[odb-api] 01/19: py3 fixes
Alastair McKinstry
mckinstry at moszumanska.debian.org
Fri Sep 1 13:18:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository odb-api.
commit b3ca5a9a32c4019af382162e45c19b1873000721
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Wed Aug 30 14:35:52 2017 +0100
py3 fixes
---
debian/patches/py3-port.patch | 32 ++++++++++++++++++++++++++++++++
debian/patches/python3.patch | 25 ++-----------------------
debian/patches/series | 1 +
3 files changed, 35 insertions(+), 23 deletions(-)
diff --git a/debian/patches/py3-port.patch b/debian/patches/py3-port.patch
new file mode 100644
index 0000000..5c73450
--- /dev/null
+++ b/debian/patches/py3-port.patch
@@ -0,0 +1,32 @@
+Description: Changes needed for Python3
+Author: Alastair McKinstry <mckinstry at debian.org>
+Last-Updated: 2017-08-30
+Forwarded: no
+
+Index: odb-api-0.17.1/odb_api/src/odb_api/IteratorProxy.h
+===================================================================
+--- odb-api-0.17.1.orig/odb_api/src/odb_api/IteratorProxy.h
++++ odb-api-0.17.1/odb_api/src/odb_api/IteratorProxy.h
+@@ -232,19 +232,19 @@ public:
+ if (PyUnicode_Check(i))
+ {
+ //cerr << "__getitem__: start: PyString " << PyString_AsString(PyObject_Repr(i)) << std::endl;
+- return getitem(PyUnicode_AsUTF8String(i));
++ return getitem(PyUnicode_AsUTF8(i));
+ }
+ if (PyUnicode_Check(i))
+ {
+ //cerr << "__getitem__: we've got a PySliceObject here: ";
+- return getslice((PySliceObject*) i);
++ return getslice( i);
+ }
+
+ long li = PyLong_AsLong(i);
+ return getitem(li);
+ }
+
+- PyObject* getslice(PySliceObject* slice)
++ PyObject* getslice(PyObject* slice)
+ {
+ //cerr << "__getslice__(PySliceObject*):" << std::endl;
+ Py_ssize_t start = 0, stop = 0, step = 0, slicelength = 0;
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
index 313a7be..82d93a1 100644
--- a/debian/patches/python3.patch
+++ b/debian/patches/python3.patch
@@ -1,28 +1,7 @@
-Description: <short summary of the patch>
- TODO: Put a short summary on the line above and replace this paragraph
- with a longer explanation of this change. Complete the meta-information
- with other relevant fields (see below for details). To make it easier, the
- information below has been extracted from the changelog. Adjust it or drop
- it.
- .
- odb-api (0.17.1-1) UNRELEASED; urgency=medium
- .
- * Initial release. (Closes: #873067)
+Description: Changes to Python code for py2/py3 agnostism
Author: Alastair McKinstry <mckinstry at debian.org>
-Bug-Debian: https://bugs.debian.org/873067
-
----
-The information above should follow the Patch Tagging Guidelines, please
-checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Origin: <vendor|upstream|other>, <url of original patch>
-Bug: <url in upstream bugtracker>
-Bug-Debian: https://bugs.debian.org/<bugnumber>
-Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
-Forwarded: <no|not-needed|url proving that it has been forwarded>
-Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2017-08-29
+Forwarded: no
--- odb-api-0.17.1.orig/odb-tools/src/migrator/pyodbdump_example.py
+++ odb-api-0.17.1/odb-tools/src/migrator/pyodbdump_example.py
diff --git a/debian/patches/series b/debian/patches/series
index c1dbcb3..ddf6c5d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
#unique_ptr.patch
shared_lib.patch
python3.patch
+py3-port.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/odb-api.git
More information about the debian-science-commits
mailing list