[Python-Dev] Add an ExecutionLoader abc to importlib or to runpy?

Brett Cannon brett at python.org
Wed Jul 15 06:26:36 CEST 2009


I implemented get_filename() as specified in PEP 302 for importlib's source
and bytecode loaders and I was starting to create the ABC for importlib.abc,
but then I realized that perhaps the loader should live in runpy instead of
importlib.
Putting the new ABC in importlib keeps all PEP 302 ABCs in a single spot.
But this addition to the PEP 302 protocols is very specific to runpy and is
not directly required to make imports work (the implementation was just a
reshuffling of pre-existing code from one method to another). I am tempted
to leave the ABC out of importlib and stop at implementing get_filename()
for importlib.abc.PyLoader and PyPycLoader.

Any opinions?

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090714/431dbe04/attachment.htm>


More information about the Python-Dev mailing list