[Python-modules-commits] r25851 - in packages/feedparser/trunk/debian (3 files)
emillon-guest at users.alioth.debian.org
emillon-guest at users.alioth.debian.org
Thu Sep 12 21:32:10 UTC 2013
Date: Thursday, September 12, 2013 @ 21:32:08
Author: emillon-guest
Revision: 25851
pick patch to fix compatibility with chardet
Added:
packages/feedparser/trunk/debian/patches/chardet.diff
Modified:
packages/feedparser/trunk/debian/changelog
packages/feedparser/trunk/debian/patches/series
Modified: packages/feedparser/trunk/debian/changelog
===================================================================
--- packages/feedparser/trunk/debian/changelog 2013-09-12 21:15:22 UTC (rev 25850)
+++ packages/feedparser/trunk/debian/changelog 2013-09-12 21:32:08 UTC (rev 25851)
@@ -1,6 +1,8 @@
feedparser (5.1.3-1) UNRELEASED; urgency=low
* New upstream release (Closes: #721768).
+ - Cherry-pick a patch to make python3-feedparser
+ compatible with python3-chardet.
* Update my email address.
* Remove useless override now that Lintian knows about python3-feedparser.
Added: packages/feedparser/trunk/debian/patches/chardet.diff
===================================================================
--- packages/feedparser/trunk/debian/patches/chardet.diff (rev 0)
+++ packages/feedparser/trunk/debian/patches/chardet.diff 2013-09-12 21:32:08 UTC (rev 25851)
@@ -0,0 +1,29 @@
+Bug: http://code.google.com/p/feedparser/issues/detail?id=384
+Origin: commit:20a32910f4a521788ba93a8c809cf0db702bed5b
+Author: Kurt McKee <contactme at kurtmckee.org>
+Date: Mon Dec 17 10:41:13 2012 -0600
+
+ Fix chardet support in Python 3
+
+ Fixes issue 384.
+ Thanks to Google user Arfrever.TFA for reporting this!
+
+diff --git a/NEWS b/NEWS
+index 4553afa..2ef71c8 100644
+diff --git a/feedparser/feedparser.py b/feedparser/feedparser.py
+index c78e6a3..e977ae8 100644
+--- a/feedparser/feedparser.py
++++ b/feedparser/feedparser.py
+@@ -3766,7 +3766,11 @@ def convert_to_utf8(http_headers, data):
+ chardet_encoding = None
+ tried_encodings = []
+ if chardet:
+- chardet_encoding = unicode(chardet.detect(data)['encoding'] or '', 'ascii', 'ignore')
++ chardet_encoding = chardet.detect(data)['encoding']
++ if not chardet_encoding:
++ chardet_encoding = ''
++ if not isinstance(chardet_encoding, unicode):
++ chardet_encoding = unicode(chardet_encoding, 'ascii', 'ignore')
+ # try: HTTP encoding, declared XML encoding, encoding sniffed from BOM
+ for proposed_encoding in (rfc3023_encoding, xml_encoding, bom_encoding,
+ chardet_encoding, u'utf-8', u'windows-1252', u'iso-8859-2'):
Modified: packages/feedparser/trunk/debian/patches/series
===================================================================
--- packages/feedparser/trunk/debian/patches/series 2013-09-12 21:15:22 UTC (rev 25850)
+++ packages/feedparser/trunk/debian/patches/series 2013-09-12 21:32:08 UTC (rev 25851)
@@ -1 +1,2 @@
sgmllib3.patch
+chardet.diff
More information about the Python-modules-commits
mailing list