Skip to content

gh-118986: expose socket.IPV6_RECVERR#118987

Merged
sobolevn merged 1 commit into
python:mainfrom
chrysn-pull-requests:ip_recverr
Oct 17, 2024
Merged

gh-118986: expose socket.IPV6_RECVERR#118987
sobolevn merged 1 commit into
python:mainfrom
chrysn-pull-requests:ip_recverr

Conversation

@chrysn

@chrysn chrysn commented May 13, 2024

Copy link
Copy Markdown
Contributor

This adds two socket option numbers, without which the existing MSG_ERRQUEUE gives barely any benefits.

@chrysn
chrysn marked this pull request as ready for review May 13, 2024 08:32
@chrysn chrysn changed the title gh-118986: expose socket.IPV6_RECVERR and socket.IP_RECVERR gh-118986: expose socket.IPV6_RECVERR Oct 16, 2024
@chrysn

chrysn commented Oct 16, 2024

Copy link
Copy Markdown
Contributor Author

This has missed the 3.14 alpha; may I ask for a review again to have this available next round?

@Eclips4 and @jeremyhylton would be suitable reviewers given the history of #120056.

@Eclips4
Eclips4 self-requested a review October 16, 2024 10:27
Comment thread Misc/NEWS.d/next/Library/2024-05-13-10-09-41.gh-issue-118986.-r4W9h.rst Outdated
@Eclips4

Eclips4 commented Oct 17, 2024

Copy link
Copy Markdown
Member

Please, modify the lines stated below to include the IPV6_RECVERR.

.. versionchanged:: 3.14
Added missing ``IP_RECVERR``, ``IP_RECVTTL``, and ``IP_RECVORIGDSTADDR``
on Linux.

@chrysn

chrysn commented Oct 17, 2024

Copy link
Copy Markdown
Contributor Author

Adjusted as requested.

You pointed at the lines for Python 3.14 -- do I read this right that this PR can become part of 3.14 still?

@Eclips4

Eclips4 commented Oct 17, 2024

Copy link
Copy Markdown
Member

You pointed at the lines for Python 3.14 -- do I read this right that this PR can become part of 3.14 still?

Yes, you understand that correctly! Python 3.14 is in development stage and two days ago was released the first alpha of 3.14, so we have more than half a year to implement new features for 3.14 version. For more information see https://peps.python.org/pep-0745/

If your question was about backporting to versions 3.12 and 3.13, sorry, we can't do that, because this PR is considered a feature request and versions 3.12 and 3.13 only accept security and bug fixes.

@Eclips4 Eclips4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! I'll let it unmerged for some time to get a review from others if they have something to say.

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

Comment thread Modules/socketmodule.c Outdated
@Eclips4

Eclips4 commented Oct 17, 2024

Copy link
Copy Markdown
Member

@chrysn, in the future, please avoid force pushes as they make PRs difficult to review. Commits are squashed anyway before merging, so it doesn't matter how many commits you need to complete a PR :)

@Eclips4

Eclips4 commented Oct 17, 2024

Copy link
Copy Markdown
Member

This adds two socket option numbers, without which the existing MSG_ERRQUEUE gives barely any benefits.

You've said that there are two new socket constants, but in fact, this PR contains only one. Did you forget to add the second one?

@chrysn

chrysn commented Oct 17, 2024

Copy link
Copy Markdown
Contributor Author

The issue was originally about adding two constants (I've updated the title but kept the original post).

One of the constants was already added after this PR was filed in a different PR (#120056), so when I updated this PR, only one was left.

@sobolevn
sobolevn merged commit b454662 into python:main Oct 17, 2024
@sobolevn

Copy link
Copy Markdown
Member

Thank you!

@chrysn
chrysn deleted the ip_recverr branch October 17, 2024 17:59
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
chrysn added a commit to chrysn/aiocoap that referenced this pull request Sep 14, 2025
With all required constants re-exported since
<python/cpython#118987>, this puts an upper
bound on workarounded version to be sure we use it when available.

The `IN` module access is removed because it was just a private module
anyway.
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.

3 participants