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 |
abravalheri
left a comment
There was a problem hiding this comment.
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
_EditableFinderthat is added tosys.meta_pathfor 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
FileFinderin the standard library (see here and here for example).Closes #3994
Pull Request Checklist
newsfragments/.(See documentation for details)