Author methane
Recipients Claudiu.Popa, Florian.Apolloner, Zbynek.Winkler, ashkop, eric.snow, ezio.melotti, methane, michael.foord, pconnell, rbcollins, rgammans
Date 2020-07-19.03:55:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595130953.39.0.341245240486.issue23882@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-07-19 03:55:53methanesetrecipients: + methane, rbcollins, ezio.melotti, michael.foord, rgammans, Claudiu.Popa, Zbynek.Winkler, eric.snow, pconnell, Florian.Apolloner, ashkop
2020-07-19 03:55:53methanesetmessageid: <1595130953.39.0.341245240486.issue23882@roundup.psfhosted.org>
2020-07-19 03:55:53methanelinkissue23882 messages
2020-07-19 03:55:53methanecreate