[med-svn] [Git][med-team/cycle][master] 2 commits: Follow another hint from peter green: Python2 style division implemented for...

Andreas Tille gitlab at salsa.debian.org
Mon Sep 16 14:18:38 BST 2019



Andreas Tille pushed to branch master at Debian Med / cycle


Commits:
d4d379e6 by Andreas Tille at 2019-09-16T12:55:13Z
Follow another hint from peter green: Python2 style division implemented for Python3: Division now produces integer result

- - - - -
f6adf88a by Andreas Tille at 2019-09-16T13:11:22Z
Another string to bytes conversion

- - - - -


1 changed file:

- debian/patches/python3_migration_warning.patch


Changes:

=====================================
debian/patches/python3_migration_warning.patch
=====================================
@@ -18,3 +18,38 @@ Last-Update: Fri, 06 Sep 2019 14:57:13 +0200
      dlg = wx.TextEntryDialog(parent, _('Enter your name:'),_('New user'),'',
           style=wx.OK | wx.CANCEL)
      while dlg.ShowModal()==wx.ID_OK:
+--- a/p_rotor.py
++++ b/p_rotor.py
+@@ -160,7 +160,7 @@ class newrotor(object):
+                     positions.append(rand(i))
+                     erotor = id_rotor[:]
+                     drotor = id_rotor[:]
+-                    drotor[i] = erotor[i] = 1 + 2*rand(i/2) # increment
++                    drotor[i] = erotor[i] = 1 + 2*rand(i//2) # increment
+                     while i > 1:
+                         r = rand(i)
+                         i -= 1
+@@ -200,9 +200,9 @@ def random_func(key):
+ 
+     # Oh, dear, for compatibility, we must evaluate the first seed transition
+     # the hard way, later it becomes much simpler
+-    x = 171 * (x % 177) - 2  * (x/177)
+-    y = 172 * (y % 176) - 35 * (y/176)
+-    z = 170 * (z % 178) - 63 * (z/178)
++    x = 171 * (x % 177) - 2  * (x//177)
++    y = 172 * (y % 176) - 35 * (y//176)
++    z = 170 * (z % 178) - 63 * (z//178)
+     if x < 0: x += 30269
+     if y < 0: y += 30307
+     if z < 0: z += 30323
+--- a/save_load.py
++++ b/save_load.py
+@@ -44,7 +44,7 @@ def Save_Cycle(name='cycle', passwd='123
+         objSave.append(['colour', [d, cal_year.cycle.colour_set[d].Get()] ])
+ 
+     tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )
+-    tmp="UserName="+pickle.dumps(name)+"==="+tmp
++    tmp=b"UserName="+pickle.dumps(name)+b"==="+tmp
+     p, f_name=get_f_name(file)
+ 
+     if not os.path.exists(p):



View it on GitLab: https://salsa.debian.org/med-team/cycle/compare/e95107308b3aef557eda507bcd118f2c1d4779a0...f6adf88a59d858d56f8d4490cfd198f360fdc526

-- 
View it on GitLab: https://salsa.debian.org/med-team/cycle/compare/e95107308b3aef557eda507bcd118f2c1d4779a0...f6adf88a59d858d56f8d4490cfd198f360fdc526
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190916/b10e9240/attachment-0001.html>


More information about the debian-med-commit mailing list