Skip to content

Commit

Permalink
Merge branch '2.x' into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Feb 29, 2020
2 parents 2014559 + 9498dbe commit c84f7bf
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------

Expand Down
2 changes: 1 addition & 1 deletion sphinx/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def get_source_input(self, filetype: str) -> "Type[Input]":

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
Expand Down
3 changes: 2 additions & 1 deletion sphinx/texinputs/sphinx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions sphinx/util/docutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ def dispatch_visit(self, node: Node) -> None:
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:
Expand All @@ -475,8 +475,8 @@ def dispatch_departure(self, node: Node) -> None:
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:
Expand Down
5 changes: 4 additions & 1 deletion utils/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def finalize_release_date(self):
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)):
Expand Down Expand Up @@ -142,6 +142,9 @@ def add_release(self, version_info):
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()
Expand Down
4 changes: 0 additions & 4 deletions utils/release-checklist
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down Expand Up @@ -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``
Expand Down Expand Up @@ -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``
Expand Down Expand Up @@ -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``
Expand Down

0 comments on commit c84f7bf

Please sign in to comment.