Passing a CookieJar instead of a cookieproc to urllib2.build_opener

rrenaud at rrenaud at
Wed Jul 11 18:40:43 CEST 2007

On Jul 10, 11:10 pm, j... at (John J. Lee) wrote:
> "rren... at" <rren... at> writes:
> > urllib2.build_opener happily accepts and ignores a FileCookieJar.    I
> > had a bug in my code which looked like
> > urllib2.build_opener(func_returning_cookie_jar())
> > which should have been
> > urllib2.build_opener(HTTPCookieProcessor(func_returning_cookie_jar())
> > The problem is that the code ran happily without actually sending the
> > cookie, the CookieJar was just ignored.  I think that build_opener
> > should throw an exception when add_handler doesn't actually add.
> > Is this worth filing a bug for, or is it acceptable behavior?
> IMO, it's worth filing iff:
> a) you think it's worthwhile (this one sounds worthwhile to me)
> b) you write a patch and are prepared to patiently keep at it until it
> gets applied
> Make sure your patch follows PEP 8.  Make sure the patch includes test
> and documentation updates / additions (you don't need to write docs in
> LaTeX format -- other people will do the conversion to LaTeX for you
> if you like).  If there are no doc changes required, state that
> explicitly in the patch tracker.  If your patch gets ignored, review
> five other patches, and post to python-dev stating you have done so
> and requesting that your patch is reviewed (there's a shortage of
> patch reviewers).
> John

The patch is on the tracker here.

Are the docs themselves in subversion?  I suppose I should also update
the doc at

More information about the Python-list mailing list