-
-
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
[BUG] certain editable installs allow case-insensitive imports #3994
Comments
This seems to be a problem when using the |
Hi @aganders3 a PR would be very useful, thank you for working on that. For the finder we use |
Yes, that's basically the problem. My proposed fix is in #3995 but feedback is appreciated. I am curious if a similar fix would be needed for namespace packages, but I don't know too much about them. |
setuptools version
setuptools==68.0.0
Python version
Python 3.10.12
OS
macOS
Additional environment information
I believe this is only a problem on macOS because of its case-preserving but case-insensitive filesytem. I'm not too familiar with filesystems but it may be a problem on others. See also PEP 235 - Import on Case-Insensitive Platforms.
I think this also depends on exactly how it is installed, but I'm not familiar with what determines which editable installation method is used.
Description
I have a project with the following structure:
When the package is installed as editable, I am able to import
module_1
with arbitrary case:Expected behavior
I expected to get an
ImportError
when importing a module with incorrect case, as is the behavior when installed normally:How to Reproduce
git clone git@github.com:aganders3/setuptools-editable-case-insensitive.git
cd setuptools-editable-case-insensitive && python3.10 -m venv venv && source venv/bin/activate
pip install -e .
python test_imports.py
module_1
is successfully imported with arbitrary caseOutput
The text was updated successfully, but these errors were encountered: