summaryrefslogtreecommitdiffstats
path: root/Lib/test/support/socket_helper.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2022-04-15 19:32:56 (GMT)
committerGitHub <noreply@github.com>2022-04-15 19:32:56 (GMT)
commitc9e231de8551ab6d06c92dfa95033150e52d7f1f (patch)
treebac99035fe2731b0a76d26495e044e8d396ef373 /Lib/test/support/socket_helper.py
parentea2ae026078b328ddeab060940568a4d3bf1b417 (diff)
downloadcpython-c9e231de8551ab6d06c92dfa95033150e52d7f1f.zip
cpython-c9e231de8551ab6d06c92dfa95033150e52d7f1f.tar.gz
cpython-c9e231de8551ab6d06c92dfa95033150e52d7f1f.tar.bz2
gh-91217: deprecate nntplib (GH-91543)
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