]> granicus.if.org Git - python/commit
Simplify the Request class. The basic components of the parsed
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 31 Mar 2009 14:35:53 +0000 (14:35 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 31 Mar 2009 14:35:53 +0000 (14:35 +0000)
commit6c5e28c383bf587f80d01e52f887801be200200d
tree6f8485b2ea4820facd7049320142e40028658494
parent16caab00a259c1a01f8e47abdd321c42b1b6e554
Simplify the Request class.  The basic components of the parsed
Request are now available as public attributes, e.g. full_url and
host.  The accessor methods are deprecated.  The implementation
replace the complicated __getattr__ machinery with a _parse() method.

The response from an HTTP request is now an HTTPResponse instance
instead of an addinfourl() wrapper instance.  The wrapper provided
minimal extract functionality and was undocumented.  The API of
addinfourl() was preserved, except for close hooks, by adding a few
methods and public attributes to the HTTPResponse class.
Lib/http/client.py
Lib/test/test_http_cookiejar.py
Lib/test/test_urllib2.py
Lib/urllib/request.py