Skip to content

Conversation

@darkdragon-001
Copy link

@darkdragon-001 darkdragon-001 commented Jan 2, 2026

This avoids the need to create a child class of DatagramProtocol for many use-cases. This aligns with TCP streams which can be created via asyncio.start_server(client_connected_cb, host, port).

Usage:

async def handle_package(data, addr):
    ...

async def start_udp(host, port):
    server = await asyncio.start_datagram_endpoint(handle_package, host, port)

This avoids the need to create a child class of DatagramProtocol for many use-cases.
This aligns with TCP streams which can be created via asyncio.start_server(client_connected_cb, host, port).
@python-cla-bot
Copy link

python-cla-bot bot commented Jan 2, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Jan 2, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm converting it into a draft, as this requires:

  • Tests.
  • What's New entry & NEWS entry.
  • Documentation.

@bedevere-app
Copy link

bedevere-app bot commented Jan 2, 2026

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@picnixz picnixz marked this pull request as draft January 2, 2026 09:56
@picnixz
Copy link
Member

picnixz commented Jan 2, 2026

Actually, I think we should first decide whether this is really useful or not as there aren't many results on GH. So, until a consensus is reached on https://discuss.python.org/c/ideas/6, I'll close the PR.

@picnixz picnixz closed this Jan 2, 2026
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

Successfully merging this pull request may close these issues.

2 participants