commit
70106d2fc6
@ -0,0 +1 @@
|
||||
SOURCES/sphinx-7.2.6.tar.gz
|
@ -0,0 +1 @@
|
||||
f7327207321395a710e8b4edbe9e585e2511e1e7 SOURCES/sphinx-7.2.6.tar.gz
|
@ -0,0 +1,69 @@
|
||||
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
|
@ -0,0 +1,51 @@
|
||||
From 22caeb2631922c3f5e3f4bb45d8c1610edb6ef74 Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Thu, 22 Aug 2024 12:33:34 +0200
|
||||
Subject: [PATCH] Fix autodoc tests with Python 3.12.3+
|
||||
|
||||
---
|
||||
tests/test_ext_autodoc.py | 5 ++++-
|
||||
tests/test_ext_autodoc_configs.py | 4 ++--
|
||||
2 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/test_ext_autodoc.py b/tests/test_ext_autodoc.py
|
||||
index 7062763..5f63214 100644
|
||||
--- a/tests/test_ext_autodoc.py
|
||||
+++ b/tests/test_ext_autodoc.py
|
||||
@@ -1407,7 +1407,10 @@ def test_enum_class(app):
|
||||
options = {"members": None}
|
||||
actual = do_autodoc(app, 'class', 'target.enums.EnumCls', options)
|
||||
|
||||
- if sys.version_info[:2] >= (3, 12):
|
||||
+ if sys.version_info[:3] >= (3, 12, 3):
|
||||
+ args = ('(value, names=<not given>, *values, module=None, '
|
||||
+ 'qualname=None, type=None, start=1, boundary=None)')
|
||||
+ elif sys.version_info[:2] >= (3, 12):
|
||||
args = ('(value, names=None, *values, module=None, '
|
||||
'qualname=None, type=None, start=1, boundary=None)')
|
||||
elif sys.version_info[:2] >= (3, 11):
|
||||
diff --git a/tests/test_ext_autodoc_configs.py b/tests/test_ext_autodoc_configs.py
|
||||
index 0994c08..a240c4b 100644
|
||||
--- a/tests/test_ext_autodoc_configs.py
|
||||
+++ b/tests/test_ext_autodoc_configs.py
|
||||
@@ -1273,7 +1273,7 @@ def test_autodoc_type_aliases(app):
|
||||
' docstring',
|
||||
'',
|
||||
'',
|
||||
- '.. py:function:: mult(x: int, y: int) -> int',
|
||||
+ '.. py:function:: mult(x: myint, y: myint) -> myint',
|
||||
' mult(x: float, y: float) -> float',
|
||||
' :module: target.autodoc_type_aliases',
|
||||
'',
|
||||
@@ -1344,7 +1344,7 @@ def test_autodoc_type_aliases(app):
|
||||
' docstring',
|
||||
'',
|
||||
'',
|
||||
- '.. py:function:: mult(x: myint, y: myint) -> myint',
|
||||
+ '.. py:function:: mult(x: myint, y: myint) -> myint',
|
||||
' mult(x: float, y: float) -> float',
|
||||
' :module: target.autodoc_type_aliases',
|
||||
'',
|
||||
--
|
||||
2.46.0
|
||||
|
@ -0,0 +1,204 @@
|
||||
From 9699465414515f0eba76d05069e755b5bcf34eef Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Mon, 15 Jan 2024 16:19:32 +0100
|
||||
Subject: [PATCH] Make the first party extensions optional, add [extensions]
|
||||
extra
|
||||
|
||||
|
||||
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
||||
---
|
||||
pyproject.toml | 33 +++++++++++++++++++++++++++------
|
||||
sphinx/application.py | 6 +++---
|
||||
sphinx/registry.py | 9 ++++++---
|
||||
sphinx/testing/fixtures.py | 6 ++++++
|
||||
tests/test_api_translator.py | 2 ++
|
||||
tests/test_build_html.py | 3 +++
|
||||
6 files changed, 47 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 8f93701..41c28c5 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -55,12 +55,6 @@ classifiers = [
|
||||
"Topic :: Utilities",
|
||||
]
|
||||
dependencies = [
|
||||
- "sphinxcontrib-applehelp",
|
||||
- "sphinxcontrib-devhelp",
|
||||
- "sphinxcontrib-jsmath",
|
||||
- "sphinxcontrib-htmlhelp>=2.0.0",
|
||||
- "sphinxcontrib-serializinghtml>=1.1.9",
|
||||
- "sphinxcontrib-qthelp",
|
||||
"Jinja2>=3.0",
|
||||
"Pygments>=2.14",
|
||||
"docutils>=0.18.1,<0.21",
|
||||
@@ -76,8 +70,35 @@ dependencies = [
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
+applehelp = [
|
||||
+ "sphinxcontrib-applehelp",
|
||||
+]
|
||||
+devhelp = [
|
||||
+ "sphinxcontrib-devhelp",
|
||||
+]
|
||||
+jsmath = [
|
||||
+ "sphinxcontrib-jsmath",
|
||||
+]
|
||||
+htmlhelp = [
|
||||
+ "sphinxcontrib-htmlhelp>=2.0.0",
|
||||
+]
|
||||
+serializinghtml = [
|
||||
+ "sphinxcontrib-serializinghtml>=1.1.9",
|
||||
+]
|
||||
+qthelp = [
|
||||
+ "sphinxcontrib-qthelp",
|
||||
+]
|
||||
+extensions = [
|
||||
+ "sphinx[applehelp]",
|
||||
+ "sphinx[devhelp]",
|
||||
+ "sphinx[jsmath]",
|
||||
+ "sphinx[htmlhelp]",
|
||||
+ "sphinx[serializinghtml]",
|
||||
+ "sphinx[qthelp]",
|
||||
+]
|
||||
docs = [
|
||||
"sphinxcontrib-websupport",
|
||||
+ "sphinx[extensions]",
|
||||
]
|
||||
lint = [
|
||||
"flake8>=3.5.0",
|
||||
diff --git a/sphinx/application.py b/sphinx/application.py
|
||||
index d5fbaa9..b030dab 100644
|
||||
--- a/sphinx/application.py
|
||||
+++ b/sphinx/application.py
|
||||
@@ -226,7 +226,7 @@ class Sphinx:
|
||||
# load all built-in extension modules, first-party extension modules,
|
||||
# and first-party themes
|
||||
for extension in builtin_extensions:
|
||||
- self.setup_extension(extension)
|
||||
+ self.setup_extension(extension, skip_nonimportable=extension in _first_party_extensions)
|
||||
|
||||
# load all user-given extension modules
|
||||
for extension in self.config.extensions:
|
||||
@@ -395,7 +395,7 @@ class Sphinx:
|
||||
|
||||
# ---- general extensibility interface -------------------------------------
|
||||
|
||||
- def setup_extension(self, extname: str) -> None:
|
||||
+ def setup_extension(self, extname: str, skip_nonimportable: bool = False) -> None:
|
||||
"""Import and setup a Sphinx extension module.
|
||||
|
||||
Load the extension given by the module *name*. Use this if your
|
||||
@@ -403,7 +403,7 @@ class Sphinx:
|
||||
called twice.
|
||||
"""
|
||||
logger.debug('[app] setting up extension: %r', extname)
|
||||
- self.registry.load_extension(self, extname)
|
||||
+ self.registry.load_extension(self, extname, skip_nonimportable=skip_nonimportable)
|
||||
|
||||
@staticmethod
|
||||
def require_sphinx(version: tuple[int, int] | str) -> None:
|
||||
diff --git a/sphinx/registry.py b/sphinx/registry.py
|
||||
index 501661d..96d4554 100644
|
||||
--- a/sphinx/registry.py
|
||||
+++ b/sphinx/registry.py
|
||||
@@ -430,7 +430,7 @@ class SphinxComponentRegistry:
|
||||
def add_html_theme(self, name: str, theme_path: str) -> None:
|
||||
self.html_themes[name] = 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
|
||||
@@ -446,9 +446,12 @@ class SphinxComponentRegistry:
|
||||
try:
|
||||
mod = import_module(extname)
|
||||
except ImportError as err:
|
||||
+ msg = __('Could not import extension %s')
|
||||
+ if skip_nonimportable:
|
||||
+ 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(msg % extname, err) from err
|
||||
|
||||
setup = getattr(mod, 'setup', None)
|
||||
if setup is None:
|
||||
diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py
|
||||
index 0cc4882..f57f709 100644
|
||||
--- a/sphinx/testing/fixtures.py
|
||||
+++ b/sphinx/testing/fixtures.py
|
||||
@@ -22,6 +22,7 @@ DEFAULT_ENABLED_MARKERS = [
|
||||
'sphinx(builder, testroot=None, freshenv=False, confoverrides=None, tags=None,'
|
||||
' docutilsconf=None, parallel=0): arguments to initialize the sphinx test application.'
|
||||
),
|
||||
+ 'sphinxcontrib(...): required sphinxcontrib.* extensions',
|
||||
'test_params(shared_result=...): test parameters.',
|
||||
]
|
||||
|
||||
@@ -67,6 +68,11 @@ def app_params(request: Any, test_params: dict, shared_result: SharedResult,
|
||||
sphinx.application.Sphinx initialization
|
||||
"""
|
||||
|
||||
+ # ##### process pytest.mark.sphinxcontrib
|
||||
+ for info in reversed(list(request.node.iter_markers("sphinxcontrib"))):
|
||||
+ for arg in info.args:
|
||||
+ pytest.importorskip("sphinxcontrib." + arg)
|
||||
+
|
||||
# ##### process pytest.mark.sphinx
|
||||
|
||||
pargs = {}
|
||||
diff --git a/tests/test_api_translator.py b/tests/test_api_translator.py
|
||||
index 9f2bd44..81575b7 100644
|
||||
--- a/tests/test_api_translator.py
|
||||
+++ b/tests/test_api_translator.py
|
||||
@@ -36,6 +36,7 @@ def test_singlehtml_set_translator_for_singlehtml(app, status, warning):
|
||||
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):
|
||||
translator_class = app.builder.get_translator_class()
|
||||
@@ -43,6 +44,7 @@ def test_pickle_set_translator_for_pickle(app, status, warning):
|
||||
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):
|
||||
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
|
||||
|
@ -0,0 +1,265 @@
|
||||
From ec721111162a24a960b8c725340e183f970d4a1c Mon Sep 17 00:00:00 2001
|
||||
From: Lumir Balhar <lbalhar@redhat.com>
|
||||
Date: Mon, 10 Jun 2024 16:53:08 +0200
|
||||
Subject: [PATCH] Patch-out snowballstemmer and replace it with a dummy
|
||||
implementation
|
||||
|
||||
---
|
||||
pyproject.toml | 1 -
|
||||
sphinx/search/da.py | 2 +-
|
||||
sphinx/search/de.py | 2 +-
|
||||
sphinx/search/dummystemmer.py | 8 ++++++++
|
||||
sphinx/search/en.py | 2 +-
|
||||
sphinx/search/es.py | 2 +-
|
||||
sphinx/search/fi.py | 2 +-
|
||||
sphinx/search/fr.py | 2 +-
|
||||
sphinx/search/hu.py | 2 +-
|
||||
sphinx/search/it.py | 2 +-
|
||||
sphinx/search/nl.py | 2 +-
|
||||
sphinx/search/no.py | 2 +-
|
||||
sphinx/search/pt.py | 2 +-
|
||||
sphinx/search/ro.py | 2 +-
|
||||
sphinx/search/ru.py | 2 +-
|
||||
sphinx/search/sv.py | 2 +-
|
||||
sphinx/search/tr.py | 2 +-
|
||||
sphinx/search/zh.py | 2 +-
|
||||
18 files changed, 24 insertions(+), 17 deletions(-)
|
||||
create mode 100644 sphinx/search/dummystemmer.py
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 0d19435..32cf5bf 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -58,7 +58,6 @@ dependencies = [
|
||||
"Jinja2>=3.0",
|
||||
"Pygments>=2.14",
|
||||
"docutils>=0.18.1,<0.21",
|
||||
- "snowballstemmer>=2.0",
|
||||
"babel>=2.9",
|
||||
"alabaster>=0.7,<0.8",
|
||||
"imagesize>=1.3",
|
||||
diff --git a/sphinx/search/da.py b/sphinx/search/da.py
|
||||
index 9b5b9f5..0ff9a56 100644
|
||||
--- a/sphinx/search/da.py
|
||||
+++ b/sphinx/search/da.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/de.py b/sphinx/search/de.py
|
||||
index 1c253fd..76af961 100644
|
||||
--- a/sphinx/search/de.py
|
||||
+++ b/sphinx/search/de.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/dummystemmer.py b/sphinx/search/dummystemmer.py
|
||||
new file mode 100644
|
||||
index 0000000..46f8fb7
|
||||
--- /dev/null
|
||||
+++ b/sphinx/search/dummystemmer.py
|
||||
@@ -0,0 +1,8 @@
|
||||
+# Dummy stemmer implementation doing nothing
|
||||
+
|
||||
+class stemmer:
|
||||
+ def __init__(self, *args, **kwargs):
|
||||
+ pass
|
||||
+
|
||||
+ def stemWord(self, word):
|
||||
+ return word
|
||||
diff --git a/sphinx/search/en.py b/sphinx/search/en.py
|
||||
index caa6f66..1e3fbb8 100644
|
||||
--- a/sphinx/search/en.py
|
||||
+++ b/sphinx/search/en.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage
|
||||
|
||||
diff --git a/sphinx/search/es.py b/sphinx/search/es.py
|
||||
index c5d9a5c..96956be 100644
|
||||
--- a/sphinx/search/es.py
|
||||
+++ b/sphinx/search/es.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/fi.py b/sphinx/search/fi.py
|
||||
index 70114f8..5de87ad 100644
|
||||
--- a/sphinx/search/fi.py
|
||||
+++ b/sphinx/search/fi.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/fr.py b/sphinx/search/fr.py
|
||||
index 01319dd..9b43d74 100644
|
||||
--- a/sphinx/search/fr.py
|
||||
+++ b/sphinx/search/fr.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/hu.py b/sphinx/search/hu.py
|
||||
index eed08db..4dde945 100644
|
||||
--- a/sphinx/search/hu.py
|
||||
+++ b/sphinx/search/hu.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/it.py b/sphinx/search/it.py
|
||||
index 7bf712b..9e44732 100644
|
||||
--- a/sphinx/search/it.py
|
||||
+++ b/sphinx/search/it.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/nl.py b/sphinx/search/nl.py
|
||||
index a610b12..f85bec7 100644
|
||||
--- a/sphinx/search/nl.py
|
||||
+++ b/sphinx/search/nl.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/no.py b/sphinx/search/no.py
|
||||
index a69380b..8f9be62 100644
|
||||
--- a/sphinx/search/no.py
|
||||
+++ b/sphinx/search/no.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/pt.py b/sphinx/search/pt.py
|
||||
index 908a417..ee266ef 100644
|
||||
--- a/sphinx/search/pt.py
|
||||
+++ b/sphinx/search/pt.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/ro.py b/sphinx/search/ro.py
|
||||
index b6c9d67..ee77c77 100644
|
||||
--- a/sphinx/search/ro.py
|
||||
+++ b/sphinx/search/ro.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict, Set
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage
|
||||
|
||||
diff --git a/sphinx/search/ru.py b/sphinx/search/ru.py
|
||||
index b8412c1..bda63bd 100644
|
||||
--- a/sphinx/search/ru.py
|
||||
+++ b/sphinx/search/ru.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/sv.py b/sphinx/search/sv.py
|
||||
index 88cc560..52e4983 100644
|
||||
--- a/sphinx/search/sv.py
|
||||
+++ b/sphinx/search/sv.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage, parse_stop_word
|
||||
|
||||
diff --git a/sphinx/search/tr.py b/sphinx/search/tr.py
|
||||
index f4a865c..934fd41 100644
|
||||
--- a/sphinx/search/tr.py
|
||||
+++ b/sphinx/search/tr.py
|
||||
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Dict, Set
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage
|
||||
|
||||
diff --git a/sphinx/search/zh.py b/sphinx/search/zh.py
|
||||
index 2a3a6e7..e3ee9d0 100644
|
||||
--- a/sphinx/search/zh.py
|
||||
+++ b/sphinx/search/zh.py
|
||||
@@ -6,7 +6,7 @@ import os
|
||||
import re
|
||||
from typing import TYPE_CHECKING, Dict, List
|
||||
|
||||
-import snowballstemmer
|
||||
+from . import dummystemmer as snowballstemmer
|
||||
|
||||
from sphinx.search import SearchLanguage
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,12 @@
|
||||
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')
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue