mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
gh-132952: Speed up startup by importing _io instead of io (#132957)
This commit is contained in:
parent
7f16f1bc11
commit
58567cc18c
11 changed files with 50 additions and 6 deletions
|
@ -2755,7 +2755,7 @@ init_set_builtins_open(void)
|
|||
goto error;
|
||||
}
|
||||
|
||||
if (!(wrapper = PyImport_ImportModuleAttrString("io", "open"))) {
|
||||
if (!(wrapper = PyImport_ImportModuleAttrString("_io", "open"))) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -2800,7 +2800,7 @@ init_sys_streams(PyThreadState *tstate)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!(iomod = PyImport_ImportModule("io"))) {
|
||||
if (!(iomod = PyImport_ImportModule("_io"))) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue