Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fa5c435e1 | ||
|
|
386cb6e874 | ||
|
|
e4c31fd612 | ||
|
|
59303ae9d8 | ||
|
|
4ac821f497 | ||
|
|
b787bdf90d | ||
|
|
574c5a94d6 | ||
|
|
d241286834 | ||
|
|
78fa545ec7 | ||
|
|
0009cf4a25 | ||
|
|
31b58a6666 | ||
|
|
bd77693107 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -49,3 +49,4 @@
|
||||
/sphinx-7.3.7.tar.gz
|
||||
/sphinx-8.1.3.tar.gz
|
||||
/sphinx-8.2.3.tar.gz
|
||||
/sphinx-9.1.0.tar.gz
|
||||
|
||||
314
13527.patch
314
13527.patch
@@ -1,314 +0,0 @@
|
||||
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',
|
||||
@@ -1,29 +0,0 @@
|
||||
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,21 +1,24 @@
|
||||
From f3fba803e1c39232f86acc9a21657cad171ce71b Mon Sep 17 00:00:00 2001
|
||||
From 7b731f7ceb8161b11a529f182bf567b77993bdeb Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Wed, 5 Mar 2025 12:14:49 +0100
|
||||
Subject: [PATCH] Make the first party extensions optional, add [extensions]
|
||||
extra
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
||||
---
|
||||
pyproject.toml | 33 ++++++++++++++++----
|
||||
pyproject.toml | 35 ++++++++++++++++----
|
||||
sphinx/application.py | 6 ++--
|
||||
sphinx/registry.py | 10 +++---
|
||||
sphinx/testing/fixtures.py | 7 +++++
|
||||
sphinx/testing/fixtures.py | 7 ++++
|
||||
tests/test_builders/test_build_html_maths.py | 3 ++
|
||||
tests/test_writers/test_api_translator.py | 2 ++
|
||||
6 files changed, 48 insertions(+), 13 deletions(-)
|
||||
6 files changed, 50 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index c4b1b6d..4e59e90 100644
|
||||
index 1195b04..9a7213f 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -67,12 +67,6 @@ classifiers = [
|
||||
@@ -30,11 +33,12 @@ index c4b1b6d..4e59e90 100644
|
||||
- "sphinxcontrib-serializinghtml>=1.1.9",
|
||||
"Jinja2>=3.1",
|
||||
"Pygments>=2.17",
|
||||
"docutils>=0.20,<0.22",
|
||||
@@ -88,8 +82,35 @@ dependencies = [
|
||||
"docutils>=0.21,<0.23",
|
||||
@@ -87,6 +81,34 @@ dependencies = [
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
+[project.optional-dependencies]
|
||||
+applehelp = [
|
||||
+ "sphinxcontrib-applehelp>=1.0.7",
|
||||
+]
|
||||
@@ -61,17 +65,23 @@ index c4b1b6d..4e59e90 100644
|
||||
+ "sphinx[serializinghtml]",
|
||||
+ "sphinx[qthelp]",
|
||||
+]
|
||||
+
|
||||
[[project.authors]]
|
||||
name = "Adam Turner"
|
||||
email = "aa-turner@users.noreply.github.com"
|
||||
@@ -104,6 +126,7 @@ sphinx-autogen = "sphinx.ext.autosummary.generate:main"
|
||||
[dependency-groups]
|
||||
docs = [
|
||||
"sphinxcontrib-websupport",
|
||||
+ "sphinx[extensions]",
|
||||
]
|
||||
lint = [
|
||||
"ruff==0.9.9",
|
||||
"ruff==0.14.9",
|
||||
diff --git a/sphinx/application.py b/sphinx/application.py
|
||||
index fe0e8bd..dcb3d75 100644
|
||||
index 5349c36..4da1635 100644
|
||||
--- a/sphinx/application.py
|
||||
+++ b/sphinx/application.py
|
||||
@@ -284,7 +284,7 @@ class Sphinx:
|
||||
@@ -292,7 +292,7 @@ class Sphinx:
|
||||
# load all built-in extension modules, first-party extension modules,
|
||||
# and first-party themes
|
||||
for extension in builtin_extensions:
|
||||
@@ -80,7 +90,7 @@ index fe0e8bd..dcb3d75 100644
|
||||
|
||||
# load all user-given extension modules
|
||||
for extension in self.config.extensions:
|
||||
@@ -478,7 +478,7 @@ class Sphinx:
|
||||
@@ -494,7 +494,7 @@ class Sphinx:
|
||||
|
||||
# ---- general extensibility interface -------------------------------------
|
||||
|
||||
@@ -89,7 +99,7 @@ index fe0e8bd..dcb3d75 100644
|
||||
"""Import and setup a Sphinx extension module.
|
||||
|
||||
Load the extension given by the module *name*. Use this if your
|
||||
@@ -486,7 +486,7 @@ class Sphinx:
|
||||
@@ -502,7 +502,7 @@ class Sphinx:
|
||||
called twice.
|
||||
"""
|
||||
logger.debug('[app] setting up extension: %r', extname)
|
||||
@@ -99,10 +109,10 @@ index fe0e8bd..dcb3d75 100644
|
||||
@staticmethod
|
||||
def require_sphinx(version: tuple[int, int] | str) -> None:
|
||||
diff --git a/sphinx/registry.py b/sphinx/registry.py
|
||||
index ce52a03..3bc90d5 100644
|
||||
index da72924..b6f6122 100644
|
||||
--- a/sphinx/registry.py
|
||||
+++ b/sphinx/registry.py
|
||||
@@ -519,7 +519,7 @@ class SphinxComponentRegistry:
|
||||
@@ -528,7 +528,7 @@ class SphinxComponentRegistry:
|
||||
def add_html_theme(self, name: str, theme_path: str | os.PathLike[str]) -> None:
|
||||
self.html_themes[name] = _StrPath(theme_path)
|
||||
|
||||
@@ -111,7 +121,7 @@ index ce52a03..3bc90d5 100644
|
||||
"""Load a Sphinx extension."""
|
||||
if extname in app.extensions: # already loaded
|
||||
return
|
||||
@@ -540,10 +540,12 @@ class SphinxComponentRegistry:
|
||||
@@ -549,10 +549,12 @@ class SphinxComponentRegistry:
|
||||
try:
|
||||
mod = import_module(extname)
|
||||
except ImportError as err:
|
||||
@@ -128,7 +138,7 @@ index ce52a03..3bc90d5 100644
|
||||
setup: _ExtensionSetupFunc | None = getattr(mod, 'setup', None)
|
||||
if setup is None:
|
||||
diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py
|
||||
index ec143fa..e6d9da1 100644
|
||||
index c6fdebe..e9f98a8 100644
|
||||
--- a/sphinx/testing/fixtures.py
|
||||
+++ b/sphinx/testing/fixtures.py
|
||||
@@ -31,6 +31,7 @@ DEFAULT_ENABLED_MARKERS = [
|
||||
@@ -153,10 +163,10 @@ index ec143fa..e6d9da1 100644
|
||||
|
||||
pargs: dict[int, Any] = {}
|
||||
diff --git a/tests/test_builders/test_build_html_maths.py b/tests/test_builders/test_build_html_maths.py
|
||||
index cc21142..16382e3 100644
|
||||
index 8654ca9..8ad006f 100644
|
||||
--- a/tests/test_builders/test_build_html_maths.py
|
||||
+++ b/tests/test_builders/test_build_html_maths.py
|
||||
@@ -37,6 +37,7 @@ def test_html_math_renderer_is_imgmath(app: SphinxTestApp) -> None:
|
||||
@@ -40,6 +40,7 @@ def test_html_math_renderer_is_imgmath(app: SphinxTestApp) -> None:
|
||||
assert app.builder.math_renderer_name == 'imgmath'
|
||||
|
||||
|
||||
@@ -164,7 +174,7 @@ index cc21142..16382e3 100644
|
||||
@pytest.mark.sphinx(
|
||||
'html',
|
||||
testroot='basic',
|
||||
@@ -62,6 +63,7 @@ def test_html_math_renderer_is_duplicated2(app: SphinxTestApp) -> None:
|
||||
@@ -67,6 +68,7 @@ def test_html_math_renderer_is_duplicated2(app: SphinxTestApp) -> None:
|
||||
assert app.builder.math_renderer_name == 'imgmath' # The another one is chosen
|
||||
|
||||
|
||||
@@ -172,7 +182,7 @@ index cc21142..16382e3 100644
|
||||
@pytest.mark.sphinx(
|
||||
'html',
|
||||
testroot='basic',
|
||||
@@ -75,6 +77,7 @@ def test_html_math_renderer_is_chosen(app: SphinxTestApp) -> None:
|
||||
@@ -80,6 +82,7 @@ def test_html_math_renderer_is_chosen(app: SphinxTestApp) -> None:
|
||||
assert app.builder.math_renderer_name == 'imgmath'
|
||||
|
||||
|
||||
@@ -201,5 +211,5 @@ index 1220192..8e8bb33 100644
|
||||
def test_json_set_translator_for_json(app: SphinxTestApp) -> None:
|
||||
translator_class = app.builder.get_translator_class()
|
||||
--
|
||||
2.48.1
|
||||
2.52.0
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
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():
|
||||
@@ -18,10 +18,11 @@
|
||||
%bcond imagemagick_tests %{undefined rhel}
|
||||
|
||||
# During texlive updates, sometimes the latex environment is unstable
|
||||
# NOTE: LaTeX tests are never run when building for ELN.
|
||||
%bcond latex_tests 1
|
||||
|
||||
Name: python-sphinx
|
||||
%global general_version 8.2.3
|
||||
%global general_version 9.1.0
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
@@ -56,11 +57,6 @@ Patch: sphinx-test_theming.patch
|
||||
# https://github.com/sphinx-doc/sphinx/pull/11747
|
||||
Patch: Make-the-first-party-extensions-optional.patch
|
||||
|
||||
# Compatibility with Python 3.14
|
||||
Patch: https://github.com/sphinx-doc/sphinx/commit/8962398b761c3d85a.patch
|
||||
Patch: https://github.com/sphinx-doc/sphinx/commit/e01e42f5fc738815b.patch
|
||||
Patch: https://github.com/sphinx-doc/sphinx/pull/13527.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: make
|
||||
@@ -89,36 +85,67 @@ BuildRequires: texinfo
|
||||
BuildRequires: ImageMagick
|
||||
%endif
|
||||
|
||||
%if %{with latex_tests}
|
||||
%if %{undefined rhel} && %{with latex_tests}
|
||||
BuildRequires: texlive-collection-fontsrecommended
|
||||
BuildRequires: texlive-collection-latex
|
||||
BuildRequires: texlive-gnu-freefont
|
||||
BuildRequires: latexmk
|
||||
BuildRequires: texlive-dvipng
|
||||
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(amssymb.sty)
|
||||
BuildRequires: tex(amstext.sty)
|
||||
BuildRequires: tex(amsthm.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(cmap.sty)
|
||||
BuildRequires: tex(color.sty)
|
||||
BuildRequires: tex(ctablestack.sty)
|
||||
BuildRequires: tex(colortbl.sty)
|
||||
BuildRequires: tex(ellipse.sty)
|
||||
BuildRequires: tex(etoolbox.sty)
|
||||
BuildRequires: tex(fancyhdr.sty)
|
||||
BuildRequires: tex(fancyvrb.sty)
|
||||
BuildRequires: tex(float.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(FreeSerif.otf)
|
||||
BuildRequires: tex(geometry.sty)
|
||||
BuildRequires: tex(graphicx.sty)
|
||||
BuildRequires: tex(hypcap.sty)
|
||||
BuildRequires: tex(hyperref.sty)
|
||||
BuildRequires: tex(inputenc.sty)
|
||||
BuildRequires: tex(kvoptions.sty)
|
||||
BuildRequires: tex(longtable.sty)
|
||||
BuildRequires: tex(ltxcmds.sty)
|
||||
BuildRequires: tex(luatex85.sty)
|
||||
BuildRequires: tex(makeidx.sty)
|
||||
BuildRequires: tex(multicol.sty)
|
||||
BuildRequires: tex(needspace.sty)
|
||||
BuildRequires: tex(parskip.sty)
|
||||
BuildRequires: tex(pict2e.sty)
|
||||
BuildRequires: tex(polyglossia.sty)
|
||||
BuildRequires: tex(remreset.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(upquote.sty)
|
||||
BuildRequires: tex(utf8x.def)
|
||||
BuildRequires: tex(varwidth.sty)
|
||||
BuildRequires: tex(wrapfig.sty)
|
||||
BuildRequires: tex(xcolor.sty)
|
||||
%endif
|
||||
%endif
|
||||
|
||||
@@ -157,6 +184,7 @@ Summary: Python documentation generator
|
||||
|
||||
Recommends: graphviz
|
||||
Recommends: ImageMagick
|
||||
Recommends: make
|
||||
|
||||
# Upstream Requires those, but we have a patch to remove the dependency.
|
||||
# We keep them Recommended to preserve the default user experience.
|
||||
@@ -197,39 +225,92 @@ the Python docs:
|
||||
snippets and inclusion of appropriately formatted docstrings.
|
||||
|
||||
|
||||
%if %{undefined rhel}
|
||||
%package -n python%{python3_pkgversion}-sphinx-latex
|
||||
Summary: LaTeX builder dependencies for python%{python3_pkgversion}-sphinx
|
||||
|
||||
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-latex
|
||||
Requires: texlive-gnu-freefont
|
||||
Requires: latexmk
|
||||
|
||||
# Required by sphinx.ext.imgmath – Render math as images
|
||||
Requires: texlive-dvipng
|
||||
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(amssymb.sty)
|
||||
Requires: tex(amstext.sty)
|
||||
Requires: tex(amsthm.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(cmap.sty)
|
||||
Requires: tex(color.sty)
|
||||
Requires: tex(ctablestack.sty)
|
||||
Requires: tex(colortbl.sty)
|
||||
Requires: tex(ellipse.sty)
|
||||
Requires: tex(etoolbox.sty)
|
||||
Requires: tex(fancyhdr.sty)
|
||||
Requires: tex(fancyvrb.sty)
|
||||
Requires: tex(float.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(FreeSerif.otf)
|
||||
Requires: tex(geometry.sty)
|
||||
Requires: tex(graphicx.sty)
|
||||
Requires: tex(hypcap.sty)
|
||||
Requires: tex(hyperref.sty)
|
||||
Requires: tex(inputenc.sty)
|
||||
Requires: tex(kvoptions.sty)
|
||||
Requires: tex(longtable.sty)
|
||||
Requires: tex(ltxcmds.sty)
|
||||
Requires: tex(luatex85.sty)
|
||||
Requires: tex(makeidx.sty)
|
||||
Requires: tex(multicol.sty)
|
||||
Requires: tex(needspace.sty)
|
||||
Requires: tex(parskip.sty)
|
||||
Requires: tex(pict2e.sty)
|
||||
Requires: tex(polyglossia.sty)
|
||||
Requires: tex(remreset.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(upquote.sty)
|
||||
Requires: tex(utf8x.def)
|
||||
Requires: tex(varwidth.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:
|
||||
%py_provides python%{python3_pkgversion}-sphinx-latex
|
||||
@@ -244,6 +325,7 @@ useful to many other projects.
|
||||
|
||||
This package pulls in the TeX dependencies needed by Sphinx's LaTeX
|
||||
builder.
|
||||
%endif
|
||||
|
||||
|
||||
%package doc
|
||||
@@ -272,6 +354,9 @@ This package contains documentation in the HTML format.
|
||||
sed -i -e '/pytest-xdist/d' pyproject.toml
|
||||
%endif
|
||||
|
||||
# sphinx 9.1.0 requires pytest >= 9, which we don't have in Fedora yet
|
||||
sed -i '/"pytest>=/ s/>=[^",]*//' pyproject.toml
|
||||
|
||||
# Drop test-dependency on defusedxml,
|
||||
# use xml from the standard library instead.
|
||||
# defusedxml is safer but this is only used in tests.
|
||||
@@ -294,12 +379,12 @@ _EOF
|
||||
%endif
|
||||
|
||||
%if %{without imagemagick_tests}
|
||||
rm tests/test_extensions/test_ext_imgconverter.py
|
||||
rm -r tests/test_ext_imgconverter/
|
||||
%endif
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r %{?with_tests:-x test}
|
||||
%pyproject_buildrequires %{?with_tests:-g test}
|
||||
|
||||
|
||||
%build
|
||||
@@ -407,10 +492,10 @@ k="${k} and not test_check_js_search_indexes"
|
||||
%dir %{_datadir}/sphinx/locale/*
|
||||
%{_mandir}/man1/sphinx-*
|
||||
|
||||
|
||||
%if %{undefined rhel}
|
||||
%files -n python%{python3_pkgversion}-sphinx-latex
|
||||
# empty, this is a metapackage
|
||||
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%license LICENSE.rst
|
||||
|
||||
2
sources
2
sources
@@ -1 +1 @@
|
||||
SHA512 (sphinx-8.2.3.tar.gz) = e7cbe251e4f44eb59ef6fd84d3918b1b29941943b75265da75aa9533379746e76331ac8a3ba8c1694840adeebd6886e0fc8eebf5407271aaeddf39594d8e1523
|
||||
SHA512 (sphinx-9.1.0.tar.gz) = 2c8b16935e14a8f827110461c530275f431949159eef47380198115d8abadaafdca06680c09722c0df7fd8ed8e16dbe1e3aa62a774164b7987247f6d8f8a20d3
|
||||
|
||||
Reference in New Issue
Block a user