Message158304
I committed the fix. Thanks for testing, Roger.
As for the change in semantics, I'm fully aware it is not backwards-compatible. Unfortunately the incorrect usage was not even discovered until I started my bootstrap work because the import statement does the right thing but __import__() itself was never updated so it is only noticeable if you never updated your code to use importlib.import_module() which has been the preferred way to programmatically import code since Python 2.7/3.1. Plus the correct semantics are documented in PEP 328 (http://python.org/dev/peps/pep-0328/) and referenced in the language spec (http://docs.python.org/py3k/reference/simple_stmts.html#the-import-statement) so I'm not going to change it back since this brings the function more in line with expectations. And since the fix is as simple as a try/except and two import calls then it falls within the realm of having to fix code for any new Python release.
And as for the crash, I will have a look. |
|
Date |
User |
Action |
Args |
2012-04-15 00:53:24 | brett.cannon | set | recipients:
+ brett.cannon, ncoghlan, pitrou, vstinner, eric.smith, benjamin.peterson, roger.serwy, eric.araujo, alex, Trundle, python-dev, eric.snow |
2012-04-15 00:53:24 | brett.cannon | set | messageid: <1334451204.73.0.794958712811.issue2377@psf.upfronthosting.co.za> |
2012-04-15 00:53:24 | brett.cannon | link | issue2377 messages |
2012-04-15 00:53:23 | brett.cannon | create | |
|