[New-bugs-announce] [issue6002] test_urlllib2_localnet DigestAuthHandler leaks nonces

R. David Murray report at bugs.python.org
Tue May 12 00:33:55 CEST 2009

New submission from R. David Murray <rdmurray at bitdance.com>:

I tracked down the exact cause of the refleak in test_urllib2_localnet.
 Turns out the DigestAuthHandler adds a nonce to its internal _nonces
list every time _return_auth_challenge is called, but not all of these
nonces are removed from the list.

Not sure what the cleanest fix would be.  I'm not that familiar with
auth protocols; I'm guessing a real auth server would time out stale
nonces.  One question I have is if the tests are expecting that the
nonce will get deleted, and thus there is a real bug here...but I
suspect not.


   FakeProxyHandler.digest_auth_handler._nonces = []

to the tearDown for ProxyAuthTests fixes the leak.  Is this acceptable,
or does this merit further investigation?

components: Tests
keywords: easy
messages: 87593
nosy: r.david.murray
priority: low
severity: normal
stage: patch review
status: open
title: test_urlllib2_localnet DigestAuthHandler leaks nonces
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list