diff options
Diffstat (limited to 'sphinx/testing/util.py')
-rw-r--r-- | sphinx/testing/util.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sphinx/testing/util.py b/sphinx/testing/util.py index 7d0cde143..bfbb1071c 100644 --- a/sphinx/testing/util.py +++ b/sphinx/testing/util.py @@ -21,15 +21,12 @@ from docutils.nodes import Node from docutils.parsers.rst import directives, roles from sphinx import application, locale -from sphinx.deprecation import RemovedInSphinx40Warning from sphinx.pycode import ModuleAnalyzer from sphinx.testing.path import path from sphinx.util.osutil import relpath __all__ = [ - 'Struct', - 'SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding', - 'remove_unicode_literals', + 'Struct', 'SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding', ] @@ -102,8 +99,8 @@ class SphinxTestApp(application.Sphinx): A subclass of :class:`Sphinx` that runs on the test root, with some better default values for the initialization parameters. """ - _status = None # type: StringIO - _warning = None # type: StringIO + _status: StringIO = None + _warning: StringIO = None def __init__(self, buildername: str = 'html', srcdir: path = None, freshenv: bool = False, confoverrides: Dict = None, status: IO = None, warning: IO = None, @@ -177,12 +174,6 @@ class SphinxTestAppWrapperForSkipBuilding: _unicode_literals_re = re.compile(r'u(".*?")|u(\'.*?\')') -def remove_unicode_literals(s: str) -> str: - warnings.warn('remove_unicode_literals() is deprecated.', - RemovedInSphinx40Warning, stacklevel=2) - return _unicode_literals_re.sub(lambda x: x.group(1) or x.group(2), s) - - def find_files(root: str, suffix: bool = None) -> Generator[str, None, None]: for dirpath, dirs, files in os.walk(root, followlinks=True): dirpath = path(dirpath) |