[issue21762] update the import machinery to only use __spec__

Brett Cannon report at bugs.python.org
Fri Oct 23 18:59:22 EDT 2020


Brett Cannon <brett at python.org> added the comment:

It turns out that the import system itself doesn't use `__loader__` (it does set it), but various parts of the stdlib do use `__loader__`. bpo-42133 updates a bunch of stdlib modules to use `__spec__.loader` as a fallback. bpo-42132 tracks the fact that there's C code which isn't setting or using `__spec__` (let alone `__spec__.loader`).

----------

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


More information about the Python-bugs-list mailing list