Remove deprecated import of imp module#3350
Conversation
|
Thanks |
|
There was https://bugs.python.org/issue24748, it is probably also important in this context. The official version of In However, I'm not sure the cure is not worse than the disease: What is the point in copying the code from |
|
PEP 489 states "All changed loaders (BuiltinImporter and ExtensionFileLoader) will remain backwards-compatible; the load_module method will be replaced by a shim." so I think this change is safe until those shims will be removed by a future PEP. It could be improved to support PEP 489 multi-phase initialization if needed. The python issue you point to has to do with loading a module when that module already has been loaded. This is not possible here since the module is newly-compiled.
Interesting, cython is indeed huge. I guess that should be changed too. |
That is true. However, in the context of |
Fixes gh-3306
Using
impis deprecated. Add an alternative incantation fromimportlibwhich was added in Python 3.3