>>> import pkg
>>> pkg.__version__
ModuleNotFoundError: No module named 'pkg.__version__'
How this Happened
The check in _Py_module_getattro_impl() (Objects/moduleobject.c) was the fix for gh-144957, when lazy from put placeholders into the source module. gh-150052 removed
those placeholders, so now we override the lazy import reification with the __getattr__ check.
Activity
gh-158824: Fix `__getattr__` blocking reification of lazy imports (GH…
[3.15] gh-158824: Fix `__getattr__` blocking reification of lazy impo…
Resolve a module's own lazy placeholder without __getattr__