Message373927
Searching into directory without __init__.py recursively is not only inefficient, but also dangerous.
project/
- mylib/
- __init__.py
- foo.py
- tests/
- __init__.py
- test_foo.py
- tools/
- bin/
- dangerous_script.py
What happens if `python -m unittest` is run in the project root?
Who excepts tools/bin/dangarous.py is executed?
My conclution is:
* People shouldn't abuse PEP 420. Omitting __init__.py is allowed only for namespace package.
* Namespace package should be searched based on PEP 420 rule. Don't search into regular directory unless it is specified. |
|
Date |
User |
Action |
Args |
2020-07-19 03:55:53 | methane | set | recipients:
+ methane, rbcollins, ezio.melotti, michael.foord, rgammans, Claudiu.Popa, Zbynek.Winkler, eric.snow, pconnell, Florian.Apolloner, ashkop |
2020-07-19 03:55:53 | methane | set | messageid: <1595130953.39.0.341245240486.issue23882@roundup.psfhosted.org> |
2020-07-19 03:55:53 | methane | link | issue23882 messages |
2020-07-19 03:55:53 | methane | create | |
|