Refine how we detect namespace packages#12169
Merged
nicoddemus merged 18 commits intopytest-dev:mainfrom Apr 9, 2024
Merged
Conversation
24566c5 to
504ceeb
Compare
bluetech
reviewed
Mar 30, 2024
Member
bluetech
left a comment
There was a problem hiding this comment.
The new approach makes sense to me (as far as I understand the details). I left a couple of questions.
nicoddemus
commented
Mar 31, 2024
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
bluetech
reviewed
Apr 6, 2024
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us. Fix pytest-dev#12112
Co-authored-by: Ran Benita <ran@unusedvar.com>
This makes it more clear what is the purpose of the start variable.
Removed the test for standalone module because for some reason it was flaky (could not figure why).
aefa523 to
981e399
Compare
Member
Author
|
Thanks @bluetech for the review. I will leave this open for a few more days to give others a chance to review too (which would be appreciated). |
This is better to enforce callers to check for it instead of ending up with '' and possibly breaking later.
34196a9 to
1e22e0f
Compare
RonnyPfannschmidt
approved these changes
Apr 8, 2024
1 task
Contributor
|
Hi, this got marked as an improvement. Isn’t this a bugfix? I’m asking because we’re trying to gauge how long we can expect to wait for a release containing this. |
Member
Author
|
Good question, decided to go with "improvement" because it contains significant changes on how things work -- seemed safe to release this in the next minor release instead of a bug-fix release. But it is not set in stone, if we think this is OK to go as a bug fix we can change that, for sure. |
4 tasks
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.
Previously we used a hand crafted approach to detect namespace packages, however we should rely on
importlibto detect them for us.Fix #12112