Skip to content

Fix case mismatching modules during namespace package search #11261

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

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

nipunn1313
Copy link
Contributor

For example from a import B should not find a namespace
package a/B/. Fix by using case aware isdir on fscache.

Helps unblock #9636

Test Plan

There are several existing tests for this area. I split one of the tests by namespace package for straddling.
I also tested this diff on top of #9636 and confirmed it helps!

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, in general looks good, but not sure about the rename... It looks like this would still return True if the path exists and was a file, unlike os.path.isdir, so exists_case seems more appropriate.

For example `from a import B` should not find a namespace
package `a/B/`. Fix by using case aware isdir on fscache.
@nipunn1313
Copy link
Contributor Author

makes sense to me - switched it back to exists_case

@hauntsaninja hauntsaninja merged commit c807277 into python:master Oct 4, 2021
@nipunn1313 nipunn1313 deleted the insensitive branch October 4, 2021 17:10
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.

2 participants