-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make _EditableFinder case-sensitive on case-insensitive filesystems (for certain editable installations) #3995
Make _EditableFinder case-sensitive on case-insensitive filesystems (for certain editable installations) #3995
Conversation
It's not terribly surprising to see this Windows failure. Unfortunately I don't have very easy access to a Windows system but I'll see what I can do. |
I pushed 07d0242 to hopefully address the lint errors in the docs build -- I'm not sure why these errors showed up here. Maybe there was a new release of |
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.
Hi @aganders3, thank you very much for looking into this (including the changes in the docs).
Please see some comments below.
Unfortunately I still couldn't make this work with public classes from I expanded the tests here to cover more of the cases you brought up. Thanks for the review! |
c6673c4
to
7d94d8e
Compare
Hi @aganders3 thank you very much for working on this.
Once I have a bit more time I can work on this, but please feel free to bet me to that. |
No worries - thanks again for the reviews! I may spend a little more time looking again at using |
…case-insensitive filesystems
4e5668d
to
65d05dd
Compare
@aganders3, I submitted a few commits trying something out... |
Nice! It at least passes my tests locally (on macOS). Thanks! edit: I also tried your solution with my test project and it seems to be working as expected |
Thank you very much |
Summary of changes
This updates the
_EditableFinder
that is added tosys.meta_path
for certain editable installations to respect filename case on case-insensitive (but case-preserving) filesystems. I believe this behavior better matches normal installations and PEP 235.The way the change works is by checking the path is in the directory listing (which returns proper case) in addition to checking if the file exists (which is generally case-insensitive if the filesystem is). I believe this is pretty much how it is done in the
FileFinder
in the standard library (see here and here for example).Closes #3994
Pull Request Checklist
newsfragments/
.(See documentation for details)