Skip to content

Commit

Permalink
Remove HTMLTranslator and html5_ready from ``sphinx.builders.…
Browse files Browse the repository at this point in the history
…html`` (#11383)
  • Loading branch information
AA-Turner committed Apr 28, 2023
1 parent 77fd819 commit 3e3251d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -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
----------
Expand Down
18 changes: 0 additions & 18 deletions sphinx/builders/html/__init__.py
Expand Up @@ -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

0 comments on commit 3e3251d

Please sign in to comment.