* :mod:`crypt`
* :mod:`imghdr`
* :mod:`msilib`
+ * :mod:`nntplib`
(Contributed by Brett Cannon in :issue:`47061`.)
import collections
import datetime
import sys
+import warnings
try:
import ssl
"decode_header",
]
+warnings._deprecated(__name__, remove=(3, 13))
+
# maximal line length when calling readline(). This is to prevent
# reading arbitrary length lines. RFC 3977 limits NNTP line length to
# 512 characters, including CRLF. We have selected 2048 just to be on
import sys
from .. import support
-
+from . import warnings_helper
HOST = "localhost"
HOSTv4 = "127.0.0.1"
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
import unittest
import functools
import contextlib
-import nntplib
import os.path
import re
import threading
from test import support
-from test.support import socket_helper
+from test.support import socket_helper, warnings_helper
+nntplib = warnings_helper.import_deprecated("nntplib")
from nntplib import NNTP, GroupInfo
from unittest.mock import patch
try:
--- /dev/null
+Deprecate nntplib.