Discovered while adding MyPy for code that was implementing
MutableMapping and using the update function like this:
```python
class CaseInsensitiveDict(collections.MutableMapping):
def __init__(self, data=None, **kwargs):
# type: (dict, **Any) -> None
self._store = dict() # type: dict
if data is None:
data = {}
self.update(data, **kwargs)
```
This commit adds kwargs to MutableMapping to allow this.
Shout out to Tim Abbott for assisting me with this.
This reverts commit d43adbe97e.
Here's a simple example of code that breaks with this PR:
from typing import Mapping, Dict, Tuple
a = {('0', '0'): 42} # type: Mapping[Tuple[str, str], int]
b = a.get(('1', '1'), 0)
This gives an error on the last line:
error: No overload variant of "get" of "dict" matches argument types [Tuple[builtins.str, builtins.str], builtins.int]
* Stubgen modules for 2.7
Cookie
email._parseaddr
email.utils
genericpath
linecache
mimetypes
multiprocessing
multiprocessing.process
multiprocessing.util
posixpath
quopri
runpy
weakref
wsgiref.validate
* 2.7/typing.py: add missing __contains__ definition
* 2.7/subprocess.py: make output argument to CalledProcessError optional
Commit f08160bd did the same for py3.
* 2.7/hmac.pyi: add compare_digest
This function was introduced to the 2.7 series in 2.7.7.
* Stubgen 2.7/ssl.pyi
This replaces a nearly-empty handwritten stub.
* Copy constants and other definitions from py3 to py2 ssl.pyi
* 2.7/__future__.pyi: add methods
* 2.7/_weakref.pyi: backport some definitions from 3.x version
* Stubgen 2.7/locale.pyi
Hand-edited to remove declarations that are redundant (and cause
conflicts with) the "from _locale import *" line.