Continuing work towards #8988.
The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:
- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
- The _MessageData alias refers to objects handled in the
_dump_message method: 016c7d37b6/Lib/mailbox.py (L210)
- The path passed to __init__ should be a str path because there are
many places in the file (search for self._path) where we join it
with a str, which won't work with a bytes path.
* Replace all uses of StrPath, BytesPath, and AnyPath in Python 2 stubs.
* Add StrOrBytesPath as preferred alias for AnyPath.
* Replace all remaining AnyPath instances with StrOrBytesPath.
* Mark AnyPath as obsolete.
Part of #5470