You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a loose (i.e. default) editable install of a distribution containing a single package, adding a toplevel module (out of the package) results in that module being automatically picked up (immediately available for import, without a reinstall). This corresponds also, I believe, to the old, pre-PEP660 behavior.
On the other hand, if the distribution does not contain a package but a single toplevel module, adding another toplevel module results in that (new) module not being automatically picked up.
Expected behavior
Consistent behavior in both cases, hopefully matching the legacy behavior (i.e. new toplevel modules are always auto-picked-up).
setuptools version
65.4.1
Python version
3.10.7
OS
Arch Linux
Additional environment information
No response
Description
In a loose (i.e. default) editable install of a distribution containing a single package, adding a toplevel module (out of the package) results in that module being automatically picked up (immediately available for import, without a reinstall). This corresponds also, I believe, to the old, pre-PEP660 behavior.
On the other hand, if the distribution does not contain a package but a single toplevel module, adding another toplevel module results in that (new) module not being automatically picked up.
Expected behavior
Consistent behavior in both cases, hopefully matching the legacy behavior (i.e. new toplevel modules are always auto-picked-up).
How to Reproduce
Write the following pyproject.toml:
In that directory, create a single package, editably install, create a single (empty) new module, check that the new module can be imported:
This succeeds.
Blow away everything (except for pyproject.toml):
pip uninstall testpkg; rm -rf src
Create a single (empty) module, editably install, create another (empty) new module; this new module cannot be imported:
This fails with
ModuleNotFoundError: No module named 'mod2'
Output
See above.
The text was updated successfully, but these errors were encountered: