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

Add import shim for sphinx ExtensionError #161

Closed

Conversation

jacobtomlinson
Copy link

@jacobtomlinson jacobtomlinson commented Oct 11, 2024

It looks like with sphinx==8.1.0 the ExtensionError is no longer available in sphinx.util and should be imported from sphinx.errors.

This PR tries sphinx.errors.ExtensionError first and falls back to sphinx.util.ExtensionError for backward compatibility.

Fixes #160

@jacobtomlinson
Copy link
Author

I have tested this fix in the CI for our docs and it works as expected (rapidsai/deployment#469).

@AA-Turner
Copy link

AA-Turner commented Oct 11, 2024

Unless you support pre-2009 Sphinx the fallback shouldn't be needed (exceptions were moved to sphinx.errors in Sphinx 0.6):

https://github.com/sphinx-doc/sphinx/blame/2f1d775dfda9e4f81dfff6cfbe9edf7731e32a97/sphinx/errors.py#L44

@jacobtomlinson
Copy link
Author

Thanks @AA-Turner I had assumed it was a semi-recent change. I'm sure support back that far isn't necessary so I've removed the shim.

@timkpaine
Copy link
Collaborator

I think this is done in #153

@Paebbels Paebbels mentioned this pull request Oct 12, 2024
@jacobtomlinson jacobtomlinson deleted the extension-error-import branch October 14, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken with Sphinx 8.1.0
3 participants