[New-bugs-announce] [issue15715] __import__ now raises with non-existing items in fromlist in 3.3

Simon Feltman 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'])"
(works)

$ 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

----------
components: None
messages: 168423
nosy: sfeltman
priority: normal
severity: normal
status: open
title: __import__ now raises with non-existing items in fromlist in 3.3
versions: Python 3.3

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


More information about the New-bugs-announce mailing list