mirror of
https://github.com/python/cpython.git
synced 2025-09-04 07:51:13 +00:00
gh-91217: deprecate telnetlib (GH-91958)
This commit is contained in:
parent
4153f2cbcb
commit
1af871eeee
4 changed files with 8 additions and 2 deletions
|
@ -1069,6 +1069,7 @@ Deprecated
|
||||||
* :mod:`sndhdr`
|
* :mod:`sndhdr`
|
||||||
* :mod:`spwd`
|
* :mod:`spwd`
|
||||||
* :mod:`sunau`
|
* :mod:`sunau`
|
||||||
|
* :mod:`telnetlib`
|
||||||
|
|
||||||
(Contributed by Brett Cannon in :issue:`47061`.)
|
(Contributed by Brett Cannon in :issue:`47061`.)
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,9 @@ import sys
|
||||||
import socket
|
import socket
|
||||||
import selectors
|
import selectors
|
||||||
from time import monotonic as _time
|
from time import monotonic as _time
|
||||||
|
import warnings
|
||||||
|
|
||||||
|
warnings._deprecated(__name__, remove=(3, 13))
|
||||||
|
|
||||||
__all__ = ["Telnet"]
|
__all__ = ["Telnet"]
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
import socket
|
import socket
|
||||||
import selectors
|
import selectors
|
||||||
import telnetlib
|
|
||||||
import threading
|
import threading
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
from test import support
|
from test import support
|
||||||
from test.support import socket_helper
|
from test.support import socket_helper, warnings_helper
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
support.requires_working_socket(module=True)
|
support.requires_working_socket(module=True)
|
||||||
|
|
||||||
|
telnetlib = warnings_helper.import_deprecated('telnetlib')
|
||||||
|
|
||||||
HOST = socket_helper.HOST
|
HOST = socket_helper.HOST
|
||||||
|
|
||||||
def server(evt, serv):
|
def server(evt, serv):
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Deprecate the telnetlib module.
|
Loading…
Add table
Add a link
Reference in a new issue