-
Notifications
You must be signed in to change notification settings - Fork 49
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
Improve backend loading from backend-path
#165
Merged
Merged
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a2f302a
Test backend is loaded from backend-path
abravalheri 275b645
Actively import from backend-path instead of checking
abravalheri 7a01590
Unify usages of BackedInvalid with BackendUnavailable
abravalheri bfcdac1
Fix path sep error when testing on windows
abravalheri 148b2aa
Improve explanation in code comment
abravalheri 5726c39
Ensure backend info is available in exception
abravalheri 4790b2b
Replace custom import sequence with MetaPathFinder
abravalheri dcdedc9
Improve test docstring for intree backend
abravalheri 0177e3d
Replace comment with a more appropriate description
abravalheri 7bb74e2
Mark BackendInvalid as no longer used/deprecated
abravalheri a318f8e
Remove unused BackendInvalid
abravalheri 32c6af3
Test nested intree backend
abravalheri 19023eb
Add negative tests for nested intree backends
abravalheri 89722cb
Avoid passing nested modules to PathFinder
abravalheri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this exception, since this is no longer being caught and used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the review @pradyunsg.
I was considering that removing
BackendInvalid
would cause backward compatibility problems (e.g. it seems to be in__init__.py
's__all__
, some folks might consider that public API, so it might break someone's script if they do afrom pyproject_hooks import BackendInvalid
).I am happy to remove the class if the project is OK with taking the (potential) backwards incompatibility. Alternative, also happy to change the docstring to "deprecated" or something like that. What is your take on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added 7bb74e2 in response to this review comment.
But I am also happy to completely remove the class or do something different.
Just let me know and I will implement the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... I don't see anyone using this on GitHub so it seems reasonably safe to remove.
We can bump the major version since this is backwards-incompatible (and version numbers are cheap), and then we don't have to bother with having dead code in the codebase that no one relies on. The fix from the users' perspective is relatively straightforward here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I'd be surprised if anyone doesn't consider it public API. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problems, in a318f8e, I removed the unused exception class.
In the case a deprecation cycle is preferred we can just revert this commit.