cookielib module in 2.4?
I have a module that I'd like to get included in Python 2.4. It adds transparent HTTP cookie handling to urllib2 (and urllib too, I guess, if somebody wants to write the little bit of code I imagine is required). I'm prepared to maintain the thing, of course. It has been distributed for 2 years in a 1.5.2-compatible form, as the ClientCookie package, at wwwsearch.sf.net. I've just made a branch in which I have removed 1.5.2 (and various other) cruft, along with some superfluous features, and turned it into a single-file module (plus a small patch to urllib2). ATM it's in a subversion branch here: http://codespeak.net/svn/user/jjlee/wwwsearch/ClientCookie/branch/python-2.4... I've renamed it 'cookielib'. That's partly to fit in with the Python standard library's naming convention for network client modules, partly so that it's clear to people whether they're importing the old 1.5.2-compatible version or the 2.4 standard library version. Actually, the most frequent use case does not involve importing the module: import urllib2 opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) response = opener.open("http://example.com/") So, assuming the module is likely to be accepted (given the answers to my post here last year), I'd be happy if anybody here could 1. indicate if I'm roughly on the right track (especially welcome if you've had a look at the subversion branch above), 2. give me a rough idea how long I have to sort out the remaining issues and submit a patch The major remaining issue is documentation, which is not yet in LaTeX format (nor in Python std. lib. style) -- see my next post. There are also two or three niggles which I'd like to discuss with Jeremy Hylton, Moshe Zadka, or anybody else who knows urllib2. Finally, there's the fact that the module contains untested thread-synchronisation code (I'm pretty thread-ignorant). Perhaps that's an academic issue ATM, though: I failed recently to eliminate deadlocks in a fairly simple bit of code using urllib2 + threading, even when I verified there were no locks allocated by any module other than threading itself... TIA John
John J Lee wrote: [snip - cookielib explanation]
So, assuming the module is likely to be accepted (given the answers to my post here last year), I'd be happy if anybody here could
1. indicate if I'm roughly on the right track (especially welcome if you've had a look at the subversion branch above),
Code, docs, tests. But in order for the module to be accepted it needs to show that its usage is truly needed by having it be widely used in the Python community. I don't do web programming so others will have to vouch for the amount of usage. All explained in the "Intro to Development" doc found at http://www.python.org/dev/ .
2. give me a rough idea how long I have to sort out the remaining issues and submit a patch
How ever long it takes. Not sure if I really understand what you are wondering about. -Brett
Brett C. wrote:
John J Lee wrote:
2. give me a rough idea how long I have to sort out the remaining issues and submit a patch
How ever long it takes. Not sure if I really understand what you are wondering about.
If the question is "how long has he got before 2.4 alpha 1", the answer is "about 6 weeks". I'm still aiming for a first alpha in the first week of July or thereabouts. -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.
On Thu, 13 May 2004, Anthony Baxter wrote:
Brett C. wrote:
John J Lee wrote:
2. give me a rough idea how long I have to sort out the remaining issues and submit a patch
How ever long it takes. Not sure if I really understand what you are wondering about.
If the question is "how long has he got before 2.4 alpha 1", the answer is "about 6 weeks". I'm still aiming for a first alpha in the first week of July or thereabouts.
Question is : "how long before it's too late to get into 2.4?" I take it from your answer that there's not a long freeze period planned before first alpha, so I'll submit a patch in a week or two. Thanks all John
On Wed, 2004-05-12 at 18:40, John J Lee wrote:
I have a module that I'd like to get included in Python 2.4. It adds transparent HTTP cookie handling to urllib2
Although I haven't looked at your code, I think the functionality would be a good addition to Python. Brett's right though, it needs (Python style) documentation and unit tests. I wonder if it makes sense to combine the functionality of Cookie.py and cookielib.py? Perhaps not, but at the very least I'd like to see something like this integrated into the eventual output of the web-sig (probably not for 2.4). -Barry
On Thu, 13 May 2004, Barry Warsaw wrote:
On Wed, 2004-05-12 at 18:40, John J Lee wrote:
I have a module that I'd like to get included in Python 2.4. It adds transparent HTTP cookie handling to urllib2
Although I haven't looked at your code, I think the functionality would be a good addition to Python. Brett's right though, it needs (Python style) documentation and unit tests.
There are unit tests aplenty, and LaTeX docs are on the way.
I wonder if it makes sense to combine the functionality of Cookie.py and cookielib.py? Perhaps not, but at the very least I'd like to see
Not. :-) There is little overlap between the two modules, and it would probably complicate cookielib to combine it with Cookie (and might possibly make my brain explode).
something like this integrated into the eventual output of the web-sig (probably not for 2.4).
The web-sig list has been dead for some time. I haven't seen any client-side output from web-sig, other than my own work on a Browser class. Haven't seen any server-side output about which there's any consensus, either, come to that. John
On Thu, 2004-05-13 at 14:36, John J Lee wrote:
There are unit tests aplenty, and LaTeX docs are on the way.
Cool.
I wonder if it makes sense to combine the functionality of Cookie.py and cookielib.py? Perhaps not, but at the very least I'd like to see
Not. :-)
There is little overlap between the two modules, and it would probably complicate cookielib to combine it with Cookie (and might possibly make my brain explode).
something like this integrated into the eventual output of the web-sig (probably not for 2.4).
The web-sig list has been dead for some time. I haven't seen any client-side output from web-sig, other than my own work on a Browser class. Haven't seen any server-side output about which there's any consensus, either, come to that.
Sigh. Well, don't wait for them. ;) -Barry
participants (4)
-
Anthony Baxter
-
Barry Warsaw
-
Brett C.
-
John J Lee