Martin Panter added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to