[issue5596] memory leaks in 3.1

Hirokazu Yamamoto report at bugs.python.org
Mon Mar 30 10:11:00 CEST 2009


Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp> added the comment:

About test_urllib2_localnet, this leak happens because FakeProxyHandler
has class variable digest_auth_handler and its instance variables are
modified. Following workaround can fix this leak, but I'm not sure this
can be committed.

Index: Lib/test/test_urllib2_localnet.py
===================================================================
--- Lib/test/test_urllib2_localnet.py	(revision 70694)
+++ Lib/test/test_urllib2_localnet.py	(working copy)
@@ -241,6 +241,7 @@
 
     def tearDown(self):
         self.server.stop()
+        FakeProxyHandler.digest_auth_handler.__init__()
 
     def test_proxy_with_bad_password_raises_httperror(self):
         self._digest_auth_handler.add_password(self.REALM, self.URL,

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5596>
_______________________________________


More information about the Python-bugs-list mailing list