[issue45020] Freeze all modules imported during startup.

Marc-Andre Lemburg report at bugs.python.org
Sat Sep 25 12:29:19 EDT 2021


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 25.09.2021 18:20, STINNER Victor wrote:
> 
> STINNER Victor <vstinner at python.org> added the comment:
> 
> Marc-Andre: I suppose that you're talking about LANDMARK in Modules/getpath.c and PC/getpathp.c.

Now that you mention it: yes, that as well :-) But os.py is used in the
Python stdlib code as well, just search for "os.__file__" to see a few
such uses.

If you search for ".__file__" you'll find that there are quite a few
cases in the test suite expecting that attribute on other stdlib modules
as well. The attribute may officially be optional, but in reality a
lot of code expects to find it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45020>
_______________________________________


More information about the Python-bugs-list mailing list