Update to 8.2.3
This commit is contained in:
parent
cca8be3e8b
commit
de4dafa39e
5 changed files with 45 additions and 46 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -48,3 +48,4 @@
|
|||
/sphinx-7.2.6.tar.gz
|
||||
/sphinx-7.3.7.tar.gz
|
||||
/sphinx-8.1.3.tar.gz
|
||||
/sphinx-8.2.3.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,28 +1,25 @@
|
|||
From 14adc6187c936738cb946c24c4a0820223d65066 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
||||
Date: Wed, 13 Nov 2024 12:25:10 +0100
|
||||
From f3fba803e1c39232f86acc9a21657cad171ce71b 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]
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
extra
|
||||
|
||||
Co-authored-by: Karolina Surma <ksurma@redhat.com>
|
||||
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
||||
---
|
||||
pyproject.toml | 33 ++++++++++++++++----
|
||||
sphinx/application.py | 6 ++--
|
||||
sphinx/registry.py | 9 ++++--
|
||||
sphinx/registry.py | 10 +++---
|
||||
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(+), 12 deletions(-)
|
||||
6 files changed, 48 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 0812e11..3ead0e0 100644
|
||||
index c4b1b6d..4e59e90 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -56,12 +56,6 @@ classifiers = [
|
||||
"Topic :: Utilities",
|
||||
@@ -67,12 +67,6 @@ classifiers = [
|
||||
"Typing :: Typed",
|
||||
]
|
||||
dependencies = [
|
||||
- "sphinxcontrib-applehelp>=1.0.7",
|
||||
|
|
@ -34,7 +31,7 @@ index 0812e11..3ead0e0 100644
|
|||
"Jinja2>=3.1",
|
||||
"Pygments>=2.17",
|
||||
"docutils>=0.20,<0.22",
|
||||
@@ -77,8 +71,35 @@ dependencies = [
|
||||
@@ -88,8 +82,35 @@ dependencies = [
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
|
@ -69,12 +66,12 @@ index 0812e11..3ead0e0 100644
|
|||
+ "sphinx[extensions]",
|
||||
]
|
||||
lint = [
|
||||
"flake8>=6.0",
|
||||
"ruff==0.9.9",
|
||||
diff --git a/sphinx/application.py b/sphinx/application.py
|
||||
index 872dd7a..21f9be0 100644
|
||||
index fe0e8bd..dcb3d75 100644
|
||||
--- a/sphinx/application.py
|
||||
+++ b/sphinx/application.py
|
||||
@@ -249,7 +249,7 @@ class Sphinx:
|
||||
@@ -284,7 +284,7 @@ class Sphinx:
|
||||
# load all built-in extension modules, first-party extension modules,
|
||||
# and first-party themes
|
||||
for extension in builtin_extensions:
|
||||
|
|
@ -83,7 +80,7 @@ index 872dd7a..21f9be0 100644
|
|||
|
||||
# load all user-given extension modules
|
||||
for extension in self.config.extensions:
|
||||
@@ -426,7 +426,7 @@ class Sphinx:
|
||||
@@ -478,7 +478,7 @@ class Sphinx:
|
||||
|
||||
# ---- general extensibility interface -------------------------------------
|
||||
|
||||
|
|
@ -92,7 +89,7 @@ index 872dd7a..21f9be0 100644
|
|||
"""Import and setup a Sphinx extension module.
|
||||
|
||||
Load the extension given by the module *name*. Use this if your
|
||||
@@ -434,7 +434,7 @@ class Sphinx:
|
||||
@@ -486,7 +486,7 @@ class Sphinx:
|
||||
called twice.
|
||||
"""
|
||||
logger.debug('[app] setting up extension: %r', extname)
|
||||
|
|
@ -102,19 +99,19 @@ index 872dd7a..21f9be0 100644
|
|||
@staticmethod
|
||||
def require_sphinx(version: tuple[int, int] | str) -> None:
|
||||
diff --git a/sphinx/registry.py b/sphinx/registry.py
|
||||
index da21aef..c3f87e0 100644
|
||||
index ce52a03..3bc90d5 100644
|
||||
--- a/sphinx/registry.py
|
||||
+++ b/sphinx/registry.py
|
||||
@@ -436,7 +436,7 @@ class SphinxComponentRegistry:
|
||||
def add_html_theme(self, name: str, theme_path: str) -> None:
|
||||
self.html_themes[name] = theme_path
|
||||
@@ -519,7 +519,7 @@ class SphinxComponentRegistry:
|
||||
def add_html_theme(self, name: str, theme_path: str | os.PathLike[str]) -> None:
|
||||
self.html_themes[name] = _StrPath(theme_path)
|
||||
|
||||
- def load_extension(self, app: Sphinx, extname: str) -> None:
|
||||
+ def load_extension(self, app: Sphinx, extname: str, skip_nonimportable: bool = False) -> None:
|
||||
"""Load a Sphinx extension."""
|
||||
if extname in app.extensions: # already loaded
|
||||
return
|
||||
@@ -452,9 +452,12 @@ class SphinxComponentRegistry:
|
||||
@@ -540,10 +540,12 @@ class SphinxComponentRegistry:
|
||||
try:
|
||||
mod = import_module(extname)
|
||||
except ImportError as err:
|
||||
|
|
@ -123,14 +120,15 @@ index da21aef..c3f87e0 100644
|
|||
+ logger.debug(msg % extname)
|
||||
+ return
|
||||
logger.verbose(__('Original exception:\n') + traceback.format_exc())
|
||||
- raise ExtensionError(__('Could not import extension %s') % extname,
|
||||
- err) from err
|
||||
- raise ExtensionError(
|
||||
- __('Could not import extension %s') % extname, err
|
||||
- ) from err
|
||||
+ raise ExtensionError(msg % extname, err) from err
|
||||
|
||||
setup: _ExtensionSetupFunc | None = getattr(mod, 'setup', None)
|
||||
if setup is None:
|
||||
diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py
|
||||
index 6f1c29c..425e026 100644
|
||||
index ec143fa..e6d9da1 100644
|
||||
--- a/sphinx/testing/fixtures.py
|
||||
+++ b/sphinx/testing/fixtures.py
|
||||
@@ -31,6 +31,7 @@ DEFAULT_ENABLED_MARKERS = [
|
||||
|
|
@ -141,8 +139,8 @@ index 6f1c29c..425e026 100644
|
|||
'test_params(shared_result=...): test parameters.',
|
||||
]
|
||||
|
||||
@@ -80,6 +81,12 @@ def app_params(
|
||||
Parameters that are specified by 'pytest.mark.sphinx' for
|
||||
@@ -79,6 +80,12 @@ def app_params(
|
||||
"""Parameters that are specified by 'pytest.mark.sphinx' for
|
||||
sphinx.application.Sphinx initialization
|
||||
"""
|
||||
+
|
||||
|
|
@ -155,10 +153,10 @@ index 6f1c29c..425e026 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 0f77691..bc87e98 100644
|
||||
index cc21142..16382e3 100644
|
||||
--- a/tests/test_builders/test_build_html_maths.py
|
||||
+++ b/tests/test_builders/test_build_html_maths.py
|
||||
@@ -26,6 +26,7 @@ def test_html_math_renderer_is_imgmath(app):
|
||||
@@ -37,6 +37,7 @@ def test_html_math_renderer_is_imgmath(app: SphinxTestApp) -> None:
|
||||
assert app.builder.math_renderer_name == 'imgmath'
|
||||
|
||||
|
||||
|
|
@ -166,7 +164,7 @@ index 0f77691..bc87e98 100644
|
|||
@pytest.mark.sphinx(
|
||||
'html',
|
||||
testroot='basic',
|
||||
@@ -50,6 +51,7 @@ def test_html_math_renderer_is_duplicated2(app):
|
||||
@@ -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
|
||||
|
||||
|
||||
|
|
@ -174,7 +172,7 @@ index 0f77691..bc87e98 100644
|
|||
@pytest.mark.sphinx(
|
||||
'html',
|
||||
testroot='basic',
|
||||
@@ -62,6 +64,7 @@ def test_html_math_renderer_is_chosen(app):
|
||||
@@ -75,6 +77,7 @@ def test_html_math_renderer_is_chosen(app: SphinxTestApp) -> None:
|
||||
assert app.builder.math_renderer_name == 'imgmath'
|
||||
|
||||
|
||||
|
|
@ -183,25 +181,25 @@ index 0f77691..bc87e98 100644
|
|||
'html',
|
||||
testroot='basic',
|
||||
diff --git a/tests/test_writers/test_api_translator.py b/tests/test_writers/test_api_translator.py
|
||||
index bdbea0d..01d4d35 100644
|
||||
index 1220192..8e8bb33 100644
|
||||
--- a/tests/test_writers/test_api_translator.py
|
||||
+++ b/tests/test_writers/test_api_translator.py
|
||||
@@ -36,6 +36,7 @@ def test_singlehtml_set_translator_for_singlehtml(app):
|
||||
@@ -47,6 +47,7 @@ def test_singlehtml_set_translator_for_singlehtml(app: SphinxTestApp) -> None:
|
||||
assert translator_class.__name__ == 'ConfSingleHTMLTranslator'
|
||||
|
||||
|
||||
+@pytest.mark.sphinxcontrib('serializinghtml')
|
||||
@pytest.mark.sphinx('pickle', testroot='api-set-translator')
|
||||
def test_pickle_set_translator_for_pickle(app):
|
||||
def test_pickle_set_translator_for_pickle(app: SphinxTestApp) -> None:
|
||||
translator_class = app.builder.get_translator_class()
|
||||
@@ -43,6 +44,7 @@ def test_pickle_set_translator_for_pickle(app):
|
||||
@@ -54,6 +55,7 @@ def test_pickle_set_translator_for_pickle(app: SphinxTestApp) -> None:
|
||||
assert translator_class.__name__ == 'ConfPickleTranslator'
|
||||
|
||||
|
||||
+@pytest.mark.sphinxcontrib('serializinghtml')
|
||||
@pytest.mark.sphinx('json', testroot='api-set-translator')
|
||||
def test_json_set_translator_for_json(app):
|
||||
def test_json_set_translator_for_json(app: SphinxTestApp) -> None:
|
||||
translator_class = app.builder.get_translator_class()
|
||||
--
|
||||
2.47.0
|
||||
2.48.1
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
%bcond latex_tests 1
|
||||
|
||||
Name: python-sphinx
|
||||
%global general_version 8.1.3
|
||||
%global general_version 8.2.3
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (sphinx-8.1.3.tar.gz) = 938fc78941fd7b2bf3382730f2f9d322d406f87c80c0e4bf4c051a85a352c2c6241fe5b8d21574de7e4c1528090955eb84b6d23813b377b2be198a2cfa70221f
|
||||
SHA512 (sphinx-8.2.3.tar.gz) = e7cbe251e4f44eb59ef6fd84d3918b1b29941943b75265da75aa9533379746e76331ac8a3ba8c1694840adeebd6886e0fc8eebf5407271aaeddf39594d8e1523
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
From 57433d8036ab1e88ad7d6c4c1a45e438f722e276 Mon Sep 17 00:00:00 2001
|
||||
From 399ae81dfbedb7b8acf84e56b0e4b2d5023432ec Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Thu, 25 Apr 2024 16:07:56 +0200
|
||||
Date: Wed, 26 Feb 2025 10:43:44 +0100
|
||||
Subject: [PATCH] Patch test_theming to accomodate for Fedora-added theme
|
||||
|
||||
---
|
||||
|
|
@ -8,18 +8,18 @@ Subject: [PATCH] Patch test_theming to accomodate for Fedora-added theme
|
|||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test_theming/test_theming.py b/tests/test_theming/test_theming.py
|
||||
index 867f8a0..281bb45 100644
|
||||
index 173e0c9..515e546 100644
|
||||
--- a/tests/test_theming/test_theming.py
|
||||
+++ b/tests/test_theming/test_theming.py
|
||||
@@ -50,7 +50,7 @@ def test_theme_api(app, status, warning):
|
||||
@@ -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'] == str(
|
||||
assert app.registry.html_themes['test-theme'] == (
|
||||
app.srcdir / 'test_theme' / 'test-theme'
|
||||
)
|
||||
--
|
||||
2.44.0
|
||||
2.48.1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue