ANN: ClientCookie 0.4.18 and 0.9.3a released (and mechanize 0.0.5a)

John J. Lee
05 Jan 2004 18:48:16 +0000

(I've uploaded a new version of mechanize too -- a lot of minor bugfixes;
note that ClientCookie 0.4.17 or newer is now required by mechanize)

0.4.18 is a stable bugfix release.

0.9.3a is an alpha release of a final version, parts of which I hope
to get into Python 2.4.

Changes from 0.4.14 to 0.4.18:

 * Fixed proxy handling.
 * Fixed redirection yet again.  This time, the problem was that the
   state introduced by cookies makes it possible for redirection to
   occur to the same URL multiple times without an infinite loop
   occurring (regardless of redirection code).  Should have thought of
   that before...
 * Fixed several bugs relating to request verifiability.
 * Worked around cases where multiple headers are (incorrectly) returned
   by server ("Location" in particular).
 * Fixes for mechanize module, to the response_seek_wrapper class.
 * Other minor bug fixes.

Changes from 0.9.0a to 0.9.3a (development version):

 * unverifiable and origin_req_host are now attributes initialised
   by Request.__init__().  All arguments named unverifiable are now
 * Renamed Request.iter_headers() to .header_items().
 * Bugfixes, as for stable version.

Requires Python >= 1.5.2.

ClientCookie is a Python module for handling HTTP cookies on the client
side, useful for accessing web sites that require cookies to be set and
then returned later.  It also provides some other (optional) useful stuff:
HTTP-EQUIV and Refresh handling, automatic adding of the Referer [sic]
header and lazily-seek()able responses.  These extras are implemented
using an extension that makes it easier to add new functionality to
urllib2.  It has developed from a port of Gisle Aas' Perl module
HTTP::Cookies, from the libwww-perl library.

Simple usage:

 import ClientCookie
 response = ClientCookie.urlopen("")

This function behaves identically to urllib2.urlopen, except that it deals
with cookies automatically.  That's probably all you need to know.