[issue15610] PyImport_ImportModuleEx always fails in 3.3 with "ValueError: level must be >= 0"
Eric Snow
report at bugs.python.org
Fri Aug 10 00:53:52 CEST 2012
Eric Snow added the comment:
> Changing the macro's expansion would be good enough IMO.
Sounds good to me.
> PyImport_ImportModuleLevel() is part of the stable API...
>From what I understand, as long as the function header has not changed, the stable ABI is still stable.
> Can't we just drop the check "level < 0"?
In Python 3 a negative value makes no sense, since there are no accommodations for implicit relative imports. The fact that builtins.__import__() accommodated -1 still was an oversight that was corrected in 3.3. Looks like this is just one bit that got missed.
----------
nosy: +eric.snow
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15610>
_______________________________________
More information about the Python-bugs-list
mailing list