Also, change the type of StringIO.name (Python 3) from str to Any.
Neither StringIO nor BytesIO actually define a name field, but the
super-class IO[T] of both in typeshed does define a read-only property.
This means that sub-classes of StringIO and BytesIO adding this field
will not typecheck correctly.
Closes: #1790
* Fix werkzeug environ type
PEP 3333 explicitly calls for environ to be a built-in dict. Using a
Mapping will not only prevent the dict from being modified (which is
explicitly allowed by PEP 3333), it will also cause interaction
problems when the environment is passed to other WSGI handlers.
Also change the value type from object to Any for convenience. By
definition, the values can be anything and can't be type checked.
Using object instead of Any forces us to explicitly cast the value
whenever we access it.
* Use Union[str, unicode] for Werkzeug environment keys
This matches the type in wsgiref.types.
* Use WSGIEnvironment from wsgiref.types
* Add '= ...' to environ attribute
From the docstring for Template: "Template objects created from the
constructor rather than an environment do have an `environment`
attribute that points to a temporary environment ..."
* Extract WSGIEnvironment in wsgiref.types
* Change value type of WSGIEnvironment to Any
Per PEP 3333, a WSGI environment can contain anything, not just strings.
* Replace `self` with `cls` in classmethod
* Group classmethods together, as in the actual stub
* Use float instead of Union[int, float] in coding style example
* Add stub for unittest.mock.patch.multiple()
* Use ... for default arguments in unittest.mock.patch() et al.
* Tighten type of create argument to patch() et al.