Resolves #90, a regression that appeared with mypy 1.7. In order to have ParamSpec available, we now require at least mypy 1.0. args_invariant_decorator_callback is modeled off the mypy contextlib plugin which was replaced with use of ParamSpec in Oct 2022 (https://github.com/python/mypy/commit/3108669b0c1d57a6eecf84002fa1cf240449dba6); mypy 1.0 came out in Feb 2023.
The test described in #90 no longer fails now that this hook has been removed.
While we're here, update stubs to be consistent with Trio's new inline stubs to satisfy CI. This included:
giving names to the statistics types
making some SocketType attributes into properties
listing out the arguments of __aexit__ instead of using a star-args shortcut
I solemnly swear that all of the statistics classes were copy-pasted from current trio. :-) stubtest is happy so I think there's relatively little that could be incorrect.
Resolves #90, a regression that appeared with mypy 1.7. In order to have ParamSpec available, we now require at least mypy 1.0.
args_invariant_decorator_callback
is modeled off the mypycontextlib
plugin which was replaced with use of ParamSpec in Oct 2022 (https://github.com/python/mypy/commit/3108669b0c1d57a6eecf84002fa1cf240449dba6); mypy 1.0 came out in Feb 2023.The test described in #90 no longer fails now that this hook has been removed.
While we're here, update stubs to be consistent with Trio's new inline stubs to satisfy CI. This included:
__aexit__
instead of using a star-args shortcut