Files
typeshed/stdlib/3
Michael Brandt 1442cc02bf Add stubs for HTTP Handler classes in py2/urllib2 & py3/urllib.request (#2710)
* HTTP Handler class annotations for py2/urllib2 & py3/urllib.request

Add full annotations for the following classes:

* Python 2:

    * `urllib2.AbstractHTTPHandler`
    * `urllib2.HTTPHandler`
    * `urllib2.HTTPsHandler`

* Python 3:

    * `urllib.request.AbstractHTTPHandler`
    * `urllib.request.HTTPHandler`
    * `urllib.request.HTTPsHandler`

This information is largely undocumented, and was obtained by directly examining
the Python source code:

* Python 2 (v2.7.15) - https://github.com/python/cpython/blob/v2.7.15/Lib/urllib2.py#L1115-L1243
* Python 3 (v3.7.1) - https://github.com/python/cpython/blob/v3.7.1/Lib/urllib/request.py#L1224-L1364

`urllib2.AbstractHTTPHandler.do_open` takes as a parameter either
`HTTPConnection` or `HTTPSConnection`--one of the classes, not an instance of
either--and constructs an object using only a few of the parameters that either
constructor could use. `HTTPConnectionProtocol` in `stdlib/2/httplib.pyi`
follows a similar patten to `HTTPConnectionProtocol` added to
`stdlib/3/http/client.pyi` in pull request #2582 to describe the type of the
`http_class` that is passed to `do_open`.
2019-02-11 11:25:02 +01:00
..
2018-10-24 07:20:53 -07:00
2018-10-24 07:20:53 -07:00
2018-11-23 09:51:44 -08:00
2018-10-24 07:20:53 -07:00
2017-04-24 15:31:29 -07:00
2018-10-27 08:54:56 -07:00
2016-12-21 01:15:26 -08:00
2018-10-24 07:20:53 -07:00
2018-10-24 07:20:53 -07:00
2017-04-24 15:31:29 -07:00
2017-04-30 14:16:30 -07:00
2016-12-20 00:47:51 -08:00
2018-10-24 07:20:53 -07:00
2017-04-24 14:57:26 -07:00
2018-08-18 19:25:48 -07:00
2017-11-13 06:56:24 -08:00
2018-08-27 20:22:19 -07:00
2017-05-31 12:07:21 -07:00
2017-10-08 21:12:19 -07:00