From 3863c0bb8f1b35c6e5405d2e6db459396531e778d0620786cfa74ce59ecf802b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 20 May 2022 05:48:09 +0000 Subject: [PATCH 1/2] Accepting request 978154 from home:benoit_monin:branches:devel:languages:python - update to version 6.0.9: * Fix a crash that can occur with GeoRSS feeds that lack a tag. (#305) OBS-URL: https://build.opensuse.org/request/show/978154 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-feedparser?expand=0&rev=59 --- feedparser-6.0.8.tar.gz | 3 --- feedparser-6.0.9.tar.gz | 3 +++ python-feedparser.changes | 7 +++++++ python-feedparser.spec | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 feedparser-6.0.8.tar.gz create mode 100644 feedparser-6.0.9.tar.gz diff --git a/feedparser-6.0.8.tar.gz b/feedparser-6.0.8.tar.gz deleted file mode 100644 index 2230cf8..0000000 --- a/feedparser-6.0.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5ce0410a05ab248c8c7cfca3a0ea2203968ee9ff4486067379af4827a59f9661 -size 285827 diff --git a/feedparser-6.0.9.tar.gz b/feedparser-6.0.9.tar.gz new file mode 100644 index 0000000..e79774e --- /dev/null +++ b/feedparser-6.0.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dad42e7beaec55f99c08b2b0cf7288bc7cfd24b6f72c8ef85478bcb55648cd42 +size 286366 diff --git a/python-feedparser.changes b/python-feedparser.changes index c916a18..e7570ee 100644 --- a/python-feedparser.changes +++ b/python-feedparser.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu May 19 19:30:30 UTC 2022 - Benoît Monin + +- update to version 6.0.9: + * Fix a crash that can occur with GeoRSS feeds that lack a + tag. (#305) + ------------------------------------------------------------------- Mon Feb 7 21:02:35 UTC 2022 - Matej Cepl diff --git a/python-feedparser.spec b/python-feedparser.spec index 42f1342..1b48c83 100644 --- a/python-feedparser.spec +++ b/python-feedparser.spec @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-feedparser -Version: 6.0.8 +Version: 6.0.9 Release: 0 Summary: Universal Feed Parser Module for Python License: BSD-2-Clause From 2e3b896bedbc7a9abd16bf22d62503123454ed5a6f385b5c9b673bf723369bb1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 20 May 2022 09:29:57 +0000 Subject: [PATCH 2/2] - Add 304_python310-crash.patch fixing crash of test test_001741 on Python 3.10 (gh#kurtmckee/feedparser#304). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-feedparser?expand=0&rev=60 --- 304_python310-crash.patch | 34 ++++++++++++++++++++++++++++++++++ python-feedparser.changes | 6 ++++++ python-feedparser.spec | 8 ++++---- 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 304_python310-crash.patch diff --git a/304_python310-crash.patch b/304_python310-crash.patch new file mode 100644 index 0000000..6ec755a --- /dev/null +++ b/304_python310-crash.patch @@ -0,0 +1,34 @@ +From c55bd8ad37db89bd219783bc514d600c9523ed38 Mon Sep 17 00:00:00 2001 +From: Kurt McKee +Date: Sat, 12 Jun 2021 15:32:05 -0500 +Subject: [PATCH] Fix a crash that occurs with Python 3.10.0b2 + +--- + changelog.d/20210612_152233_kurtmckee_python3_10.rst | 4 ++++ + feedparser/html.py | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + create mode 100644 changelog.d/20210612_152233_kurtmckee_python3_10.rst + +diff --git a/changelog.d/20210612_152233_kurtmckee_python3_10.rst b/changelog.d/20210612_152233_kurtmckee_python3_10.rst +new file mode 100644 +index 00000000..3795cdc0 +--- /dev/null ++++ b/changelog.d/20210612_152233_kurtmckee_python3_10.rst +@@ -0,0 +1,4 @@ ++Fixed ++----- ++ ++* Fix a crash that occurs with Python 3.10.0b2. +diff --git a/feedparser/html.py b/feedparser/html.py +index be913311..f78270a3 100644 +--- a/feedparser/html.py ++++ b/feedparser/html.py +@@ -337,7 +337,7 @@ def parse_declaration(self, i): + + try: + return sgmllib.SGMLParser.parse_declaration(self, i) +- except sgmllib.SGMLParseError: ++ except (AssertionError, sgmllib.SGMLParseError): + # Escape the doctype declaration and continue parsing. + self.handle_data('<') + return i+1 diff --git a/python-feedparser.changes b/python-feedparser.changes index e7570ee..5e291bd 100644 --- a/python-feedparser.changes +++ b/python-feedparser.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri May 20 09:28:16 UTC 2022 - Matej Cepl + +- Add 304_python310-crash.patch fixing crash of test test_001741 + on Python 3.10 (gh#kurtmckee/feedparser#304). + ------------------------------------------------------------------- Thu May 19 19:30:30 UTC 2022 - Benoît Monin diff --git a/python-feedparser.spec b/python-feedparser.spec index 1b48c83..903cd6f 100644 --- a/python-feedparser.spec +++ b/python-feedparser.spec @@ -26,15 +26,18 @@ License: BSD-2-Clause Group: Development/Libraries/Python URL: https://github.com/kurtmckee/feedparser Source: https://files.pythonhosted.org/packages/source/f/feedparser/feedparser-%{version}.tar.gz +# PATCH-FIX-UPSTREAM 304_python310-crash.patch gh#kurtmckee/feedparser#304 mcepl@suse.com +# Fix crash on Python 3.10 +Patch0: 304_python310-crash.patch BuildRequires: %{python_module chardet} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module sgmllib3k} BuildRequires: %{python_module xml} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-sgmllib3k Requires: python-xml Recommends: python-chardet -Requires: python-sgmllib3k BuildArch: noarch %python_subpackages @@ -45,9 +48,6 @@ A universal feed parser module for Python that handles RSS 0.9x, RSS 1.0, RSS %prep %autosetup -p1 -n feedparser-%{version} -# Remove Python 3.10 non-compatible tests -rm -v tests/wellformed/sanitize/xml_declaration_unexpected_character.xml - # Make tests more verbose sed -i -e 's/verbosity=1/verbosity=2/' tests/runtests.py