[Python-checkins] r80427 - in python/branches/release31-maint: Lib/test/test_ssl.py
antoine.pitrou
python-checkins at python.org
Sat Apr 24 01:12:23 CEST 2010
Author: antoine.pitrou
Date: Sat Apr 24 01:12:22 2010
New Revision: 80427
Log:
Merged revisions 80426 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r80426 | antoine.pitrou | 2010-04-24 01:10:32 +0200 (sam., 24 avril 2010) | 13 lines
Only the test is merged in.
Merged revisions 80423 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80423 | antoine.pitrou | 2010-04-24 00:54:59 +0200 (sam., 24 avril 2010) | 4 lines
Issue #7943: Fix circular reference created when instantiating an SSL
socket. Initial patch by Péter Szabó.
........
................
Modified:
python/branches/release31-maint/ (props changed)
python/branches/release31-maint/Lib/test/test_ssl.py
Modified: python/branches/release31-maint/Lib/test/test_ssl.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_ssl.py (original)
+++ python/branches/release31-maint/Lib/test/test_ssl.py Sat Apr 24 01:12:22 2010
@@ -14,6 +14,7 @@
import shutil
import traceback
import asyncore
+import weakref
from http.server import HTTPServer, SimpleHTTPRequestHandler
@@ -97,6 +98,16 @@
if (d1 != d2):
raise support.TestFailed("PEM-to-DER or DER-to-PEM translation failed")
+ @support.cpython_only
+ def test_refcycle(self):
+ # Issue #7943: an SSL object doesn't create reference cycles with
+ # itself.
+ s = socket.socket(socket.AF_INET)
+ ss = ssl.wrap_socket(s)
+ wr = weakref.ref(ss)
+ del ss
+ self.assertEqual(wr(), None)
+
class NetworkedTests(unittest.TestCase):
def testConnect(self):
More information about the Python-checkins
mailing list