[issue20942] _frozen_importlib should not have a __file__ attribute

Brett Cannon report at bugs.python.org
Fri Mar 21 19:36:07 CET 2014


Brett Cannon added the comment:

Here is a patch to change PyImport_ImportFrozenModuleObject() to not set __file__. Had to refactor some things as PyImport_ExecCodeModuleObject() was setting __file__ no matter what, so to avoid it even being used during import I had to change some things.

----------
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file34555/no_frozen__file__.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20942>
_______________________________________


More information about the Python-bugs-list mailing list