mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Deprecate sphinx.util.pycompat.u
It is now simply a constant equal to the empty string. Provides no further utility.
This commit is contained in:
parent
b6fb808317
commit
6fbf4a2f99
1
CHANGES
1
CHANGES
@ -27,6 +27,7 @@ Deprecated
|
||||
* ``sphinx.testing.util.remove_unicode_literal()``
|
||||
* ``sphinx.util.get_matching_docs()`` is deprecated
|
||||
* ``sphinx.util.osutil.walk()``
|
||||
* ``sphinx.util.pycompat.u``
|
||||
* ``sphinx.writers.latex.LaTeXTranslator.babel_defmacro()``
|
||||
* template variables for LaTeX template
|
||||
|
||||
|
@ -158,6 +158,11 @@ The following is a list of deprecated interfaces.
|
||||
- 4.0
|
||||
- ``os.walk()``
|
||||
|
||||
* - ``sphinx.util.pycompat.u``
|
||||
- 2.0
|
||||
- 4.0
|
||||
- N/A
|
||||
|
||||
* - ``sphinx.application.Sphinx._setting_up_extension``
|
||||
- 2.0
|
||||
- 3.0
|
||||
|
@ -14,8 +14,6 @@ import re
|
||||
|
||||
from six import integer_types, string_types
|
||||
|
||||
from sphinx.util.pycompat import u
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
from typing import Any, Dict, IO, List, Match, Union # NOQA
|
||||
@ -62,7 +60,7 @@ def encode_string(s):
|
||||
|
||||
def decode_string(s):
|
||||
# type: (str) -> str
|
||||
return ESCAPED.sub(lambda m: eval(u + '"' + m.group() + '"'), s)
|
||||
return ESCAPED.sub(lambda m: eval('"' + m.group() + '"'), s)
|
||||
|
||||
|
||||
reswords = set("""\
|
||||
|
@ -27,7 +27,7 @@ NoneType = type(None)
|
||||
# Python 2/3 compatibility
|
||||
|
||||
# prefix for Unicode strings
|
||||
u = ''
|
||||
u = '' # RemovedInSphinx40Warning
|
||||
|
||||
|
||||
# sys_encoding: some kind of default system encoding; should be used with
|
||||
|
Loading…
Reference in New Issue
Block a user