This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients EvensF, docs@python, martin.panter, orsenthil, r.david.murray
Date 2014-09-05.06:56:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409900198.9.0.291598985745.issue21228@psf.upfronthosting.co.za>
In-reply-to
Content
With this patch, there is no longer any implication that the returned object implements the “addinfourl” interface. Perhaps that should be added back. Or maybe add it to the HTTPResponse class documentation itself? There is a comment that says the methods are there “for compatibility with old-style urllib responses”, although it seems to me they also make the class compatible with Python 3’s new “urllib”:

http://hg.python.org/cpython/file/c499cc2c4a06/Lib/http/client.py#l772

It is good to document the “msg” attribute and its inconsistency, since I have found this is required to implement your own BaseHandler.default_open(). However I’m not so sure if it is necessary to document the “url” attribute. Why not encourage using geturl() instead, since it is already documented, at least for non-HTTP responses?

I also saw a comment against the “msg” attribute which mentions deprecating something, but it is not clear what:
http://hg.python.org/cpython/file/c499cc2c4a06/Lib/urllib/request.py#l1187
History
Date User Action Args
2014-09-05 06:56:38martin.pantersetrecipients: + martin.panter, orsenthil, r.david.murray, docs@python, EvensF
2014-09-05 06:56:38martin.pantersetmessageid: <1409900198.9.0.291598985745.issue21228@psf.upfronthosting.co.za>
2014-09-05 06:56:38martin.panterlinkissue21228 messages
2014-09-05 06:56:38martin.pantercreate