[Patches] [ python-Patches-1587139 ] cookielib: lock acquire/release try..finally protected

SourceForge.net noreply at sourceforge.net
Tue Dec 19 16:44:25 CET 2006


Patches item #1587139, was opened at 2006-10-30 06:39
Message generated for change (Comment added) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1587139&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: kxroberto (kxroberto)
>Assigned to: A.M. Kuchling (akuchling)
Summary: cookielib: lock acquire/release try..finally protected

Initial Comment:
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

----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2006-12-19 10:44

Message:
Logged In: YES 
user_id=11375
Originator: NO

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.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1587139&group_id=5470


More information about the Patches mailing list