Skip to content
Commits on Source (5)
cycle (0.3.1-16) unstable; urgency=medium
Cycle was converted to Python3 by the Debian Med team since
Python2 will be removed from Debian 11.
If you notice any issues that might be connected to this conversion
please do
reportbug cycle
to let us know.
-- Andreas Tille <tille@debian.org> Wed, 11 Sep 2019 15:32:06 +0200
......@@ -3,6 +3,7 @@ cycle (0.3.1-16) UNRELEASED; urgency=medium
* Team upload.
* Redo 2to3 patch, wxPython 4 migration
Closes: #939181
* Inform users about Python3 migration in NEWS.Debian
-- Andreas Tille <tille@debian.org> Wed, 11 Sep 2019 15:32:06 +0200
......
......@@ -3,3 +3,4 @@ README_de.html
README.html
README_ru.html
THANKS
debian/NEWS.Debian
......@@ -2570,8 +2570,12 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
_('more' 'than' 'one' 'string')
--- a/p_rotor.py
+++ b/p_rotor.py
@@ -80,11 +80,11 @@ class newrotor(object):
for c in map(ord, buf):
@@ -77,14 +77,14 @@ class newrotor(object):
size, nr, rotors, pos = self.get_rotors(do_decrypt)
outbuf = []
append = outbuf.append
- for c in map(ord, buf):
+ for c in buf:
if do_decrypt:
# Apply decrypt rotors and xor in reverse order
- for i in xrange(nr-1,-1,-1):
......@@ -2584,7 +2588,7 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
c = rotors[i][c ^ pos[i]]
append(c)
@@ -96,7 +96,7 @@ class newrotor(object):
@@ -96,11 +96,11 @@ class newrotor(object):
# Masking with 0xff simulates this behavior.
#
pnew = 0 # (pnew >= size) works as "carry bit"
......@@ -2593,6 +2597,11 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
pnew = ((pos[i] + (pnew >= size)) & 0xff) + rotors[i][size]
pos[i] = pnew % size
- return ''.join(map(chr, outbuf))
+ return bytes(outbuf)
def get_rotors(self, do_decrypt):
# Return a tuple (size, nr, rotors, positions) where
@@ -146,7 +146,7 @@ class newrotor(object):
# Generate identity permutation for 8-bit bytes plus an
# (unused) increment value
......@@ -2611,6 +2620,15 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
i = size
positions.append(rand(i))
erotor = id_rotor[:]
@@ -184,7 +184,7 @@ def random_func(key):
x=995
y=576
z=767
- for c in map(ord, key):
+ for c in key:
x = (((x<<3 | x>>13) + c) & mask)
y = (((y<<3 | y>>13) ^ c) & mask)
z = (((z<<3 | z>>13) - c) & mask)
--- a/save_load.py
+++ b/save_load.py
@@ -1,10 +1,10 @@
......@@ -2636,6 +2654,15 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
import cal_year
try:
import rotor
@@ -24,7 +24,7 @@ def Save_Cycle(name='cycle', passwd='123
"""
objSave=[]
m=hashlib.md5()
- m.update(passwd)
+ m.update(passwd.encode())
rt=rotor.newrotor(m.digest())
objSave.append(['period', cal_year.cycle.period])
objSave.append(['by_average', cal_year.cycle.by_average])
@@ -32,23 +32,23 @@ def Save_Cycle(name='cycle', passwd='123
objSave.append(['first_week_day', cal_year.cycle.first_week_day])
objSave.append(['note', cal_year.cycle.note])
......@@ -2660,7 +2687,7 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
- tmp=rt.encrypt( 'Cycle'+cPickle.dumps(objSave) )
- tmp="UserName="+cPickle.dumps(name)+"==="+tmp
+ tmp=rt.encrypt( 'Cycle'+pickle.dumps(objSave) )
+ tmp = rt.encrypt('Cycle{}'.format(pickle.dumps(objSave)))
+ tmp="UserName="+pickle.dumps(name)+"==="+tmp
p, f_name=get_f_name(file)
......
Description: Warn users about issues to be expected due to Python3 migration and advise what to do
Bug-Debian: https://bugs.debian.org/939181
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
--- a/dialogs.py
+++ b/dialogs.py
@@ -326,7 +326,11 @@ def ask_name(parent=None):
"like HIV/AIDS.\n\nIt is just an electronic means of keeping track\n"
"of some of your medical data and extracting some statistical\n"
"conclusions from them. You cannot consider this program as a\n"
- "substitute for your gynecologist in any way."))
+ "substitute for your gynecologist in any way.\n\n"
+ "Please also note: This program was ported from Python2 which is\n"
+ "End Of Life since 2020-01-01 to Python3 by the Debian Med team\n"
+ "In case you might notice any issue with this program report it via\n"
+ " reportbug cycle"))
dlg = wx.TextEntryDialog(parent, _('Enter your name:'),_('New user'),'',
style=wx.OK | wx.CANCEL)
while dlg.ShowModal()==wx.ID_OK:
......@@ -11,3 +11,4 @@
07_wxpython3.0.patch
wxclientsize.patch
2to3.patch
python3_migration_warning.patch