[issue15715] __import__ now raises with non-existing items in fromlist in 3.3
report at bugs.python.org
Fri Aug 17 00:42:08 CEST 2012
New submission from Simon Feltman:
This came up while trying to build pygobject with Python 3.3. The problem is there are some erroneous imports in the fromlist with these bindings that can easily be fixed. But it is a behavioral change so I just wanted to raise awareness if it is not already known.
$ python3.2 -c "__import__('http', fromlist=['blah'])"
$ python3.3 -c "__import__('http', fromlist=['blah'])"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'http.blah'
Note this is also the case when using the C API: PyImport_ImportModuleEx
title: __import__ now raises with non-existing items in fromlist in 3.3
versions: Python 3.3
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list