]> granicus.if.org Git - python/commitdiff
deprecate use of FakeSocket
authorBill Janssen <janssen@parc.com>
Fri, 31 Aug 2007 19:02:23 +0000 (19:02 +0000)
committerBill Janssen <janssen@parc.com>
Fri, 31 Aug 2007 19:02:23 +0000 (19:02 +0000)
Lib/httplib.py

index b9e59d0871f9e9d33bb59dc4fa6e8bf5284f2f6a..b9260822578d6c1a6a876da7d07de437525c1451 100644 (file)
@@ -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