-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
gh-117873: Use positional-only parameters in _posixshmem #118012
Conversation
I convert this PR to a draft until the main branch becomes Python 3.14. |
The main branch is now Python 3.14. I mark the PR as ready for review. @erlend-aasland @corona10: Do you want to review it? |
* shm_unlink() parameter becomes positional-only. * shm_open() first parameter (path) becomes positional-only, the two following parameters remain positional-or-keyword.
This PR does not address the concerns of the issue: the |
shm_unlink() now uses METH_O. Using positional-only arguments for shm_open() sounds like a bad API, that's not my intent. Do you want to change its API? |
Correct; I was talking about
I think that particular change should be reverted. |
@@ -32,6 +32,7 @@ module _posixshmem | |||
/*[clinic input] | |||
_posixshmem.shm_open -> int | |||
path: unicode | |||
/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, why not use the / [3.16]
syntax? These are user-visible changes, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a private module: _posixshmem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then why the concern about making all the params positional-only?
If the API is not exposed, why care about it being positional-only? :) |
It's to make the API closer to open() API. It's not related to #117873 directly. |
If it is an internal and unexposed API; why care if it is identical to |
I wrote #118901 to revert shm_open() change. |
METH_VARARGS
in clinic code #117873