* Revert "Revert "add types to ssl for py2 (#251)""
This reverts commit 0b19fb471c (thus re-adding types to ssl).
* add some undocumented ssl constants
* Add stub for cgi.parse_header().
* Improve asyncio stubs (far from complete)
* More asyncio changes.
* Use @overload to solve strange test failures.
* Add some TODOs. Make ProactorEventLoop conditional.
* Future should not inherit from Awaitable or implement __await__.
At least not yet.
* Fix AbstractServer.wait_closed() return type.
It's a generator, not a future.
* Fix stubs for 2.7/dateutil. They were pretty broken.
(The 3/dateutil share some of the brokenness but that's still a TODO.)
* Fix argparse stubs.
- Container is not strong enough for choices.
- add_subparsers() returns something with an add_parser() method.
Signature of bytearray.__delitem__ is overloaded to support both
int and slice as parameters. Use a union instead.
This is needed to change bytearray's superclass from Sequence[int]
to MutableSequence[int], because the current signature of
__delitem__ is incompatible with that of MutableSequence.
As of Python 2.7, you can pass in multiple iterables into some set
methods like union, intersection, difference, and update. So, for
example, `new_set = a.union(b, c)`.
- Move Loader and ModuleType into _importlib_modulespec.pyi.
- Add "import X as X" for these to types.pyi and importlib/abc.pyi.
The goal is to ensure mypy -i still works, to fix https://github.com/python/mypy/issues/1797.
decode_header accepts a parameter of type str or Header, but the
stub for decode_header types the parameter as Header. Change
that to Union[Header, str].
* urllib.parse: Make return type of unquote_from_bytes str.
* urllib.parse: Reject encoding when quote is passed bytes.
encoding and errors must not be supplied to quote_plus and
quote if the first parameter is a bytes, or a TypeError is raised.
So overload quote and do not put encoding and errors in the
version where bytes is the first parameter.
quote and quote_plus also allow string and safe to be of different
types. Also allow that in the stubs.
* Fix some misspelled method names that were also missing 'self'
* Initial stubs for importlib.machinery
* Use importlib.machinery.ModuleSpec everywhere