* Add public missing asyncio stubs for windows and proactor files, and any necessary private return/argument types.
* Add methods to BaseProactorEventLoop that mypy is complaining about, with note about status at runtime
* Add asyncio constants file
* Make multiprocessing stubs match implementation
* Add multiprocessing.process.BaseProcess
* Use BaseProcess in multiprocessing.context where applicable
* Remove non-existing BaseContext.Process()
* Derive DefaultContext from BaseContext
* Fix BaseContext/DefaultContext.set_start_method() signatures
* Re-export multiprocessing.context.Process from multiprocessing,
instead of using a custom definition
* Re-export multiprocessing.active_from from multiprocessing.process
instead of using a custom definition
* Add parent_process() (Python 3.8)
* Complete BaseManager; add Server
* Add multiprocessing.shared_memory et al
* Add os.add_dll_directory()
* Add memfd_create() and flags
* Add type annotation to flags
* Add stat_result.st_reparse_tag and flags
* Add ncurses_version
* Add Path.link_to()
* Add Picker.reducer_override()
* Add plistlib.UID
* Add has_dualstack_ipv6() and create_server()
* Add shlex.join()
* Add SSL methods and fields
* Add Python 3.8 statistics functions and classes
* Remove obsolete sys.subversion
* Add sys.unraisablehook
* Add threading.excepthook
* Add get_native_id() and Thread.native_id
* Add Python 3.8 tkinter methods
* Add CLOCK_UPTIME_RAW
* Add SupportsIndex
* Add typing.get_origin() and get_args()
* Add unicodedata.is_normalized
* Add unittest.mock.AsyncMock
Currently this is just an alias for Any like Mock and MagicMock. All of
these classes should probably be sub-classing Any and add their own
methods. See also #3224.
* Add unittest cleanup methods
* Add IsolatedAsyncioTestCase
* Add ElementTree.canonicalize() and C14NWriterTarget
* cProfile.Profile can be used as a context manager
* Add asyncio task name handling
* mmap.flush() now always returns None
* Add posonlyargcount to CodeType
While it may eventually be useful to mark the exceptions that can be
raised from a function or method, the semantics are currently undefined
and unclear.
This is important because mypy doesn't generally think functions are compatible with `FunctionType`, so `inspect.getsource` on arbitrary functions is rejected by the current annotations.
Nothing prevents a decorator defined using `@decorator` from
changing the signature of the decorated function. For example,
this example changes the return type to `str`:
```
from decorator import decorator
@decorator
def stringify(f, *args, **kwargs) -> str:
return str(f(*args, **kwargs))
```
The old signature caused false positives in internal Dropbox code.
I couldn't come up with a signature that would produce better types
with mypy while not generating false positives.
Per the urllib.parse documentation, username, password, hostname,
and port will be set to None if not set in the parsed URL. The
same is true for urlparse in Python 2 according to its documentation.
This is a continuation of #3291, which was the initial fix for #3201.
The 2-arg version of iter() turns a callable into an iterator. The
changes made in #3291 introduce an Any return type for both the
callable's return type and the iterator's type, while in reality the
return type of the function is always the same as the iterator's type.