Avoid importing new modules in backrefs#1177
Merged
larsoner merged 3 commits intosphinx-gallery:masterfrom Sep 20, 2023
Merged
Conversation
36d8601 to
6192bf6
Compare
Contributor
|
I think in principle we shouldn't need a config option for this. I'd rather try using it globally and if we find problems with it fix them (maybe by use of a config var but hopefully not) |
lucyleeow
reviewed
Aug 18, 2023
lucyleeow
approved these changes
Aug 18, 2023
Contributor
lucyleeow
left a comment
There was a problem hiding this comment.
A few nits but looks good otherwise!
d5735fb to
2fe4d3e
Compare
Contributor
|
@larsoner will merge this soon unless you want another look? |
Contributor
|
Thanks @aganders3 ! |
Contributor
Author
Thanks! Let me know if you hear of users having issues with this; I'm happy to look into them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #1158 (or, is intended to help at least) based on the proposed solution in that issue and discussion elsewhere.
Hopefully this solution makes sense but I'm happy to rework as I came up with a lot of ways to do effectively the same thing. I am not too intimately familiar with the import system (at least I was not when I started on this) and definitely a little lost in some of this sphinx-gallery code.
Either way I know @lucyleeow had also suggested this should possibly be a config and I am happy to add that if you want it. I will also read though to see if there's a good spot to put some of this info in the docs.
It's also worth noting that now setuptools 68.1.0 has been released, which should fix the specific problem (case-insensitive imports from editable installs) that brought this issue to light for me.