Compare commits
25 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
574c5a94d6 | ||
|
|
d241286834 | ||
|
|
78fa545ec7 | ||
|
|
0009cf4a25 | ||
|
|
31b58a6666 | ||
|
|
bd77693107 | ||
|
|
9db66313d0 | ||
|
|
9848821cbe | ||
|
|
8d9f71877e | ||
|
|
5e29644eb4 | ||
|
|
0522916ddc | ||
|
|
aa73a643c5 | ||
|
|
600e566ce8 | ||
|
|
94392caedd | ||
|
|
bdccc31518 | ||
|
|
1dedfd6334 | ||
|
|
de4dafa39e | ||
|
|
cca8be3e8b | ||
|
|
c97bb0f3e2 | ||
|
|
383e230ab0 | ||
|
|
f1121b8bac | ||
|
|
379ab359f3 | ||
|
|
fa05224c39 | ||
|
|
cc54017166 | ||
|
|
8f5d120071 |
23 changed files with 842 additions and 219 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
1
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -46,3 +46,6 @@
|
||||||
/Sphinx-7.0.1.tar.gz
|
/Sphinx-7.0.1.tar.gz
|
||||||
/sphinx-7.1.2.tar.gz
|
/sphinx-7.1.2.tar.gz
|
||||||
/sphinx-7.2.6.tar.gz
|
/sphinx-7.2.6.tar.gz
|
||||||
|
/sphinx-7.3.7.tar.gz
|
||||||
|
/sphinx-8.1.3.tar.gz
|
||||||
|
/sphinx-8.2.3.tar.gz
|
||||||
|
|
|
||||||
69
11774.patch
69
11774.patch
|
|
@ -1,69 +0,0 @@
|
||||||
From bc8939b34037f81b8610f3b26caec128ee20a2f4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karolina Surma <ksurma@redhat.com>
|
|
||||||
Date: Tue, 28 Nov 2023 14:43:58 +0100
|
|
||||||
Subject: [PATCH] Adjust the expected string to match Python 3.11+ changed
|
|
||||||
output
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/test_ext_autodoc_configs.py | 21 +++++++++++++++++----
|
|
||||||
1 file changed, 17 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/test_ext_autodoc_configs.py b/tests/test_ext_autodoc_configs.py
|
|
||||||
index 45bc729b73e..0994c08e899 100644
|
|
||||||
--- a/tests/test_ext_autodoc_configs.py
|
|
||||||
+++ b/tests/test_ext_autodoc_configs.py
|
|
||||||
@@ -11,6 +11,7 @@
|
|
||||||
from .test_ext_autodoc import do_autodoc
|
|
||||||
|
|
||||||
IS_PYPY = platform.python_implementation() == 'PyPy'
|
|
||||||
+IS_PY311_AND_LATER = sys.version_info >= (3, 11)
|
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
|
||||||
@@ -1627,7 +1628,10 @@ def test_autodoc_default_options(app):
|
|
||||||
assert ' Iterate squares of each value.' in actual
|
|
||||||
if not IS_PYPY:
|
|
||||||
assert ' .. py:attribute:: CustomIter.__weakref__' in actual
|
|
||||||
- assert ' list of weak references to the object (if defined)' in actual
|
|
||||||
+ if IS_PY311_AND_LATER:
|
|
||||||
+ assert ' list of weak references to the object' in actual
|
|
||||||
+ else:
|
|
||||||
+ assert ' list of weak references to the object (if defined)' in actual
|
|
||||||
|
|
||||||
# :exclude-members: None - has no effect. Unlike :members:,
|
|
||||||
# :special-members:, etc. where None == "include all", here None means
|
|
||||||
@@ -1651,7 +1655,10 @@ def test_autodoc_default_options(app):
|
|
||||||
assert ' Iterate squares of each value.' in actual
|
|
||||||
if not IS_PYPY:
|
|
||||||
assert ' .. py:attribute:: CustomIter.__weakref__' in actual
|
|
||||||
- assert ' list of weak references to the object (if defined)' in actual
|
|
||||||
+ if IS_PY311_AND_LATER:
|
|
||||||
+ assert ' list of weak references to the object' in actual
|
|
||||||
+ else:
|
|
||||||
+ assert ' list of weak references to the object (if defined)' in actual
|
|
||||||
assert ' .. py:method:: CustomIter.snafucate()' in actual
|
|
||||||
assert ' Makes this snafucated.' in actual
|
|
||||||
|
|
||||||
@@ -1698,7 +1705,10 @@ def test_autodoc_default_options_with_values(app):
|
|
||||||
assert ' Iterate squares of each value.' in actual
|
|
||||||
if not IS_PYPY:
|
|
||||||
assert ' .. py:attribute:: CustomIter.__weakref__' not in actual
|
|
||||||
- assert ' list of weak references to the object (if defined)' not in actual
|
|
||||||
+ if IS_PY311_AND_LATER:
|
|
||||||
+ assert ' list of weak references to the object' not in actual
|
|
||||||
+ else:
|
|
||||||
+ assert ' list of weak references to the object (if defined)' not in actual
|
|
||||||
|
|
||||||
# with :exclude-members:
|
|
||||||
app.config.autodoc_default_options = {
|
|
||||||
@@ -1722,6 +1732,9 @@ def test_autodoc_default_options_with_values(app):
|
|
||||||
assert ' Iterate squares of each value.' in actual
|
|
||||||
if not IS_PYPY:
|
|
||||||
assert ' .. py:attribute:: CustomIter.__weakref__' not in actual
|
|
||||||
- assert ' list of weak references to the object (if defined)' not in actual
|
|
||||||
+ if IS_PY311_AND_LATER:
|
|
||||||
+ assert ' list of weak references to the object' not in actual
|
|
||||||
+ else:
|
|
||||||
+ assert ' list of weak references to the object (if defined)' not in actual
|
|
||||||
assert ' .. py:method:: CustomIter.snafucate()' not in actual
|
|
||||||
assert ' Makes this snafucated.' not in actual
|
|
||||||
314
13527.patch
Normal file
314
13527.patch
Normal file
|
|
@ -0,0 +1,314 @@
|
||||||
|
From 93312460e37be0ba1acbbefa553bfc25f4fc5ea9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
||||||
|
Date: Sun, 27 Apr 2025 21:00:40 +0100
|
||||||
|
Subject: [PATCH 1/9] Fix tests for Python 3.14a7+
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc.py | 2 +-
|
||||||
|
tests/test_extensions/test_ext_autodoc_configs.py | 1 -
|
||||||
|
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc.py b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
index a06c1bbe30d..bdcd6ef2b95 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
@@ -941,7 +941,7 @@ def test_autodoc_special_members(app):
|
||||||
|
actual = do_autodoc(app, 'class', 'target.Class', options)
|
||||||
|
assert list(filter(lambda l: '::' in l, actual)) == [
|
||||||
|
'.. py:class:: Class(arg)',
|
||||||
|
- ' .. py:attribute:: Class.__annotations__',
|
||||||
|
+ ' .. py:attribute:: Class.__annotations_cache__',
|
||||||
|
' .. py:attribute:: Class.__dict__',
|
||||||
|
' .. py:method:: Class.__init__(arg)',
|
||||||
|
' .. py:attribute:: Class.__module__',
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc_configs.py b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
index ab7539190e0..d520e7f9cfe 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
@@ -1368,7 +1368,6 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'',
|
||||||
|
' .. py:attribute:: Foo.attr2',
|
||||||
|
' :module: target.autodoc_type_aliases',
|
||||||
|
- ' :type: int',
|
||||||
|
'',
|
||||||
|
' docstring',
|
||||||
|
'',
|
||||||
|
|
||||||
|
From 523f290134f644b115e18e347dce093fa0fbd662 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
||||||
|
Date: Sun, 27 Apr 2025 21:03:35 +0100
|
||||||
|
Subject: [PATCH 2/9] Fix tests for Python 3.14a7+
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc_configs.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc_configs.py b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
index d520e7f9cfe..2f8dc75d082 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
@@ -1368,6 +1368,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'',
|
||||||
|
' .. py:attribute:: Foo.attr2',
|
||||||
|
' :module: target.autodoc_type_aliases',
|
||||||
|
+ ' :type: int',
|
||||||
|
'',
|
||||||
|
' docstring',
|
||||||
|
'',
|
||||||
|
@@ -1440,7 +1441,6 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'',
|
||||||
|
' .. py:attribute:: Foo.attr2',
|
||||||
|
' :module: target.autodoc_type_aliases',
|
||||||
|
- ' :type: myint',
|
||||||
|
'',
|
||||||
|
' docstring',
|
||||||
|
'',
|
||||||
|
|
||||||
|
From a81bcf834822fac1cf96a2ab43c5b0d260ec532b Mon Sep 17 00:00:00 2001
|
||||||
|
From: James Addison <jay@jp-hosting.net>
|
||||||
|
Date: Tue, 6 May 2025 22:06:24 +0100
|
||||||
|
Subject: [PATCH 3/9] Tests: make test expectations pyversion-conditional
|
||||||
|
|
||||||
|
Relates-to commits 93312460e37be0ba1acbbefa553bfc25f4fc5ea9, 523f290134f644b115e18e347dce093fa0fbd662.
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc.py | 6 +++++-
|
||||||
|
tests/test_extensions/test_ext_autodoc_configs.py | 10 +++++++++-
|
||||||
|
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc.py b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
index bdcd6ef2b95..d7cef59056e 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
@@ -938,10 +938,14 @@ def test_autodoc_special_members(app):
|
||||||
|
}
|
||||||
|
if sys.version_info >= (3, 13, 0, 'alpha', 5):
|
||||||
|
options['exclude-members'] = '__static_attributes__,__firstlineno__'
|
||||||
|
+ if sys.version_info >= (3, 14, 0, 'alpha', 7):
|
||||||
|
+ annotations_attributes = [' .. py:attribute:: Class.__annotations_cache__']
|
||||||
|
+ else:
|
||||||
|
+ annotations_attributes = [' .. py:attribute:: Class.__annotations__']
|
||||||
|
actual = do_autodoc(app, 'class', 'target.Class', options)
|
||||||
|
assert list(filter(lambda l: '::' in l, actual)) == [
|
||||||
|
'.. py:class:: Class(arg)',
|
||||||
|
- ' .. py:attribute:: Class.__annotations_cache__',
|
||||||
|
+ ] + annotations_attributes + [
|
||||||
|
' .. py:attribute:: Class.__dict__',
|
||||||
|
' .. py:method:: Class.__init__(arg)',
|
||||||
|
' .. py:attribute:: Class.__module__',
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc_configs.py b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
index 2f8dc75d082..f449bb57809 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
@@ -1348,6 +1348,10 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
# default
|
||||||
|
options = {'members': None}
|
||||||
|
actual = do_autodoc(app, 'module', 'target.autodoc_type_aliases', options)
|
||||||
|
+ if sys.version_info >= (3, 14, 0, 'alpha', 7):
|
||||||
|
+ attr2_typeinfo = []
|
||||||
|
+ else:
|
||||||
|
+ attr2_typeinfo = [' :type: int']
|
||||||
|
assert list(actual) == [
|
||||||
|
'',
|
||||||
|
'.. py:module:: target.autodoc_type_aliases',
|
||||||
|
@@ -1368,7 +1372,6 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'',
|
||||||
|
' .. py:attribute:: Foo.attr2',
|
||||||
|
' :module: target.autodoc_type_aliases',
|
||||||
|
- ' :type: int',
|
||||||
|
'',
|
||||||
|
' docstring',
|
||||||
|
'',
|
||||||
|
@@ -1421,6 +1424,10 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'io.StringIO': 'my.module.StringIO',
|
||||||
|
}
|
||||||
|
actual = do_autodoc(app, 'module', 'target.autodoc_type_aliases', options)
|
||||||
|
+ if sys.version_info >= (3, 14, 0, 'alpha', 7):
|
||||||
|
+ attr2_typeinfo = []
|
||||||
|
+ else:
|
||||||
|
+ attr2_typeinfo = [' :type: myint']
|
||||||
|
assert list(actual) == [
|
||||||
|
'',
|
||||||
|
'.. py:module:: target.autodoc_type_aliases',
|
||||||
|
@@ -1441,6 +1448,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'',
|
||||||
|
' .. py:attribute:: Foo.attr2',
|
||||||
|
' :module: target.autodoc_type_aliases',
|
||||||
|
+ ] + attr2_typeinfo + [
|
||||||
|
'',
|
||||||
|
' docstring',
|
||||||
|
'',
|
||||||
|
|
||||||
|
From 26e7a6435ad9840345455f35f62c063cb588bba7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: James Addison <jay@jp-hosting.net>
|
||||||
|
Date: Tue, 6 May 2025 22:16:42 +0100
|
||||||
|
Subject: [PATCH 4/9] Tests: fixup: actually insert updated expectation
|
||||||
|
|
||||||
|
Relates-to commit a81bcf834822fac1cf96a2ab43c5b0d260ec532b.
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc_configs.py | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc_configs.py b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
index f449bb57809..fe2561aea00 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
@@ -1372,6 +1372,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'',
|
||||||
|
' .. py:attribute:: Foo.attr2',
|
||||||
|
' :module: target.autodoc_type_aliases',
|
||||||
|
+ ] + attr2_typeinfo + [
|
||||||
|
'',
|
||||||
|
' docstring',
|
||||||
|
'',
|
||||||
|
|
||||||
|
From 52c7010c4b673898af115d3a86728274a8dd620d Mon Sep 17 00:00:00 2001
|
||||||
|
From: James Addison <jay@jp-hosting.net>
|
||||||
|
Date: Tue, 6 May 2025 22:19:30 +0100
|
||||||
|
Subject: [PATCH 5/9] Tests: linting: use iterable unpacking as suggested by
|
||||||
|
`ruff`
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc_configs.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc_configs.py b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
index fe2561aea00..39fdc454e31 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
@@ -1372,7 +1372,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'',
|
||||||
|
' .. py:attribute:: Foo.attr2',
|
||||||
|
' :module: target.autodoc_type_aliases',
|
||||||
|
- ] + attr2_typeinfo + [
|
||||||
|
+ *attr2_typeinfo,
|
||||||
|
'',
|
||||||
|
' docstring',
|
||||||
|
'',
|
||||||
|
@@ -1449,7 +1449,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
'',
|
||||||
|
' .. py:attribute:: Foo.attr2',
|
||||||
|
' :module: target.autodoc_type_aliases',
|
||||||
|
- ] + attr2_typeinfo + [
|
||||||
|
+ *attr2_typeinfo,
|
||||||
|
'',
|
||||||
|
' docstring',
|
||||||
|
'',
|
||||||
|
|
||||||
|
From 7b3ce9b642e636fe2ec58f1e090dc79d51b1f2f0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: James Addison <jay@jp-hosting.net>
|
||||||
|
Date: Tue, 6 May 2025 22:21:24 +0100
|
||||||
|
Subject: [PATCH 6/9] Tests: linting: use iterable unpacking as suggested by
|
||||||
|
`ruff` (uno mas)
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc.py b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
index d7cef59056e..4f38634cf51 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
@@ -945,7 +945,7 @@ def test_autodoc_special_members(app):
|
||||||
|
actual = do_autodoc(app, 'class', 'target.Class', options)
|
||||||
|
assert list(filter(lambda l: '::' in l, actual)) == [
|
||||||
|
'.. py:class:: Class(arg)',
|
||||||
|
- ] + annotations_attributes + [
|
||||||
|
+ *annotations_attributes,
|
||||||
|
' .. py:attribute:: Class.__dict__',
|
||||||
|
' .. py:method:: Class.__init__(arg)',
|
||||||
|
' .. py:attribute:: Class.__module__',
|
||||||
|
|
||||||
|
From 386ba32af878b23c5857be588f932fe2af4a2d88 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
||||||
|
Date: Mon, 12 May 2025 17:36:04 +0100
|
||||||
|
Subject: [PATCH 7/9] Style
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc.py b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
index 4f38634cf51..012e708a2f3 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
@@ -939,9 +939,9 @@ def test_autodoc_special_members(app):
|
||||||
|
if sys.version_info >= (3, 13, 0, 'alpha', 5):
|
||||||
|
options['exclude-members'] = '__static_attributes__,__firstlineno__'
|
||||||
|
if sys.version_info >= (3, 14, 0, 'alpha', 7):
|
||||||
|
- annotations_attributes = [' .. py:attribute:: Class.__annotations_cache__']
|
||||||
|
+ annotations_attributes = (' .. py:attribute:: Class.__annotations_cache__',)
|
||||||
|
else:
|
||||||
|
- annotations_attributes = [' .. py:attribute:: Class.__annotations__']
|
||||||
|
+ annotations_attributes = (' .. py:attribute:: Class.__annotations__',)
|
||||||
|
actual = do_autodoc(app, 'class', 'target.Class', options)
|
||||||
|
assert list(filter(lambda l: '::' in l, actual)) == [
|
||||||
|
'.. py:class:: Class(arg)',
|
||||||
|
|
||||||
|
From 1f381ec05015fcbc695d1f0991e77241daef49c7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
||||||
|
Date: Mon, 12 May 2025 17:38:28 +0100
|
||||||
|
Subject: [PATCH 8/9] fstr
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc.py | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc.py b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
index 012e708a2f3..7aa12db3c32 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc.py
|
||||||
|
@@ -939,13 +939,13 @@ def test_autodoc_special_members(app):
|
||||||
|
if sys.version_info >= (3, 13, 0, 'alpha', 5):
|
||||||
|
options['exclude-members'] = '__static_attributes__,__firstlineno__'
|
||||||
|
if sys.version_info >= (3, 14, 0, 'alpha', 7):
|
||||||
|
- annotations_attributes = (' .. py:attribute:: Class.__annotations_cache__',)
|
||||||
|
+ ann_attr_name = '__annotations_cache__'
|
||||||
|
else:
|
||||||
|
- annotations_attributes = (' .. py:attribute:: Class.__annotations__',)
|
||||||
|
+ ann_attr_name = '__annotations__'
|
||||||
|
actual = do_autodoc(app, 'class', 'target.Class', options)
|
||||||
|
assert list(filter(lambda l: '::' in l, actual)) == [
|
||||||
|
'.. py:class:: Class(arg)',
|
||||||
|
- *annotations_attributes,
|
||||||
|
+ f' .. py:attribute:: Class.{ann_attr_name}',
|
||||||
|
' .. py:attribute:: Class.__dict__',
|
||||||
|
' .. py:method:: Class.__init__(arg)',
|
||||||
|
' .. py:attribute:: Class.__module__',
|
||||||
|
|
||||||
|
From 0bd1f9d1615c20078677b48a09180c4b68e27796 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
||||||
|
Date: Mon, 12 May 2025 17:40:13 +0100
|
||||||
|
Subject: [PATCH 9/9] tuple
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autodoc_configs.py | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autodoc_configs.py b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
index 39fdc454e31..c88496ee506 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autodoc_configs.py
|
||||||
|
@@ -1349,9 +1349,9 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
options = {'members': None}
|
||||||
|
actual = do_autodoc(app, 'module', 'target.autodoc_type_aliases', options)
|
||||||
|
if sys.version_info >= (3, 14, 0, 'alpha', 7):
|
||||||
|
- attr2_typeinfo = []
|
||||||
|
+ attr2_typeinfo = ()
|
||||||
|
else:
|
||||||
|
- attr2_typeinfo = [' :type: int']
|
||||||
|
+ attr2_typeinfo = (' :type: int',)
|
||||||
|
assert list(actual) == [
|
||||||
|
'',
|
||||||
|
'.. py:module:: target.autodoc_type_aliases',
|
||||||
|
@@ -1426,9 +1426,9 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
|
||||||
|
}
|
||||||
|
actual = do_autodoc(app, 'module', 'target.autodoc_type_aliases', options)
|
||||||
|
if sys.version_info >= (3, 14, 0, 'alpha', 7):
|
||||||
|
- attr2_typeinfo = []
|
||||||
|
+ attr2_typeinfo = ()
|
||||||
|
else:
|
||||||
|
- attr2_typeinfo = [' :type: myint']
|
||||||
|
+ attr2_typeinfo = (' :type: myint',)
|
||||||
|
assert list(actual) == [
|
||||||
|
'',
|
||||||
|
'.. py:module:: target.autodoc_type_aliases',
|
||||||
49
13610.patch
Normal file
49
13610.patch
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
From 69998bdf8848614eb52ddd80923ffde7af64c0a8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: James Addison <jay@jp-hosting.net>
|
||||||
|
Date: Mon, 2 Jun 2025 21:55:15 +0100
|
||||||
|
Subject: [PATCH] tests: update LaTeX label test expectations from docutils
|
||||||
|
r10151
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_builders/test_build_latex.py | 11 +++++++++--
|
||||||
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_builders/test_build_latex.py b/tests/test_builders/test_build_latex.py
|
||||||
|
index 0d1c607462d..37e708a021e 100644
|
||||||
|
--- a/tests/test_builders/test_build_latex.py
|
||||||
|
+++ b/tests/test_builders/test_build_latex.py
|
||||||
|
@@ -12,6 +12,7 @@
|
||||||
|
from subprocess import CalledProcessError
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
+import docutils
|
||||||
|
import pygments
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
@@ -1959,10 +1960,16 @@ def test_latex_labels(app: SphinxTestApp) -> None:
|
||||||
|
|
||||||
|
result = (app.outdir / 'projectnamenotset.tex').read_text(encoding='utf8')
|
||||||
|
|
||||||
|
+ # ref: docutils r10151
|
||||||
|
+ if docutils.__version_info__[:2] < (0, 22):
|
||||||
|
+ figure_id, table_id = 'id1', 'id2'
|
||||||
|
+ else:
|
||||||
|
+ figure_id, table_id = 'id2', 'id3'
|
||||||
|
+
|
||||||
|
# figures
|
||||||
|
assert (
|
||||||
|
r'\caption{labeled figure}'
|
||||||
|
- r'\label{\detokenize{index:id1}}'
|
||||||
|
+ r'\label{\detokenize{index:' + figure_id + '}}'
|
||||||
|
r'\label{\detokenize{index:figure2}}'
|
||||||
|
r'\label{\detokenize{index:figure1}}'
|
||||||
|
r'\end{figure}'
|
||||||
|
@@ -1988,7 +1995,7 @@ def test_latex_labels(app: SphinxTestApp) -> None:
|
||||||
|
# tables
|
||||||
|
assert (
|
||||||
|
r'\sphinxcaption{table caption}'
|
||||||
|
- r'\label{\detokenize{index:id2}}'
|
||||||
|
+ r'\label{\detokenize{index:' + table_id + '}}'
|
||||||
|
r'\label{\detokenize{index:table2}}'
|
||||||
|
r'\label{\detokenize{index:table1}}'
|
||||||
|
) in result
|
||||||
30
13883.patch
Normal file
30
13883.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
From 4d842a2c4909fe360172826a46eb88b442f44858 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?G=C3=BCnter=20Milde?= <milde@users.sf.net>
|
||||||
|
Date: Tue, 9 Sep 2025 16:17:15 +0200
|
||||||
|
Subject: [PATCH] Fix test setup for directive tests.
|
||||||
|
|
||||||
|
Set the "parent" attribute of RSTState instances to the `document`
|
||||||
|
instead of None. The attribute holds the state machines "current node"
|
||||||
|
which is initialized to the `document` in `RSTStateMachine.run()` and
|
||||||
|
required since Docutils 0.22.1 in `RSTState.nested_parse()` to correctly
|
||||||
|
support sections in nested parsing.
|
||||||
|
---
|
||||||
|
tests/test_util/test_util_docutils_sphinx_directive.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_util/test_util_docutils_sphinx_directive.py b/tests/test_util/test_util_docutils_sphinx_directive.py
|
||||||
|
index ecfcab0..7a26e96 100644
|
||||||
|
--- a/tests/test_util/test_util_docutils_sphinx_directive.py
|
||||||
|
+++ b/tests/test_util/test_util_docutils_sphinx_directive.py
|
||||||
|
@@ -38,7 +38,7 @@ def make_directive_and_state(
|
||||||
|
inliner = Inliner()
|
||||||
|
inliner.init_customizations(state.document.settings)
|
||||||
|
state.inliner = inliner
|
||||||
|
- state.parent = None
|
||||||
|
+ state.parent = state.document
|
||||||
|
state.memo = SimpleNamespace(
|
||||||
|
document=state.document,
|
||||||
|
language=english,
|
||||||
|
--
|
||||||
|
2.51.1
|
||||||
|
|
||||||
29
8962398b761c3d85a.patch
Normal file
29
8962398b761c3d85a.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
From 8962398b761c3d85a7c74b6f789b3ffb127bde0c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
||||||
|
Date: Thu, 6 Mar 2025 16:03:44 +0000
|
||||||
|
Subject: [PATCH] autosummary: Update test for Python 3.14.0a5+ (#13418)
|
||||||
|
|
||||||
|
`types.UnionType` and `typing.Union` have been merged.
|
||||||
|
---
|
||||||
|
tests/test_extensions/test_ext_autosummary.py | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_extensions/test_ext_autosummary.py b/tests/test_extensions/test_ext_autosummary.py
|
||||||
|
index 35dc7d180ef..c807ddba3d1 100644
|
||||||
|
--- a/tests/test_extensions/test_ext_autosummary.py
|
||||||
|
+++ b/tests/test_extensions/test_ext_autosummary.py
|
||||||
|
@@ -447,8 +447,12 @@ def test_autosummary_generate_content_for_module_imported_members(app):
|
||||||
|
]
|
||||||
|
assert context['functions'] == ['bar']
|
||||||
|
assert context['all_functions'] == ['_quux', 'bar']
|
||||||
|
- assert context['classes'] == ['Class', 'Foo']
|
||||||
|
- assert context['all_classes'] == ['Class', 'Foo', '_Baz']
|
||||||
|
+ if sys.version_info >= (3, 14, 0, 'alpha', 5):
|
||||||
|
+ assert context['classes'] == ['Class', 'Foo', 'Union']
|
||||||
|
+ assert context['all_classes'] == ['Class', 'Foo', 'Union', '_Baz']
|
||||||
|
+ else:
|
||||||
|
+ assert context['classes'] == ['Class', 'Foo']
|
||||||
|
+ assert context['all_classes'] == ['Class', 'Foo', '_Baz']
|
||||||
|
assert context['exceptions'] == ['Exc']
|
||||||
|
assert context['all_exceptions'] == ['Exc', '_Exc']
|
||||||
|
assert context['attributes'] == ['CONSTANT1', 'qux', 'quuz', 'non_imported_member']
|
||||||
|
|
@ -1,58 +1,57 @@
|
||||||
From 9699465414515f0eba76d05069e755b5bcf34eef Mon Sep 17 00:00:00 2001
|
From f3fba803e1c39232f86acc9a21657cad171ce71b Mon Sep 17 00:00:00 2001
|
||||||
From: Karolina Surma <ksurma@redhat.com>
|
From: Karolina Surma <ksurma@redhat.com>
|
||||||
Date: Mon, 15 Jan 2024 16:19:32 +0100
|
Date: Wed, 5 Mar 2025 12:14:49 +0100
|
||||||
Subject: [PATCH] Make the first party extensions optional, add [extensions]
|
Subject: [PATCH] Make the first party extensions optional, add [extensions]
|
||||||
extra
|
extra
|
||||||
|
|
||||||
|
|
||||||
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
||||||
---
|
---
|
||||||
pyproject.toml | 33 +++++++++++++++++++++++++++------
|
pyproject.toml | 33 ++++++++++++++++----
|
||||||
sphinx/application.py | 6 +++---
|
sphinx/application.py | 6 ++--
|
||||||
sphinx/registry.py | 9 ++++++---
|
sphinx/registry.py | 10 +++---
|
||||||
sphinx/testing/fixtures.py | 6 ++++++
|
sphinx/testing/fixtures.py | 7 +++++
|
||||||
tests/test_api_translator.py | 2 ++
|
tests/test_builders/test_build_html_maths.py | 3 ++
|
||||||
tests/test_build_html.py | 3 +++
|
tests/test_writers/test_api_translator.py | 2 ++
|
||||||
6 files changed, 47 insertions(+), 12 deletions(-)
|
6 files changed, 48 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
diff --git a/pyproject.toml b/pyproject.toml
|
diff --git a/pyproject.toml b/pyproject.toml
|
||||||
index 8f93701..41c28c5 100644
|
index c4b1b6d..4e59e90 100644
|
||||||
--- a/pyproject.toml
|
--- a/pyproject.toml
|
||||||
+++ b/pyproject.toml
|
+++ b/pyproject.toml
|
||||||
@@ -55,12 +55,6 @@ classifiers = [
|
@@ -67,12 +67,6 @@ classifiers = [
|
||||||
"Topic :: Utilities",
|
"Typing :: Typed",
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
- "sphinxcontrib-applehelp",
|
- "sphinxcontrib-applehelp>=1.0.7",
|
||||||
- "sphinxcontrib-devhelp",
|
- "sphinxcontrib-devhelp>=1.0.6",
|
||||||
- "sphinxcontrib-jsmath",
|
- "sphinxcontrib-htmlhelp>=2.0.6",
|
||||||
- "sphinxcontrib-htmlhelp>=2.0.0",
|
- "sphinxcontrib-jsmath>=1.0.1",
|
||||||
|
- "sphinxcontrib-qthelp>=1.0.6",
|
||||||
- "sphinxcontrib-serializinghtml>=1.1.9",
|
- "sphinxcontrib-serializinghtml>=1.1.9",
|
||||||
- "sphinxcontrib-qthelp",
|
"Jinja2>=3.1",
|
||||||
"Jinja2>=3.0",
|
"Pygments>=2.17",
|
||||||
"Pygments>=2.14",
|
"docutils>=0.20,<0.22",
|
||||||
"docutils>=0.18.1,<0.21",
|
@@ -88,8 +82,35 @@ dependencies = [
|
||||||
@@ -76,8 +70,35 @@ dependencies = [
|
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
+applehelp = [
|
+applehelp = [
|
||||||
+ "sphinxcontrib-applehelp",
|
+ "sphinxcontrib-applehelp>=1.0.7",
|
||||||
+]
|
+]
|
||||||
+devhelp = [
|
+devhelp = [
|
||||||
+ "sphinxcontrib-devhelp",
|
+ "sphinxcontrib-devhelp>=1.0.6",
|
||||||
+]
|
+]
|
||||||
+jsmath = [
|
+jsmath = [
|
||||||
+ "sphinxcontrib-jsmath",
|
+ "sphinxcontrib-jsmath>=1.0.1",
|
||||||
+]
|
+]
|
||||||
+htmlhelp = [
|
+htmlhelp = [
|
||||||
+ "sphinxcontrib-htmlhelp>=2.0.0",
|
+ "sphinxcontrib-htmlhelp>=2.0.6",
|
||||||
+]
|
+]
|
||||||
+serializinghtml = [
|
+serializinghtml = [
|
||||||
+ "sphinxcontrib-serializinghtml>=1.1.9",
|
+ "sphinxcontrib-serializinghtml>=1.1.9",
|
||||||
+]
|
+]
|
||||||
+qthelp = [
|
+qthelp = [
|
||||||
+ "sphinxcontrib-qthelp",
|
+ "sphinxcontrib-qthelp>=1.0.6",
|
||||||
+]
|
+]
|
||||||
+extensions = [
|
+extensions = [
|
||||||
+ "sphinx[applehelp]",
|
+ "sphinx[applehelp]",
|
||||||
|
|
@ -67,12 +66,12 @@ index 8f93701..41c28c5 100644
|
||||||
+ "sphinx[extensions]",
|
+ "sphinx[extensions]",
|
||||||
]
|
]
|
||||||
lint = [
|
lint = [
|
||||||
"flake8>=3.5.0",
|
"ruff==0.9.9",
|
||||||
diff --git a/sphinx/application.py b/sphinx/application.py
|
diff --git a/sphinx/application.py b/sphinx/application.py
|
||||||
index d5fbaa9..b030dab 100644
|
index fe0e8bd..dcb3d75 100644
|
||||||
--- a/sphinx/application.py
|
--- a/sphinx/application.py
|
||||||
+++ b/sphinx/application.py
|
+++ b/sphinx/application.py
|
||||||
@@ -226,7 +226,7 @@ class Sphinx:
|
@@ -284,7 +284,7 @@ class Sphinx:
|
||||||
# load all built-in extension modules, first-party extension modules,
|
# load all built-in extension modules, first-party extension modules,
|
||||||
# and first-party themes
|
# and first-party themes
|
||||||
for extension in builtin_extensions:
|
for extension in builtin_extensions:
|
||||||
|
|
@ -81,7 +80,7 @@ index d5fbaa9..b030dab 100644
|
||||||
|
|
||||||
# load all user-given extension modules
|
# load all user-given extension modules
|
||||||
for extension in self.config.extensions:
|
for extension in self.config.extensions:
|
||||||
@@ -395,7 +395,7 @@ class Sphinx:
|
@@ -478,7 +478,7 @@ class Sphinx:
|
||||||
|
|
||||||
# ---- general extensibility interface -------------------------------------
|
# ---- general extensibility interface -------------------------------------
|
||||||
|
|
||||||
|
|
@ -90,7 +89,7 @@ index d5fbaa9..b030dab 100644
|
||||||
"""Import and setup a Sphinx extension module.
|
"""Import and setup a Sphinx extension module.
|
||||||
|
|
||||||
Load the extension given by the module *name*. Use this if your
|
Load the extension given by the module *name*. Use this if your
|
||||||
@@ -403,7 +403,7 @@ class Sphinx:
|
@@ -486,7 +486,7 @@ class Sphinx:
|
||||||
called twice.
|
called twice.
|
||||||
"""
|
"""
|
||||||
logger.debug('[app] setting up extension: %r', extname)
|
logger.debug('[app] setting up extension: %r', extname)
|
||||||
|
|
@ -100,19 +99,19 @@ index d5fbaa9..b030dab 100644
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def require_sphinx(version: tuple[int, int] | str) -> None:
|
def require_sphinx(version: tuple[int, int] | str) -> None:
|
||||||
diff --git a/sphinx/registry.py b/sphinx/registry.py
|
diff --git a/sphinx/registry.py b/sphinx/registry.py
|
||||||
index 501661d..96d4554 100644
|
index ce52a03..3bc90d5 100644
|
||||||
--- a/sphinx/registry.py
|
--- a/sphinx/registry.py
|
||||||
+++ b/sphinx/registry.py
|
+++ b/sphinx/registry.py
|
||||||
@@ -430,7 +430,7 @@ class SphinxComponentRegistry:
|
@@ -519,7 +519,7 @@ class SphinxComponentRegistry:
|
||||||
def add_html_theme(self, name: str, theme_path: str) -> None:
|
def add_html_theme(self, name: str, theme_path: str | os.PathLike[str]) -> None:
|
||||||
self.html_themes[name] = theme_path
|
self.html_themes[name] = _StrPath(theme_path)
|
||||||
|
|
||||||
- def load_extension(self, app: Sphinx, extname: str) -> None:
|
- def load_extension(self, app: Sphinx, extname: str) -> None:
|
||||||
+ def load_extension(self, app: Sphinx, extname: str, skip_nonimportable: bool = False) -> None:
|
+ def load_extension(self, app: Sphinx, extname: str, skip_nonimportable: bool = False) -> None:
|
||||||
"""Load a Sphinx extension."""
|
"""Load a Sphinx extension."""
|
||||||
if extname in app.extensions: # already loaded
|
if extname in app.extensions: # already loaded
|
||||||
return
|
return
|
||||||
@@ -446,9 +446,12 @@ class SphinxComponentRegistry:
|
@@ -540,10 +540,12 @@ class SphinxComponentRegistry:
|
||||||
try:
|
try:
|
||||||
mod = import_module(extname)
|
mod = import_module(extname)
|
||||||
except ImportError as err:
|
except ImportError as err:
|
||||||
|
|
@ -121,28 +120,30 @@ index 501661d..96d4554 100644
|
||||||
+ logger.debug(msg % extname)
|
+ logger.debug(msg % extname)
|
||||||
+ return
|
+ return
|
||||||
logger.verbose(__('Original exception:\n') + traceback.format_exc())
|
logger.verbose(__('Original exception:\n') + traceback.format_exc())
|
||||||
- raise ExtensionError(__('Could not import extension %s') % extname,
|
- raise ExtensionError(
|
||||||
- err) from err
|
- __('Could not import extension %s') % extname, err
|
||||||
|
- ) from err
|
||||||
+ raise ExtensionError(msg % extname, err) from err
|
+ raise ExtensionError(msg % extname, err) from err
|
||||||
|
|
||||||
setup = getattr(mod, 'setup', None)
|
setup: _ExtensionSetupFunc | None = getattr(mod, 'setup', None)
|
||||||
if setup is None:
|
if setup is None:
|
||||||
diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py
|
diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py
|
||||||
index 0cc4882..f57f709 100644
|
index ec143fa..e6d9da1 100644
|
||||||
--- a/sphinx/testing/fixtures.py
|
--- a/sphinx/testing/fixtures.py
|
||||||
+++ b/sphinx/testing/fixtures.py
|
+++ b/sphinx/testing/fixtures.py
|
||||||
@@ -22,6 +22,7 @@ DEFAULT_ENABLED_MARKERS = [
|
@@ -31,6 +31,7 @@ DEFAULT_ENABLED_MARKERS = [
|
||||||
'sphinx(builder, testroot=None, freshenv=False, confoverrides=None, tags=None,'
|
'builddir=None, docutils_conf=None'
|
||||||
' docutilsconf=None, parallel=0): arguments to initialize the sphinx test application.'
|
'): arguments to initialize the sphinx test application.'
|
||||||
),
|
),
|
||||||
+ 'sphinxcontrib(...): required sphinxcontrib.* extensions',
|
+ 'sphinxcontrib(...): required sphinxcontrib.* extensions',
|
||||||
'test_params(shared_result=...): test parameters.',
|
'test_params(shared_result=...): test parameters.',
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -67,6 +68,11 @@ def app_params(request: Any, test_params: dict, shared_result: SharedResult,
|
@@ -79,6 +80,12 @@ def app_params(
|
||||||
|
"""Parameters that are specified by 'pytest.mark.sphinx' for
|
||||||
sphinx.application.Sphinx initialization
|
sphinx.application.Sphinx initialization
|
||||||
"""
|
"""
|
||||||
|
+
|
||||||
+ # ##### process pytest.mark.sphinxcontrib
|
+ # ##### process pytest.mark.sphinxcontrib
|
||||||
+ for info in reversed(list(request.node.iter_markers("sphinxcontrib"))):
|
+ for info in reversed(list(request.node.iter_markers("sphinxcontrib"))):
|
||||||
+ for arg in info.args:
|
+ for arg in info.args:
|
||||||
|
|
@ -150,55 +151,55 @@ index 0cc4882..f57f709 100644
|
||||||
+
|
+
|
||||||
# ##### process pytest.mark.sphinx
|
# ##### process pytest.mark.sphinx
|
||||||
|
|
||||||
pargs = {}
|
pargs: dict[int, Any] = {}
|
||||||
diff --git a/tests/test_api_translator.py b/tests/test_api_translator.py
|
diff --git a/tests/test_builders/test_build_html_maths.py b/tests/test_builders/test_build_html_maths.py
|
||||||
index 9f2bd44..81575b7 100644
|
index cc21142..16382e3 100644
|
||||||
--- a/tests/test_api_translator.py
|
--- a/tests/test_builders/test_build_html_maths.py
|
||||||
+++ b/tests/test_api_translator.py
|
+++ b/tests/test_builders/test_build_html_maths.py
|
||||||
@@ -36,6 +36,7 @@ def test_singlehtml_set_translator_for_singlehtml(app, status, warning):
|
@@ -37,6 +37,7 @@ def test_html_math_renderer_is_imgmath(app: SphinxTestApp) -> None:
|
||||||
|
assert app.builder.math_renderer_name == 'imgmath'
|
||||||
|
|
||||||
|
|
||||||
|
+@pytest.mark.sphinxcontrib('serializinghtml', 'jsmath')
|
||||||
|
@pytest.mark.sphinx(
|
||||||
|
'html',
|
||||||
|
testroot='basic',
|
||||||
|
@@ -62,6 +63,7 @@ def test_html_math_renderer_is_duplicated2(app: SphinxTestApp) -> None:
|
||||||
|
assert app.builder.math_renderer_name == 'imgmath' # The another one is chosen
|
||||||
|
|
||||||
|
|
||||||
|
+@pytest.mark.sphinxcontrib('jsmath')
|
||||||
|
@pytest.mark.sphinx(
|
||||||
|
'html',
|
||||||
|
testroot='basic',
|
||||||
|
@@ -75,6 +77,7 @@ def test_html_math_renderer_is_chosen(app: SphinxTestApp) -> None:
|
||||||
|
assert app.builder.math_renderer_name == 'imgmath'
|
||||||
|
|
||||||
|
|
||||||
|
+@pytest.mark.sphinxcontrib('jsmath')
|
||||||
|
@pytest.mark.sphinx(
|
||||||
|
'html',
|
||||||
|
testroot='basic',
|
||||||
|
diff --git a/tests/test_writers/test_api_translator.py b/tests/test_writers/test_api_translator.py
|
||||||
|
index 1220192..8e8bb33 100644
|
||||||
|
--- a/tests/test_writers/test_api_translator.py
|
||||||
|
+++ b/tests/test_writers/test_api_translator.py
|
||||||
|
@@ -47,6 +47,7 @@ def test_singlehtml_set_translator_for_singlehtml(app: SphinxTestApp) -> None:
|
||||||
assert translator_class.__name__ == 'ConfSingleHTMLTranslator'
|
assert translator_class.__name__ == 'ConfSingleHTMLTranslator'
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.sphinxcontrib('serializinghtml')
|
+@pytest.mark.sphinxcontrib('serializinghtml')
|
||||||
@pytest.mark.sphinx('pickle', testroot='api-set-translator')
|
@pytest.mark.sphinx('pickle', testroot='api-set-translator')
|
||||||
def test_pickle_set_translator_for_pickle(app, status, warning):
|
def test_pickle_set_translator_for_pickle(app: SphinxTestApp) -> None:
|
||||||
translator_class = app.builder.get_translator_class()
|
translator_class = app.builder.get_translator_class()
|
||||||
@@ -43,6 +44,7 @@ def test_pickle_set_translator_for_pickle(app, status, warning):
|
@@ -54,6 +55,7 @@ def test_pickle_set_translator_for_pickle(app: SphinxTestApp) -> None:
|
||||||
assert translator_class.__name__ == 'ConfPickleTranslator'
|
assert translator_class.__name__ == 'ConfPickleTranslator'
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.sphinxcontrib('serializinghtml')
|
+@pytest.mark.sphinxcontrib('serializinghtml')
|
||||||
@pytest.mark.sphinx('json', testroot='api-set-translator')
|
@pytest.mark.sphinx('json', testroot='api-set-translator')
|
||||||
def test_json_set_translator_for_json(app, status, warning):
|
def test_json_set_translator_for_json(app: SphinxTestApp) -> None:
|
||||||
translator_class = app.builder.get_translator_class()
|
translator_class = app.builder.get_translator_class()
|
||||||
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
|
|
||||||
index 07f101d..c512a33 100644
|
|
||||||
--- a/tests/test_build_html.py
|
|
||||||
+++ b/tests/test_build_html.py
|
|
||||||
@@ -1544,6 +1544,7 @@ def test_html_math_renderer_is_imgmath(app, status, warning):
|
|
||||||
assert app.builder.math_renderer_name == 'imgmath'
|
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.sphinxcontrib('serializinghtml', 'jsmath')
|
|
||||||
@pytest.mark.sphinx('html', testroot='basic',
|
|
||||||
confoverrides={'extensions': ['sphinxcontrib.jsmath',
|
|
||||||
'sphinx.ext.imgmath']})
|
|
||||||
@@ -1564,6 +1565,7 @@ def test_html_math_renderer_is_duplicated2(app, status, warning):
|
|
||||||
assert app.builder.math_renderer_name == 'imgmath' # The another one is chosen
|
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.sphinxcontrib('jsmath')
|
|
||||||
@pytest.mark.sphinx('html', testroot='basic',
|
|
||||||
confoverrides={'extensions': ['sphinxcontrib.jsmath',
|
|
||||||
'sphinx.ext.imgmath'],
|
|
||||||
@@ -1572,6 +1574,7 @@ def test_html_math_renderer_is_chosen(app, status, warning):
|
|
||||||
assert app.builder.math_renderer_name == 'imgmath'
|
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.sphinxcontrib('jsmath')
|
|
||||||
@pytest.mark.sphinx('html', testroot='basic',
|
|
||||||
confoverrides={'extensions': ['sphinxcontrib.jsmath',
|
|
||||||
'sphinx.ext.mathjax'],
|
|
||||||
--
|
--
|
||||||
2.43.0
|
2.48.1
|
||||||
|
|
||||||
|
|
|
||||||
40
e01e42f5fc738815b.patch
Normal file
40
e01e42f5fc738815b.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
From e01e42f5fc738815b8499c4ede30c6caf130f0a4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
||||||
|
Date: Wed, 19 Mar 2025 20:11:35 +0000
|
||||||
|
Subject: [PATCH] Fix ``INVALID_BUILTIN_CLASSES`` test for Python 3.14.0a6+
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_util/test_util_typing.py | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_util/test_util_typing.py b/tests/test_util/test_util_typing.py
|
||||||
|
index 35ee240f7b8..8a561c378ed 100644
|
||||||
|
--- a/tests/test_util/test_util_typing.py
|
||||||
|
+++ b/tests/test_util/test_util_typing.py
|
||||||
|
@@ -205,7 +205,7 @@ def test_is_invalid_builtin_class() -> None:
|
||||||
|
zipfile.Path,
|
||||||
|
zipfile.CompleteDirs,
|
||||||
|
)
|
||||||
|
- if sys.version_info[:2] >= (3, 13):
|
||||||
|
+ if sys.version_info[:2] == (3, 13):
|
||||||
|
invalid_types += (
|
||||||
|
# pathlib
|
||||||
|
Path,
|
||||||
|
@@ -217,7 +217,7 @@ def test_is_invalid_builtin_class() -> None:
|
||||||
|
)
|
||||||
|
|
||||||
|
invalid_names = {(cls.__module__, cls.__qualname__) for cls in invalid_types}
|
||||||
|
- if sys.version_info[:2] < (3, 13):
|
||||||
|
+ if sys.version_info[:2] != (3, 13):
|
||||||
|
invalid_names |= {
|
||||||
|
('pathlib._local', 'Path'),
|
||||||
|
('pathlib._local', 'PosixPath'),
|
||||||
|
@@ -231,7 +231,7 @@ def test_is_invalid_builtin_class() -> None:
|
||||||
|
('zipfile._path', 'Path'),
|
||||||
|
('zipfile._path', 'CompleteDirs'),
|
||||||
|
}
|
||||||
|
- assert _INVALID_BUILTIN_CLASSES.keys() == invalid_names
|
||||||
|
+ assert set(_INVALID_BUILTIN_CLASSES) == invalid_names
|
||||||
|
|
||||||
|
|
||||||
|
def test_restify_type_hints_containers():
|
||||||
5
plan.fmf
Normal file
5
plan.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
||||||
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
# Without the packages, we have warnings in docs, but it's not a hard dependency
|
# Without the packages, we have warnings in docs, but it's not a hard dependency
|
||||||
# We don't want to support sphinxcontrib-* in RHEL, hence disabling the dependencies
|
# We don't want to support sphinxcontrib-* in RHEL, hence disabling the dependencies
|
||||||
%bcond sphinxcontrib %{undefined rhel}
|
%bcond sphinxcontrib %{undefined rhel}
|
||||||
|
# RHEL does not include python3-snowballstemmer (SRPM: snowball)
|
||||||
|
%bcond snowballstemmer %{undefined rhel}
|
||||||
# Also, we don't have all the tests requirements
|
# Also, we don't have all the tests requirements
|
||||||
%bcond tests 1
|
%bcond tests 1
|
||||||
|
|
||||||
|
|
@ -14,14 +16,13 @@
|
||||||
|
|
||||||
# Build without BuildRequires ImageMagick, to skip imgconverter tests
|
# Build without BuildRequires ImageMagick, to skip imgconverter tests
|
||||||
%bcond imagemagick_tests %{undefined rhel}
|
%bcond imagemagick_tests %{undefined rhel}
|
||||||
# Same for filelock -- we don't want it in RHEL just to run a handful of tests here
|
|
||||||
%bcond filelock_tests %{undefined rhel}
|
|
||||||
|
|
||||||
# During texlive updates, sometimes the latex environment is unstable
|
# During texlive updates, sometimes the latex environment is unstable
|
||||||
|
# NOTE: LaTeX tests are never run when building for ELN.
|
||||||
%bcond latex_tests 1
|
%bcond latex_tests 1
|
||||||
|
|
||||||
Name: python-sphinx
|
Name: python-sphinx
|
||||||
%global general_version 7.2.6
|
%global general_version 8.2.3
|
||||||
#global prerel ...
|
#global prerel ...
|
||||||
%global upstream_version %{general_version}%{?prerel}
|
%global upstream_version %{general_version}%{?prerel}
|
||||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||||
|
|
@ -38,7 +39,7 @@ Source: %{pypi_source sphinx %{upstream_version}}
|
||||||
|
|
||||||
# Allow extra themes to exist. We pull in python3-sphinx-theme-alabaster
|
# Allow extra themes to exist. We pull in python3-sphinx-theme-alabaster
|
||||||
# which causes that test to fail.
|
# which causes that test to fail.
|
||||||
Patch: sphinx-test_theming.diff
|
Patch: sphinx-test_theming.patch
|
||||||
|
|
||||||
# Make the first party extensions optional
|
# Make the first party extensions optional
|
||||||
# This removes the runtime dependencies on:
|
# This removes the runtime dependencies on:
|
||||||
|
|
@ -56,9 +57,13 @@ Patch: sphinx-test_theming.diff
|
||||||
# https://github.com/sphinx-doc/sphinx/pull/11747
|
# https://github.com/sphinx-doc/sphinx/pull/11747
|
||||||
Patch: Make-the-first-party-extensions-optional.patch
|
Patch: Make-the-first-party-extensions-optional.patch
|
||||||
|
|
||||||
# Fix the expected test docstring to match output in Python 3.11.7, 3.12.1 and later
|
# Compatibility with Python 3.14
|
||||||
# Proposed upstream.
|
Patch: https://github.com/sphinx-doc/sphinx/commit/8962398b761c3d85a.patch
|
||||||
Patch: https://github.com/sphinx-doc/sphinx/pull/11774.patch
|
Patch: https://github.com/sphinx-doc/sphinx/commit/e01e42f5fc738815b.patch
|
||||||
|
Patch: https://github.com/sphinx-doc/sphinx/pull/13527.patch
|
||||||
|
# Compatibility with docutils 0.22+
|
||||||
|
Patch: https://github.com/sphinx-doc/sphinx/pull/13610.patch
|
||||||
|
Patch: https://github.com/sphinx-doc/sphinx/pull/13883.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
@ -88,36 +93,68 @@ BuildRequires: texinfo
|
||||||
BuildRequires: ImageMagick
|
BuildRequires: ImageMagick
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with latex_tests}
|
%if %{undefined rhel} && %{with latex_tests}
|
||||||
BuildRequires: texlive-collection-fontsrecommended
|
BuildRequires: texlive-collection-fontsrecommended
|
||||||
BuildRequires: texlive-collection-latex
|
BuildRequires: texlive-collection-latex
|
||||||
|
BuildRequires: texlive-gnu-freefont
|
||||||
|
BuildRequires: latexmk
|
||||||
BuildRequires: texlive-dvipng
|
BuildRequires: texlive-dvipng
|
||||||
BuildRequires: texlive-dvisvgm
|
BuildRequires: texlive-dvisvgm
|
||||||
|
BuildRequires: tex(article.cls)
|
||||||
|
BuildRequires: tex(utf8x.def)
|
||||||
|
# Other dependencies.
|
||||||
|
BuildRequires: tex(alltt.sty)
|
||||||
|
BuildRequires: tex(amsfonts.sty)
|
||||||
BuildRequires: tex(amsmath.sty)
|
BuildRequires: tex(amsmath.sty)
|
||||||
|
BuildRequires: tex(amssymb.sty)
|
||||||
|
BuildRequires: tex(amstext.sty)
|
||||||
BuildRequires: tex(amsthm.sty)
|
BuildRequires: tex(amsthm.sty)
|
||||||
BuildRequires: tex(anyfontsize.sty)
|
BuildRequires: tex(anyfontsize.sty)
|
||||||
BuildRequires: tex(article.cls)
|
BuildRequires: tex(atbegshi.sty)
|
||||||
|
BuildRequires: tex(babel.sty)
|
||||||
|
BuildRequires: tex(bm.sty)
|
||||||
|
BuildRequires: tex(booktabs.sty)
|
||||||
BuildRequires: tex(capt-of.sty)
|
BuildRequires: tex(capt-of.sty)
|
||||||
BuildRequires: tex(cmap.sty)
|
BuildRequires: tex(cmap.sty)
|
||||||
BuildRequires: tex(color.sty)
|
BuildRequires: tex(colortbl.sty)
|
||||||
BuildRequires: tex(ctablestack.sty)
|
BuildRequires: tex(ellipse.sty)
|
||||||
|
BuildRequires: tex(etoolbox.sty)
|
||||||
BuildRequires: tex(fancyhdr.sty)
|
BuildRequires: tex(fancyhdr.sty)
|
||||||
BuildRequires: tex(fancyvrb.sty)
|
BuildRequires: tex(fancyvrb.sty)
|
||||||
|
BuildRequires: tex(float.sty)
|
||||||
BuildRequires: tex(fncychap.sty)
|
BuildRequires: tex(fncychap.sty)
|
||||||
|
BuildRequires: tex(fontawesome.sty)
|
||||||
|
BuildRequires: tex(fontawesome5.sty)
|
||||||
|
BuildRequires: tex(fontenc.sty)
|
||||||
|
BuildRequires: tex(fontspec.sty)
|
||||||
BuildRequires: tex(framed.sty)
|
BuildRequires: tex(framed.sty)
|
||||||
BuildRequires: tex(FreeSerif.otf)
|
|
||||||
BuildRequires: tex(geometry.sty)
|
BuildRequires: tex(geometry.sty)
|
||||||
|
BuildRequires: tex(graphicx.sty)
|
||||||
|
BuildRequires: tex(hypcap.sty)
|
||||||
BuildRequires: tex(hyperref.sty)
|
BuildRequires: tex(hyperref.sty)
|
||||||
|
BuildRequires: tex(inputenc.sty)
|
||||||
BuildRequires: tex(kvoptions.sty)
|
BuildRequires: tex(kvoptions.sty)
|
||||||
|
BuildRequires: tex(longtable.sty)
|
||||||
|
BuildRequires: tex(ltxcmds.sty)
|
||||||
BuildRequires: tex(luatex85.sty)
|
BuildRequires: tex(luatex85.sty)
|
||||||
|
BuildRequires: tex(makeidx.sty)
|
||||||
|
BuildRequires: tex(multicol.sty)
|
||||||
BuildRequires: tex(needspace.sty)
|
BuildRequires: tex(needspace.sty)
|
||||||
BuildRequires: tex(parskip.sty)
|
BuildRequires: tex(parskip.sty)
|
||||||
|
BuildRequires: tex(pict2e.sty)
|
||||||
BuildRequires: tex(polyglossia.sty)
|
BuildRequires: tex(polyglossia.sty)
|
||||||
|
BuildRequires: tex(remreset.sty)
|
||||||
|
BuildRequires: tex(substitutefont.sty)
|
||||||
BuildRequires: tex(tabulary.sty)
|
BuildRequires: tex(tabulary.sty)
|
||||||
|
BuildRequires: tex(textalpha.sty)
|
||||||
|
BuildRequires: tex(textcomp.sty)
|
||||||
|
BuildRequires: tex(tgheros.sty)
|
||||||
|
BuildRequires: tex(tgtermes.sty)
|
||||||
BuildRequires: tex(titlesec.sty)
|
BuildRequires: tex(titlesec.sty)
|
||||||
BuildRequires: tex(upquote.sty)
|
BuildRequires: tex(upquote.sty)
|
||||||
BuildRequires: tex(utf8x.def)
|
BuildRequires: tex(varwidth.sty)
|
||||||
BuildRequires: tex(wrapfig.sty)
|
BuildRequires: tex(wrapfig.sty)
|
||||||
|
BuildRequires: tex(xcolor.sty)
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
@ -156,6 +193,7 @@ Summary: Python documentation generator
|
||||||
|
|
||||||
Recommends: graphviz
|
Recommends: graphviz
|
||||||
Recommends: ImageMagick
|
Recommends: ImageMagick
|
||||||
|
Recommends: make
|
||||||
|
|
||||||
# Upstream Requires those, but we have a patch to remove the dependency.
|
# Upstream Requires those, but we have a patch to remove the dependency.
|
||||||
# We keep them Recommended to preserve the default user experience.
|
# We keep them Recommended to preserve the default user experience.
|
||||||
|
|
@ -196,39 +234,93 @@ the Python docs:
|
||||||
snippets and inclusion of appropriately formatted docstrings.
|
snippets and inclusion of appropriately formatted docstrings.
|
||||||
|
|
||||||
|
|
||||||
|
%if %{undefined rhel}
|
||||||
%package -n python%{python3_pkgversion}-sphinx-latex
|
%package -n python%{python3_pkgversion}-sphinx-latex
|
||||||
Summary: LaTeX builder dependencies for python%{python3_pkgversion}-sphinx
|
Summary: LaTeX builder dependencies for python%{python3_pkgversion}-sphinx
|
||||||
|
|
||||||
Requires: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
|
Requires: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
|
||||||
|
# Required dependencies as stated in the documentation [1]:
|
||||||
|
#
|
||||||
|
# - texlive-collection-latexrecommended
|
||||||
|
# - texlive-collection-fontsrecommended
|
||||||
|
# - texlive-collection-fontsextra
|
||||||
|
# - texlive-collection-latexextra
|
||||||
|
# - texlive-tex-gyre
|
||||||
|
# - latexmk
|
||||||
|
#
|
||||||
|
# [1] https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
|
||||||
|
#
|
||||||
|
# These packages install 2500+ other packages requiring ~3 GiB of space.
|
||||||
|
# Therefore, a more precise list of dependencies.
|
||||||
|
|
||||||
Requires: texlive-collection-fontsrecommended
|
Requires: texlive-collection-fontsrecommended
|
||||||
Requires: texlive-collection-latex
|
Requires: texlive-collection-latex
|
||||||
|
Requires: texlive-gnu-freefont
|
||||||
|
Requires: latexmk
|
||||||
|
|
||||||
|
# Required by sphinx.ext.imgmath – Render math as images
|
||||||
Requires: texlive-dvipng
|
Requires: texlive-dvipng
|
||||||
Requires: texlive-dvisvgm
|
Requires: texlive-dvisvgm
|
||||||
|
#Requires: tex(preview.sty) Pulls in texlive-collection-latexrecommended
|
||||||
|
|
||||||
|
Requires: tex(article.cls)
|
||||||
|
Requires: tex(utf8x.def)
|
||||||
|
|
||||||
|
# Other dependencies.
|
||||||
|
# -- After searching for \RequirePackage{..} and \usepackage{..}.
|
||||||
|
Requires: tex(alltt.sty)
|
||||||
|
Requires: tex(amsfonts.sty)
|
||||||
Requires: tex(amsmath.sty)
|
Requires: tex(amsmath.sty)
|
||||||
|
Requires: tex(amssymb.sty)
|
||||||
|
Requires: tex(amstext.sty)
|
||||||
Requires: tex(amsthm.sty)
|
Requires: tex(amsthm.sty)
|
||||||
Requires: tex(anyfontsize.sty)
|
Requires: tex(anyfontsize.sty)
|
||||||
Requires: tex(article.cls)
|
Requires: tex(atbegshi.sty)
|
||||||
|
Requires: tex(babel.sty)
|
||||||
|
Requires: tex(bm.sty)
|
||||||
|
Requires: tex(booktabs.sty)
|
||||||
Requires: tex(capt-of.sty)
|
Requires: tex(capt-of.sty)
|
||||||
Requires: tex(cmap.sty)
|
Requires: tex(cmap.sty)
|
||||||
Requires: tex(color.sty)
|
Requires: tex(colortbl.sty)
|
||||||
Requires: tex(ctablestack.sty)
|
Requires: tex(ellipse.sty)
|
||||||
|
Requires: tex(etoolbox.sty)
|
||||||
Requires: tex(fancyhdr.sty)
|
Requires: tex(fancyhdr.sty)
|
||||||
Requires: tex(fancyvrb.sty)
|
Requires: tex(fancyvrb.sty)
|
||||||
|
Requires: tex(float.sty)
|
||||||
Requires: tex(fncychap.sty)
|
Requires: tex(fncychap.sty)
|
||||||
|
Requires: tex(fontawesome.sty)
|
||||||
|
Requires: tex(fontawesome5.sty)
|
||||||
|
Requires: tex(fontenc.sty)
|
||||||
|
Requires: tex(fontspec.sty)
|
||||||
Requires: tex(framed.sty)
|
Requires: tex(framed.sty)
|
||||||
Requires: tex(FreeSerif.otf)
|
|
||||||
Requires: tex(geometry.sty)
|
Requires: tex(geometry.sty)
|
||||||
|
Requires: tex(graphicx.sty)
|
||||||
|
Requires: tex(hypcap.sty)
|
||||||
Requires: tex(hyperref.sty)
|
Requires: tex(hyperref.sty)
|
||||||
|
Requires: tex(inputenc.sty)
|
||||||
Requires: tex(kvoptions.sty)
|
Requires: tex(kvoptions.sty)
|
||||||
|
Requires: tex(longtable.sty)
|
||||||
|
Requires: tex(ltxcmds.sty)
|
||||||
Requires: tex(luatex85.sty)
|
Requires: tex(luatex85.sty)
|
||||||
|
Requires: tex(makeidx.sty)
|
||||||
|
Requires: tex(multicol.sty)
|
||||||
Requires: tex(needspace.sty)
|
Requires: tex(needspace.sty)
|
||||||
Requires: tex(parskip.sty)
|
Requires: tex(parskip.sty)
|
||||||
|
Requires: tex(pict2e.sty)
|
||||||
Requires: tex(polyglossia.sty)
|
Requires: tex(polyglossia.sty)
|
||||||
|
Requires: tex(remreset.sty)
|
||||||
|
Requires: tex(substitutefont.sty)
|
||||||
Requires: tex(tabulary.sty)
|
Requires: tex(tabulary.sty)
|
||||||
|
Requires: tex(textalpha.sty)
|
||||||
|
Requires: tex(textcomp.sty)
|
||||||
|
Requires: tex(tgheros.sty)
|
||||||
|
Requires: tex(tgtermes.sty)
|
||||||
Requires: tex(titlesec.sty)
|
Requires: tex(titlesec.sty)
|
||||||
Requires: tex(upquote.sty)
|
Requires: tex(upquote.sty)
|
||||||
Requires: tex(utf8x.def)
|
Requires: tex(varwidth.sty)
|
||||||
Requires: tex(wrapfig.sty)
|
Requires: tex(wrapfig.sty)
|
||||||
|
Requires: tex(xcolor.sty)
|
||||||
|
#Requires: tex(xeCJK.sty) Pulls in pLaTeX and upLaTeX
|
||||||
|
|
||||||
# No files in this package, automatic provides don't work:
|
# No files in this package, automatic provides don't work:
|
||||||
%py_provides python%{python3_pkgversion}-sphinx-latex
|
%py_provides python%{python3_pkgversion}-sphinx-latex
|
||||||
|
|
@ -243,6 +335,7 @@ useful to many other projects.
|
||||||
|
|
||||||
This package pulls in the TeX dependencies needed by Sphinx's LaTeX
|
This package pulls in the TeX dependencies needed by Sphinx's LaTeX
|
||||||
builder.
|
builder.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
|
|
@ -264,27 +357,41 @@ This package contains documentation in the HTML format.
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n sphinx-%{upstream_version} -p1
|
%autosetup -n sphinx-%{upstream_version} -p1
|
||||||
|
|
||||||
|
# Drop test-dependency on pytest-xdist
|
||||||
|
# This allows for parallel testing, but has a lot of dependencies.
|
||||||
|
# We want to avoid the dependency in RHEL, where it is not available.
|
||||||
|
%if 0%{?rhel}
|
||||||
|
sed -i -e '/pytest-xdist/d' pyproject.toml
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Support for docutils 0.22+
|
||||||
|
sed -i -e 's/docutils>=0.20,<0.22/docutils>=0.20,<0.23/' pyproject.toml
|
||||||
|
|
||||||
|
# Drop test-dependency on defusedxml,
|
||||||
|
# use xml from the standard library instead.
|
||||||
|
# defusedxml is safer but this is only used in tests.
|
||||||
|
# Upstream uses defusedxml to be "safer for future contributors when they
|
||||||
|
# create/open branches and pull requests" -- that does not concern us.
|
||||||
|
# https://github.com/sphinx-doc/sphinx/pull/12168#discussion_r1535383868
|
||||||
|
# We want to avoid the dependency in RHEL, but no harm in doing so unconditionally.
|
||||||
|
sed -i '/"defusedxml/d' pyproject.toml
|
||||||
|
sed -i 's/from defusedxml./from xml.etree./' sphinx/testing/util.py tests/test_theming/test_theming.py
|
||||||
|
|
||||||
|
%if %{without snowballstemmer}
|
||||||
|
# Drop dependency on snowballstemmer for RHEL, implement dummy method instead
|
||||||
|
sed -i -e '/snowballstemmer/d' pyproject.toml
|
||||||
|
sed -i -e 's/^import \(snowballstemmer\)/from . import dummystemmer as \1/' sphinx/search/*.py
|
||||||
|
cat > sphinx/search/dummystemmer.py <<_EOF
|
||||||
|
class stemmer:
|
||||||
|
def __init__(self, *args, **kwargs): pass
|
||||||
|
def stemWord(self, word): return word
|
||||||
|
_EOF
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{without imagemagick_tests}
|
%if %{without imagemagick_tests}
|
||||||
rm tests/test_ext_imgconverter.py
|
rm tests/test_extensions/test_ext_imgconverter.py
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{without filelock_tests}
|
|
||||||
sed -i '/filelock/d' pyproject.toml
|
|
||||||
rm tests/test_build_linkcheck.py tests/test_ext_intersphinx.py
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{defined rhel}
|
|
||||||
# unwanted dependency in RHEL, https://bugzilla.redhat.com/show_bug.cgi?id=1945182
|
|
||||||
sed -i '/html5lib/d' pyproject.toml
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Sphinx' tests import from each other, this feature is not supported by
|
|
||||||
# the 'importlib' import mode in pytest. Upstream mitigates this by invoking
|
|
||||||
# `python -m pytest` rather than `pytest` directly, but in the context of the
|
|
||||||
# RPM build we explicitly want to test the installed library rather than the
|
|
||||||
# one from PWD.
|
|
||||||
# https://github.com/sphinx-doc/sphinx/issues/11740
|
|
||||||
sed -i '/"--import-mode=importlib",/d' pyproject.toml
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires -r %{?with_tests:-x test}
|
%pyproject_buildrequires -r %{?with_tests:-x test}
|
||||||
|
|
@ -364,25 +471,28 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
||||||
# Currently, all linkcheck tests and test_latex_images need internet
|
# Currently, all linkcheck tests and test_latex_images need internet
|
||||||
# test_build_latex_doc needs internet to download pictures,
|
# test_build_latex_doc needs internet to download pictures,
|
||||||
# but fails also with it enabled, we decided to skip it entirely
|
# but fails also with it enabled, we decided to skip it entirely
|
||||||
# In RHEL builds, skip tests which use html5lib (excluded above)
|
# test_autodoc_type_aliases fails with Python 3.12.4, 3.13.0b3
|
||||||
%pytest \
|
# skip temporarily until resolved:
|
||||||
%if %{defined rhel}
|
# https://github.com/sphinx-doc/sphinx/issues/12430
|
||||||
--ignore tests/test_build_html.py \
|
k="not test_autodoc_type_aliases"
|
||||||
--ignore tests/test_build_latex.py \
|
|
||||||
--ignore tests/test_build_texinfo.py \
|
|
||||||
--ignore tests/test_domain_std.py \
|
|
||||||
--ignore tests/test_smartquotes.py \
|
|
||||||
%endif
|
|
||||||
%if %{without internet}
|
%if %{without internet}
|
||||||
-k "not linkcheck and not test_latex_images and not test_build_latex_doc" \
|
k="${k} and not linkcheck and not test_latex_images and not test_build_latex_doc"
|
||||||
%endif
|
|
||||||
;
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{without snowballstemmer}
|
||||||
|
# Without snowballstemmer, some tests have to be skipped as well,
|
||||||
|
# as the results with dummystemmer do not exactly match the testcases
|
||||||
|
k="${k} and not test_meta_keys_are_handled_for_language_en and not test_stemmer"
|
||||||
|
k="${k} and not test_term_in_heading_and_section and not test_IndexBuilder"
|
||||||
|
k="${k} and not test_check_js_search_indexes"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%pytest -k "${k}"
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-sphinx -f sphinx.lang
|
%files -n python%{python3_pkgversion}-sphinx -f sphinx.lang
|
||||||
%license LICENSE
|
%license LICENSE.rst
|
||||||
%doc AUTHORS CHANGES EXAMPLES README.rst
|
%doc README.rst
|
||||||
%{_bindir}/sphinx-*
|
%{_bindir}/sphinx-*
|
||||||
%{python3_sitelib}/sphinx/
|
%{python3_sitelib}/sphinx/
|
||||||
%dir %{python3_sitelib}/sphinxcontrib/
|
%dir %{python3_sitelib}/sphinxcontrib/
|
||||||
|
|
@ -392,13 +502,13 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
||||||
%dir %{_datadir}/sphinx/locale/*
|
%dir %{_datadir}/sphinx/locale/*
|
||||||
%{_mandir}/man1/sphinx-*
|
%{_mandir}/man1/sphinx-*
|
||||||
|
|
||||||
|
%if %{undefined rhel}
|
||||||
%files -n python%{python3_pkgversion}-sphinx-latex
|
%files -n python%{python3_pkgversion}-sphinx-latex
|
||||||
# empty, this is a metapackage
|
# empty, this is a metapackage
|
||||||
|
%endif
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%license LICENSE
|
%license LICENSE.rst
|
||||||
%doc html
|
%doc html
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (sphinx-7.2.6.tar.gz) = 9a42e38c3c54429cc008b58892297ade4ccdd67561ee671e42a1fae976955895bb5383d58cb66a4f9f7edd1cc50dc2d1f083efeef036eac9fffc205979d3ccbc
|
SHA512 (sphinx-8.2.3.tar.gz) = e7cbe251e4f44eb59ef6fd84d3918b1b29941943b75265da75aa9533379746e76331ac8a3ba8c1694840adeebd6886e0fc8eebf5407271aaeddf39594d8e1523
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
diff -ru Sphinx-1.7.6/tests/test_theming.py Sphinx-1.7.6_patched/tests/test_theming.py
|
|
||||||
--- Sphinx-1.7.6/tests/test_theming.py 2018-07-16 11:24:40.000000000 +0200
|
|
||||||
+++ Sphinx-1.7.6_patched/tests/test_theming.py 2018-07-20 15:17:35.049263077 +0200
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
themes.append('alabaster')
|
|
||||||
|
|
||||||
# test Theme class API
|
|
||||||
- assert set(app.registry.html_themes.keys()) == set(themes)
|
|
||||||
+ assert set(app.registry.html_themes.keys()) >= set(themes)
|
|
||||||
assert app.registry.html_themes['test-theme'] == str(app.srcdir / 'test_theme' / 'test-theme')
|
|
||||||
assert app.registry.html_themes['ziptheme'] == str(app.srcdir / 'ziptheme.zip')
|
|
||||||
assert app.registry.html_themes['staticfiles'] == str(app.srcdir / 'test_theme' / 'staticfiles')
|
|
||||||
25
sphinx-test_theming.patch
Normal file
25
sphinx-test_theming.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
From 399ae81dfbedb7b8acf84e56b0e4b2d5023432ec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karolina Surma <ksurma@redhat.com>
|
||||||
|
Date: Wed, 26 Feb 2025 10:43:44 +0100
|
||||||
|
Subject: [PATCH] Patch test_theming to accomodate for Fedora-added theme
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_theming/test_theming.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_theming/test_theming.py b/tests/test_theming/test_theming.py
|
||||||
|
index 173e0c9..515e546 100644
|
||||||
|
--- a/tests/test_theming/test_theming.py
|
||||||
|
+++ b/tests/test_theming/test_theming.py
|
||||||
|
@@ -58,7 +58,7 @@ def test_theme_api(app: SphinxTestApp) -> None:
|
||||||
|
]
|
||||||
|
|
||||||
|
# test Theme class API
|
||||||
|
- assert set(app.registry.html_themes.keys()) == set(themes)
|
||||||
|
+ assert set(app.registry.html_themes.keys()) >= set(themes)
|
||||||
|
assert app.registry.html_themes['test-theme'] == (
|
||||||
|
app.srcdir / 'test_theme' / 'test-theme'
|
||||||
|
)
|
||||||
|
--
|
||||||
|
2.48.1
|
||||||
|
|
||||||
11
tests/include-sphinxcontrib-jquery/main.fmf
Normal file
11
tests/include-sphinxcontrib-jquery/main.fmf
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
summary: run the basic documentation build
|
||||||
|
test: |
|
||||||
|
sphinx-build -M html source/ build/ &&
|
||||||
|
grep '<script src="_static/jquery.js' build/html/index.html &&
|
||||||
|
grep '<script src="_static/_sphinx_javascript_frameworks_compat.js' build/html/index.html &&
|
||||||
|
test -f build/html/_static/jquery.js &&
|
||||||
|
test -f build/html/_static/_sphinx_javascript_frameworks_compat.js &&
|
||||||
|
rm -rf build/
|
||||||
|
require:
|
||||||
|
- python3-sphinx
|
||||||
|
- python3-sphinxcontrib-jquery
|
||||||
7
tests/include-sphinxcontrib-jquery/source/conf.py
Normal file
7
tests/include-sphinxcontrib-jquery/source/conf.py
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
project = 'Test'
|
||||||
|
copyright = '2024, Test'
|
||||||
|
author = 'Test'
|
||||||
|
release = '0.3.0'
|
||||||
|
extensions = [
|
||||||
|
"sphinxcontrib.jquery",
|
||||||
|
]
|
||||||
15
tests/include-sphinxcontrib-jquery/source/index.rst
Normal file
15
tests/include-sphinxcontrib-jquery/source/index.rst
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
Test docfile
|
||||||
|
============
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: Contents:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Indices and tables
|
||||||
|
==================
|
||||||
|
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
||||||
10
tests/smoke-alabaster/main.fmf
Normal file
10
tests/smoke-alabaster/main.fmf
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
summary: run the basic documentation build
|
||||||
|
test: |
|
||||||
|
sphinx-build -M html source/ build/ &&
|
||||||
|
grep '<section id="test-docfile">' build/html/index.html &&
|
||||||
|
grep '<h1>Test docfile' build/html/index.html &&
|
||||||
|
grep '_static/alabaster.css' build/html/index.html &&
|
||||||
|
rm -rf build/
|
||||||
|
require:
|
||||||
|
- python3-sphinx
|
||||||
|
- python3-sphinx-theme-alabaster
|
||||||
5
tests/smoke-alabaster/source/conf.py
Normal file
5
tests/smoke-alabaster/source/conf.py
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
project = 'Test'
|
||||||
|
copyright = '2024, Test'
|
||||||
|
author = 'Test'
|
||||||
|
release = '0.3.0'
|
||||||
|
html_theme = 'alabaster'
|
||||||
15
tests/smoke-alabaster/source/index.rst
Normal file
15
tests/smoke-alabaster/source/index.rst
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
Test docfile
|
||||||
|
============
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: Contents:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Indices and tables
|
||||||
|
==================
|
||||||
|
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
||||||
11
tests/smoke-rtd-theme/main.fmf
Normal file
11
tests/smoke-rtd-theme/main.fmf
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
summary: run the basic documentation build with sphinx-rtd-theme
|
||||||
|
test: |
|
||||||
|
sphinx-build -M html source/ build/ &&
|
||||||
|
grep '<section id="test-docfile">' build/html/index.html &&
|
||||||
|
grep '<h1>Test docfile' build/html/index.html &&
|
||||||
|
grep 'SphinxRtdTheme' build/html/_static/js/theme.js &&
|
||||||
|
grep '<script src="_static/js/theme.js' build/html/index.html &&
|
||||||
|
rm -rf build/
|
||||||
|
require:
|
||||||
|
- python3-sphinx
|
||||||
|
- python3-sphinx_rtd_theme
|
||||||
8
tests/smoke-rtd-theme/source/conf.py
Normal file
8
tests/smoke-rtd-theme/source/conf.py
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
project = 'Test'
|
||||||
|
copyright = '2024, Test'
|
||||||
|
author = 'Test'
|
||||||
|
release = '0.3.0'
|
||||||
|
html_theme = 'sphinx_rtd_theme'
|
||||||
|
extensions = [
|
||||||
|
'sphinx_rtd_theme',
|
||||||
|
]
|
||||||
15
tests/smoke-rtd-theme/source/index.rst
Normal file
15
tests/smoke-rtd-theme/source/index.rst
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
Test docfile
|
||||||
|
============
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: Contents:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Indices and tables
|
||||||
|
==================
|
||||||
|
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
||||||
Loading…
Add table
Add a link
Reference in a new issue