Nikita Sobolev
0441c880b9
Use Literal in asyncio/constants.pyi ( #6788 )
2022-01-02 23:44:51 +01:00
Nikita Sobolev
bbd8c77b16
Use "async def" in asyncio/tasks.pyi ( #6783 )
2022-01-02 16:22:05 +01:00
Nikita Sobolev
03861b5a1d
Use Literal type for constans in asyncio/tasks ( #6781 )
2022-01-02 12:42:00 +02:00
Alex Waygood
8d5d2520ac
Use PEP 585 syntax wherever possible ( #6717 )
2021-12-28 11:31:43 +01:00
Sebastian Rittau
4f39a31553
Remove asyncio loop arguments in Python 3.10 ( #6690 )
2021-12-25 21:39:36 +02:00
Thomas Grainger
eced701c8b
add ParamSpec to asyncio.to_thread ( #6668 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-12-23 13:29:02 +02:00
Sebastian Rittau
3fb2bcd4c1
Restore stubtest 0.930 ( #6663 )
2021-12-22 20:18:19 -08:00
Stephen Rosen
df0a724c0f
Always import Protocol from typing in stubs ( #6617 )
2021-12-17 13:12:22 +01:00
Alex Waygood
f43b968ab9
Clean up asyncio.__init__ ( #6497 )
2021-12-05 16:53:26 +02:00
Alex Waygood
bb7a06c60b
Add missing asyncio functions, part II ( #6493 )
2021-12-05 12:29:25 +02:00
Akuli
2b702233c6
tests/check_new_syntax.py: check order of if statements ( #6423 )
2021-11-28 08:04:46 -08:00
Shantanu
0131f4b868
style: put most recent python branch first ( #6420 )
...
Co-authored-by: hauntsaninja <>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-28 12:05:25 +02:00
Alex Waygood
da8bab974a
Add missing asyncio functions ( #6418 )
...
These were added in https://bugs.python.org/issue32250 and https://bugs.python.org/issue32415
2021-11-27 23:43:00 -08:00
Akuli
a5bc1e037f
Add mypy error codes to '# type: ignore' comments ( #6379 )
2021-11-26 07:07:56 +01:00
Alex Waygood
9707cb00f6
Python 3.11 removals in stdlib ( #6374 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-25 19:34:12 +02:00
Alex Waygood
029cf555e7
Use lowercase set/deque in stdlib subdirectories ( #6350 )
2021-11-20 04:20:25 -08:00
Akuli
0cd1135219
Revert "do not use mypy-specific syntax in '# type: ignore' comments" ( #6338 )
2021-11-18 20:13:07 +02:00
Kyle Altendorf
12dd8d9718
AbstractEventLoop.run_in_executor() returns Future ( #6187 )
...
https://docs.python.org/3.10/library/asyncio-eventloop.html#asyncio.loop.run_in_executor
> This method returns a asyncio.Future object.
2021-10-22 10:50:42 -07:00
Akuli
994b69ef8f
Use lowercase tuple where possible ( #6170 )
2021-10-14 17:18:19 -07:00
KotlinIsland
b7d1d099d9
add TypeGuard to coroutines.iscoroutine ( #6105 )
...
make CoroutineType extend Coroutine
2021-10-09 17:01:36 +02:00
Andrew Svetlov
c0030b2b12
Fix msg parameter type for asyncio Future.cancel() and Task.cancel() ( #5999 )
2021-09-03 09:07:20 -07:00
Akuli
8d5452e873
do not use mypy-specific syntax in '# type: ignore' comments ( #5953 )
2021-08-29 03:58:34 -07:00
Oleg Höfling
64f481189f
drop ellipsis assignments from module vars, classvars and instance attrs ( #5914 )
...
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com >
2021-08-11 19:26:58 +02:00
Akuli
ce11072dbe
Big diff: use lower-case list and dict ( #5888 )
2021-08-08 09:26:35 -07:00
Akuli
df6a211855
Use new union syntax in rest of stdlib ( #5884 )
2021-08-08 15:44:30 +02:00
Matt Vollrath
753cb4caba
Override argument type of DatagramProtocol.connection_made() ( #5873 )
2021-08-08 11:16:26 +02: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
8a107464a8
Use _typeshed.Self with __enter__ ( #5719 )
2021-07-01 23:15:13 +02:00
Dominic Davis-Foster
58559e56b3
Use _typeshed.Self where __enter__ returns self ( #5698 )
2021-06-27 22:58:58 +03:00
Sebastian Rittau
7e1b8384a0
Return concrete server from abstract event loop ( #5566 )
...
https://docs.python.org/3/library/asyncio-eventloop.html?highlight=abstracteventloop#creating-network-servers
documents the methods as returning a concrete server object.
2021-06-03 07:03:45 -07:00
Sebastian Rittau
6ee67483a3
Rework socket ( #5545 )
...
* Extract _socket.pyi from socket.pyi.
* Extract _socket.socket from socket.socket.
* Fix socket.family annotation.
* Annotate SocketIO properly.
* SocketType is an alias of _socket.socket.
* Sort items in socket.pyi in the same order as in socket.py.
* Remove socket.EINTR.
* Use _typeshed.WriteableBuffer instead of custom alias.
* Add errorTab (Windows only).
* Add _socket.dup().
* Mark positional-only argments.
* Remove constructors from socket exceptions.
* socket.timeout is an alias for TimeoutError, starting with Python 3.10.
* Use PEP 604 in changed lines.
* Add alias for fileno arguments.
* getaddrinfo() port can be bytes.
* Explicitly override some SSLSocket methods.
* Allow ReadableBuffer in _CMSG arguments.
2021-05-30 20:17:33 +02:00
Sebastian Rittau
ca256b85b9
asyncio.Server.socket fixes ( #5538 )
...
* Move socket from AbstractServer to Server.
* Fix Server.socket type on Python 3.7+.
* Use Iterable instead of list for socket argument.
Closes : #5535
2021-05-27 16:14:36 +02:00
Thomas Grainger
0a73982318
add asyncio.Task.get_coro return type ( #5536 )
2021-05-27 11:04:20 +02:00
Jelle Zijlstra
c4e3fd92cc
Adjust types for asyncio.coroutines functions ( #5517 )
...
Noticed this in mypy-primer output in #5516 on this code: https://github.com/encode/starlette/blob/master/starlette/testclient.py#L74
It calls `iscoroutinefunction()` on an object that may be None, which got flagged as an error but is actually fine; it just returns False.
We could also potentially use TypeGuard here, especially for `iscoroutine` which is just an `isinstance` call.
2021-05-21 23:07:06 +02:00
Thomas Grainger
f1dd6cad52
name can be any object ( #5494 )
2021-05-19 11:03:07 +02:00
Sebastian Rittau
f0bf6eebbd
AnyStr cleanup ( #5487 )
...
* 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
2021-05-17 20:45:48 +02:00
Sebastian Rittau
841a365284
Remove compatibility aliases ( #5464 )
...
* Remove compatibility aliases
Remove a few instances of Text
Use aliases from _typeshed
* Remove unused imports
2021-05-15 20:49:20 +03:00
Jelle Zijlstra
38dfb57adf
Improve asyncio.subprocess stubs ( #5327 )
2021-05-02 21:50:29 -07:00
Shantanu
1826072dd1
asyncio.subprocess: remove loop in py310 ( #5315 )
2021-05-02 18:56:45 -07:00
Shantanu
26f3748741
asyncio.tasks: update for py310 ( #5283 )
...
Just removing the loop argument from various places
2021-05-01 20:29:58 -07:00
Sebastian Rittau
4ac3ccad45
black: enable skip_magic_trailing_comma ( #5252 )
...
* black: enable skip_magic_trailing_comma
* Remove spurious commas
2021-04-27 08:32:32 -07:00
Thomas Cellerier
e5336e2358
loop.remove_signal_handler returns a bool ( #5253 )
2021-04-26 16:10:04 +02:00
Cássio Botaro
e2c4ffd9eb
Tighten wait() return type using overloads ( #5193 )
...
Closes : #5095
2021-04-08 20:34:43 +02:00
Sebastian Rittau
190e07236f
Tighten ensure_future() return type using overloads ( #5190 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-04-08 17:31:45 +02:00
hatal175
88a8d0ccbc
Explaining/Fixing asyncio allowlist exceptions ( #5132 )
2021-03-23 17:14:30 -07:00
Eric Traut
0ec182227c
Added a few missing type arguments for generic types used in stdlib stubs
...
I just found and fixed a bug in pyright's "missing type arguments" check. When type arguments were omitted for a generic type within a subscript expression, the error was being suppressed. With this bug fixed, I found several new cases where type arguments were missing in stdlib stubs. (#5130 )
Co-authored-by: Eric Traut <erictr@microsoft.com >
2021-03-22 18:28:04 -07:00
Eric Traut
4b4ced5fa0
Added missing type annotations and type arguments ( #5070 )
...
Co-authored-by: Eric Traut <erictr@microsoft.com >
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com >
2021-02-25 15:09:58 -08: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