[Python-Dev] Python 3.4 change in importlib/__init__.py breaking cxFreeze?

2014年3月10日 02:16:29 -0700

 Hi all.
Python 3.4 introduced a change to Lib/importlib/__init__.py that added the following code to it:
else:
 # importlib._bootstrap is the built-in import, ensure we don't create
 # a second copy of the module.
 _bootstrap.__name__ = 'importlib._bootstrap'
 _bootstrap.__package__ = 'importlib'
 _bootstrap.__file__ = __file__.replace('__init__.py', '_bootstrap.py')
 sys.modules['importlib._bootstrap'] = _bootstrap
When attempting to use cxFreeze on a project, using Python 3.4. we ran into a problem with '__file__' identifier not being defined. Could this be a python bug? Why is this code expecting the module loaded from importlib/__init__.py to always have a __file__ identifier? What is supposed to happen when that code gets loaded from a ZIP archive? Just wanted to check here before filing an issue... but if this is an issue I hope it can be resolved before the final 3.4 release.
 Best regards,
 Jurko Gospodnetić
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to