[gsw] 04/08: python3 changes now uptream

Alastair McKinstry mckinstry at moszumanska.debian.org
Wed May 3 10:36:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository gsw.

commit fd051c5efdbeb75f7b64884ff028c11720771491
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Tue May 2 16:55:50 2017 +0100

    python3 changes now uptream
---
 debian/changelog             |  1 +
 debian/patches/python3.patch | 72 --------------------------------------------
 debian/patches/series        |  2 --
 3 files changed, 1 insertion(+), 74 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f2475ff..3da7a2e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 gsw (3.1.1-1) UNRELEASED; urgency=medium
 
   * New upstream release
+    - python3 changes now uptream
 
  -- Alastair McKinstry <mckinstry at debian.org>  Tue, 02 May 2017 16:53:43 +0100
 
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
deleted file mode 100644
index 08a421f..0000000
--- a/debian/patches/python3.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Author: Alastair McKinstry <mckinstry at debian.org>
-Description: Python3 support. Code is python2,3 neutral.
-Last-Updated: 2017-04-24
-Forwarded: no
-
-Index: gsw-3.0.6/gsw/test/test_octave.py
-===================================================================
---- gsw-3.0.6.orig/gsw/test/test_octave.py
-+++ gsw-3.0.6/gsw/test/test_octave.py
-@@ -230,7 +230,7 @@ if __name__ == '__main__':
-     outcomes = ['passed', 'no_octave', 'no_python', 'failed', 'no_comparison']
-     results = dict([(k, list()) for k in outcomes])
- 
--    for name, (function, args) in library.items():
-+    for name, (function, args) in list(library.items()):
-         ret = compare_results(name, function, args, octave)
-         results[ret].append(name)
- 
-Index: gsw-3.0.6/gsw/utilities/utilities.py
-===================================================================
---- gsw-3.0.6.orig/gsw/utilities/utilities.py
-+++ gsw-3.0.6/gsw/utilities/utilities.py
-@@ -128,7 +128,7 @@ class Bunch(dict):
-             newkw.update(d)
-         newkw.update(kw)
-         self._check_strict(strict, newkw)
--        dsub = dict([(k, v) for (k, v) in newkw.items() if k in self])
-+        dsub = dict([(k, v) for (k, v) in list(newkw.items()) if k in self])
-         self.update(dsub)
- 
-     def update_None(self, *args, **kw):
-@@ -142,7 +142,7 @@ class Bunch(dict):
-             newkw.update(d)
-         newkw.update(kw)
-         self._check_strict(strict, newkw)
--        dsub = dict([(k, v) for (k, v) in newkw.items()
-+        dsub = dict([(k, v) for (k, v) in list(newkw.items())
-                                 if k in self and self[k] is None])
-         self.update(dsub)
- 
-@@ -179,6 +179,13 @@ class Cache_npz(object):
- _npz_cache = Cache_npz()
- 
- 
-+def iteritems(d):
-+    'Factor-out Py2-to-3 differences in dictionary item iterator methods'
-+    try:
-+         return d.iteritems()
-+    except AttributeError:
-+         return d.items()
-+
- def repair_npzfile_with_objects(infile, outfile):
-     """
-     Read an npz file written based on scipy.io.loadmat,
-@@ -192,7 +199,7 @@ def repair_npzfile_with_objects(infile,
-     """
-     dat = np.load(infile)
-     out = dict()
--    for k, v in dat.items():
-+    for k, v in list(dat.items()):
-         if v.dtype.kind == 'O':
-             v = v.item()
-         out[k] = v
-@@ -397,7 +404,7 @@ def loadmatbunch(fname, masked=True):
-     out = Bunch()
-     fobj = open(fname, 'rb')
-     xx = loadmat(fobj)
--    keys = [k for k in xx.keys() if not k.startswith("__")]
-+    keys = [k for k in list(xx.keys()) if not k.startswith("__")]
-     for k in keys:
-         out[k] = _structured_to_bunch(xx[k], masked=masked)
-     fobj.close()
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index d071b99..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-# remove-setuptools.patch
-python3.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gsw.git



More information about the debian-science-commits mailing list