Since Python 3.6 logging.FileHandler's filename argument can be a
PathLike object. Same for FileHandler's subclasses.
logging.basicConfig passes its filename argument to a FileHandler, so
this can be a PathLike object too.
Finally, logging.config.fileConfig passes its fname argument to
ConfigParser.read, which also takes a PathLike since version 3.6.1.
* optparse.Option.dest is a string
* optparse.OptionParser.epilog is a string
* optparse.OptionParser.prog is string
* optparse.OptionParser.values is Values
Shuffle code to resolve forward reference
* optparse.OptionParser.*option_list is a list of Options
* optparse.OptionParser.parse_args returns 2-tuple
<https://docs.python.org/2/library/optparse.html#parsing-arguments>
* minor improvements to Values
* Add ExcInfo and OptExcInfo type aliases
* Implement StartResponse using a protocol
* Mark stub-only types with an underscore
* Remove wrong TODO note
python/mypy#1178 is about variable-length tuples, while exc_info()
always returns a tuple with length 3. Ideally, exc_info() would
return Union[Tuple[Type[_E], _E, TracebackType], Tuple[None, None, None]],
but that is a different issue.
StartResponse callbacks are required to accept and optional third argument.
Currently, there is no good way to describe this using type hints.
Previously, a Union was used, but that causes mypy to complain about any call
of start_response().
* Use Tuple field in DecimalTuple
* Remove unnecessary base classes from Decimal
* Decimal.__init__ -> __new__
* Decimal.__ne__ is not defined in Python 3
* Add Decimal.as_integer_ratio()
* Annotate DecimalException.handle()
* Correct types of Decimal method arguments
* Add missing arguments and optional markers to Decimal
* Add missing arguments to Context
* Remove spurious int from Unions with float
* Remove Context.__setattr__()
* Fix return types of Context methods
These type annotations are unnecessary and seem to confuse the type system.
* Remove annotation from PlistFormat enum members
Same rationale as python/typeshed#2314; same adverse effects observed.
To backport `os.path.commonpath` in mypy I needed to use genericpath. It seems unchanged since 3.4, and the `same*` functions were added in 3.4. (checked via comparing the `__all__`s of the source in 2.7, 3.4, and 3.7.)
* Drop support for Python 3.3
* Merge Python 2 and 3 shutil
* Marked some arguments optional
* Changed callback return type from None to Any for more flexibility