Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension registry: add sphinxprettysearchresults to blacklist #11926

Conversation

jayaddison
Copy link
Contributor

Feature or Bugfix

  • Bugfix

Purpose

  • Discourage use of the now-fairly-long-redundant sphinxprettysearchresults extension.

Detail

  • Adds sphinxprettysearchresults to the list of blacklisted extensions, with the corresponding Sphinx version where the functionality became available in Sphinx core (v2.0.0).

Relates

The functionality from this extension was added to Sphinx core in version v2.0.0 (sphinx-doc#4022).
@jayaddison
Copy link
Contributor Author

Note for anyone curious / reviewing: adding an extension to the blacklist doesn't prevent a project from building, but it does cause a warning message to be emitted, and the extension will not be loaded.

Relevant code snippet:

sphinx/sphinx/registry.py

Lines 438 to 446 in aff9578

def load_extension(self, app: Sphinx, extname: str) -> None:
"""Load a Sphinx extension."""
if extname in app.extensions: # already loaded
return
if extname in EXTENSION_BLACKLIST:
logger.warning(__('the extension %r was already merged with Sphinx since '
'version %s; this extension is ignored.'),
extname, EXTENSION_BLACKLIST[extname])
return

@AA-Turner AA-Turner merged commit 11d522a into sphinx-doc:master Feb 2, 2024
21 of 22 checks passed
@jayaddison jayaddison deleted the issue-11925/blacklist-sphinxprettysearchresults-extension branch February 2, 2024 12:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sphinx-pretty-searchresults is now redundant
2 participants