Eric Snow added the comment:

With ModuleSpec (PEP 451), the finder creates the spec object (where it stores 
the loader).  At that point the finder is free to store any stat object you 
like in spec.loader_state.  The spec is made available to the loader during 
exec (if the loader supports it, which the importlib loaders will).  So there 
is no need to add anything to any loader __init__.

The only catch is the slim possibility that the stat object will be stale by 
the time it gets used.  I seem to remember a case where something like this 
happened (related to distros building their system Python or something).

----------
nosy: +eric.snow

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19216>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to