Skip to content

fix: enhance address family check in __loop_create_datagram_endpoint - #125

Merged
egorsmkv merged 1 commit into
RustedBytes:masterfrom
Vioshim:master
Nov 4, 2026
Merged

egorsmkv merged 1 commit into
RustedBytes:masterfrom
Vioshim:master

Conversation

@Vioshim

@Vioshim Vioshim commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the issue in which __loop_create_datagram_endpoint raises ValueError("unexpected address family") whenever both local_addr and remote_addr are omitted despite family being explicitly provided.

Allows the following

await loop.create_datagram_endpoint(
    protocol_factory,
    family=socket.AF_INET,
)

This improves compatibility with asyncio-based libraries that rely on unconnected UDP sockets, including dnspython's asynchronous resolver

@egorsmkv
egorsmkv merged commit 76d2533 into RustedBytes:master Nov 4, 2026
44 checks passed
@egorsmkv

egorsmkv commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

thank you for the contribution!

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