SHA256
1
0
forked from pool/fetchmail
fetchmail/fetchmailconf-no-more-future.patch
David Anes d3d6f67ccb Accepting request 1139330 from home:StevenK:branches:server:mail
- Add patch fetchmailconf-no-more-future.patch:
  * Drop requirement for python-future from fetchmailconf.

OBS-URL: https://build.opensuse.org/request/show/1139330
OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=155
2024-01-17 07:42:14 +00:00

46 lines
1.6 KiB
Diff

Index: fetchmail-6.4.37/fetchmailconf.py
===================================================================
--- fetchmail-6.4.37.orig/fetchmailconf.py
+++ fetchmail-6.4.37/fetchmailconf.py
@@ -3,21 +3,12 @@
# A GUI configurator for generating fetchmail configuration files.
# by Eric S. Raymond, <esr@snark.thyrsus.com>,
# Matthias Andree <matthias.andree@gmx.de>
-# Requires Python with Tkinter, and the following OS-dependent services:
+# Requires Python 3.4+ with Tkinter, and the following OS-dependent services:
# posix, posixpath, socket
# WARNING: this needs to be updated for fetchmail 6.4's SSL options,
# and other recent new options;
-from __future__ import print_function
-from __future__ import division
-from past.builtins import execfile
-from future import standard_library
-standard_library.install_aliases()
-from builtins import str
-from builtins import range
-from past.utils import old_div
-from builtins import object
import sys
import time
import os
@@ -37,7 +28,7 @@ except:
VERSION = "1.63.5"
-MIN_PY = (2, 7, 13)
+MIN_PY = (3, 4, 0)
if sys.version_info < MIN_PY:
sys.exit("fetchmailconf: Python %s.%s.%s or later is required.\n" % MIN_PY)
@@ -535,7 +526,7 @@ class LabeledEntry(Frame):
def ButtonBar(frame, legend, ref, alternatives, depth, command):
# array of radio buttons, caption to left, picking from a string list
bbar = Frame(frame)
- width = old_div((len(alternatives)+1), depth)
+ width = len(alternatives)+1 // depth
Label(bbar, text=legend).pack(side=LEFT)
for column in range(width):
subframe = Frame(bbar)