mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-25711: Rewrite zipimport in pure Python. (GH-6809)
This commit is contained in:
parent
4ba3b50bfe
commit
79d1c2e6c9
23 changed files with 2998 additions and 3408 deletions
|
@ -191,7 +191,6 @@ initimport(PyInterpreterState *interp, PyObject *sysmod)
|
|||
PyObject *importlib;
|
||||
PyObject *impmod;
|
||||
PyObject *value;
|
||||
_PyInitError err;
|
||||
|
||||
/* Import _importlib through its frozen version, _frozen_importlib. */
|
||||
if (PyImport_ImportFrozenModule("_frozen_importlib") <= 0) {
|
||||
|
@ -233,11 +232,6 @@ initimport(PyInterpreterState *interp, PyObject *sysmod)
|
|||
Py_DECREF(value);
|
||||
Py_DECREF(impmod);
|
||||
|
||||
err = _PyImportZip_Init();
|
||||
if (_Py_INIT_FAILED(err)) {
|
||||
return err;
|
||||
}
|
||||
|
||||
return _Py_INIT_OK();
|
||||
}
|
||||
|
||||
|
@ -252,7 +246,7 @@ initexternalimport(PyInterpreterState *interp)
|
|||
return _Py_INIT_ERR("external importer setup failed");
|
||||
}
|
||||
Py_DECREF(value);
|
||||
return _Py_INIT_OK();
|
||||
return _PyImportZip_Init();
|
||||
}
|
||||
|
||||
/* Helper functions to better handle the legacy C locale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue