python-trio / trio

Trio – a friendly Python library for async concurrency and I/O
https://trio.readthedocs.io
Other
6.21k stars 343 forks source link

Update `SocketType.recv` (&other) signatures to use PEP570 #3094

Open jakkdl opened 1 month ago

jakkdl commented 1 month ago

https://github.com/python/typeshed/pull/11250 changed the signatures of SocketType.recv and friends, so it should now be possible to change https://github.com/python-trio/trio/blob/4e979bfef4aac8c756fd4c6c521977cfcfdde1df/src/trio/_socket.py#L1115-L1129

although I'm surprised that mypy haven't started complaining from bumping typeshed. Maybe they did some backwards compatibility thing? Or haven't bumped typeshed?