diff options
Diffstat (limited to 'sphinx/util/pycompat.py')
-rw-r--r-- | sphinx/util/pycompat.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 50eee5ce3..6474cf141 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -21,7 +21,6 @@ from sphinx.util import logging from sphinx.util.console import terminal_safe from sphinx.util.typing import NoneType - logger = logging.getLogger(__name__) @@ -32,8 +31,8 @@ logger = logging.getLogger(__name__) # support for running 2to3 over config files def convert_with_2to3(filepath: str) -> str: try: - from lib2to3.refactor import RefactoringTool, get_fixers_from_package from lib2to3.pgen2.parse import ParseError + from lib2to3.refactor import RefactoringTool, get_fixers_from_package except ImportError as exc: # python 3.9.0a6+ emits PendingDeprecationWarning for lib2to3. # Additionally, removal of the module is still discussed at PEP-594. |