Alex Waygood
e88a182573
Simplify __all__ definitions in modules beginning with 'a' to 'l' ( #8026 )
2022-06-07 15:40:48 +02:00
Jelle Zijlstra
c35ec8ba89
contextlib: Remove explicit base class from ExitStack ( #7963 )
...
Fixes #7961
2022-05-27 09:19:18 -07:00
Jelle Zijlstra
d77d848975
contextlib: Use bound TypeVar ( #7764 )
2022-05-02 08:57:21 +02:00
Alex Waygood
97a74bc1aa
Import from collections.abc wherever possible ( #7635 )
2022-04-18 12:50:37 +02:00
Alex Waygood
740193a8fc
Use TypeAlias where possible for type aliases ( #7630 )
2022-04-15 18:01:00 -07:00
Alex Waygood
da3e69d093
stdlib: Improve a bunch of __(a)exit__ methods ( #7571 )
2022-04-01 08:05:25 +02:00
Alex Waygood
a3245db63c
Remove unneeded # noqa comments, fix broken # noqa comments ( #7561 )
2022-03-28 23:17:44 +02:00
Alex Waygood
5c44ae4f8c
Improve various signatures that shouldn't be async def, but currently are ( #7491 )
...
Co-authored-by: Thomas Grainger <tagrain@gmail.com >
2022-03-18 20:54:39 -07:00
Alex Waygood
3ab250eec8
Use PEP 604 syntax wherever possible ( #7493 )
2022-03-16 16:01:33 +01:00
Alex Waygood
947724a5cb
stdlib: Add several missing @abstractmethod decorators ( #7443 )
2022-03-06 16:41:13 -08:00
Alex Waygood
49aa342c15
Add contextlib.__all__ ( #7301 )
2022-02-19 13:02:34 -08:00
Alex Waygood
fbc279e3f5
stdlib: Add many missing dunder overrides ( #7231 )
2022-02-16 06:25:47 -08:00
Alex Waygood
584336a41e
Fix several methods that should be async def, but aren't ( #7107 )
2022-02-02 15:18:14 +01:00
Jelle Zijlstra
2b72dea679
Allow ExitStack.push callbacks to return None ( #7090 )
2022-01-31 08:21:32 +01:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
Nikita Sobolev
2244bdfa15
Use ParamSpec in contextlib ( #7007 )
2022-01-23 13:22:05 -08:00
Alex Waygood
fe6233a8c3
Add Y027 to list of ignored .flake8 error codes ( #6962 )
...
Refs https://github.com/PyCQA/flake8-pyi/pull/104
2022-01-19 07:17:30 -08:00
Alex Waygood
8af5e0d340
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible ( #6949 )
2022-01-18 07:14:03 -08:00
Alex Waygood
a40d79a4e6
Use lowercase type everywhere ( #6853 )
2022-01-08 16:09:29 +01:00
Alex Waygood
0e75580381
Add missing attributes to contextlib._(Async)GeneratorContextManager ( #6676 )
2021-12-26 14:05:49 +01:00
Alex Waygood
2173c44117
Correct return type of asynccontextmanager in 3.10 ( #6634 )
2021-12-20 17:58:13 +01:00
Stephen Rosen
df0a724c0f
Always import Protocol from typing in stubs ( #6617 )
2021-12-17 13:12:22 +01:00
Akuli
a5bc1e037f
Add mypy error codes to '# type: ignore' comments ( #6379 )
2021-11-26 07:07:56 +01:00
Alex Waygood
848753a4a9
Use contextlib classes inside contextlib ( #6353 )
2021-11-22 07:40:11 +01:00
Thomas Grainger
50dff2454a
add contextlib.chdir ( #6191 )
2021-11-08 11:54:51 -08:00
Kevin Rose
98dde9c364
Mark some contextlib method arguments as positional-only ( #6118 )
2021-10-05 19:41:52 -07:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Akuli
42247feefb
use Self in async context managers ( #5724 )
2021-07-06 08:47:49 +02:00
Anton Grübel
c38171a0b3
Use _typeshed.Self with __enter__ ( #5712 )
2021-06-29 15:19:25 -07:00
Thomas Grainger
bd50dacd76
add py3.10 async contextlib.nullcontext ( #5711 )
2021-06-29 08:35:44 -07:00
Thomas Grainger
14add7520b
widen _SupportsAclose ( #5708 )
...
see https://github.com/python-trio/trio-typing/issues/31#issuecomment-867534826
2021-06-28 15:29:21 -07:00
Thomas Grainger
c522e8e53c
contextlib.nullcontext is a class ( #5695 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-06-26 08:19:03 -07:00
Thomas Grainger
74091411ea
widen contextlib._SupportsClose and _SupportsAclose ( #5655 )
2021-06-17 11:58:49 +03:00
Jelle Zijlstra
4581501c98
use ParamSpec for @contextmanager ( #5476 )
2021-06-14 16:38:39 +02:00
Pavel Karateev
af376f4d1f
Add contextlib.AsyncContextDecorator ( #5550 )
2021-05-29 06:44:10 -07:00
Akuli
17dcea4a68
Akuli and srittau: Remove Python 2 branches from Python 3 stubs ( #5461 )
...
* run script and do some manual changes (Akuli)
* do the whole thing manually (srittau)
* merge changes (Akuli)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-05-15 15:33:39 +03:00
Shantanu
11c673b681
contextlib: add aclosing in py310 ( #5317 )
...
* contextlib: add aclosing in py310
* use protocols for closing, aclosing
2021-05-02 14:53:06 -07:00
Ivan Levkivskyi
16ae4c6120
Re-organize directory structure ( #4971 )
...
See discussion in #2491
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2021-01-27 12:00:39 +00:00