diff --git a/Fix-autodoc-tests-with-Python-3.12.3.patch b/Fix-autodoc-tests-with-Python-3.12.3.patch new file mode 100644 index 0000000..4d78a38 --- /dev/null +++ b/Fix-autodoc-tests-with-Python-3.12.3.patch @@ -0,0 +1,51 @@ +From 22caeb2631922c3f5e3f4bb45d8c1610edb6ef74 Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Thu, 22 Aug 2024 12:33:34 +0200 +Subject: [PATCH] Fix autodoc tests with Python 3.12.3+ + +--- + tests/test_ext_autodoc.py | 5 ++++- + tests/test_ext_autodoc_configs.py | 4 ++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/tests/test_ext_autodoc.py b/tests/test_ext_autodoc.py +index 7062763..5f63214 100644 +--- a/tests/test_ext_autodoc.py ++++ b/tests/test_ext_autodoc.py +@@ -1407,7 +1407,10 @@ def test_enum_class(app): + options = {"members": None} + actual = do_autodoc(app, 'class', 'target.enums.EnumCls', options) + +- if sys.version_info[:2] >= (3, 12): ++ if sys.version_info[:3] >= (3, 12, 3): ++ args = ('(value, names=, *values, module=None, ' ++ 'qualname=None, type=None, start=1, boundary=None)') ++ elif sys.version_info[:2] >= (3, 12): + args = ('(value, names=None, *values, module=None, ' + 'qualname=None, type=None, start=1, boundary=None)') + elif sys.version_info[:2] >= (3, 11): +diff --git a/tests/test_ext_autodoc_configs.py b/tests/test_ext_autodoc_configs.py +index 0994c08..a240c4b 100644 +--- a/tests/test_ext_autodoc_configs.py ++++ b/tests/test_ext_autodoc_configs.py +@@ -1273,7 +1273,7 @@ def test_autodoc_type_aliases(app): + ' docstring', + '', + '', +- '.. py:function:: mult(x: int, y: int) -> int', ++ '.. py:function:: mult(x: myint, y: myint) -> myint', + ' mult(x: float, y: float) -> float', + ' :module: target.autodoc_type_aliases', + '', +@@ -1344,7 +1344,7 @@ def test_autodoc_type_aliases(app): + ' docstring', + '', + '', +- '.. py:function:: mult(x: myint, y: myint) -> myint', ++ '.. py:function:: mult(x: myint, y: myint) -> myint', + ' mult(x: float, y: float) -> float', + ' :module: target.autodoc_type_aliases', + '', +-- +2.46.0 + diff --git a/python-sphinx.spec b/python-sphinx.spec index 2ecef0d..310b72a 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -25,7 +25,7 @@ Name: python-sphinx #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 8%{?dist} +Release: 9%{?dist} Epoch: 1 Summary: Python documentation generator @@ -64,6 +64,9 @@ Patch: https://github.com/sphinx-doc/sphinx/pull/11774.patch # with a dummy implementation doing nothing. Patch: Patch-out-snowballstemmer.patch +# Account for the changes is enum and type aliases representations +Patch: Fix-autodoc-tests-with-Python-3.12.3.patch + BuildArch: noarch BuildRequires: make @@ -416,6 +419,9 @@ ${k+-k }"${k-}" %changelog +* Thu Aug 22 2024 Karolina Surma - 1:7.2.6-9 +- Fix build with Python 3.12.3+ + * Mon Jun 24 2024 Troy Dawson - 1:7.2.6-8 - Bump release for June 2024 mass rebuild