summaryrefslogtreecommitdiffstats
path: root/Lib/test/support/socket_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/support/socket_helper.py')
-rw-r--r--Lib/test/support/socket_helper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/support/socket_helper.py b/Lib/test/support/socket_helper.py
index 0ee7a5d..754af18 100644
--- a/Lib/test/support/socket_helper.py
+++ b/Lib/test/support/socket_helper.py
@@ -5,7 +5,7 @@ import unittest
import sys
from .. import support
-
+from . import warnings_helper
HOST = "localhost"
HOSTv4 = "127.0.0.1"
@@ -190,7 +190,7 @@ _NOT_SET = object()
def transient_internet(resource_name, *, timeout=_NOT_SET, errnos=()):
"""Return a context manager that raises ResourceDenied when various issues
with the internet connection manifest themselves as exceptions."""
- import nntplib
+ nntplib = warnings_helper.import_deprecated("nntplib")
import urllib.error
if timeout is _NOT_SET:
timeout = support.INTERNET_TIMEOUT