Skip to content

Add an proto_addr_info argument to sock_connect in asyncio #123174

Open
@Aperence

Description

@Aperence

Feature or enhancement

Proposal:

Allow the selection of the protocol used by getaddrinfo by adding an additional, optional parameter proto_addr_info which defaults to None.

If not specified, use the protocol used by the socket ( = previous behaviour).

This change is needed to allow custom protocols to be used with the sock_connect, because these protocols may raise an error when calling getaddrinfo (result in a ai_proto not supported error). An example of such protocol is MPTCP (https://mptcp.dev)

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions