mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #4889: latex: sphinx.writers.latex causes recusrive import
This commit is contained in:
parent
7a13a5996b
commit
1a59aca8a1
1
CHANGES
1
CHANGES
@ -17,6 +17,7 @@ Bugs fixed
|
||||
----------
|
||||
|
||||
* #4885, #4887: py domain: Crashed with duplicated objects
|
||||
* #4889: latex: sphinx.writers.latex causes recusrive import
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -23,7 +23,6 @@ from six import itervalues, text_type
|
||||
|
||||
from sphinx import addnodes
|
||||
from sphinx import highlighting
|
||||
from sphinx.builders.latex.transforms import URI_SCHEMES, ShowUrlsTransform # NOQA # for compatibility
|
||||
from sphinx.errors import SphinxError
|
||||
from sphinx.locale import admonitionlabels, _
|
||||
from sphinx.util import split_into, logging
|
||||
@ -2561,3 +2560,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
def unknown_visit(self, node):
|
||||
# type: (nodes.Node) -> None
|
||||
raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
|
||||
|
||||
|
||||
# Import old modules here for compatibility
|
||||
# They should be imported after `LaTeXTranslator` to avoid recursive import.
|
||||
#
|
||||
# refs: https://github.com/sphinx-doc/sphinx/issues/4889
|
||||
from sphinx.builders.latex.transforms import URI_SCHEMES, ShowUrlsTransform # NOQA
|
||||
|
Loading…
Reference in New Issue
Block a user