Notification time stamped 2020-12-31 23:15:25 UTC
From d311da7a972d4c82a008a157f001395983d04251 Mon Sep 17 00:00:00 2001
From: Kevin Fenzi <kevin(a)scrye.com>
Date: Dec 31 2020 23:15:17 +0000
Subject: Update to 6.0.3. Upstream is python3 only now.
re-enable tests, since they now all pass.
---
diff --git a/.gitignore b/.gitignore
index c5f894d..93ffe9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/feedparser-*.tar.bz2
+/feedparser-6.0.2.tar.gz
diff --git a/0001-Don-t-always-expect-base64.decodestring-to-exist.patch
b/0001-Don-t-always-expect-base64.decodestring-to-exist.patch
deleted file mode 100644
index b79e121..0000000
--- a/0001-Don-t-always-expect-base64.decodestring-to-exist.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 696d957e13d1bc5b2034dcd637bc088cc4646a53 Mon Sep 17 00:00:00 2001
-From: Adam Williamson <awilliam(a)redhat.com>
-Date: Fri, 15 May 2020 09:15:20 -0700
-Subject: [PATCH] Don't always expect base64.decodestring to exist
-
-This does the same as before, but in such a way as not to fail if
-`base64.decodestring` doesn't exist at all - as is the case in
-Python 3.9.
-
-This is a backport of #206 on top of 5.2.1.
-
-Signed-off-by: Adam Williamson <awilliam(a)redhat.com>
----
- feedparser/feedparser.py | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/feedparser/feedparser.py b/feedparser/feedparser.py
-index 999cb0d..1548db8 100644
---- a/feedparser/feedparser.py
-+++ b/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
---
-2.26.2
-
diff --git a/feedparser-5.1.3-tests-py3.patch b/feedparser-5.1.3-tests-py3.patch
deleted file mode 100644
index c6cf4bc..0000000
--- a/feedparser-5.1.3-tests-py3.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -Nur feedparser-5.1.3-orig/feedparser/feedparsertest.py
feedparser-5.1.3/feedparser/feedparsertest.py
---- feedparser-5.1.3-orig/feedparser/feedparsertest.py 2012-12-09 17:18:06.000000000
+0100
-+++ feedparser-5.1.3/feedparser/feedparsertest.py 2013-03-09 11:38:04.664372770 +0100
-@@ -163,9 +163,9 @@
- try:
- if not eval(evalString, globals(), env):
- failure=(msg or 'not eval(%s) \nWITH env(%s)' % (evalString,
pprint.pformat(env)))
-- raise self.failureException, failure
-+ raise self.failureException(failure)
- if not everythingIsUnicode(env):
-- raise self.failureException, "not everything is unicode \nWITH
env(%s)" % (pprint.pformat(env), )
-+ raise self.failureException("not everything is unicode \nWITH
env(%s)" % (pprint.pformat(env), ))
- except SyntaxError:
- # Python 3 doesn't have the `u""` syntax, so evalString needs to
be modified,
- # which will require the failure message to be updated
-@@ -173,7 +173,7 @@
- evalString = re.sub(unicode2_re, _s2bytes(' "'), evalString)
- if not eval(evalString, globals(), env):
- failure=(msg or 'not eval(%s) \nWITH env(%s)' % (evalString,
pprint.pformat(env)))
-- raise self.failureException, failure
-+ raise self.failureException(failure)
-
- class BaseTestCase(unittest.TestCase):
- failUnlessEval = failUnlessEval
-@@ -742,7 +742,7 @@
- skipUnless = '1'
- search_results = desc_re.search(data)
- if not search_results:
-- raise RuntimeError, "can't parse %s" % xmlfile
-+ raise RuntimeError("can't parse %s" % xmlfile)
- description, evalString = map(lambda s: s.strip(), list(search_results.groups()))
- description = xmlfile + ": " + unicode(description, 'utf8')
- return description, evalString, skipUnless
diff --git a/python-feedparser.spec b/python-feedparser.spec
index e38658f..f7b3b35 100644
--- a/python-feedparser.spec
+++ b/python-feedparser.spec
@@ -1,22 +1,13 @@
-%global srcname feedparser
+%global pypi_name feedparser
Name: python-feedparser
-Version: 5.2.1
-Release: 17%{?dist}
+Version: 6.0.2
+Release: 1%{?dist}
Summary: Parse RSS and Atom feeds in Python
License: BSD
URL:
https://github.com/kurtmckee/feedparser
-Source0:
https://pypi.python.org/packages/source/f/%{srcname}/%{srcname}-%{version...
-
-# shows that for Python 3 the test-suite fails early with
-# ImportError: No module named 'BaseHTTPServer'
-Patch0: feedparser-5.1.3-tests-py3.patch
-
-# Fix for decodestring being removed in Python 3.9
-#
https://github.com/kurtmckee/feedparser/pull/206
-# backported to 5.2.1
-Patch1: 0001-Don-t-always-expect-base64.decodestring-to-exist.patch
+Source0: %{pypi_source}
BuildArch: noarch
@@ -27,10 +18,11 @@ Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0,
Atom 0.3, Atom 1.0, and CDF feeds. It also parses several popular extension
modules, including Dublin Core and Apple's iTunes extensions.
-%package -n python3-%{srcname}
+%package -n python3-%{pypi_name}
Summary: Parse RSS and Atom feeds in Python
BuildRequires: python3-devel
BuildRequires: python3-setuptools
+BuildRequires: python3-sgmllib3k
## TODO: Decide on these, also with regard to explicit "Requires".
## Optional imports at run-time and influence the test-suite, too,
@@ -47,7 +39,7 @@ BuildRequires: python3-setuptools
%{?python_provide:%python_provide python3-feedparser}
-%description -n python3-%{srcname}
+%description -n python3-%{pypi_name}
Universal Feed Parser is a Python module for downloading and parsing
syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91,
Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0,
@@ -67,7 +59,7 @@ The documentation is also included in source form (Sphinx ReST).
%prep
-%autosetup -p1 -n %{srcname}-%{version}
+%autosetup -p1 -n %{pypi_name}-%{version}
find -type f -exec sed -i 's/\r//' {} ';'
find -type f -exec chmod 0644 {} ';'
@@ -86,17 +78,14 @@ sphinx-build -b html -d __tmp_docs/ docs/ __tmp_docs/html/
%check
-pushd feedparser
-PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} feedparsertest.py || :
-popd
+PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} tests/runtests.py || :
-%files -n python3-%{srcname}
+%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst NEWS
-%{python3_sitelib}/%{srcname}.py
-%{python3_sitelib}/__pycache__/%{srcname}.*.pyc
-%{python3_sitelib}/%{srcname}-*.egg-info/
+%{python3_sitelib}/%{pypi_name}
+%{python3_sitelib}/%{pypi_name}-*.egg-info/
%files doc
%doc LICENSE __tmp_docs/html/
@@ -105,6 +94,10 @@ popd
%changelog
+* Thu Dec 31 2020 Kevin Fenzi <kevin(a)scrye.com> - 6.0.2-1
+- Update to 6.0.3. Upstream is python3 only now.
+- re-enable tests, since they now all pass.
+
* Wed Jul 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.2.1-17
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
diff --git a/sources b/sources
index f731851..b906f93 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (feedparser-5.2.1.tar.bz2) =
f0ff50464dced40be46f7810791938a2a384edbdf71dcb58edd9342042a4e80aa2140b6f604c4cdbca8a8c70d0f6fdc5a0c1aa37994d2893f0bb0038633ac9b7
+SHA512 (feedparser-6.0.2.tar.gz) =
4b6d6baf6560280e0364ebe00687dd2903dede77319176a4055909390fcd6c748780e805da16e4290916c56209af290f82edd5bdd6459abca85332b4ff348891
https://src.fedoraproject.org/rpms/python-feedparser/c/d311da7a972d4c82a0...