8000 bpo-40275: Avoid importing socket in test.support by serhiy-storchaka · Pull Request #19603 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-40275: Avoid importing socket in test.support #19603

8000
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 5 commits into from
Apr 25, 2020
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
Import urllib lazily in transient_internet().
  • Loading branch information
serhiy-storchaka committed Apr 19, 2020
commit 578d77a239a526d22e8fefd374a6cb1fd2a29db3
2 changes: 1 addition & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import time
import types
import unittest
import urllib.error
import warnings

from .testresult import get_test_runner
Expand Down Expand Up @@ -1433,6 +1432,7 @@ def transient_internet(resource_name, *, timeout=_NOT_SET, errnos=()):
with the Internet connection manifest themselves as exceptions."""
import socket
import nntplib
import urllib.error
if timeout is _NOT_SET:
timeout = INTERNET_TIMEOUT

Expand Down
0