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: cookielib: lock acquire/release try..finally protected
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, jjlee, kxroberto
Priority: normal Keywords: patch

Created on 2006-10-30 11:39 by kxroberto, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
cookielib.patch kxroberto, 2006-10-30 11:39
Messages (3)
msg51296 - (view) Author: kxroberto (kxroberto) Date: 2006-10-30 11:39
Almost all code between lock.acquire and .relase in
cookielib was unprotected by a try..finally bracket.
I suspect some deadlocks here to have to do with that.
This patch against latest version (2.5) in SVN corrects it.


Another minor change request:

at the end of cookielib.py these 2 special
CookieJar-modules are just imported without being
referenced/used in cookielib:

 from _LWPCookieJar import LWPCookieJar, lwp_cookie_str
 from _MozillaCookieJar import MozillaCookieJar

Maybe that should be removed from cookielib in order to
further reduce the slow import and leave the (rarely
used) import to the user (as with BSDJar etc. too ...)

robert
msg51297 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2006-12-19 15:44
Thanks for your patch!  Applied to the trunk in rev. 53073.

We probably can't remove the imports at the end because they're for preserving backward compatibility with
earlier versions of cookielib that contained those classes.
msg51298 - (view) Author: John J Lee (jjlee) Date: 2007-01-31 22:47
FWIW, I added a note about the history of this issue here:

http://python.org/sf/1484758
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44179
2006-10-30 11:39:16kxrobertocreate