python-requests isn't secure enough, and some behavior depends on the
latest version.
Tested on 0.10.6.
So instead of the previous hack, we have some copy-paste.
But we gain secure cookies handling (not there yet),
referrer handling, "proper" redirect on POST behavior.
See commits:
e831947be43bc97b39d6e6e573cb0842b67fea80
dacc1d8aafedf80f8736d794005b6c8e8b1d4ad1
b20d171c1c11ecee83b7e4a0beead1e54902d37b
The entire redirect thingy will have to be overriden anyway, as it is
still broken. Cookies are given domain to domain without any checks.
I certainly don't like doing this, but:
* It is the only cookie lib that does not completely suck.
* It handles multiple cookies in a line, parses flags correctly.
* Clean API
* "One file, so you can just drop cookies.py into your project if you like"
* MIT license
Despite being the best cookie lib available, it isn't well-packaged.
And since for now some light monkeypatching is done, it is even more
interesting to import it.
http://pypi.python.org/pypi/cookies