[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze

Nick Coghlan report at bugs.python.org
Tue Mar 11 12:12:01 CET 2014


Nick Coghlan added the comment:

Another relevant link: http://docs.python.org/3.4/reference/import.html

Just to clarify the reason for the pending status:

At the moment, I suspect this is a matter of either 3.4 revealing a latent defect in the cx-freeze import emulation (by being less tolerant of deviations from the language spec), or else that emulation needs to be updated to address one or more of the existing porting notes.

In the first case, we'll just need a new porting note, in the latter, no change at all.

However, an inadvertent backwards incompatible change as a result of the PEP 451 changes is also a possibility. cx-freeze digs much deeper into the import system than most tools, so it's entirely plausible that it might hit an edge case that isn't covered by our test suite.

Note that Python source and bytecode files, whether imported from the filesystem or from inside a zipfile *should* have __file__ set (as should extension modules). Frozen modules won't have it set, but that shouldn't apply in the case of importlib/__init__.py.

----------
status: pending -> open

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


More information about the Python-bugs-list mailing list