py-feedparser5: Compatibility with Python 3.9diff -r1.1 -r1.2 pkgsrc/textproc/py-feedparser5/Makefile
(nia)
@@ -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/}
@@ -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
$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