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
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.