Update to 8.1.3
- Fixes: rhbz#2275375
This commit is contained in:
parent
383e230ab0
commit
c97bb0f3e2
6 changed files with 52 additions and 237 deletions
|
|
@ -1,10 +1,12 @@
|
|||
From b74128966fe4edf77a0c3a7936f6a6216833c9ed Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Thu, 25 Apr 2024 15:58:03 +0200
|
||||
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
|
||||
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: Karolina Surma <ksurma@redhat.com>
|
||||
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
||||
---
|
||||
pyproject.toml | 33 ++++++++++++++++----
|
||||
|
|
@ -16,43 +18,43 @@ Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
|||
6 files changed, 48 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 8aa49aa..10fa20e 100644
|
||||
index 0812e11..3ead0e0 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -56,12 +56,6 @@ classifiers = [
|
||||
"Topic :: Utilities",
|
||||
]
|
||||
dependencies = [
|
||||
- "sphinxcontrib-applehelp",
|
||||
- "sphinxcontrib-devhelp",
|
||||
- "sphinxcontrib-jsmath",
|
||||
- "sphinxcontrib-htmlhelp>=2.0.0",
|
||||
- "sphinxcontrib-applehelp>=1.0.7",
|
||||
- "sphinxcontrib-devhelp>=1.0.6",
|
||||
- "sphinxcontrib-htmlhelp>=2.0.6",
|
||||
- "sphinxcontrib-jsmath>=1.0.1",
|
||||
- "sphinxcontrib-qthelp>=1.0.6",
|
||||
- "sphinxcontrib-serializinghtml>=1.1.9",
|
||||
- "sphinxcontrib-qthelp",
|
||||
"Jinja2>=3.0",
|
||||
"Pygments>=2.14",
|
||||
"docutils>=0.18.1,<0.22",
|
||||
@@ -78,8 +72,35 @@ dependencies = [
|
||||
"Jinja2>=3.1",
|
||||
"Pygments>=2.17",
|
||||
"docutils>=0.20,<0.22",
|
||||
@@ -77,8 +71,35 @@ dependencies = [
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
+applehelp = [
|
||||
+ "sphinxcontrib-applehelp",
|
||||
+ "sphinxcontrib-applehelp>=1.0.7",
|
||||
+]
|
||||
+devhelp = [
|
||||
+ "sphinxcontrib-devhelp",
|
||||
+ "sphinxcontrib-devhelp>=1.0.6",
|
||||
+]
|
||||
+jsmath = [
|
||||
+ "sphinxcontrib-jsmath",
|
||||
+ "sphinxcontrib-jsmath>=1.0.1",
|
||||
+]
|
||||
+htmlhelp = [
|
||||
+ "sphinxcontrib-htmlhelp>=2.0.0",
|
||||
+ "sphinxcontrib-htmlhelp>=2.0.6",
|
||||
+]
|
||||
+serializinghtml = [
|
||||
+ "sphinxcontrib-serializinghtml>=1.1.9",
|
||||
+]
|
||||
+qthelp = [
|
||||
+ "sphinxcontrib-qthelp",
|
||||
+ "sphinxcontrib-qthelp>=1.0.6",
|
||||
+]
|
||||
+extensions = [
|
||||
+ "sphinx[applehelp]",
|
||||
|
|
@ -67,12 +69,12 @@ index 8aa49aa..10fa20e 100644
|
|||
+ "sphinx[extensions]",
|
||||
]
|
||||
lint = [
|
||||
"flake8>=3.5.0",
|
||||
"flake8>=6.0",
|
||||
diff --git a/sphinx/application.py b/sphinx/application.py
|
||||
index 7d16d9a..2a71074 100644
|
||||
index 872dd7a..21f9be0 100644
|
||||
--- a/sphinx/application.py
|
||||
+++ b/sphinx/application.py
|
||||
@@ -222,7 +222,7 @@ class Sphinx:
|
||||
@@ -249,7 +249,7 @@ class Sphinx:
|
||||
# load all built-in extension modules, first-party extension modules,
|
||||
# and first-party themes
|
||||
for extension in builtin_extensions:
|
||||
|
|
@ -81,7 +83,7 @@ index 7d16d9a..2a71074 100644
|
|||
|
||||
# load all user-given extension modules
|
||||
for extension in self.config.extensions:
|
||||
@@ -391,7 +391,7 @@ class Sphinx:
|
||||
@@ -426,7 +426,7 @@ class Sphinx:
|
||||
|
||||
# ---- general extensibility interface -------------------------------------
|
||||
|
||||
|
|
@ -90,7 +92,7 @@ index 7d16d9a..2a71074 100644
|
|||
"""Import and setup a Sphinx extension module.
|
||||
|
||||
Load the extension given by the module *name*. Use this if your
|
||||
@@ -399,7 +399,7 @@ class Sphinx:
|
||||
@@ -434,7 +434,7 @@ class Sphinx:
|
||||
called twice.
|
||||
"""
|
||||
logger.debug('[app] setting up extension: %r', extname)
|
||||
|
|
@ -100,7 +102,7 @@ index 7d16d9a..2a71074 100644
|
|||
@staticmethod
|
||||
def require_sphinx(version: tuple[int, int] | str) -> None:
|
||||
diff --git a/sphinx/registry.py b/sphinx/registry.py
|
||||
index 7887858..ca95960 100644
|
||||
index da21aef..c3f87e0 100644
|
||||
--- a/sphinx/registry.py
|
||||
+++ b/sphinx/registry.py
|
||||
@@ -436,7 +436,7 @@ class SphinxComponentRegistry:
|
||||
|
|
@ -128,11 +130,11 @@ index 7887858..ca95960 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 6e1a122..f3fe743 100644
|
||||
index 6f1c29c..425e026 100644
|
||||
--- a/sphinx/testing/fixtures.py
|
||||
+++ b/sphinx/testing/fixtures.py
|
||||
@@ -31,6 +31,7 @@ DEFAULT_ENABLED_MARKERS = [
|
||||
'keep_going=False, builddir=None, docutils_conf=None'
|
||||
'builddir=None, docutils_conf=None'
|
||||
'): arguments to initialize the sphinx test application.'
|
||||
),
|
||||
+ 'sphinxcontrib(...): required sphinxcontrib.* extensions',
|
||||
|
|
@ -153,53 +155,53 @@ index 6e1a122..f3fe743 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 900846b..664c86e 100644
|
||||
index 0f77691..bc87e98 100644
|
||||
--- a/tests/test_builders/test_build_html_maths.py
|
||||
+++ b/tests/test_builders/test_build_html_maths.py
|
||||
@@ -20,6 +20,7 @@ def test_html_math_renderer_is_imgmath(app, status, warning):
|
||||
@@ -26,6 +26,7 @@ def test_html_math_renderer_is_imgmath(app):
|
||||
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']})
|
||||
@@ -40,6 +41,7 @@ def test_html_math_renderer_is_duplicated2(app, status, warning):
|
||||
@pytest.mark.sphinx(
|
||||
'html',
|
||||
testroot='basic',
|
||||
@@ -50,6 +51,7 @@ def test_html_math_renderer_is_duplicated2(app):
|
||||
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'],
|
||||
@@ -48,6 +50,7 @@ def test_html_math_renderer_is_chosen(app, status, warning):
|
||||
@pytest.mark.sphinx(
|
||||
'html',
|
||||
testroot='basic',
|
||||
@@ -62,6 +64,7 @@ def test_html_math_renderer_is_chosen(app):
|
||||
assert app.builder.math_renderer_name == 'imgmath'
|
||||
|
||||
|
||||
+@pytest.mark.sphinxcontrib('jsmath')
|
||||
@pytest.mark.sphinx('html', testroot='basic',
|
||||
confoverrides={'extensions': ['sphinxcontrib.jsmath',
|
||||
'sphinx.ext.mathjax'],
|
||||
@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 9f2bd44..81575b7 100644
|
||||
index bdbea0d..01d4d35 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, status, warning):
|
||||
@@ -36,6 +36,7 @@ def test_singlehtml_set_translator_for_singlehtml(app):
|
||||
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, status, warning):
|
||||
def test_pickle_set_translator_for_pickle(app):
|
||||
translator_class = app.builder.get_translator_class()
|
||||
@@ -43,6 +44,7 @@ def test_pickle_set_translator_for_pickle(app, status, warning):
|
||||
@@ -43,6 +44,7 @@ def test_pickle_set_translator_for_pickle(app):
|
||||
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, status, warning):
|
||||
def test_json_set_translator_for_json(app):
|
||||
translator_class = app.builder.get_translator_class()
|
||||
--
|
||||
2.44.0
|
||||
2.47.0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue