8000 gh-132952: Import _io instead of io at startup by JelleZijlstra · Pull Request #132957 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-132952: Import _io instead of io at startup #132957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 28, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test
  • Loading branch information
JelleZijlstra committed Apr 26, 2025
commit 6c40c3a6d928fc3534d26be1d0cf000021346e83
12 changes: 12 additions & 0 deletions Lib/test/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import test.support
from test import support
from test.support.script_helper import assert_python_ok
from test.support import import_helper
from test.support import os_helper
from test.support import socket_helper
from test.support import captured_stderr
Expand Down Expand Up @@ -574,6 +575,17 @@ def test_license_exists_at_url(self):
code = e.code
self.assertEqual(code, 200, msg="Can't find " + url)

@support.cpython_only
def test_lazy_imports(self):
import_helper.ensure_lazy_imports("site", [
"io",
"locale",
"traceback",
"atexit",
"warnings",
"textwrap",
])


class StartupImportTests(unittest.TestCase):

Expand Down
Loading
0