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.

Author r.david.murray
Recipients r.david.murray
Date 2009-05-11.22:33:51
SpamBayes Score 9.4903306e-05
Marked as misclassified No
Message-id <1242081235.08.0.896974873294.issue6002@psf.upfronthosting.co.za>
In-reply-to
Content
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.

Adding

   FakeProxyHandler.digest_auth_handler._nonces = []

to the tearDown for ProxyAuthTests fixes the leak.  Is this acceptable,
or does this merit further investigation?
History
Date User Action Args
2009-05-11 22:33:55r.david.murraysetrecipients: + r.david.murray
2009-05-11 22:33:55r.david.murraysetmessageid: <1242081235.08.0.896974873294.issue6002@psf.upfronthosting.co.za>
2009-05-11 22:33:52r.david.murraylinkissue6002 messages
2009-05-11 22:33:51r.david.murraycreate