Message248033
This is an interesting find - thanks.
Adding Larry as 3.5 release manager to the cc here, as I think the right fix actually involves an API adjustment inside _imp.
One of the consequences of PEP 489 (multi-phase initialisation) was that builtin imports and extension module imports now share a lot more code, and that includes the fact that while we have both _imp.create_builtin and _imp.create_dynamic, they currently share a module level exec implementation in _imp.exec_dynamic.
However, the definition and implementation of _imp.exec_dynamic is still behind the same preprocessor guard as _imp.create_dynamic, hence the error reported here.
As far as a fix goes, rather than defining _imp.exec_dynamic unconditionally, my inclination is to say that merging the Python level APIs in addition to the underyling C level implementation represents a design mistake when we implemented the PEP, and there should be a separate _imp.exec_builtin function.
The fact that _imp.exec_dynamic just called _imp.exec_builtin internally would then be a pure CPython implementation detail, rather than something importlib specifically depended on. |
|
Date |
User |
Action |
Args |
2015-08-05 12:45:37 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, petr.viktorin, eric.snow, Jeffrey.Armstrong |
2015-08-05 12:45:36 | ncoghlan | set | messageid: <1438778736.48.0.670819968208.issue24769@psf.upfronthosting.co.za> |
2015-08-05 12:45:35 | ncoghlan | link | issue24769 messages |
2015-08-05 12:45:23 | ncoghlan | create | |
|