diff options
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | sphinx/registry.py | 2 | ||||
| -rw-r--r-- | sphinx/texinputs/sphinx.sty | 3 | ||||
| -rw-r--r-- | sphinx/util/docutils.py | 8 | ||||
| -rwxr-xr-x | utils/bump_version.py | 5 | ||||
| -rw-r--r-- | utils/release-checklist | 24 |
7 files changed, 23 insertions, 23 deletions
@@ -16,6 +16,9 @@ Features added Bugs fixed ---------- +* #7197: LaTeX: platex cause error to build image directive with target url +* #7223: Sphinx builds has been slower since 2.4.0 + Testing -------- @@ -31,6 +31,7 @@ clean-backupfiles: clean-generated: find . -name '.DS_Store' -exec rm -f {} + rm -rf Sphinx.egg-info/ + rm -rf dists/ rm -rf doc/_build/ rm -f sphinx/pycode/*.pickle rm -f utils/*3.py* diff --git a/sphinx/registry.py b/sphinx/registry.py index d7bffa2ce..ea423298f 100644 --- a/sphinx/registry.py +++ b/sphinx/registry.py @@ -347,7 +347,7 @@ class SphinxComponentRegistry: def add_translator(self, name: str, translator: "Type[nodes.NodeVisitor]", override: bool = False) -> None: - logger.debug('[app] Change of translator for the %s builder.' % name) + logger.debug('[app] Change of translator for the %s builder.', name) if name in self.translators and not override: raise ExtensionError(__('Translator for %r already exists') % name) self.translators[name] = translator diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 3e67b5610..714d98e05 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -1407,7 +1407,8 @@ % \sphinxcode). Sphinx uses \#, \%, \& ... always inside \sphinxhref. \protected\def\sphinxhref#1#2{{% \sphinxunactivateextrasandspace % never do \scantokens with active space! - \endlinechar\m@ne\everyeof{{#2}}% keep catcode regime for #2 +% for the \endlinechar business, https://github.com/latex3/latex2e/issues/286 + \endlinechar\m@ne\everyeof{{\endlinechar13 #2}}% keep catcode regime for #2 \scantokens{\href{#1}}% normalise it for #1 during \href expansion }} % Same for \url. And also \nolinkurl for coherence. diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index 23f2c888b..3fbd8a420 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -479,8 +479,8 @@ class SphinxTranslator(nodes.NodeVisitor): for node_class in node.__class__.__mro__: method = getattr(self, 'visit_%s' % (node_class.__name__), None) if method: - logger.debug('SphinxTranslator.dispatch_visit calling %s for %s' % - (method.__name__, node)) + logger.debug('SphinxTranslator.dispatch_visit calling %s for %s', + method.__name__, node) return method(node) else: super().dispatch_visit(node) @@ -497,8 +497,8 @@ class SphinxTranslator(nodes.NodeVisitor): for node_class in node.__class__.__mro__: method = getattr(self, 'depart_%s' % (node_class.__name__), None) if method: - logger.debug('SphinxTranslator.dispatch_departure calling %s for %s' % - (method.__name__, node)) + logger.debug('SphinxTranslator.dispatch_departure calling %s for %s', + method.__name__, node) return method(node) else: super().dispatch_departure(node) diff --git a/utils/bump_version.py b/utils/bump_version.py index 6491a38e3..b829877b6 100755 --- a/utils/bump_version.py +++ b/utils/bump_version.py @@ -114,7 +114,7 @@ class Changes: f.truncate(0) f.write(heading + '\n') f.write('=' * len(heading) + '\n') - f.write(body) + f.write(self.filter_empty_sections(body)) def add_release(self, version_info): if version_info[-2:] in (('beta', 0), ('final', 0)): @@ -142,6 +142,9 @@ class Changes: f.write('\n') f.write(body) + def filter_empty_sections(self, body): + return re.sub('^\n.+\n-{3,}\n+(?=\n.+\n[-=]{3,}\n)', '', body, flags=re.M) + def parse_options(argv): parser = argparse.ArgumentParser() diff --git a/utils/release-checklist b/utils/release-checklist index 12cbe6381..94773e458 100644 --- a/utils/release-checklist +++ b/utils/release-checklist @@ -8,12 +8,11 @@ for stable releases * Run ``git fetch; git status`` and check nothing changed * ``python utils/bump_version.py X.Y.Z`` * Check diff by ``git diff`` -* Edit CHANGES if empty section exists * ``git commit -am 'Bump to X.Y.Z final'`` * ``make clean`` * ``python setup.py release bdist_wheel sdist`` -* ``twine check dist/Sphinx-X.Y.Z*`` -* ``twine upload dist/Sphinx-X.Y.Z* --sign --identity [your GPG key]`` +* ``twine check dist/Sphinx-*`` +* ``twine upload dist/Sphinx-* --sign --identity [your GPG key]`` * open https://pypi.org/project/Sphinx/ and check there are no obvious errors * ``git tag vX.Y.Z`` * ``python utils/bump_version.py --in-develop X.Y.Zb0`` (ex. 1.5.3b0) @@ -23,7 +22,6 @@ for stable releases * ``git checkout master`` * ``git merge X.Y`` * ``git push origin master`` -* Update `sphinx-doc-translations <https://github.com/sphinx-doc/sphinx-doc-translations>`_ * Add new version/milestone to tracker categories * Write announcement and send to sphinx-dev, sphinx-users and python-announce @@ -36,12 +34,11 @@ for first beta releases * Run ``(cd sphinx/locale; tx push -s)`` * ``python utils/bump_version.py X.Y.0b1`` * Check diff by ``git diff`` -* Edit CHANGES if empty section exists * ``git commit -am 'Bump to X.Y.0 beta1'`` * ``make clean`` * ``python setup.py release bdist_wheel sdist`` -* ``twine check dist/Sphinx-X.Y.Z*`` -* ``twine upload dist/Sphinx-X.Y.Z* --sign --identity [your GPG key]`` +* ``twine check dist/Sphinx-*`` +* ``twine upload dist/Sphinx-* --sign --identity [your GPG key]`` * open https://pypi.org/project/Sphinx/ and check there are no obvious errors * ``git tag vX.Y.0b1`` * ``python utils/bump_version.py --in-develop X.Y.0b2`` (ex. 1.6.0b2) @@ -56,7 +53,6 @@ for first beta releases * ``git commit -am 'Bump version'`` * ``git push origin master`` * open https://github.com/sphinx-doc/sphinx/settings/branches and make ``X.Y`` branch protected -* Update `sphinx-doc-translations <https://github.com/sphinx-doc/sphinx-doc-translations>`_ * Add new version/milestone to tracker categories * Write announcement and send to sphinx-dev, sphinx-users and python-announce @@ -67,12 +63,11 @@ for other beta releases * Run ``git fetch; git status`` and check nothing changed * ``python utils/bump_version.py X.Y.0bN`` * Check diff by ``git diff`` -* Edit CHANGES if empty section exists * ``git commit -am 'Bump to X.Y.0 betaN'`` * ``make clean`` * ``python setup.py release bdist_wheel sdist`` -* ``twine check dist/Sphinx-X.Y.Z*`` -* ``twine upload dist/Sphinx-X.Y.Z* --sign --identity [your GPG key]`` +* ``twine check dist/Sphinx-*`` +* ``twine upload dist/Sphinx-* --sign --identity [your GPG key]`` * open https://pypi.org/project/Sphinx/ and check there are no obvious errors * ``git tag vX.Y.0bN`` * ``python utils/bump_version.py --in-develop X.Y.0bM`` (ex. 1.6.0b3) @@ -82,7 +77,6 @@ for other beta releases * ``git checkout master`` * ``git merge X.Y`` * ``git push origin master`` -* Update `sphinx-doc-translations <https://github.com/sphinx-doc/sphinx-doc-translations>`_ * Add new version/milestone to tracker categories * Write announcement and send to sphinx-dev, sphinx-users and python-announce @@ -97,12 +91,11 @@ for major releases * Run ``git commit -am 'Update message catalogs'`` * ``python utils/bump_version.py X.Y.0`` * Check diff by ``git diff`` -* Edit CHANGES if empty section exists * ``git commit -am 'Bump to X.Y.0 final'`` * ``make clean`` * ``python setup.py release bdist_wheel sdist`` -* ``twine check dist/Sphinx-X.Y.Z*`` -* ``twine upload dist/Sphinx-X.Y.Z* --sign --identity [your GPG key]`` +* ``twine check dist/Sphinx-*`` +* ``twine upload dist/Sphinx-* --sign --identity [your GPG key]`` * open https://pypi.org/project/Sphinx/ and check there are no obvious errors * ``git tag vX.Y.0`` * ``python utils/bump_version.py --in-develop X.Y.1b0`` (ex. 1.6.1b0) @@ -117,6 +110,5 @@ for major releases * Run ``git tag A.B`` to paste a tag instead branch * Run ``git push origin :A.B --tags`` to remove old stable branch * open https://readthedocs.org/dashboard/sphinx/versions/ and enable the released version -* Update `sphinx-doc-translations <https://github.com/sphinx-doc/sphinx-doc-translations>`_ * Add new version/milestone to tracker categories * Write announcement and send to sphinx-dev, sphinx-users and python-announce |
