This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix refleaks in test_urllib2_localnet
Type: behavior Stage: patch review
Components: Tests Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: 6002 Superseder:
Assigned To: collinwinter Nosy List: ajaksu2, collinwinter
Priority: normal Keywords: patch

Created on 2009-05-16 00:47 by collinwinter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
urllib2_localnet.patch collinwinter, 2009-05-16 00:47 Patch against trunk, r72673
Messages (6)
msg87846 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2009-05-16 00:47
Currently (r72673), test_urllib2_localnet leaks references. This is due
to state implicitly shared between tests. The attached patch fixes this
by removing the shared state.

The problem is also present in py3k. I'll port the patch once I commit
to trunk. Should this be backported so we can take test_urllib2_localnet
off the refleak test blacklist in Misc/build.sh in those branches?
msg87847 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-05-16 01:07
Collin,
This the fix for issue 6002, right? Does issue 1208304 also cause leaks
in your tests?
msg87848 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2009-05-16 01:11
Yes, this is a patch for issue 6002 (sorry, didn't find it). I haven't
seen any refleaks from issue 1208304, but I was only looking at this one
particular failure (since it was showing up in Unladen Swallow's refleak
builds).
msg88051 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2009-05-18 20:37
Daniel, did you have any comments on this patch? If not, I'll go ahead
and commit it and close both of these issues.
msg88053 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-05-18 21:24
LGTM :)

This part changes the output in verbose mode, not sure it's necessary
(but not a real problem either):

-    test_support.run_unittest(ProxyAuthTests)
-    test_support.run_unittest(TestUrlopen)
+    test_support.run_unittest(ProxyAuthTests, TestUrlopen)
msg88057 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2009-05-18 22:34
Applied as r72777 (trunk), r72778 (py3k).
History
Date User Action Args
2022-04-11 14:56:48adminsetgithub: 50282
2009-05-18 22:34:36collinwintersetstatus: open -> closed
assignee: collinwinter
resolution: fixed
messages: + msg88057
2009-05-18 21:24:49ajaksu2setmessages: + msg88053
2009-05-18 20:37:21collinwintersetmessages: + msg88051
2009-05-16 01:11:42collinwintersetmessages: + msg87848
2009-05-16 01:07:56ajaksu2setpriority: normal

nosy: + ajaksu2
messages: + msg87847

dependencies: + test_urllib2_localnet DigestAuthHandler leaks nonces
2009-05-16 00:47:12collinwintercreate