[Python-modules-commits] [python-pynzb] 04/04: merge patched into master
Carl Suster
arcresu-guest at moszumanska.debian.org
Thu Jan 12 01:29:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
arcresu-guest pushed a commit to branch master
in repository python-pynzb.
commit 59db9437f966b82137e6a3b3660e1818d51b7868
Merge: 6ea53df bb4f526
Author: Carl Suster <carl at contraflo.ws>
Date: Thu Jan 12 12:24:53 2017 +1100
merge patched into master
debian/.git-dpm | 4 ++--
debian/patches/0001-set-message_id-properly-in-expat-parser.patch | 4 +++-
debian/patches/0002-enable-use_2to3-in-setup.py.patch | 3 ++-
debian/patches/0003-give-lxml-etree-BytesIO-in-Python-3.patch | 4 +++-
4 files changed, 10 insertions(+), 5 deletions(-)
diff --cc debian/.git-dpm
index f93cbbb,0000000..9ae02eb
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
+# see git-dpm(1) from git-dpm package
- 591e67b26a2d694d5aae2d77985eab4d8daf2d9e
- 591e67b26a2d694d5aae2d77985eab4d8daf2d9e
++bb4f526aa0b6664b45d38c64b546e783407034b6
++bb4f526aa0b6664b45d38c64b546e783407034b6
+124074ce42e5d83c71e028a8757afb392cc96548
+124074ce42e5d83c71e028a8757afb392cc96548
+python-pynzb_0.1.0.orig.tar.gz
+cf39d7f32c15f281ab81b0043b4068d101a2cd1f
+5598
diff --cc debian/patches/0001-set-message_id-properly-in-expat-parser.patch
index 2ed07ab,0000000..90441ec
mode 100644,000000..100644
--- a/debian/patches/0001-set-message_id-properly-in-expat-parser.patch
+++ b/debian/patches/0001-set-message_id-properly-in-expat-parser.patch
@@@ -1,24 -1,0 +1,26 @@@
- From 0a5a3e9b44be1ec1a150c027a07754a53f039189 Mon Sep 17 00:00:00 2001
++From 14d1c8d4ff4bbf5b942d553fa8638decef9f41c9 Mon Sep 17 00:00:00 2001
+From: Carl Suster <carl at contraflo.ws>
+Date: Mon, 9 Jan 2017 11:57:13 +1100
+Subject: set message_id properly in expat parser
+
+Upstream had a typo in the expat parser wrapper which called the
+non-existent message_id() when set_message_id() was intended.
++
++Forwarded: https://github.com/ericflo/pynzb/pull/4
+---
+ pynzb/expat_nzb.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pynzb/expat_nzb.py b/pynzb/expat_nzb.py
+index 5c1b096..313dee6 100644
+--- a/pynzb/expat_nzb.py
++++ b/pynzb/expat_nzb.py
+@@ -22,7 +22,7 @@ class ExpatNZBParser(BaseNZBParser):
+ elif name == 'group':
+ self.current_file.add_group(self.current_data)
+ elif name == 'segment':
+- self.current_segment.message_id(self.current_data)
++ self.current_segment.set_message_id(self.current_data)
+ self.current_file.add_segment(self.current_segment)
+
+ def char_data(self, data):
diff --cc debian/patches/0002-enable-use_2to3-in-setup.py.patch
index 16f2a85,0000000..83e6bf7
mode 100644,000000..100644
--- a/debian/patches/0002-enable-use_2to3-in-setup.py.patch
+++ b/debian/patches/0002-enable-use_2to3-in-setup.py.patch
@@@ -1,21 -1,0 +1,22 @@@
- From 01027917584eafdf4228bf0590123dfd47fe14a8 Mon Sep 17 00:00:00 2001
++From db99bb2f8b4bc56c6ba91d5dab84ec042bb777ec Mon Sep 17 00:00:00 2001
+From: Carl Suster <carl at contraflo.ws>
+Date: Wed, 11 Jan 2017 22:23:32 +1100
+Subject: enable use_2to3 in setup.py
+
++Forwarded: https://github.com/ericflo/pynzb/pull/5
+---
+ setup.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 0fd9d51..62f1ff3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -168,4 +168,5 @@ setup(
+ include_package_data=True,
+ zip_safe=False,
+ install_requires=['setuptools'],
+-)
+\ No newline at end of file
++ use_2to3=True,
++)
diff --cc debian/patches/0003-give-lxml-etree-BytesIO-in-Python-3.patch
index aac136f,0000000..7289d6a
mode 100644,000000..100644
--- a/debian/patches/0003-give-lxml-etree-BytesIO-in-Python-3.patch
+++ b/debian/patches/0003-give-lxml-etree-BytesIO-in-Python-3.patch
@@@ -1,40 -1,0 +1,42 @@@
- From 591e67b26a2d694d5aae2d77985eab4d8daf2d9e Mon Sep 17 00:00:00 2001
++From bb4f526aa0b6664b45d38c64b546e783407034b6 Mon Sep 17 00:00:00 2001
+From: Carl Suster <carl at contraflo.ws>
+Date: Wed, 11 Jan 2017 22:34:34 +1100
+Subject: give lxml etree BytesIO in Python 3
+
+The lxml etree API changed in Python 3 to take BytesIO instead of
+StringIO. This patch maintains the original behaviour in Python 2 but
+switches to BytesIO in Python 3, decoding the XML data as UTF-8.
++
++Forwarded: https://github.com/ericflo/pynzb/pull/6
+---
+ pynzb/lxml_nzb.py | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/pynzb/lxml_nzb.py b/pynzb/lxml_nzb.py
+index 790671d..e74ba34 100644
+--- a/pynzb/lxml_nzb.py
++++ b/pynzb/lxml_nzb.py
+@@ -6,11 +6,17 @@ except ImportError:
+ raise ImportError("You must have lxml installed before you can use the " +
+ "lxml NZB parser.")
+
+-try:
+- from cStringIO import StringIO
+-except ImportError:
+- from StringIO import StringIO
++import sys
++if sys.version_info.major < 3:
++ try:
++ from cStringIO import StringIO
++ except ImportError:
++ from StringIO import StringIO
++ def as_io(xml): return StringIO(xml)
++else:
++ from io import BytesIO
++ def as_io(xml): return BytesIO(bytes(xml, 'utf-8'))
+
+ class LXMLNZBParser(BaseETreeNZBParser):
+ def get_etree_iter(self, xml, et=etree):
+- return iter(et.iterparse(StringIO(xml), events=("start", "end")))
+\ No newline at end of file
++ return iter(et.iterparse(as_io(xml), events=("start", "end")))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pynzb.git
More information about the Python-modules-commits
mailing list