ANN: ClientCookie 0.4.6a released

John J. Lee jjl@pobox.com
23 Oct 2003 00:53:07 +0100


http://wwwsearch.sourceforge.net/ClientCookie/

Bugfix release.

Officially this is an alpha release, but it's actually stable code:
the only reason for the 'alpha' label is that I'm waiting for Jeremy
Hylton to look at RFE http://www.python.org/sf/759792 -- if that needs
interface changes, so will ClientCookie.  0.3.x is no longer
supported.  See the following for how to switch from 0.3.x to 0.4.x:

http://wwwsearch.sourceforge.net/ClientCookie/porting.txt

Changes since 0.4.3a:

 * Cleaned up MSIECookies delayloading.  All methods should now work,
   but anything that causes iteration over all cookies will not cause
   loading of delayloaded cookies from disk.  If you really want to
   iterate over *all* cookies (rather than just those currently in
   memory), call read_all_cookies.
 * Lots of MSIECookieJar bug fixes.
 * Corrected domain-blocking documentation ("acme.com" doesn't match
   ".acme.com").  Also, changed wording (from "x matches y" to "y
   matches x"), to agree with the ordering actually used in the code
   (since the domain-matching algorithms used are not commutative,
   this was confusing).
 * Fixed loading from file for cookies with no name (previously, the
   name and value were reversed).
 * Assorted other bug fixes.
 * Split up set_ok and return_ok methods from DefaultCookiePolicy to
   make it easier to inherit its implementation.
 * Implemented strict_domain argument to DefaultCookiePolicy
   constructor.


Requires Python >= 1.5.2.

ClientCookie is a Python module for handling HTTP cookies on the client
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("http://foo.bar.com/")

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


John