Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDPTransport returning when data is empty #594

Open
ordinary-jamie opened this issue Feb 17, 2024 · 0 comments
Open

UDPTransport returning when data is empty #594

ordinary-jamie opened this issue Feb 17, 2024 · 0 comments

Comments

@ordinary-jamie
Copy link

ordinary-jamie commented Feb 17, 2024

  • uvloop version:
  • Python version: <3.13
  • Platform: MacOS
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?:
  • Does uvloop behave differently from vanilla asyncio? How?: There is a change made in CPython 3.13 to remove this behaviour.

The Datagram transport in both asyncio.DatagramTransport and uvloop.UDPTransport will return and ignore calls to sendto if the data is empty. This prohibits users from sending zero-length datagrams.

The behaviour will be removed in CPython 3.13 (see python/cpython#113812). Note that the public API in uvloop references the Python asyncio behaviour.

if not data:
# Replicating asyncio logic here.
return

@ordinary-jamie ordinary-jamie changed the title DatagramTransport returning when data is empty UDPTransport returning when data is empty Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant