pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/py-feedparser5 py-feedparser5: Compatibility ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/605015e43cae
branches:  trunk
changeset: 457167:605015e43cae
user:      nia <nia%pkgsrc.org@localhost>
date:      Thu Aug 19 19:21:00 2021 +0000

description:
py-feedparser5: Compatibility with Python 3.9

diffstat:

 textproc/py-feedparser5/Makefile                               |   3 +-
 textproc/py-feedparser5/distinfo                               |   3 +-
 textproc/py-feedparser5/patches/patch-feedparser_feedparser.py |  22 ++++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r 0987dccab90d -r 605015e43cae textproc/py-feedparser5/Makefile
--- a/textproc/py-feedparser5/Makefile  Thu Aug 19 16:29:09 2021 +0000
+++ b/textproc/py-feedparser5/Makefile  Thu Aug 19 19:21:00 2021 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2020/10/13 12:16:39 schmonz Exp $
+# $NetBSD: Makefile,v 1.2 2021/08/19 19:21:00 nia Exp $
 
 DISTNAME=              feedparser-5.2.1
 PKGNAME=               ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=           1
 CATEGORIES=            textproc python
 MASTER_SITES=          ${MASTER_SITE_PYPI:=f/feedparser/}
 
diff -r 0987dccab90d -r 605015e43cae textproc/py-feedparser5/distinfo
--- a/textproc/py-feedparser5/distinfo  Thu Aug 19 16:29:09 2021 +0000
+++ b/textproc/py-feedparser5/distinfo  Thu Aug 19 19:21:00 2021 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2020/10/13 12:16:39 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2021/08/19 19:21:00 nia Exp $
 
 SHA1 (feedparser-5.2.1.tar.gz) = 84f05bf1d1443cc55b9893e2cb5aa2b16ab55dec
 RMD160 (feedparser-5.2.1.tar.gz) = d48648b794bdd8af38e77b8337ac2241d79bca4c
 SHA512 (feedparser-5.2.1.tar.gz) = 1fd0c4324e2eff8ef4b15e3793c767290bca562af4a5056fdbdfa12411095530c87a113bb1b9757e532ff63aecb399b18f1e6b753884798eb6b8d3fdf575af81
 Size (feedparser-5.2.1.tar.gz) = 252956 bytes
+SHA1 (patch-feedparser_feedparser.py) = dd96707b0a85cd0d2f40dea2e7cd14f3235a905c
diff -r 0987dccab90d -r 605015e43cae textproc/py-feedparser5/patches/patch-feedparser_feedparser.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-feedparser5/patches/patch-feedparser_feedparser.py    Thu Aug 19 19:21:00 2021 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-feedparser_feedparser.py,v 1.1 2021/08/19 19:21:00 nia Exp $
+
+Fix compatibility with Python 3.9.
+
+Backported from:
+https://github.com/kurtmckee/feedparser/pull/206
+https://bugzilla.redhat.com/show_bug.cgi?id=1807186
+
+--- feedparser/feedparser.py.orig      2015-07-24 05:00:04.000000000 +0000
++++ feedparser/feedparser.py
+@@ -90,7 +90,10 @@ except ImportError:
+     base64 = binascii = None
+ else:
+     # Python 3.1 deprecates decodestring in favor of decodebytes
+-    _base64decode = getattr(base64, 'decodebytes', base64.decodestring)
++    try:
++        _base64decode = base64.decodebytes
++    except AttributeError:
++        _base64decode = base64.decodestring
+ 
+ # _s2bytes: convert a UTF-8 str to bytes if the interpreter is Python 3
+ # _l2bytes: convert a list of ints to bytes if the interpreter is Python 3



Home | Main Index | Thread Index | Old Index