diff options
-rw-r--r-- | CHANGES | 3 | ||||
-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 | 4 |
6 files changed, 14 insertions, 11 deletions
@@ -98,6 +98,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 -------- diff --git a/sphinx/registry.py b/sphinx/registry.py index 9a1d68dd6..93a7ebc25 100644 --- a/sphinx/registry.py +++ b/sphinx/registry.py @@ -296,7 +296,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 4a3f1fab4..3b7b60201 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -456,8 +456,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) method(node) break else: @@ -475,8 +475,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) method(node) break else: 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 170b2417e..5a60e59c8 100644 --- a/utils/release-checklist +++ b/utils/release-checklist @@ -8,7 +8,6 @@ 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`` @@ -36,7 +35,6 @@ 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`` @@ -66,7 +64,6 @@ 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`` @@ -95,7 +92,6 @@ 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`` |