Skip to content

Commit 7c3308f

Browse files
committed
Maintenance: Remove sphinx-build-compatibility
1 parent 904dce1 commit 7c3308f

5 files changed

Lines changed: 0 additions & 300 deletions

File tree

src/crate/theme/rtd/conf/__init__.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -205,35 +205,6 @@
205205

206206
def setup(app):
207207

208-
def setup_sphinx_compatibility():
209-
"""
210-
Resolve problem with `sphinx_build_compatibility` extension.
211-
212-
Add Sphinx extension at runtime, in order to be able to configure it previously.
213-
This is needed because it has some quirks that reveal themselves when invoked in
214-
non-RTD environments.
215-
216-
- https://github.com/crate/crate-docs-theme/issues/536
217-
- https://about.readthedocs.com/blog/2024/07/addons-by-default/
218-
- https://github.com/readthedocs/sphinx-build-compatibility
219-
"""
220-
221-
# Extension error (sphinx_build_compatibility.extension):
222-
# Handler <function manipulate_config at 0x10a4289a0> for event 'config-inited' threw an exception
223-
# (exception: argument of type 'NoneType' is not iterable)
224-
os.environ.setdefault("READTHEDOCS_GIT_CLONE_URL", "")
225-
226-
# IndexError: list index out of range
227-
# project_id = response_project["results"][0]["id"]
228-
# Currently needs a valid project on PyPI. Long-term fix should go into upstream code.
229-
os.environ.setdefault("READTHEDOCS_PROJECT", "crate-docs-theme")
230-
231-
# Exception: 'NoneType' object is not subscriptable
232-
os.environ.setdefault("READTHEDOCS_GIT_COMMIT_HASH", "")
233-
234-
# Register vendorized Sphinx plugin.
235-
app.setup_extension("crate.theme.vendor.rtd_compat.extension")
236-
237208
# Configure Sphinx/RTD to host projects on a custom domain, but also on a non-root resource.
238209
def configure_self_hosted_on_path(app_inited):
239210
"""
@@ -327,9 +298,6 @@ def apply_html_context_custom(app_inited):
327298
except Exception as ex:
328299
print(f"ERROR: Unable to adjust `html_context`. Reason: {ex}")
329300

330-
# Read The Docs compatibility issues.
331-
setup_sphinx_compatibility()
332-
333301
# Modern / NG / Furo.
334302
app.require_sphinx("3.0")
335303
app.connect("html-page-context", _html_page_context)

src/crate/theme/vendor/__init__.py

Whitespace-only changes.

src/crate/theme/vendor/rtd_compat/__init__.py

Whitespace-only changes.

src/crate/theme/vendor/rtd_compat/extension.py

Lines changed: 0 additions & 213 deletions
This file was deleted.

src/crate/theme/vendor/rtd_compat/utils.py

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)