[issue42062] Usage of HTTPResponse.url

Martin Panter report at bugs.python.org
Sat Oct 17 21:59:43 EDT 2020


Martin Panter <vadmium+py at gmail.com> added the comment:

There is a comment in the HTTPResponse class regarding these methods:

# For compatibility with old-style urllib responses.

They were there for the "urlopen" API in "urllib.request", not for the "http.client" module on its own. I expect the "url" attribute is set by the "urlopen" code.

However more recently (Issue 12707) the "url" attribute and "geturl" method were documented in the HTTPResponse documentation, which is awkward.

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42062>
_______________________________________


More information about the Python-bugs-list mailing list