Remove `HTMLTranslator and html5_ready from sphinx.builders.html` (#11383)

This commit is contained in:
Adam Turner 2023-04-28 11:01:14 +01:00 committed by GitHub
parent 77fd819a09
commit 3e3251d3ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 18 deletions

View File

@ -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
----------

View File

@ -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