From 51a276920e9bb871010a107f9fdbe450bed95c7b Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Mon, 21 Sep 2020 00:45:18 +0900 Subject: [PATCH 01/16] latex: Fix a typo (refs: #8206) Fix a typo in the name of function: install_pakcages_for_ja() --- sphinx/builders/latex/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/builders/latex/__init__.py b/sphinx/builders/latex/__init__.py index ffb17d2eb..1caa9ecb4 100644 --- a/sphinx/builders/latex/__init__.py +++ b/sphinx/builders/latex/__init__.py @@ -503,7 +503,7 @@ def validate_latex_theme_options(app: Sphinx, config: Config) -> None: config.latex_theme_options.pop(key) -def install_pakcages_for_ja(app: Sphinx) -> None: +def install_packages_for_ja(app: Sphinx) -> None: """Install packages for Japanese.""" if app.config.language == 'ja' and app.config.latex_engine in ('platex', 'uplatex'): app.add_latex_package('pxjahyper', after_hyperref=True) @@ -556,7 +556,7 @@ def setup(app: Sphinx) -> Dict[str, Any]: app.add_builder(LaTeXBuilder) app.connect('config-inited', validate_config_values, priority=800) app.connect('config-inited', validate_latex_theme_options, priority=800) - app.connect('builder-inited', install_pakcages_for_ja) + app.connect('builder-inited', install_packages_for_ja) app.add_config_value('latex_engine', default_latex_engine, None, ENUM('pdflatex', 'xelatex', 'lualatex', 'platex', 'uplatex')) From 786972e47f6d25d438b4bb7cf6ae0c43358d41f2 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sun, 27 Sep 2020 20:54:50 +0200 Subject: [PATCH 02/16] linkcheck: take source directory into account for local files --- sphinx/builders/linkcheck.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 9b54afc7c..4ea98f1d3 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -210,7 +210,7 @@ class CheckExternalLinksBuilder(Builder): else: return 'redirected', new_url, 0 - def check() -> Tuple[str, str, int]: + def check(srcdir: str) -> Tuple[str, str, int]: # check for various conditions without bothering the network if len(uri) == 0 or uri.startswith(('#', 'mailto:')): return 'unchecked', '', 0 @@ -219,7 +219,7 @@ class CheckExternalLinksBuilder(Builder): # non supported URI schemes (ex. ftp) return 'unchecked', '', 0 else: - if path.exists(path.join(self.srcdir, uri)): + if path.exists(path.join(srcdir, uri)): return 'working', '', 0 else: for rex in self.to_ignore: @@ -256,7 +256,8 @@ class CheckExternalLinksBuilder(Builder): uri, docname, lineno = self.wqueue.get() if uri is None: break - status, info, code = check() + srcdir = path.dirname(self.env.doc2path(docname)) + status, info, code = check(srcdir) self.rqueue.put((uri, docname, lineno, status, info, code)) def process_result(self, result: Tuple[str, str, int, str, str, int]) -> None: From 785f4d695cfca0eeb537c92166808bc9f187d8c0 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 3 Oct 2020 12:00:33 +0900 Subject: [PATCH 03/16] Fix #7964: autodoc: Tuple in default value is wrongly rendered This implements tuple literal support to sphinx.pycode.ast.unparse(). --- CHANGES | 1 + sphinx/pycode/ast.py | 18 ++++++++++++++++-- tests/test_pycode_ast.py | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 22876d43b..bfe8910d1 100644 --- a/CHANGES +++ b/CHANGES @@ -34,6 +34,7 @@ Bugs fixed by string not ending with blank lines * #8142: autodoc: Wrong constructor signature for the class derived from typing.Generic +* #7964: autodoc: Tuple in default value is wrongly rendered * #8192: napoleon: description is disappeared when it contains inline literals * #8142: napoleon: Potential of regex denial of service in google style docs * #8169: LaTeX: pxjahyper loaded even when latex_engine is not platex diff --git a/sphinx/pycode/ast.py b/sphinx/pycode/ast.py index 9bafff11c..2583448d5 100644 --- a/sphinx/pycode/ast.py +++ b/sphinx/pycode/ast.py @@ -166,14 +166,28 @@ class _UnparseVisitor(ast.NodeVisitor): return "{" + ", ".join(self.visit(e) for e in node.elts) + "}" def visit_Subscript(self, node: ast.Subscript) -> str: - return "%s[%s]" % (self.visit(node.value), self.visit(node.slice)) + def is_simple_tuple(value: ast.AST) -> bool: + return ( + isinstance(value, ast.Tuple) and + bool(value.elts) and + not any(isinstance(elt, ast.Starred) for elt in value.elts) + ) + + if is_simple_tuple(node.slice): + elts = ", ".join(self.visit(e) for e in node.slice.elts) # type: ignore + return "%s[%s]" % (self.visit(node.value), elts) + elif isinstance(node.slice, ast.Index) and is_simple_tuple(node.slice.value): + elts = ", ".join(self.visit(e) for e in node.slice.value.elts) # type: ignore + return "%s[%s]" % (self.visit(node.value), elts) + else: + return "%s[%s]" % (self.visit(node.value), self.visit(node.slice)) def visit_UnaryOp(self, node: ast.UnaryOp) -> str: return "%s %s" % (self.visit(node.op), self.visit(node.operand)) def visit_Tuple(self, node: ast.Tuple) -> str: if node.elts: - return ", ".join(self.visit(e) for e in node.elts) + return "(" + ", ".join(self.visit(e) for e in node.elts) + ")" else: return "()" diff --git a/tests/test_pycode_ast.py b/tests/test_pycode_ast.py index 9b12d24d5..32a784b74 100644 --- a/tests/test_pycode_ast.py +++ b/tests/test_pycode_ast.py @@ -53,7 +53,7 @@ from sphinx.pycode import ast ("+ a", "+ a"), # UAdd ("- 1", "- 1"), # UnaryOp ("- a", "- a"), # USub - ("(1, 2, 3)", "1, 2, 3"), # Tuple + ("(1, 2, 3)", "(1, 2, 3)"), # Tuple ("()", "()"), # Tuple (empty) ]) def test_unparse(source, expected): From f2c0dfe7c454589d9a2681369e51a0d073bfd4ba Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 26 Jul 2020 16:05:14 +0900 Subject: [PATCH 04/16] Close #6518: autodoc: Add autodoc_type_aliases autodoc_type_aliases allows to keep user defined type alises not evaluated in the generated document. --- doc/usage/extensions/autodoc.rst | 38 +++++++++++++++ sphinx/ext/autodoc/__init__.py | 37 +++++++++----- sphinx/util/inspect.py | 6 +-- sphinx/util/typing.py | 6 ++- .../test-ext-autodoc/target/annotations.py | 25 ++++++++++ tests/test_ext_autodoc_configs.py | 48 +++++++++++++++++++ 6 files changed, 144 insertions(+), 16 deletions(-) create mode 100644 tests/roots/test-ext-autodoc/target/annotations.py diff --git a/doc/usage/extensions/autodoc.rst b/doc/usage/extensions/autodoc.rst index 802be3bd0..2d8a216c0 100644 --- a/doc/usage/extensions/autodoc.rst +++ b/doc/usage/extensions/autodoc.rst @@ -515,6 +515,44 @@ There are also config values that you can set: New option ``'description'`` is added. +.. confval:: autodoc_type_aliases + + A dictionary for users defined `type aliases`__ that maps a type name to the + full-qualified object name. It is used to keep type aliases not evaluated in + the document. Defaults to empty (``{}``). + + The type aliases are only available if your program enables `Postponed + Evaluation of Annotations (PEP 563)`__ feature via ``from __future__ import + annotations``. + + For example, there is code using a type alias:: + + from __future__ import annotations + + AliasType = Union[List[Dict[Tuple[int, str], Set[int]]], Tuple[str, List[str]]] + + def f() -> AliasType: + ... + + If ``autodoc_type_aliases`` is not set, autodoc will generate internal mark-up + from this code as following:: + + .. py:function:: f() -> Union[List[Dict[Tuple[int, str], Set[int]]], Tuple[str, List[str]]] + + ... + + If you set ``autodoc_type_aliases`` as + ``{'AliasType': 'your.module.TypeAlias'}``, it generates a following document + internally:: + + .. py:function:: f() -> your.module.AliasType: + + ... + + .. __: https://www.python.org/dev/peps/pep-0563/ + .. __: https://mypy.readthedocs.io/en/latest/kinds_of_types.html#type-aliases + .. versionadded:: 3.3 + .. confval:: autodoc_warningiserror This value controls the behavior of :option:`sphinx-build -W` during diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py index 35bb1c90d..d7c5d2242 100644 --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -1213,7 +1213,8 @@ class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # typ try: self.env.app.emit('autodoc-before-process-signature', self.object, False) - sig = inspect.signature(self.object, follow_wrapped=True) + sig = inspect.signature(self.object, follow_wrapped=True, + type_aliases=self.env.config.autodoc_type_aliases) args = stringify_signature(sig, **kwargs) except TypeError as exc: logger.warning(__("Failed to get a function signature for %s: %s"), @@ -1262,7 +1263,9 @@ class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # typ if overloaded: __globals__ = safe_getattr(self.object, '__globals__', {}) for overload in self.analyzer.overloads.get('.'.join(self.objpath)): - overload = evaluate_signature(overload, __globals__) + overload = evaluate_signature(overload, __globals__, + self.env.config.autodoc_type_aliases) + sig = stringify_signature(overload, **kwargs) sigs.append(sig) @@ -1271,7 +1274,7 @@ class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # typ def annotate_to_first_argument(self, func: Callable, typ: Type) -> None: """Annotate type hint to the first argument of function if needed.""" try: - sig = inspect.signature(func) + sig = inspect.signature(func, type_aliases=self.env.config.autodoc_type_aliases) except TypeError as exc: logger.warning(__("Failed to get a function signature for %s: %s"), self.fullname, exc) @@ -1392,7 +1395,8 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type: if call is not None: self.env.app.emit('autodoc-before-process-signature', call, True) try: - sig = inspect.signature(call, bound_method=True) + sig = inspect.signature(call, bound_method=True, + type_aliases=self.env.config.autodoc_type_aliases) return type(self.object), '__call__', sig except ValueError: pass @@ -1407,7 +1411,8 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type: if new is not None: self.env.app.emit('autodoc-before-process-signature', new, True) try: - sig = inspect.signature(new, bound_method=True) + sig = inspect.signature(new, bound_method=True, + type_aliases=self.env.config.autodoc_type_aliases) return self.object, '__new__', sig except ValueError: pass @@ -1417,7 +1422,8 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type: if init is not None: self.env.app.emit('autodoc-before-process-signature', init, True) try: - sig = inspect.signature(init, bound_method=True) + sig = inspect.signature(init, bound_method=True, + type_aliases=self.env.config.autodoc_type_aliases) return self.object, '__init__', sig except ValueError: pass @@ -1428,7 +1434,8 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type: # the signature from, so just pass the object itself to our hook. self.env.app.emit('autodoc-before-process-signature', self.object, False) try: - sig = inspect.signature(self.object, bound_method=False) + sig = inspect.signature(self.object, bound_method=False, + type_aliases=self.env.config.autodoc_type_aliases) return None, None, sig except ValueError: pass @@ -1475,7 +1482,8 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type: method = safe_getattr(self._signature_class, self._signature_method_name, None) __globals__ = safe_getattr(method, '__globals__', {}) for overload in self.analyzer.overloads.get(qualname): - overload = evaluate_signature(overload, __globals__) + overload = evaluate_signature(overload, __globals__, + self.env.config.autodoc_type_aliases) parameters = list(overload.parameters.values()) overload = overload.replace(parameters=parameters[1:], @@ -1820,11 +1828,13 @@ class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): # type: else: if inspect.isstaticmethod(self.object, cls=self.parent, name=self.object_name): self.env.app.emit('autodoc-before-process-signature', self.object, False) - sig = inspect.signature(self.object, bound_method=False) + sig = inspect.signature(self.object, bound_method=False, + type_aliases=self.env.config.autodoc_type_aliases) else: self.env.app.emit('autodoc-before-process-signature', self.object, True) sig = inspect.signature(self.object, bound_method=True, - follow_wrapped=True) + follow_wrapped=True, + type_aliases=self.env.config.autodoc_type_aliases) args = stringify_signature(sig, **kwargs) except TypeError as exc: logger.warning(__("Failed to get a method signature for %s: %s"), @@ -1884,7 +1894,9 @@ class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): # type: if overloaded: __globals__ = safe_getattr(self.object, '__globals__', {}) for overload in self.analyzer.overloads.get('.'.join(self.objpath)): - overload = evaluate_signature(overload, __globals__) + overload = evaluate_signature(overload, __globals__, + self.env.config.autodoc_type_aliases) + if not inspect.isstaticmethod(self.object, cls=self.parent, name=self.object_name): parameters = list(overload.parameters.values()) @@ -1897,7 +1909,7 @@ class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): # type: def annotate_to_first_argument(self, func: Callable, typ: Type) -> None: """Annotate type hint to the first argument of function if needed.""" try: - sig = inspect.signature(func) + sig = inspect.signature(func, type_aliases=self.env.config.autodoc_type_aliases) except TypeError as exc: logger.warning(__("Failed to get a method signature for %s: %s"), self.fullname, exc) @@ -2237,6 +2249,7 @@ def setup(app: Sphinx) -> Dict[str, Any]: app.add_config_value('autodoc_mock_imports', [], True) app.add_config_value('autodoc_typehints', "signature", True, ENUM("signature", "description", "none")) + app.add_config_value('autodoc_type_aliases', {}, True) app.add_config_value('autodoc_warningiserror', True, True) app.add_config_value('autodoc_inherit_docstrings', True, True) app.add_event('autodoc-before-process-signature') diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py index 37997e6b2..378174993 100644 --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -439,8 +439,8 @@ def _should_unwrap(subject: Callable) -> bool: return False -def signature(subject: Callable, bound_method: bool = False, follow_wrapped: bool = False - ) -> inspect.Signature: +def signature(subject: Callable, bound_method: bool = False, follow_wrapped: bool = False, + type_aliases: Dict = {}) -> inspect.Signature: """Return a Signature object for the given *subject*. :param bound_method: Specify *subject* is a bound method or not @@ -470,7 +470,7 @@ def signature(subject: Callable, bound_method: bool = False, follow_wrapped: boo try: # Update unresolved annotations using ``get_type_hints()``. - annotations = typing.get_type_hints(subject) + annotations = typing.get_type_hints(subject, None, type_aliases) for i, param in enumerate(parameters): if isinstance(param.annotation, str) and param.name in annotations: parameters[i] = param.replace(annotation=annotations[param.name]) diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py index d71ca1b2d..4dac3b695 100644 --- a/sphinx/util/typing.py +++ b/sphinx/util/typing.py @@ -63,7 +63,11 @@ def is_system_TypeVar(typ: Any) -> bool: def stringify(annotation: Any) -> str: """Stringify type annotation object.""" if isinstance(annotation, str): - return annotation + if annotation.startswith("'") and annotation.endswith("'"): + # might be a double Forward-ref'ed type. Go unquoting. + return annotation[1:-2] + else: + return annotation elif isinstance(annotation, TypeVar): # type: ignore return annotation.__name__ elif not annotation: diff --git a/tests/roots/test-ext-autodoc/target/annotations.py b/tests/roots/test-ext-autodoc/target/annotations.py new file mode 100644 index 000000000..667149b26 --- /dev/null +++ b/tests/roots/test-ext-autodoc/target/annotations.py @@ -0,0 +1,25 @@ +from __future__ import annotations +from typing import overload + + +myint = int + + +def sum(x: myint, y: myint) -> myint: + """docstring""" + return x + y + + +@overload +def mult(x: myint, y: myint) -> myint: + ... + + +@overload +def mult(x: float, y: float) -> float: + ... + + +def mult(x, y): + """docstring""" + return x, y diff --git a/tests/test_ext_autodoc_configs.py b/tests/test_ext_autodoc_configs.py index 3d0bfd395..7d51b7f0e 100644 --- a/tests/test_ext_autodoc_configs.py +++ b/tests/test_ext_autodoc_configs.py @@ -642,6 +642,54 @@ def test_autodoc_typehints_description_for_invalid_node(app): restructuredtext.parse(app, text) # raises no error +@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.') +@pytest.mark.sphinx('text', testroot='ext-autodoc') +def test_autodoc_type_aliases(app): + # default + options = {"members": None} + actual = do_autodoc(app, 'module', 'target.annotations', options) + assert list(actual) == [ + '', + '.. py:module:: target.annotations', + '', + '', + '.. py:function:: mult(x: int, y: int) -> int', + ' mult(x: float, y: float) -> float', + ' :module: target.annotations', + '', + ' docstring', + '', + '', + '.. py:function:: sum(x: int, y: int) -> int', + ' :module: target.annotations', + '', + ' docstring', + '', + ] + + # define aliases + app.config.autodoc_type_aliases = {'myint': 'myint'} + actual = do_autodoc(app, 'module', 'target.annotations', options) + assert list(actual) == [ + '', + '.. py:module:: target.annotations', + '', + '', + '.. py:function:: mult(x: myint, y: myint) -> myint', + ' mult(x: float, y: float) -> float', + ' :module: target.annotations', + '', + ' docstring', + '', + '', + '.. py:function:: sum(x: myint, y: myint) -> myint', + ' :module: target.annotations', + '', + ' docstring', + '', + ] + + @pytest.mark.sphinx('html', testroot='ext-autodoc') def test_autodoc_default_options(app): # no settings From 5166dd194c27b63d2211e70272d9a39ffda36744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Freitag?= Date: Sat, 3 Oct 2020 13:47:01 +0200 Subject: [PATCH 05/16] Strip trailing whitespaces and normalize line endings Trailing whitespace do not have impact on the result, they are just unused bytes. Most text editors are configured to strip trailing whitespaces. Remove them all in one go. Update a handful of files to use the UNIX line ending. --- CHANGES | 4 +- doc/_themes/sphinx13/static/sphinx13.css | 2 +- doc/usage/extensions/coverage.rst | 2 +- doc/usage/installation.rst | 2 +- doc/usage/restructuredtext/directives.rst | 4 +- sphinx/locale/ar/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/bg/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/bn/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/ca/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/cak/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/cs/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/cy/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/da/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/de/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/el/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/eo/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/es/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/et/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/eu/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/fa/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/fi/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/fr/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/he/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/hi/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/hr/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/hu/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/id/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/it/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/ja/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/ko/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/lt/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/lv/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/mk/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/ne/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/nl/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/pl/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/pt/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/ro/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/ru/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/si/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/sk/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/sl/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/sq/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/sr/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/sr_RS/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/sv/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/ta/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/te/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/tr/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/ur/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/vi/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po | 2 +- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po | 2 +- .../search/non-minified-js/danish-stemmer.js | 4 +- .../search/non-minified-js/dutch-stemmer.js | 4 +- .../search/non-minified-js/finnish-stemmer.js | 4 +- .../search/non-minified-js/french-stemmer.js | 4 +- .../search/non-minified-js/german-stemmer.js | 4 +- .../non-minified-js/hungarian-stemmer.js | 4 +- .../search/non-minified-js/italian-stemmer.js | 4 +- .../non-minified-js/norwegian-stemmer.js | 4 +- .../search/non-minified-js/porter-stemmer.js | 4 +- .../non-minified-js/portuguese-stemmer.js | 4 +- .../non-minified-js/romanian-stemmer.js | 4 +- .../search/non-minified-js/russian-stemmer.js | 4 +- .../search/non-minified-js/spanish-stemmer.js | 4 +- .../search/non-minified-js/swedish-stemmer.js | 4 +- .../search/non-minified-js/turkish-stemmer.js | 4 +- sphinx/texinputs/sphinx.sty | 4 +- sphinx/texinputs/sphinxcyrillic.sty | 2 +- sphinx/texinputs/sphinxhowto.cls | 2 +- sphinx/themes/nature/static/nature.css_t | 66 +++++++++---------- sphinx/themes/pyramid/static/pyramid.css_t | 64 +++++++++--------- .../themes/sphinxdoc/static/sphinxdoc.css_t | 2 +- tests/roots/test-circular/conf.py | 2 +- .../roots/test-intl/xx/LC_MESSAGES/toctree.po | 2 +- tests/roots/test-numbered-circular/conf.py | 2 +- tests/roots/test-theming/MANIFEST.in | 4 +- tests/roots/test-theming/conf.py | 6 +- tests/roots/test-theming/index.rst | 10 +-- tests/roots/test-theming/setup.py | 22 +++---- .../roots/test-theming/test_theme/__init__.py | 10 +-- tests/test_pycode.py | 2 +- 89 files changed, 191 insertions(+), 191 deletions(-) diff --git a/CHANGES b/CHANGES index 22876d43b..318338208 100644 --- a/CHANGES +++ b/CHANGES @@ -171,7 +171,7 @@ Bugs fixed contains a hyperlink target * #7469: autosummary: "Module attributes" header is not translatable * #7940: apidoc: An extra newline is generated at the end of the rst file if a - module has submodules + module has submodules * #4258: napoleon: decorated special methods are not shown * #7799: napoleon: parameters are not escaped for combined params in numpydoc * #7780: napoleon: multiple paramaters declaration in numpydoc was wrongly @@ -338,7 +338,7 @@ Features added * #7543: html theme: Add top and bottom margins to tables * #7695: html theme: Add viewport meta tag for basic theme * #7721: html theme: classic: default codetextcolor/codebgcolor doesn't override - Pygments + Pygments * C and C++: allow semicolon in the end of declarations. * C++, parse parameterized noexcept specifiers. * #7294: C++, parse expressions with user-defined literals. diff --git a/doc/_themes/sphinx13/static/sphinx13.css b/doc/_themes/sphinx13/static/sphinx13.css index 7c1d46e83..c8fb2e5c9 100644 --- a/doc/_themes/sphinx13/static/sphinx13.css +++ b/doc/_themes/sphinx13/static/sphinx13.css @@ -239,7 +239,7 @@ div.footer a { /* -- body styles ----------------------------------------------------------- */ -p { +p { margin: 0.8em 0 0.5em 0; } diff --git a/doc/usage/extensions/coverage.rst b/doc/usage/extensions/coverage.rst index db989f38d..5e6b04feb 100644 --- a/doc/usage/extensions/coverage.rst +++ b/doc/usage/extensions/coverage.rst @@ -51,7 +51,7 @@ should check: .. versionadded:: 1.1 -.. confval:: coverage_show_missing_items +.. confval:: coverage_show_missing_items Print objects that are missing to standard output also. ``False`` by default. diff --git a/doc/usage/installation.rst b/doc/usage/installation.rst index c9bef974d..46ef6a51e 100644 --- a/doc/usage/installation.rst +++ b/doc/usage/installation.rst @@ -171,7 +171,7 @@ Docker images for Sphinx are published on the `Docker Hub `_ - `sphinxdoc/sphinx-latexpdf `_ -Former one is used for standard usage of Sphinx, and latter one is mainly used for PDF builds using LaTeX. +Former one is used for standard usage of Sphinx, and latter one is mainly used for PDF builds using LaTeX. Please choose one for your purpose. .. note:: diff --git a/doc/usage/restructuredtext/directives.rst b/doc/usage/restructuredtext/directives.rst index e94106148..92bf78489 100644 --- a/doc/usage/restructuredtext/directives.rst +++ b/doc/usage/restructuredtext/directives.rst @@ -665,7 +665,7 @@ __ http://pygments.org/docs/lexers .. note:: If you want to select only ``[second-section]`` of ini file like the - following, you can use ``:start-at: [second-section]`` and + following, you can use ``:start-at: [second-section]`` and ``:end-before: [third-section]``: .. code-block:: ini @@ -692,7 +692,7 @@ __ http://pygments.org/docs/lexers # [initialize] app.start(":8000") # [initialize] - + When lines have been selected in any of the ways described above, the line numbers in ``emphasize-lines`` refer to those selected lines, counted diff --git a/sphinx/locale/ar/LC_MESSAGES/sphinx.po b/sphinx/locale/ar/LC_MESSAGES/sphinx.po index bd69d2aeb..371395b7b 100644 --- a/sphinx/locale/ar/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ar/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Mohammed Shannaq , 2018 msgid "" diff --git a/sphinx/locale/bg/LC_MESSAGES/sphinx.po b/sphinx/locale/bg/LC_MESSAGES/sphinx.po index 79329a57a..6d36b05f3 100644 --- a/sphinx/locale/bg/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/bg/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/bn/LC_MESSAGES/sphinx.po b/sphinx/locale/bn/LC_MESSAGES/sphinx.po index 63aae6877..98ecbe5d0 100644 --- a/sphinx/locale/bn/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/bn/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2009 msgid "" diff --git a/sphinx/locale/ca/LC_MESSAGES/sphinx.po b/sphinx/locale/ca/LC_MESSAGES/sphinx.po index 6a8e317b1..9cbebc74a 100644 --- a/sphinx/locale/ca/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ca/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2009 msgid "" diff --git a/sphinx/locale/cak/LC_MESSAGES/sphinx.po b/sphinx/locale/cak/LC_MESSAGES/sphinx.po index b729d5f1f..2ea8716e3 100644 --- a/sphinx/locale/cak/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/cak/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Julien Malard , 2019 msgid "" diff --git a/sphinx/locale/cs/LC_MESSAGES/sphinx.po b/sphinx/locale/cs/LC_MESSAGES/sphinx.po index 8952713e1..1e7890782 100644 --- a/sphinx/locale/cs/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/cs/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2008 # Vilibald W. , 2014-2015 diff --git a/sphinx/locale/cy/LC_MESSAGES/sphinx.po b/sphinx/locale/cy/LC_MESSAGES/sphinx.po index 12f2aecd2..19a4c83d3 100644 --- a/sphinx/locale/cy/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/cy/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2016 # Geraint Palmer , 2016 diff --git a/sphinx/locale/da/LC_MESSAGES/sphinx.po b/sphinx/locale/da/LC_MESSAGES/sphinx.po index 317b832d2..47fcbfd6f 100644 --- a/sphinx/locale/da/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/da/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # askhl , 2010-2011 # Jakob Lykke Andersen , 2014,2016 diff --git a/sphinx/locale/de/LC_MESSAGES/sphinx.po b/sphinx/locale/de/LC_MESSAGES/sphinx.po index 8d5cd4e43..2eaab8597 100644 --- a/sphinx/locale/de/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/de/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Georg Brandl , 2013-2015 # Jean-François B. , 2018 diff --git a/sphinx/locale/el/LC_MESSAGES/sphinx.po b/sphinx/locale/el/LC_MESSAGES/sphinx.po index 54eb341ec..03f5d01fe 100644 --- a/sphinx/locale/el/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/el/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Stelios Vitalis , 2015 # tzoumakers tzoumakers , 2019 diff --git a/sphinx/locale/eo/LC_MESSAGES/sphinx.po b/sphinx/locale/eo/LC_MESSAGES/sphinx.po index 6c94360c6..1af0769f3 100644 --- a/sphinx/locale/eo/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/eo/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Dinu Gherman , 2014 msgid "" diff --git a/sphinx/locale/es/LC_MESSAGES/sphinx.po b/sphinx/locale/es/LC_MESSAGES/sphinx.po index be149e88a..a01ae6c80 100644 --- a/sphinx/locale/es/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/es/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Edward Villegas-Pulgarin , 2018 # Edward Villegas-Pulgarin , 2019 diff --git a/sphinx/locale/et/LC_MESSAGES/sphinx.po b/sphinx/locale/et/LC_MESSAGES/sphinx.po index a87de4d11..1f40f10c0 100644 --- a/sphinx/locale/et/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/et/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Aivar Annamaa , 2011 # Ivar Smolin , 2012 diff --git a/sphinx/locale/eu/LC_MESSAGES/sphinx.po b/sphinx/locale/eu/LC_MESSAGES/sphinx.po index 80dbae5a3..c6f25f8b0 100644 --- a/sphinx/locale/eu/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/eu/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Ales Zabala Alava , 2011 # Asier Iturralde Sarasola , 2018 diff --git a/sphinx/locale/fa/LC_MESSAGES/sphinx.po b/sphinx/locale/fa/LC_MESSAGES/sphinx.po index ddca8112c..066cfc4bb 100644 --- a/sphinx/locale/fa/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/fa/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/fi/LC_MESSAGES/sphinx.po b/sphinx/locale/fi/LC_MESSAGES/sphinx.po index 19233894d..6e18d601a 100644 --- a/sphinx/locale/fi/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/fi/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2009 msgid "" diff --git a/sphinx/locale/fr/LC_MESSAGES/sphinx.po b/sphinx/locale/fr/LC_MESSAGES/sphinx.po index b01d956c0..740e9ba70 100644 --- a/sphinx/locale/fr/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/fr/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Christophe CHAUVET , 2017 # Christophe CHAUVET , 2013,2015 diff --git a/sphinx/locale/he/LC_MESSAGES/sphinx.po b/sphinx/locale/he/LC_MESSAGES/sphinx.po index 7332af27f..1f8d45480 100644 --- a/sphinx/locale/he/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/he/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2011 msgid "" diff --git a/sphinx/locale/hi/LC_MESSAGES/sphinx.po b/sphinx/locale/hi/LC_MESSAGES/sphinx.po index 7fd40316b..5effb078c 100644 --- a/sphinx/locale/hi/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/hi/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Ajay Singh , 2019 # Purnank H. Ghumalia , 2015-2016 diff --git a/sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po b/sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po index 78f66e29e..b1047a51f 100644 --- a/sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/hr/LC_MESSAGES/sphinx.po b/sphinx/locale/hr/LC_MESSAGES/sphinx.po index c1f1d4be0..20e336487 100644 --- a/sphinx/locale/hr/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/hr/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Mario Šarić, 2015-2020 msgid "" diff --git a/sphinx/locale/hu/LC_MESSAGES/sphinx.po b/sphinx/locale/hu/LC_MESSAGES/sphinx.po index fe58d1895..ecf147f1f 100644 --- a/sphinx/locale/hu/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/hu/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2011 # Molnár Dénes , 2017 diff --git a/sphinx/locale/id/LC_MESSAGES/sphinx.po b/sphinx/locale/id/LC_MESSAGES/sphinx.po index d11a59d35..d1ff01f34 100644 --- a/sphinx/locale/id/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/id/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Arif Budiman , 2016-2017 # FIRST AUTHOR , 2009 diff --git a/sphinx/locale/it/LC_MESSAGES/sphinx.po b/sphinx/locale/it/LC_MESSAGES/sphinx.po index 9c871d0d2..c0aeb2e06 100644 --- a/sphinx/locale/it/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/it/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Denis Cappellin , 2018 # Paolo Cavallini , 2013-2017 diff --git a/sphinx/locale/ja/LC_MESSAGES/sphinx.po b/sphinx/locale/ja/LC_MESSAGES/sphinx.po index d9299e58c..1477b3d8a 100644 --- a/sphinx/locale/ja/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ja/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # shirou - しろう , 2013 # Akitoshi Ohta , 2011 diff --git a/sphinx/locale/ko/LC_MESSAGES/sphinx.po b/sphinx/locale/ko/LC_MESSAGES/sphinx.po index bf3bbe78e..56fff17d1 100644 --- a/sphinx/locale/ko/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ko/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Minho Ryang , 2019 # YT H , 2019 diff --git a/sphinx/locale/lt/LC_MESSAGES/sphinx.po b/sphinx/locale/lt/LC_MESSAGES/sphinx.po index fbf5b0a1d..4df91eb54 100644 --- a/sphinx/locale/lt/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/lt/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # DALIUS DOBRAVOLSKAS , 2010 msgid "" diff --git a/sphinx/locale/lv/LC_MESSAGES/sphinx.po b/sphinx/locale/lv/LC_MESSAGES/sphinx.po index a3968756d..ca8ef8240 100644 --- a/sphinx/locale/lv/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/lv/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/mk/LC_MESSAGES/sphinx.po b/sphinx/locale/mk/LC_MESSAGES/sphinx.po index 5543d45fd..397828d91 100644 --- a/sphinx/locale/mk/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/mk/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Vasil Vangelovski , 2013 msgid "" diff --git a/sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po b/sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po index b061b0361..05fe2c92c 100644 --- a/sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/ne/LC_MESSAGES/sphinx.po b/sphinx/locale/ne/LC_MESSAGES/sphinx.po index 46590097d..22e4ef626 100644 --- a/sphinx/locale/ne/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ne/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2011 # Takeshi KOMIYA , 2016 diff --git a/sphinx/locale/nl/LC_MESSAGES/sphinx.po b/sphinx/locale/nl/LC_MESSAGES/sphinx.po index d5eb16c6f..4bdf9f43b 100644 --- a/sphinx/locale/nl/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/nl/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Bram Geron, 2017 # brechtm, 2016 diff --git a/sphinx/locale/pl/LC_MESSAGES/sphinx.po b/sphinx/locale/pl/LC_MESSAGES/sphinx.po index ac8488a45..73b7a6478 100644 --- a/sphinx/locale/pl/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/pl/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # m_aciek , 2017-2020 # Michael Gielda , 2014 diff --git a/sphinx/locale/pt/LC_MESSAGES/sphinx.po b/sphinx/locale/pt/LC_MESSAGES/sphinx.po index 4b0c30cb7..e08ce7a5d 100644 --- a/sphinx/locale/pt/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/pt/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po b/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po index dba58f93e..3e9e2965f 100644 --- a/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Claudio Rogerio Carvalho Filho , 2016 # FIRST AUTHOR , 2008 diff --git a/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po b/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po index 7d219561a..6c78b0813 100644 --- a/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Pedro Algarvio , 2013 # Takeshi KOMIYA , 2016 diff --git a/sphinx/locale/ro/LC_MESSAGES/sphinx.po b/sphinx/locale/ro/LC_MESSAGES/sphinx.po index 6a4591643..721f8dcd2 100644 --- a/sphinx/locale/ro/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ro/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Razvan Stefanescu , 2015-2017 # Takeshi KOMIYA , 2016 diff --git a/sphinx/locale/ru/LC_MESSAGES/sphinx.po b/sphinx/locale/ru/LC_MESSAGES/sphinx.po index e69207f4e..d8572db5f 100644 --- a/sphinx/locale/ru/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ru/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Alex Salikov , 2019 # Dmitry Shachnev , 2013 diff --git a/sphinx/locale/si/LC_MESSAGES/sphinx.po b/sphinx/locale/si/LC_MESSAGES/sphinx.po index a257711c5..d03be451e 100644 --- a/sphinx/locale/si/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/si/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # callkalpa , 2013 msgid "" diff --git a/sphinx/locale/sk/LC_MESSAGES/sphinx.po b/sphinx/locale/sk/LC_MESSAGES/sphinx.po index 7d4bb2118..07d654695 100644 --- a/sphinx/locale/sk/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/sk/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # FIRST AUTHOR , 2008 # Slavko , 2013-2019 diff --git a/sphinx/locale/sl/LC_MESSAGES/sphinx.po b/sphinx/locale/sl/LC_MESSAGES/sphinx.po index 80dde8bd0..6ceca74a0 100644 --- a/sphinx/locale/sl/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/sl/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/sq/LC_MESSAGES/sphinx.po b/sphinx/locale/sq/LC_MESSAGES/sphinx.po index bf21f378d..fb1b0e26c 100644 --- a/sphinx/locale/sq/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/sq/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/sr/LC_MESSAGES/sphinx.po b/sphinx/locale/sr/LC_MESSAGES/sphinx.po index 1df55881c..2bcfcf51c 100644 --- a/sphinx/locale/sr/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/sr/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Risto Pejasinovic , 2019 msgid "" diff --git a/sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po b/sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po index a7b82e633..574d218de 100644 --- a/sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/sr@latin/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/sr_RS/LC_MESSAGES/sphinx.po b/sphinx/locale/sr_RS/LC_MESSAGES/sphinx.po index dad4f3542..3e7ac5ba4 100644 --- a/sphinx/locale/sr_RS/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/sr_RS/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/sv/LC_MESSAGES/sphinx.po b/sphinx/locale/sv/LC_MESSAGES/sphinx.po index bbf5e5ff1..af26ab2f1 100644 --- a/sphinx/locale/sv/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/sv/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/ta/LC_MESSAGES/sphinx.po b/sphinx/locale/ta/LC_MESSAGES/sphinx.po index bb1c77f28..cc19b6dfa 100644 --- a/sphinx/locale/ta/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ta/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Julien Malard , 2019 msgid "" diff --git a/sphinx/locale/te/LC_MESSAGES/sphinx.po b/sphinx/locale/te/LC_MESSAGES/sphinx.po index c6c3c45f1..32c1fc59e 100644 --- a/sphinx/locale/te/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/te/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/tr/LC_MESSAGES/sphinx.po b/sphinx/locale/tr/LC_MESSAGES/sphinx.po index 996d6e67c..b37c18d50 100644 --- a/sphinx/locale/tr/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/tr/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # BouRock, 2020 # Fırat Özgül , 2013-2016 diff --git a/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po b/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po index 2b43faa32..791426dd7 100644 --- a/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Petro Sasnyk , 2009 msgid "" diff --git a/sphinx/locale/ur/LC_MESSAGES/sphinx.po b/sphinx/locale/ur/LC_MESSAGES/sphinx.po index c674b9283..c37314be1 100644 --- a/sphinx/locale/ur/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/ur/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: msgid "" msgstr "" diff --git a/sphinx/locale/vi/LC_MESSAGES/sphinx.po b/sphinx/locale/vi/LC_MESSAGES/sphinx.po index 83b579ea4..20c77edeb 100644 --- a/sphinx/locale/vi/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/vi/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Hoat Le Van , 2014 msgid "" diff --git a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po index 47cb76210..5b9491c53 100644 --- a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Yinian Chin , 2015,2017-2018 # Hsiaoming Yang , 2018 diff --git a/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po b/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po index 67b4d2b81..435fe0453 100644 --- a/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po @@ -1,7 +1,7 @@ # Translations template for Sphinx. # Copyright (C) 2020 ORGANIZATION # This file is distributed under the same license as the Sphinx project. -# +# # Translators: # Adrian Liaw , 2018 # Fred Lin , 2008 diff --git a/sphinx/search/non-minified-js/danish-stemmer.js b/sphinx/search/non-minified-js/danish-stemmer.js index f6309327f..36943d22a 100644 --- a/sphinx/search/non-minified-js/danish-stemmer.js +++ b/sphinx/search/non-minified-js/danish-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/dutch-stemmer.js b/sphinx/search/non-minified-js/dutch-stemmer.js index 15c053a8d..997f1467b 100644 --- a/sphinx/search/non-minified-js/dutch-stemmer.js +++ b/sphinx/search/non-minified-js/dutch-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/finnish-stemmer.js b/sphinx/search/non-minified-js/finnish-stemmer.js index 210c3e13d..5b520c00f 100644 --- a/sphinx/search/non-minified-js/finnish-stemmer.js +++ b/sphinx/search/non-minified-js/finnish-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/french-stemmer.js b/sphinx/search/non-minified-js/french-stemmer.js index 3b3c0607f..75255a03d 100644 --- a/sphinx/search/non-minified-js/french-stemmer.js +++ b/sphinx/search/non-minified-js/french-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/german-stemmer.js b/sphinx/search/non-minified-js/german-stemmer.js index 4f1dc1cf3..a5beb8f3a 100644 --- a/sphinx/search/non-minified-js/german-stemmer.js +++ b/sphinx/search/non-minified-js/german-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/hungarian-stemmer.js b/sphinx/search/non-minified-js/hungarian-stemmer.js index c9a6347c6..67fd1cdf0 100644 --- a/sphinx/search/non-minified-js/hungarian-stemmer.js +++ b/sphinx/search/non-minified-js/hungarian-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/italian-stemmer.js b/sphinx/search/non-minified-js/italian-stemmer.js index ca16ff24c..52daef58f 100644 --- a/sphinx/search/non-minified-js/italian-stemmer.js +++ b/sphinx/search/non-minified-js/italian-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/norwegian-stemmer.js b/sphinx/search/non-minified-js/norwegian-stemmer.js index 38b64c5a8..5c6eba182 100644 --- a/sphinx/search/non-minified-js/norwegian-stemmer.js +++ b/sphinx/search/non-minified-js/norwegian-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/porter-stemmer.js b/sphinx/search/non-minified-js/porter-stemmer.js index 7a0f4558a..d07e7a426 100644 --- a/sphinx/search/non-minified-js/porter-stemmer.js +++ b/sphinx/search/non-minified-js/porter-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/portuguese-stemmer.js b/sphinx/search/non-minified-js/portuguese-stemmer.js index 35f21aa8f..4042c0aef 100644 --- a/sphinx/search/non-minified-js/portuguese-stemmer.js +++ b/sphinx/search/non-minified-js/portuguese-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/romanian-stemmer.js b/sphinx/search/non-minified-js/romanian-stemmer.js index f71f44a68..545d3ee2e 100644 --- a/sphinx/search/non-minified-js/romanian-stemmer.js +++ b/sphinx/search/non-minified-js/romanian-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/russian-stemmer.js b/sphinx/search/non-minified-js/russian-stemmer.js index 74d630968..87f4844e0 100644 --- a/sphinx/search/non-minified-js/russian-stemmer.js +++ b/sphinx/search/non-minified-js/russian-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/spanish-stemmer.js b/sphinx/search/non-minified-js/spanish-stemmer.js index 21b648fa8..6c5d2da91 100644 --- a/sphinx/search/non-minified-js/spanish-stemmer.js +++ b/sphinx/search/non-minified-js/spanish-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/swedish-stemmer.js b/sphinx/search/non-minified-js/swedish-stemmer.js index fd2a58f0a..1d8aba8f4 100644 --- a/sphinx/search/non-minified-js/swedish-stemmer.js +++ b/sphinx/search/non-minified-js/swedish-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/search/non-minified-js/turkish-stemmer.js b/sphinx/search/non-minified-js/turkish-stemmer.js index f8f088576..22bd7538d 100644 --- a/sphinx/search/non-minified-js/turkish-stemmer.js +++ b/sphinx/search/non-minified-js/turkish-stemmer.js @@ -143,7 +143,7 @@ JSX.resetProfileResults = function () { return $__jsx_profiler.resetResults(); }; JSX.DEBUG = false; -var GeneratorFunction$0 = +var GeneratorFunction$0 = (function () { try { return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); @@ -151,7 +151,7 @@ var GeneratorFunction$0 = return function GeneratorFunction () {}; } })(); -var __jsx_generator_object$0 = +var __jsx_generator_object$0 = (function () { function __jsx_generator_object() { this.__next = 0; diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index a3e91ad34..2b83ab85b 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -1823,7 +1823,7 @@ % fix a space-gobbling issue due to LaTeX's original \do@noligs % TODO: using \@noligs as patched by upquote.sty is now unneeded because % either ` and ' are escaped (non-unicode engines) or they don't build -% ligatures (unicode engines). Thus remove this and unify handling of `, <, >, +% ligatures (unicode engines). Thus remove this and unify handling of `, <, >, % ' and - with the characters . , ; ? ! / as handled via % \sphinxbreaksviaactive. % Hence \sphinx@do@noligs will be removed, or rather replaced with code @@ -1905,7 +1905,7 @@ % Special characters % % This definition prevents en-dash and em-dash TeX ligatures. -% +% % It inserts a potential breakpoint after the hyphen. This is to keep in sync % with behavior in code-blocks, parsed and inline literals. For a breakpoint % before the hyphen use \leavevmode\kern\z@- (within \makeatletter/\makeatother) diff --git a/sphinx/texinputs/sphinxcyrillic.sty b/sphinx/texinputs/sphinxcyrillic.sty index 482b4e3f7..6747b5ec6 100644 --- a/sphinx/texinputs/sphinxcyrillic.sty +++ b/sphinx/texinputs/sphinxcyrillic.sty @@ -15,7 +15,7 @@ % https://tex.stackexchange.com/a/460325/ % 159 Cyrillic glyphs as available in X2 TeX 8bit font encoding % This assumes inputenc loaded with utf8 option, or LaTeX release -% as recent as 2018/04/01 which does it automatically. +% as recent as 2018/04/01 which does it automatically. \@tfor\next:=% {Ё}{Ђ}{Є}{Ѕ}{І}{Ј}{Љ}{Њ}{Ћ}{Ў}{Џ}{А}{Б}{В}{Г}{Д}{Е}{Ж}{З}{И}{Й}% {К}{Л}{М}{Н}{О}{П}{Р}{С}{Т}{У}{Ф}{Х}{Ц}{Ч}{Ш}{Щ}{Ъ}{Ы}{Ь}{Э}{Ю}% diff --git a/sphinx/texinputs/sphinxhowto.cls b/sphinx/texinputs/sphinxhowto.cls index 57d73cebf..0848a79fd 100644 --- a/sphinx/texinputs/sphinxhowto.cls +++ b/sphinx/texinputs/sphinxhowto.cls @@ -76,7 +76,7 @@ \endgroup \noindent\rule{\textwidth}{1pt}\par \vspace{12pt}% -} +} \newcommand\sphinxtableofcontentshook{} \pagenumbering{arabic} diff --git a/sphinx/themes/nature/static/nature.css_t b/sphinx/themes/nature/static/nature.css_t index 34893b86a..7df474a91 100644 --- a/sphinx/themes/nature/static/nature.css_t +++ b/sphinx/themes/nature/static/nature.css_t @@ -8,11 +8,11 @@ * :license: BSD, see LICENSE for details. * */ - + @import url("basic.css"); - + /* -- page layout ----------------------------------------------------------- */ - + body { font-family: Arial, sans-serif; font-size: 100%; @@ -34,18 +34,18 @@ div.bodywrapper { hr { border: 1px solid #B1B4B6; } - + div.document { background-color: #eee; } - + div.body { background-color: #ffffff; color: #3E4349; padding: 0 30px 30px 30px; font-size: 0.9em; } - + div.footer { color: #555; width: 100%; @@ -53,12 +53,12 @@ div.footer { text-align: center; font-size: 75%; } - + div.footer a { color: #444; text-decoration: underline; } - + div.related { background-color: #6BA81E; line-height: 32px; @@ -66,11 +66,11 @@ div.related { text-shadow: 0px 1px 0 #444; font-size: 0.9em; } - + div.related a { color: #E2F3CC; } - + div.sphinxsidebar { font-size: 0.75em; line-height: 1.5em; @@ -79,7 +79,7 @@ div.sphinxsidebar { div.sphinxsidebarwrapper{ padding: 20px 0; } - + div.sphinxsidebar h3, div.sphinxsidebar h4 { font-family: Arial, sans-serif; @@ -95,30 +95,30 @@ div.sphinxsidebar h4 { div.sphinxsidebar h4{ font-size: 1.1em; } - + div.sphinxsidebar h3 a { color: #444; } - - + + div.sphinxsidebar p { color: #888; padding: 5px 20px; } - + div.sphinxsidebar p.topless { } - + div.sphinxsidebar ul { margin: 10px 20px; padding: 0; color: #000; } - + div.sphinxsidebar a { color: #444; } - + div.sphinxsidebar input { border: 1px solid #ccc; font-family: sans-serif; @@ -131,17 +131,17 @@ div.sphinxsidebar .searchformwrapper { } /* -- body styles ----------------------------------------------------------- */ - + a { color: #005B81; text-decoration: none; } - + a:hover { color: #E32E00; text-decoration: underline; } - + div.body h1, div.body h2, div.body h3, @@ -156,30 +156,30 @@ div.body h6 { padding: 5px 0 5px 10px; text-shadow: 0px 1px 0 white } - + div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; } div.body h2 { font-size: 150%; background-color: #C8D5E3; } div.body h3 { font-size: 120%; background-color: #D8DEE3; } div.body h4 { font-size: 110%; background-color: #D8DEE3; } div.body h5 { font-size: 100%; background-color: #D8DEE3; } div.body h6 { font-size: 100%; background-color: #D8DEE3; } - + a.headerlink { color: #c60f0f; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; } - + a.headerlink:hover { background-color: #c60f0f; color: white; } - + div.body p, div.body dd, div.body li { line-height: 1.5em; } - + div.admonition p.admonition-title + p { display: inline; } @@ -188,29 +188,29 @@ div.note { background-color: #eee; border: 1px solid #ccc; } - + div.seealso { background-color: #ffc; border: 1px solid #ff6; } - + div.topic { background-color: #eee; } - + div.warning { background-color: #ffe4e4; border: 1px solid #f66; } - + p.admonition-title { display: inline; } - + p.admonition-title:after { content: ":"; } - + pre { padding: 10px; line-height: 1.2em; @@ -220,7 +220,7 @@ pre { -webkit-box-shadow: 1px 1px 1px #d8d8d8; -moz-box-shadow: 1px 1px 1px #d8d8d8; } - + code { background-color: #ecf0f3; color: #222; diff --git a/sphinx/themes/pyramid/static/pyramid.css_t b/sphinx/themes/pyramid/static/pyramid.css_t index dafd898d5..0bab3d1a2 100644 --- a/sphinx/themes/pyramid/static/pyramid.css_t +++ b/sphinx/themes/pyramid/static/pyramid.css_t @@ -8,11 +8,11 @@ * :license: BSD, see LICENSE for details. * */ - + @import url("basic.css"); - + /* -- page layout ----------------------------------------------------------- */ - + body { font-family: "Nobile", sans-serif; font-size: 100%; @@ -34,7 +34,7 @@ div.bodywrapper { hr { border: 1px solid #B1B4B6; } - + div.document { background-color: #eee; } @@ -59,7 +59,7 @@ div.body { border-right-style: none; overflow: auto; } - + div.footer { color: #ffffff; width: 100%; @@ -69,7 +69,7 @@ div.footer { background: transparent; clear:both; } - + div.footer a { color: #ffffff; text-decoration: none; @@ -79,14 +79,14 @@ div.footer a:hover { color: #e88f00; text-decoration: underline; } - + div.related { line-height: 30px; color: #373839; font-size: 0.8em; background-color: #eee; } - + div.related a { color: #1b61d6; } @@ -94,7 +94,7 @@ div.related a { div.related ul { padding-left: calc({{ theme_sidebarwidth|todim }} + 10px); } - + div.sphinxsidebar { font-size: 0.75em; line-height: 1.5em; @@ -103,7 +103,7 @@ div.sphinxsidebar { div.sphinxsidebarwrapper{ padding: 10px 0; } - + div.sphinxsidebar h3, div.sphinxsidebar h4 { font-family: "Neuton", sans-serif; @@ -118,30 +118,30 @@ div.sphinxsidebar h4 { div.sphinxsidebar h4{ font-size: 1.3em; } - + div.sphinxsidebar h3 a { color: #000000; } - - + + div.sphinxsidebar p { color: #888; padding: 5px 20px; } - + div.sphinxsidebar p.topless { } - + div.sphinxsidebar ul { margin: 10px 20px; padding: 0; color: #373839; } - + div.sphinxsidebar a { color: #444; } - + div.sphinxsidebar input { border: 1px solid #ccc; font-family: sans-serif; @@ -171,16 +171,16 @@ p.sidebar-title { } /* -- body styles ----------------------------------------------------------- */ - + a, a .pre { color: #1b61d6; text-decoration: none; } - + a:hover, a:hover .pre { text-decoration: underline; } - + div.body h1, div.body h2, div.body h3, @@ -194,29 +194,29 @@ div.body h6 { margin: 30px 0px 10px 0px; padding: 5px 0; } - + div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; } div.body h2 { font-size: 150%; background-color: #ffffff; } div.body h3 { font-size: 120%; background-color: #ffffff; } div.body h4 { font-size: 110%; background-color: #ffffff; } div.body h5 { font-size: 100%; background-color: #ffffff; } div.body h6 { font-size: 100%; background-color: #ffffff; } - + a.headerlink { color: #1b61d6; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; } - + a.headerlink:hover { text-decoration: underline; } - + div.body p, div.body dd, div.body li { line-height: 1.5em; } - + div.admonition p.admonition-title + p { display: inline; } @@ -236,7 +236,7 @@ div.note { padding: 10px 20px 10px 60px; background: #e1ecfe url(dialog-note.png) no-repeat 10px 8px; } - + div.seealso { background: #fff6bf url(dialog-seealso.png) no-repeat 10px 8px; border: 2px solid #ffd324; @@ -244,7 +244,7 @@ div.seealso { border-right-style: none; padding: 10px 20px 10px 60px; } - + div.topic { background: #eeeeee; border: 2px solid #C6C9CB; @@ -252,7 +252,7 @@ div.topic { border-right-style: none; border-left-style: none; } - + div.warning { background: #fbe3e4 url(dialog-warning.png) no-repeat 10px 8px; border: 2px solid #fbc2c4; @@ -268,18 +268,18 @@ div.admonition-todo { border-left-style: none; padding: 10px 20px 10px 60px; } - + div.note p.admonition-title, div.warning p.admonition-title, div.seealso p.admonition-title, div.admonition-todo p.admonition-title { display: none; } - + p.admonition-title:after { content: ":"; } - + pre { padding: 10px; line-height: 1.2em; @@ -289,7 +289,7 @@ pre { border-right-style: none; border-left-style: none; } - + code { background-color: transparent; color: #222; diff --git a/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t b/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t index f9961ae36..8eca63278 100644 --- a/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t +++ b/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t @@ -138,7 +138,7 @@ div.footer a { /* -- body styles ----------------------------------------------------------- */ -p { +p { margin: 0.8em 0 0.5em 0; } diff --git a/tests/roots/test-circular/conf.py b/tests/roots/test-circular/conf.py index 027d21cda..a45d22e28 100644 --- a/tests/roots/test-circular/conf.py +++ b/tests/roots/test-circular/conf.py @@ -1 +1 @@ -exclude_patterns = ['_build'] +exclude_patterns = ['_build'] diff --git a/tests/roots/test-intl/xx/LC_MESSAGES/toctree.po b/tests/roots/test-intl/xx/LC_MESSAGES/toctree.po index 8ca1dc52c..62cccdfc1 100644 --- a/tests/roots/test-intl/xx/LC_MESSAGES/toctree.po +++ b/tests/roots/test-intl/xx/LC_MESSAGES/toctree.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) +# Copyright (C) # This file is distributed under the same license as the Sphinx intl package. # FIRST AUTHOR , YEAR. # diff --git a/tests/roots/test-numbered-circular/conf.py b/tests/roots/test-numbered-circular/conf.py index 027d21cda..a45d22e28 100644 --- a/tests/roots/test-numbered-circular/conf.py +++ b/tests/roots/test-numbered-circular/conf.py @@ -1 +1 @@ -exclude_patterns = ['_build'] +exclude_patterns = ['_build'] diff --git a/tests/roots/test-theming/MANIFEST.in b/tests/roots/test-theming/MANIFEST.in index 0e977e756..0ace41cb7 100644 --- a/tests/roots/test-theming/MANIFEST.in +++ b/tests/roots/test-theming/MANIFEST.in @@ -1,2 +1,2 @@ -recursive-include test_theme *.conf - +recursive-include test_theme *.conf + diff --git a/tests/roots/test-theming/conf.py b/tests/roots/test-theming/conf.py index 062b9cf83..0db7cf035 100644 --- a/tests/roots/test-theming/conf.py +++ b/tests/roots/test-theming/conf.py @@ -1,3 +1,3 @@ -html_theme = 'test-theme' -html_theme_path = ['.', 'test_theme'] -exclude_patterns = ['_build'] +html_theme = 'test-theme' +html_theme_path = ['.', 'test_theme'] +exclude_patterns = ['_build'] diff --git a/tests/roots/test-theming/index.rst b/tests/roots/test-theming/index.rst index 18a9a4e2f..214dcd7eb 100644 --- a/tests/roots/test-theming/index.rst +++ b/tests/roots/test-theming/index.rst @@ -1,5 +1,5 @@ -======= -Theming -======= - - +======= +Theming +======= + + diff --git a/tests/roots/test-theming/setup.py b/tests/roots/test-theming/setup.py index e62007f36..02ee259c0 100644 --- a/tests/roots/test-theming/setup.py +++ b/tests/roots/test-theming/setup.py @@ -1,11 +1,11 @@ -from setuptools import setup, find_packages - -setup( - name='test-theme', - packages=find_packages(), - include_package_data=True, - entry_points=""" - [sphinx_themes] - path = test_theme:get_path - """, -) +from setuptools import setup, find_packages + +setup( + name='test-theme', + packages=find_packages(), + include_package_data=True, + entry_points=""" + [sphinx_themes] + path = test_theme:get_path + """, +) diff --git a/tests/roots/test-theming/test_theme/__init__.py b/tests/roots/test-theming/test_theme/__init__.py index 398408c5d..13bdc4b2c 100644 --- a/tests/roots/test-theming/test_theme/__init__.py +++ b/tests/roots/test-theming/test_theme/__init__.py @@ -1,5 +1,5 @@ -import os - - -def get_path(): - return os.path.dirname(os.path.abspath(__file__)) +import os + + +def get_path(): + return os.path.dirname(os.path.abspath(__file__)) diff --git a/tests/test_pycode.py b/tests/test_pycode.py index 458e813f6..20f01f17d 100644 --- a/tests/test_pycode.py +++ b/tests/test_pycode.py @@ -26,7 +26,7 @@ def test_ModuleAnalyzer_get_module_source(): ModuleAnalyzer.get_module_source('builtins') with pytest.raises(PycodeError): ModuleAnalyzer.get_module_source('itertools') - + def test_ModuleAnalyzer_for_string(): analyzer = ModuleAnalyzer.for_string('print("Hello world")', 'module_name') From 5ea8ee133dfac71e58d1d6fb8f6b38a7ba249a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Freitag?= Date: Sat, 3 Oct 2020 12:59:47 +0200 Subject: [PATCH 06/16] Fix #8268: make linkcheck report HTTP errors --- CHANGES | 1 + sphinx/builders/linkcheck.py | 1 + .../roots/test-linkcheck-localserver/conf.py | 2 ++ .../test-linkcheck-localserver/index.rst | 1 + tests/test_build_linkcheck.py | 36 +++++++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 tests/roots/test-linkcheck-localserver/conf.py create mode 100644 tests/roots/test-linkcheck-localserver/index.rst diff --git a/CHANGES b/CHANGES index 22876d43b..7013a6d01 100644 --- a/CHANGES +++ b/CHANGES @@ -41,6 +41,7 @@ Bugs fixed * #8093: The highlight warning has wrong location in some builders (LaTeX, singlehtml and so on) * #8239: Failed to refer a token in productionlist if it is indented +* #8268: linkcheck: Report HTTP errors when ``linkcheck_anchors`` is ``True`` Testing -------- diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 9b54afc7c..1083e82ec 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -166,6 +166,7 @@ class CheckExternalLinksBuilder(Builder): # Read the whole document and see if #anchor exists response = requests.get(req_url, stream=True, config=self.app.config, auth=auth_info, **kwargs) + response.raise_for_status() found = check_anchor(response, unquote(anchor)) if not found: diff --git a/tests/roots/test-linkcheck-localserver/conf.py b/tests/roots/test-linkcheck-localserver/conf.py new file mode 100644 index 000000000..2ba1f85e8 --- /dev/null +++ b/tests/roots/test-linkcheck-localserver/conf.py @@ -0,0 +1,2 @@ +exclude_patterns = ['_build'] +linkcheck_anchors = True diff --git a/tests/roots/test-linkcheck-localserver/index.rst b/tests/roots/test-linkcheck-localserver/index.rst new file mode 100644 index 000000000..807fe964b --- /dev/null +++ b/tests/roots/test-linkcheck-localserver/index.rst @@ -0,0 +1 @@ +`local server `_ diff --git a/tests/test_build_linkcheck.py b/tests/test_build_linkcheck.py index 7d85f10c5..a78587668 100644 --- a/tests/test_build_linkcheck.py +++ b/tests/test_build_linkcheck.py @@ -8,8 +8,10 @@ :license: BSD, see LICENSE for details. """ +import http.server import json import re +import threading from unittest import mock import pytest @@ -106,6 +108,21 @@ def test_anchors_ignored(app, status, warning): # expect all ok when excluding #top assert not content +@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True) +def test_raises_for_invalid_status(app, status, warning): + server_thread = HttpServerThread(InternalServerErrorHandler, daemon=True) + server_thread.start() + try: + app.builder.build_all() + finally: + server_thread.terminate() + content = (app.outdir / 'output.txt').read_text() + assert content == ( + "index.rst:1: [broken] http://localhost:7777/#anchor: " + "500 Server Error: Internal Server Error " + "for url: http://localhost:7777/\n" + ) + @pytest.mark.sphinx( 'linkcheck', testroot='linkcheck', freshenv=True, @@ -160,3 +177,22 @@ def test_linkcheck_request_headers(app, status, warning): assert headers["X-Secret"] == "open sesami" else: assert headers["Accept"] == "text/html,application/xhtml+xml;q=0.9,*/*;q=0.8" + + +class HttpServerThread(threading.Thread): + def __init__(self, handler, *args, **kwargs): + super().__init__(*args, **kwargs) + self.server = http.server.HTTPServer(("localhost", 7777), handler) + + def run(self): + self.server.serve_forever(poll_interval=0.01) + + def terminate(self): + self.server.shutdown() + self.server.server_close() + self.join() + + +class InternalServerErrorHandler(http.server.BaseHTTPRequestHandler): + def do_GET(self): + self.send_error(500, "Internal Server Error") From 178c05b0597e144fdc2117c7b46ac15723a290e8 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 3 Oct 2020 22:26:32 +0900 Subject: [PATCH 07/16] Close #7996: manpage: Add man_make_section_directory Add a new config variable; man_make_section_directory to make a section directory on build man page. During 3.x, it defaults to False and will be changed to True on 4.0 release. --- CHANGES | 2 ++ doc/usage/configuration.rst | 6 ++++++ sphinx/builders/manpage.py | 10 ++++++++-- tests/test_build_manpage.py | 7 +++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index df70ab46e..c5791a368 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,8 @@ Features added nested declarations. * #8081: LaTeX: Allow to add LaTeX package via ``app.add_latex_package()`` until just before writing .tex file +* #7996: manpage: Add :confval:`man_make_section_directory` to make a section + directory on build man page Bugs fixed ---------- diff --git a/doc/usage/configuration.rst b/doc/usage/configuration.rst index 3fc3a5306..270fcbf33 100644 --- a/doc/usage/configuration.rst +++ b/doc/usage/configuration.rst @@ -2245,6 +2245,12 @@ These options influence manual page output. .. versionadded:: 1.1 +.. confval:: man_make_section_directory + + If true, make a section directory on build man page. Default is False. + + .. versionadded:: 3.3 + .. _texinfo-options: diff --git a/sphinx/builders/manpage.py b/sphinx/builders/manpage.py index 4166dece9..2a10ba62f 100644 --- a/sphinx/builders/manpage.py +++ b/sphinx/builders/manpage.py @@ -24,7 +24,7 @@ from sphinx.util import logging from sphinx.util import progress_message from sphinx.util.console import darkgreen # type: ignore from sphinx.util.nodes import inline_all_toctrees -from sphinx.util.osutil import make_filename_from_project +from sphinx.util.osutil import ensuredir, make_filename_from_project from sphinx.writers.manpage import ManualPageWriter, ManualPageTranslator @@ -80,7 +80,12 @@ class ManualPageBuilder(Builder): docsettings.authors = authors docsettings.section = section - targetname = '%s.%s' % (name, section) + if self.config.man_make_section_directory: + ensuredir(path.join(self.outdir, str(section))) + targetname = '%s/%s.%s' % (section, name, section) + else: + targetname = '%s.%s' % (name, section) + logger.info(darkgreen(targetname) + ' { ', nonl=True) destination = FileOutput( destination_path=path.join(self.outdir, targetname), @@ -115,6 +120,7 @@ def setup(app: Sphinx) -> Dict[str, Any]: app.add_config_value('man_pages', default_man_pages, None) app.add_config_value('man_show_urls', False, None) + app.add_config_value('man_make_section_directory', False, None) return { 'version': 'builtin', diff --git a/tests/test_build_manpage.py b/tests/test_build_manpage.py index c3c41a2ae..d4b1a320e 100644 --- a/tests/test_build_manpage.py +++ b/tests/test_build_manpage.py @@ -30,6 +30,13 @@ def test_all(app, status, warning): assert 'Footnotes' not in content +@pytest.mark.sphinx('man', testroot='basic', + confoverrides={'man_make_section_directory': True}) +def test_man_make_section_directory(app, status, warning): + app.build() + assert (app.outdir / '1' / 'python.1').exists() + + @pytest.mark.sphinx('man', testroot='directive-code') def test_captioned_code_block(app, status, warning): app.builder.build_all() From f0f90a5ce2bcd171f93720333eefa3e3c2bd9332 Mon Sep 17 00:00:00 2001 From: shimizukawa Date: Sun, 4 Oct 2020 06:24:04 +0900 Subject: [PATCH 08/16] Fix: missing and redundant spacing (and etc) for console output on building. Before this fixing: ``` generating indices... genindexdone writing additional pages... searchdone copying static files... ... done ``` After this fixing: ``` generating indices... genindex done writing additional pages... search done copying static files... done ``` This tiny trouble has been introduced at #6538 (sphinx-2.0.0 Mar 29, 2019) --- sphinx/builders/html/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py index c30aa9cfd..beb650991 100644 --- a/sphinx/builders/html/__init__.py +++ b/sphinx/builders/html/__init__.py @@ -641,17 +641,17 @@ class StandaloneHTMLBuilder(Builder): def gen_additional_pages(self) -> None: # additional pages from conf.py for pagename, template in self.config.html_additional_pages.items(): - logger.info(' ' + pagename, nonl=True) + logger.info(pagename + ' ', nonl=True) self.handle_page(pagename, {}, template) # the search page if self.search: - logger.info(' search', nonl=True) + logger.info('search ', nonl=True) self.handle_page('search', {}, 'search.html') # the opensearch xml file if self.config.html_use_opensearch and self.search: - logger.info(' opensearch', nonl=True) + logger.info('opensearch ', nonl=True) fn = path.join(self.outdir, '_static', 'opensearch.xml') self.handle_page('opensearch', {}, 'opensearch.xml', outfilename=fn) @@ -669,7 +669,7 @@ class StandaloneHTMLBuilder(Builder): 'genindexcounts': indexcounts, 'split_index': self.config.html_split_index, } - logger.info(' genindex', nonl=True) + logger.info('genindex ', nonl=True) if self.config.html_split_index: self.handle_page('genindex', genindexcontext, @@ -691,7 +691,7 @@ class StandaloneHTMLBuilder(Builder): 'content': content, 'collapse_index': collapse, } - logger.info(' ' + indexname, nonl=True) + logger.info(indexname + ' ', nonl=True) self.handle_page(indexname, indexcontext, 'domainindex.html') def copy_image_files(self) -> None: @@ -785,7 +785,7 @@ class StandaloneHTMLBuilder(Builder): def copy_static_files(self) -> None: try: - with progress_message(__('copying static files... ')): + with progress_message(__('copying static files')): ensuredir(path.join(self.outdir, '_static')) # prepare context for templates From d1f8dddeff742ca09dca6ab829410248b919a5c5 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 4 Oct 2020 10:15:38 +0900 Subject: [PATCH 09/16] Update CHANGES for PR #8277 --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index df70ab46e..b82c2e948 100644 --- a/CHANGES +++ b/CHANGES @@ -38,6 +38,8 @@ Bugs fixed * #8142: napoleon: Potential of regex denial of service in google style docs * #8169: LaTeX: pxjahyper loaded even when latex_engine is not platex * #8175: intersphinx: Potential of regex denial of service by broken inventory +* #8277: sphinx-build: missing and redundant spacing (and etc) for console + output on building * #8093: The highlight warning has wrong location in some builders (LaTeX, singlehtml and so on) * #8239: Failed to refer a token in productionlist if it is indented From 9a0a0f9ae15d717a5503fc3883159ae6c4210254 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 3 Oct 2020 02:01:12 +0900 Subject: [PATCH 10/16] Fix #8157: autodoc: TypeError is raised when annotation has invalid __args__ Typically, the __args__ attribute of type annotations is a tuple containing arguments for the types (ex. The __args__ of `List[int]` is `(int,)`). But some kind of types has non tuple __args__ attribute. For example, `nptyping.NDArray` is one of them. This fixes the TypeError when the invalid __args__ attribute found. --- CHANGES | 1 + sphinx/util/typing.py | 5 ++++- tests/test_util_typing.py | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b82c2e948..e30d42e43 100644 --- a/CHANGES +++ b/CHANGES @@ -34,6 +34,7 @@ Bugs fixed by string not ending with blank lines * #8142: autodoc: Wrong constructor signature for the class derived from typing.Generic +* #8157: autodoc: TypeError is raised when annotation has invalid __args__ * #8192: napoleon: description is disappeared when it contains inline literals * #8142: napoleon: Potential of regex denial of service in google style docs * #8169: LaTeX: pxjahyper loaded even when latex_engine is not platex diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py index 4dac3b695..8eca67220 100644 --- a/sphinx/util/typing.py +++ b/sphinx/util/typing.py @@ -109,7 +109,10 @@ def _stringify_py37(annotation: Any) -> str: return repr(annotation) if getattr(annotation, '__args__', None): - if qualname == 'Union': + if not isinstance(annotation.__args__, (list, tuple)): + # broken __args__ found + pass + elif qualname == 'Union': if len(annotation.__args__) > 1 and annotation.__args__[-1] is NoneType: if len(annotation.__args__) > 2: args = ', '.join(stringify(a) for a in annotation.__args__[:-1]) diff --git a/tests/test_util_typing.py b/tests/test_util_typing.py index 932fdbfc0..3f8ddbb37 100644 --- a/tests/test_util_typing.py +++ b/tests/test_util_typing.py @@ -32,6 +32,10 @@ class MyList(List[T]): pass +class BrokenType: + __args__ = int + + def test_stringify(): assert stringify(int) == "int" assert stringify(str) == "str" @@ -113,3 +117,7 @@ def test_stringify_type_hints_alias(): MyTuple = Tuple[str, str] assert stringify(MyStr) == "str" assert stringify(MyTuple) == "Tuple[str, str]" # type: ignore + + +def test_stringify_broken_type_hints(): + assert stringify(BrokenType) == 'test_util_typing.BrokenType' From 37235c71e04aff3b93ae98f12456a34666635a9d Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Fri, 14 Aug 2020 16:11:23 +0900 Subject: [PATCH 11/16] Fix #6640: i18n: Failed to override system message translation Our document describes that users can override system messages via their own message catalog named `sphinx.mo` under the locale_dirs. But it has not been used since its beginning of i18n mechanism because the priority of users' message catalog is lower than system's. This makes the priority of users' message catalog higher than system's. --- CHANGES | 1 + sphinx/application.py | 7 +++++-- sphinx/locale/__init__.py | 2 +- tests/test_intl.py | 29 +++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index e30d42e43..481ade0b8 100644 --- a/CHANGES +++ b/CHANGES @@ -27,6 +27,7 @@ Bugs fixed ---------- * #8085: i18n: Add support for having single text domain +* #6640: i18n: Failed to override system message translation * #8143: autodoc: AttributeError is raised when False value is passed to autodoc_default_options * #8103: autodoc: functools.cached_property is not considered as a property diff --git a/sphinx/application.py b/sphinx/application.py index 385b74d8a..f91027bf7 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -18,7 +18,7 @@ import warnings from collections import deque from io import StringIO from os import path -from typing import Any, Callable, Dict, IO, List, Tuple, Union +from typing import Any, Callable, Dict, IO, List, Optional, Tuple, Union from docutils import nodes from docutils.nodes import Element, TextElement @@ -293,7 +293,10 @@ class Sphinx: if catalog.domain == 'sphinx' and catalog.is_outdated(): catalog.write_mo(self.config.language) - locale_dirs = [None, path.join(package_dir, 'locale')] + list(repo.locale_dirs) + locale_dirs = [None] # type: List[Optional[str]] + locale_dirs += list(repo.locale_dirs) + locale_dirs += [path.join(package_dir, 'locale')] + self.translator, has_translation = locale.init(locale_dirs, self.config.language) if has_translation or self.config.language == 'en': # "en" never needs to be translated diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py index 385ca3566..5210dc725 100644 --- a/sphinx/locale/__init__.py +++ b/sphinx/locale/__init__.py @@ -106,7 +106,7 @@ class _TranslationProxy(UserString): translators = defaultdict(NullTranslations) # type: Dict[Tuple[str, str], NullTranslations] -def init(locale_dirs: List[str], language: str, +def init(locale_dirs: List[Optional[str]], language: str, catalog: str = 'sphinx', namespace: str = 'general') -> Tuple[NullTranslations, bool]: """Look for message catalogs in `locale_dirs` and *ensure* that there is at least a NullTranslations catalog set in `translators`. If called multiple diff --git a/tests/test_intl.py b/tests/test_intl.py index 1d1282baa..c0b87d5ce 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -14,8 +14,10 @@ import re import pytest from babel.messages import pofile, mofile +from babel.messages.catalog import Catalog from docutils import nodes +from sphinx import locale from sphinx.testing.util import ( path, etree_parse, strip_escseq, assert_re_search, assert_not_re_search, assert_startswith, assert_node @@ -1289,3 +1291,30 @@ def test_image_glob_intl_using_figure_language_filename(app): def getwarning(warnings): return strip_escseq(warnings.getvalue().replace(os.sep, '/')) + + +@pytest.mark.sphinx('html', testroot='basic', confoverrides={'language': 'de'}) +def test_customize_system_message(make_app, app_params, sphinx_test_tempdir): + try: + # clear translators cache + locale.translators.clear() + + # prepare message catalog (.po) + locale_dir = sphinx_test_tempdir / 'basic' / 'locales' / 'de' / 'LC_MESSAGES' + locale_dir.makedirs() + with (locale_dir / 'sphinx.po').open('wb') as f: + catalog = Catalog() + catalog.add('Quick search', 'QUICK SEARCH') + pofile.write_po(f, catalog) + + # construct application and convert po file to .mo + args, kwargs = app_params + app = make_app(*args, **kwargs) + assert (locale_dir / 'sphinx.mo').exists() + assert app.translator.gettext('Quick search') == 'QUICK SEARCH' + + app.build() + content = (app.outdir / 'index.html').read_text() + assert 'QUICK SEARCH' in content + finally: + locale.translators.clear() From 2d37ba44193aac1f7082382ceb34e85078e64a32 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 3 Oct 2020 13:33:37 +0900 Subject: [PATCH 12/16] autodoc: deprecate SingledispatchFunctionDocumenter In #7487, SingledispatchFunctionDocumenter is merged into FunctionDocumenter. SingledispatchMethodDocumenter is also. As a result, They are no longer needed. So this deprecates them. --- CHANGES | 2 ++ doc/extdev/deprecated.rst | 10 ++++++++++ sphinx/ext/autodoc/__init__.py | 10 ++++++++++ 3 files changed, 22 insertions(+) diff --git a/CHANGES b/CHANGES index 4252376b0..a7f27ac4d 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,8 @@ Deprecated * ``sphinx.builders.latex.LaTeXBuilder.usepackages`` * ``sphinx.builders.latex.LaTeXBuilder.usepackages_afger_hyperref`` +* ``sphinx.ext.autodoc.SingledispatchFunctionDocumenter`` +* ``sphinx.ext.autodoc.SingledispatchMethodDocumenter`` Features added -------------- diff --git a/doc/extdev/deprecated.rst b/doc/extdev/deprecated.rst index d7ad21fff..2bb8aebfd 100644 --- a/doc/extdev/deprecated.rst +++ b/doc/extdev/deprecated.rst @@ -36,6 +36,16 @@ The following is a list of deprecated interfaces. - 5.0 - N/A + * - ``sphinx.ext.autodoc.SingledispatchFunctionDocumenter`` + - 3.3 + - 5.0 + - ``sphinx.ext.autodoc.FunctionDocumenter`` + + * - ``sphinx.ext.autodoc.SingledispatchMethodDocumenter`` + - 3.3 + - 5.0 + - ``sphinx.ext.autodoc.MethodDocumenter`` + * - ``sphinx.ext.autodoc.members_set_option()`` - 3.2 - 5.0 diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py index d7c5d2242..6eff27102 100644 --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -1302,6 +1302,11 @@ class SingledispatchFunctionDocumenter(FunctionDocumenter): Retained for backwards compatibility, now does the same as the FunctionDocumenter """ + def __init__(self, *args: Any, **kwargs: Any) -> None: + warnings.warn("%s is deprecated." % self.__class__.__name__, + RemovedInSphinx50Warning, stacklevel=2) + super().__init__(*args, **kwargs) + class DecoratorDocumenter(FunctionDocumenter): """ @@ -1936,6 +1941,11 @@ class SingledispatchMethodDocumenter(MethodDocumenter): Retained for backwards compatibility, now does the same as the MethodDocumenter """ + def __init__(self, *args: Any, **kwargs: Any) -> None: + warnings.warn("%s is deprecated." % self.__class__.__name__, + RemovedInSphinx50Warning, stacklevel=2) + super().__init__(*args, **kwargs) + class AttributeDocumenter(DocstringStripSignatureMixin, ClassLevelDocumenter): # type: ignore """ From 66dda1fc50249e9da62e79380251d8795b8e36df Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 8 Aug 2020 21:20:55 +0900 Subject: [PATCH 13/16] Fix #6914: figure numbers are unexpectedly assigned to uncaptioned items The figure numbers should be assigned to items only having captions or titles. This uses `get_numfig_title()` to ensures it on assign numbers. --- CHANGES | 1 + sphinx/environment/collectors/toctree.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 4252376b0..11b758399 100644 --- a/CHANGES +++ b/CHANGES @@ -47,6 +47,7 @@ Bugs fixed singlehtml and so on) * #8239: Failed to refer a token in productionlist if it is indented * #8268: linkcheck: Report HTTP errors when ``linkcheck_anchors`` is ``True`` +* #6914: figure numbers are unexpectedly assigned to uncaptioned items Testing -------- diff --git a/sphinx/environment/collectors/toctree.py b/sphinx/environment/collectors/toctree.py index e168bd9c4..d6cdc8354 100644 --- a/sphinx/environment/collectors/toctree.py +++ b/sphinx/environment/collectors/toctree.py @@ -224,6 +224,10 @@ class TocTreeCollector(EnvironmentCollector): def get_figtype(node: Node) -> str: for domain in env.domains.values(): figtype = domain.get_enumerable_node_type(node) + if domain.name == 'std' and not domain.get_numfig_title(node): # type: ignore + # Skip if uncaptioned node + continue + if figtype: return figtype From 6b3d4458796d3ed2f536c09b60c2573a276db417 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sun, 4 Oct 2020 10:02:57 +0200 Subject: [PATCH 14/16] Pass docname instead of srcdir --- sphinx/builders/linkcheck.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 4ea98f1d3..c632220db 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -210,7 +210,7 @@ class CheckExternalLinksBuilder(Builder): else: return 'redirected', new_url, 0 - def check(srcdir: str) -> Tuple[str, str, int]: + def check(docname: str) -> Tuple[str, str, int]: # check for various conditions without bothering the network if len(uri) == 0 or uri.startswith(('#', 'mailto:')): return 'unchecked', '', 0 @@ -219,6 +219,7 @@ class CheckExternalLinksBuilder(Builder): # non supported URI schemes (ex. ftp) return 'unchecked', '', 0 else: + srcdir = path.dirname(self.env.doc2path(docname)) if path.exists(path.join(srcdir, uri)): return 'working', '', 0 else: @@ -256,8 +257,7 @@ class CheckExternalLinksBuilder(Builder): uri, docname, lineno = self.wqueue.get() if uri is None: break - srcdir = path.dirname(self.env.doc2path(docname)) - status, info, code = check(srcdir) + status, info, code = check(docname) self.rqueue.put((uri, docname, lineno, status, info, code)) def process_result(self, result: Tuple[str, str, int, str, str, int]) -> None: From 45717977ac9e492f3090cbfa665bae883a8272e2 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 19 Jul 2020 00:50:36 +0900 Subject: [PATCH 15/16] Fix #7973: imgconverter: Check availability of imagemagick only once To prevent checking the availability of image converters times and times again, this stores the result to the class variable. It is not a good design to have a state globally. So this should be refactored in the future. --- CHANGES | 1 + sphinx/transforms/post_transforms/images.py | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index aea356897..c3b66b4d8 100644 --- a/CHANGES +++ b/CHANGES @@ -45,6 +45,7 @@ Bugs fixed * #8175: intersphinx: Potential of regex denial of service by broken inventory * #8277: sphinx-build: missing and redundant spacing (and etc) for console output on building +* #7973: imgconverter: Check availability of imagemagick many times * #8093: The highlight warning has wrong location in some builders (LaTeX, singlehtml and so on) * #8239: Failed to refer a token in productionlist if it is indented diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py index f2cacac3c..949c09dde 100644 --- a/sphinx/transforms/post_transforms/images.py +++ b/sphinx/transforms/post_transforms/images.py @@ -11,7 +11,7 @@ import os import re from math import ceil -from typing import Any, Dict, List, Tuple +from typing import Any, Dict, List, Optional, Tuple from docutils import nodes @@ -175,6 +175,13 @@ class ImageConverter(BaseImageConverter): """ default_priority = 200 + #: The converter is available or not. Will be filled at the first call of + #: the build. The result is shared in the same process. + #: + #: .. todo:: This should be refactored not to store the state without class + #: variable. + available = None # type: Optional[bool] + #: A conversion rules the image converter supports. #: It is represented as a list of pair of source image format (mimetype) and #: destination one:: @@ -187,16 +194,14 @@ class ImageConverter(BaseImageConverter): conversion_rules = [] # type: List[Tuple[str, str]] def __init__(self, *args: Any, **kwargs: Any) -> None: - self.available = None # type: bool - # the converter is available or not. - # Will be checked at first conversion super().__init__(*args, **kwargs) def match(self, node: nodes.image) -> bool: if not self.app.builder.supported_image_types: return False elif self.available is None: - self.available = self.is_available() + # store the value to the class variable to share it during the build + self.__class__.available = self.is_available() if not self.available: return False From 941c9ba23d9498be80f0abe1930e2ceb9f4c7a16 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 4 Oct 2020 17:18:38 +0900 Subject: [PATCH 16/16] Update CHANGES for PR #8245 --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index aea356897..eb6e05270 100644 --- a/CHANGES +++ b/CHANGES @@ -49,6 +49,7 @@ Bugs fixed singlehtml and so on) * #8239: Failed to refer a token in productionlist if it is indented * #8268: linkcheck: Report HTTP errors when ``linkcheck_anchors`` is ``True`` +* #8245: linkcheck: take source directory into account for local files * #6914: figure numbers are unexpectedly assigned to uncaptioned items Testing