mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove `HTMLTranslator
and
html5_ready
from
sphinx.builders.html
` (#11383)
This commit is contained in:
parent
77fd819a09
commit
3e3251d3ba
2
CHANGES
2
CHANGES
@ -28,6 +28,8 @@ Incompatible changes
|
||||
* #11381: Remove deprecated ``style`` key for HTML templates.
|
||||
* #11382: Remove deprecated ``sphinx.writers.latex.LaTeXTranslator.docclasses``
|
||||
attribute.
|
||||
* #11383: Remove deprecated ``sphinx.builders.html.html5_ready`` and
|
||||
``sphinx.builders.html.HTMLTranslator`` attributes.
|
||||
|
||||
Deprecated
|
||||
----------
|
||||
|
@ -1397,21 +1397,3 @@ def setup(app: Sphinx) -> dict[str, Any]:
|
||||
'parallel_read_safe': True,
|
||||
'parallel_write_safe': True,
|
||||
}
|
||||
|
||||
|
||||
# deprecated name -> (object to return, canonical path or empty string)
|
||||
_DEPRECATED_OBJECTS = {
|
||||
'html5_ready': (True, ''),
|
||||
'HTMLTranslator': (HTML4Translator, 'sphinx.writers.html.HTML5Translator'),
|
||||
}
|
||||
|
||||
|
||||
def __getattr__(name):
|
||||
if name not in _DEPRECATED_OBJECTS:
|
||||
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
|
||||
|
||||
from sphinx.deprecation import _deprecation_warning
|
||||
|
||||
deprecated_object, canonical_name = _DEPRECATED_OBJECTS[name]
|
||||
_deprecation_warning(__name__, name, canonical_name, remove=(7, 0))
|
||||
return deprecated_object
|
||||
|
Loading…
Reference in New Issue
Block a user