summaryrefslogtreecommitdiff
path: root/sphinx/util/compat.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2022-06-26 15:01:09 +0100
committerGitHub <noreply@github.com>2022-06-26 15:01:09 +0100
commitac0fc4b7817389fb8b860d82537f69d9060aabae (patch)
treeadfcf2633080704bce01df064c5103f3c7748ede /sphinx/util/compat.py
parent7b0787485e6e6630a7a6922a7eab1803ac3019f5 (diff)
downloadsphinx-git-ac0fc4b7817389fb8b860d82537f69d9060aabae.tar.gz
Remove more deprecated items in Sphinx 6.0 (#10562)
Diffstat (limited to 'sphinx/util/compat.py')
-rw-r--r--sphinx/util/compat.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/sphinx/util/compat.py b/sphinx/util/compat.py
deleted file mode 100644
index 7f332fda7..000000000
--- a/sphinx/util/compat.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""modules for backward compatibility"""
-
-import sys
-from typing import TYPE_CHECKING, Any, Dict
-
-if TYPE_CHECKING:
- from sphinx.application import Sphinx
-
-
-def register_application_for_autosummary(app: "Sphinx") -> None:
- """Register application object to autosummary module.
-
- Since Sphinx-1.7, documenters and attrgetters are registered into
- application object. As a result, the arguments of
- ``get_documenter()`` has been changed. To keep compatibility,
- this handler registers application object to the module.
- """
- if 'sphinx.ext.autosummary' in sys.modules:
- from sphinx.ext import autosummary
- if hasattr(autosummary, '_objects'):
- autosummary._objects['_app'] = app # type: ignore
- else:
- autosummary._app = app # type: ignore
-
-
-def setup(app: "Sphinx") -> Dict[str, Any]:
- app.connect('builder-inited', register_application_for_autosummary, priority=100)
-
- return {
- 'version': 'builtin',
- 'parallel_read_safe': True,
- 'parallel_write_safe': True,
- }