From 320ead80ee6372187d2bac02b39e1c55e7a89c30 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 1 May 2024 03:58:01 +0300 Subject: [PATCH] import python-sphinx-3.4.3-8.el9 --- ...autodoc-build-with-extension-modules.patch | 25 +++++++++++++++++++ SPECS/python-sphinx.spec | 15 ++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 SOURCES/Enable-autodoc-build-with-extension-modules.patch diff --git a/SOURCES/Enable-autodoc-build-with-extension-modules.patch b/SOURCES/Enable-autodoc-build-with-extension-modules.patch new file mode 100644 index 0000000..ea31b62 --- /dev/null +++ b/SOURCES/Enable-autodoc-build-with-extension-modules.patch @@ -0,0 +1,25 @@ +From 924b2e2cee46753d26a8419f273ffe045bbfb9bb Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Tue, 21 Nov 2023 11:27:42 +0100 +Subject: [PATCH] Enable autodoc build with extension modules + +--- + sphinx/ext/autodoc/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py +index 54e91a1..dba5769 100644 +--- a/sphinx/ext/autodoc/__init__.py ++++ b/sphinx/ext/autodoc/__init__.py +@@ -1871,7 +1871,7 @@ class DataDocumenter(GenericAliasMixin, NewTypeMixin, TypeVarMixin, + for (classname, attrname), annotation in analyzer.annotations.items(): + if classname == '' and attrname not in annotations: + annotations[attrname] = annotation +- except AttributeError: ++ except (AttributeError, PycodeError): + pass + + def import_object(self, raiseerror: bool = False) -> bool: +-- +2.41.0 + diff --git a/SPECS/python-sphinx.spec b/SPECS/python-sphinx.spec index d74889f..cf7f6bd 100644 --- a/SPECS/python-sphinx.spec +++ b/SPECS/python-sphinx.spec @@ -28,7 +28,7 @@ Name: python-sphinx #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 Summary: Python documentation generator @@ -45,6 +45,15 @@ Source0: %{pypi_source %{upstream_name} %{upstream_version}} # which causes that test to fail. Patch1: sphinx-test_theming.diff +# Fix autodoc build with extension modules: +# additionally to AttributeError catch also PycodeError +# Upstream has replaced one with another in Sphinx 3.5.x and later, +# but to prevent any compatibility issues it's safer to only extend +# the list of exceptions. Upstream fix: +# https://github.com/sphinx-doc/sphinx/commit/50295f18c25020e15e9bc398a0689 +# Bug: https://issues.redhat.com/browse/RHEL-5664 +Patch2: Enable-autodoc-build-with-extension-modules.patch + BuildArch: noarch BuildRequires: make @@ -378,6 +387,10 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib %changelog +* Tue Nov 21 2023 Karolina Surma - 1:3.4.3-8 +- Fix autodoc build with the compiled extension modules +Resolves: RHEL-5664 + * Fri Oct 08 2021 Charalampos Stratakis - 1:3.4.3-7 - Obsolete and provide the python-sphinx-locale package to fix the upgrade path Related: rhbz#1985219