mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +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:`spwd` | ||||
|   * :mod:`sunau` | ||||
|   * :mod:`telnetlib` | ||||
| 
 | ||||
|   (Contributed by Brett Cannon in :issue:`47061`.) | ||||
| 
 | ||||
|  |  | |||
|  | @ -37,6 +37,9 @@ | |||
| import socket | ||||
| import selectors | ||||
| from time import monotonic as _time | ||||
| import warnings | ||||
| 
 | ||||
| warnings._deprecated(__name__, remove=(3, 13)) | ||||
| 
 | ||||
| __all__ = ["Telnet"] | ||||
| 
 | ||||
|  |  | |||
|  | @ -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): | ||||
|  |  | |||
|  | @ -0,0 +1 @@ | |||
| Deprecate the telnetlib module. | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brett Cannon
						Brett Cannon