diff --git a/PygmentsBridge-trime_doctest_flags.patch b/PygmentsBridge-trime_doctest_flags.patch new file mode 100644 index 0000000..20f14e6 --- /dev/null +++ b/PygmentsBridge-trime_doctest_flags.patch @@ -0,0 +1,28 @@ +--- + Doc/tools/extensions/pyspecific.py | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/Doc/tools/extensions/pyspecific.py ++++ b/Doc/tools/extensions/pyspecific.py +@@ -31,14 +31,17 @@ Body.enum.converters['loweralpha'] = \ + # doctest docs themselves + orig_visit_literal_block = HTMLTranslator.visit_literal_block + def new_visit_literal_block(self, node): ++ old_trim_doctest_flags = None + meta = self.builder.env.metadata[self.builder.current_docname] +- old_trim_doctest_flags = self.highlighter.trim_doctest_flags +- if 'keepdoctest' in meta: +- self.highlighter.trim_doctest_flags = False ++ if hasattr(self.highlighter, 'trim_doctest_flags'): ++ old_trim_doctest_flags = self.highlighter.trim_doctest_flags ++ if 'keepdoctest' in meta: ++ self.highlighter.trim_doctest_flags = False + try: + orig_visit_literal_block(self, node) + finally: +- self.highlighter.trim_doctest_flags = old_trim_doctest_flags ++ if old_trim_doctest_flags is not None: ++ self.highlighter.trim_doctest_flags = old_trim_doctest_flags + + HTMLTranslator.visit_literal_block = new_visit_literal_block + diff --git a/python-base.changes b/python-base.changes index bac3802..500eec2 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 24 20:50:27 UTC 2023 - Matej Cepl + +- Add PygmentsBridge-trime_doctest_flags.patch to allow build of + the documentation even with the current Sphinx. (SUSE-ONLY + PATCH, DO NOT SEND UPSTREAM!) + ------------------------------------------------------------------- Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl diff --git a/python-base.spec b/python-base.spec index 035f4b8..7e822db 100644 --- a/python-base.spec +++ b/python-base.spec @@ -146,6 +146,9 @@ Patch74: skip_unverified_test.patch # blocklist bypass via the urllib.parse component when supplying # a URL that starts with blank characters Patch75: CVE-2023-24329-blank-URL-bypass.patch +# PATCH-FIX-OPENSUSE PygmentsBridge-trime_doctest_flags.patch mcepl@suse.com +# Build documentation even without PygmentsBridge.trim_doctest_flags +Patch76: PygmentsBridge-trime_doctest_flags.patch # COMMON-PATCH-END %define python_version %(echo %{tarversion} | head -c 3) BuildRequires: automake @@ -293,6 +296,7 @@ other applications. %patch74 -p1 %endif %patch75 -p1 +%patch76 -p1 # For patch 66 cp -v %{SOURCE66} Lib/test/recursion.tar diff --git a/python-doc.changes b/python-doc.changes index bac3802..500eec2 100644 --- a/python-doc.changes +++ b/python-doc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 24 20:50:27 UTC 2023 - Matej Cepl + +- Add PygmentsBridge-trime_doctest_flags.patch to allow build of + the documentation even with the current Sphinx. (SUSE-ONLY + PATCH, DO NOT SEND UPSTREAM!) + ------------------------------------------------------------------- Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl diff --git a/python-doc.spec b/python-doc.spec index e42e077..d1161c5 100644 --- a/python-doc.spec +++ b/python-doc.spec @@ -27,8 +27,8 @@ URL: https://www.python.org/ Source0: %{tarname}.tar.xz # docs for current version are regenerated every day # this messes with autobuild "file changed" checks -#Source2: https://docs.python.org/%{version}/archives/python-%{pyver}-docs-pdf-a4.tar.bz2 -#Source3: https://docs.python.org/%{version}/archives/python-%{pyver}-docs-pdf-letter.tar.bz2 +#Source2: https://docs.python.org/%%{version}/archives/python-%%{pyver}-docs-pdf-a4.tar.bz2 +#Source3: https://docs.python.org/%%{version}/archives/python-%%{pyver}-docs-pdf-letter.tar.bz2 Source2: python-%{version}-docs-pdf-a4.tar.bz2 Source3: python-%{version}-docs-pdf-letter.tar.bz2 # For Patch 66 @@ -145,6 +145,9 @@ Patch74: skip_unverified_test.patch # blocklist bypass via the urllib.parse component when supplying # a URL that starts with blank characters Patch75: CVE-2023-24329-blank-URL-bypass.patch +# PATCH-FIX-OPENSUSE PygmentsBridge-trime_doctest_flags.patch mcepl@suse.com +# Build documentation even without PygmentsBridge.trim_doctest_flags +Patch76: PygmentsBridge-trime_doctest_flags.patch # COMMON-PATCH-END Provides: pyth_doc = %{version} Provides: pyth_ps = %{version} @@ -229,6 +232,7 @@ Python, and Macintosh Module Reference in PDF format. %patch74 -p1 %endif %patch75 -p1 +%patch76 -p1 # For patch 66 cp -v %{SOURCE66} Lib/test/recursion.tar @@ -270,7 +274,7 @@ done %dir %{_docdir}/python %doc %{_docdir}/python/Misc %doc %{_docdir}/python/html -#%doc %{_docdir}/python/README +#%%doc %%{_docdir}/python/README %files pdf %defattr(644,root,root,755) diff --git a/python.changes b/python.changes index bac3802..500eec2 100644 --- a/python.changes +++ b/python.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 24 20:50:27 UTC 2023 - Matej Cepl + +- Add PygmentsBridge-trime_doctest_flags.patch to allow build of + the documentation even with the current Sphinx. (SUSE-ONLY + PATCH, DO NOT SEND UPSTREAM!) + ------------------------------------------------------------------- Sun Apr 30 18:18:09 UTC 2023 - Matej Cepl diff --git a/python.spec b/python.spec index 7cf1759..96c611a 100644 --- a/python.spec +++ b/python.spec @@ -145,6 +145,9 @@ Patch74: skip_unverified_test.patch # blocklist bypass via the urllib.parse component when supplying # a URL that starts with blank characters Patch75: CVE-2023-24329-blank-URL-bypass.patch +# PATCH-FIX-OPENSUSE PygmentsBridge-trime_doctest_flags.patch mcepl@suse.com +# Build documentation even without PygmentsBridge.trim_doctest_flags +Patch76: PygmentsBridge-trime_doctest_flags.patch # COMMON-PATCH-END BuildRequires: automake BuildRequires: db-devel @@ -347,6 +350,7 @@ that rely on earlier non-verification behavior. %patch74 -p1 %endif %patch75 -p1 +%patch76 -p1 # For patch 66 cp -v %{SOURCE66} Lib/test/recursion.tar