mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
deprecate use of FakeSocket
This commit is contained in:
parent
1ab4a1f9b8
commit
c459264f5b
1 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,7 @@ import errno
|
|||
import mimetools
|
||||
import socket
|
||||
from urlparse import urlsplit
|
||||
import warnings
|
||||
|
||||
try:
|
||||
from cStringIO import StringIO
|
||||
|
@ -1081,6 +1082,9 @@ else:
|
|||
|
||||
|
||||
def FakeSocket (sock, sslobj):
|
||||
warnings.warn("FakeSocket is deprecated, and won't be in 3.x. " +
|
||||
"Use the result of ssl.sslsocket directly instead.",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
return sslobj
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue