gh-91217: deprecate telnetlib (GH-91958)

This commit is contained in:
Brett Cannon 2022-04-26 10:45:08 -07:00 committed by GitHub
parent 4153f2cbcb
commit 1af871eeee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View File

@ -1069,6 +1069,7 @@ Deprecated
* :mod:`sndhdr`
* :mod:`spwd`
* :mod:`sunau`
* :mod:`telnetlib`
(Contributed by Brett Cannon in :issue:`47061`.)

View File

@ -37,6 +37,9 @@ import sys
import socket
import selectors
from time import monotonic as _time
import warnings
warnings._deprecated(__name__, remove=(3, 13))
__all__ = ["Telnet"]

View File

@ -1,15 +1,16 @@
import socket
import selectors
import telnetlib
import threading
import contextlib
from test import support
from test.support import socket_helper
from test.support import socket_helper, warnings_helper
import unittest
support.requires_working_socket(module=True)
telnetlib = warnings_helper.import_deprecated('telnetlib')
HOST = socket_helper.HOST
def server(evt, serv):

View File

@ -0,0 +1 @@
Deprecate the telnetlib module.