mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-91217: deprecate nntplib (GH-91543)
This commit is contained in:
parent
ea2ae02607
commit
c9e231de85
5 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue