gh-52597: Add position-only markers for os functions - #94735
Conversation
|
@JelleZijlstra Could you take a peek at this one since you'd looked over the docs for |
JelleZijlstra
left a comment
There was a problem hiding this comment.
Thanks! I used this also for fixing a few missing pos-only markers in typeshed: python/typeshed#8283, python/typeshed#8284.
| used to determine the disposition of a process. | ||
|
|
||
| .. function:: WCOREDUMP(status) | ||
| .. function:: WCOREDUMP(status, /) |
There was a problem hiding this comment.
Strangely enough, this one is indeed pos-only, but all the other similar ones below it aren't.
There was a problem hiding this comment.
Looking at
cpython/Modules/clinic/posixmodule.c.h
Lines 4282 to 4318 in 1009bf1
Separately, could you check whether you're able to run os.plock(op=None) to verify the keyword can't be used? I gave all the functions a quick run to double-check but like chflags, I'm not able to run plock for some reason.
There was a problem hiding this comment.
Actually, seeing that the clinic def
cpython/Modules/clinic/posixmodule.c.h
Lines 3688 to 3692 in f0bf795
has the position-only marker, then regardless of whether it can be confirmed, adding the plock change would arguably be strictly better than the current docs. In that case, tracking this particular problem can go into some other issue instead, and I'd reckon that the change can go ahead anyways, if there aren't any other problems with the PR.
|
Thanks @slateny for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
|
Sorry @slateny and @JelleZijlstra, I had trouble checking out the |
|
Sorry, @slateny and @JelleZijlstra, I could not cleanly backport this to |
|
Thanks @slateny for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
|
GH-97643 is a backport of this pull request to the 3.11 branch. |
#52597
chflagsskipped as I couldn't test it due to someAttributeError, but per clinicfollow_symlinksshouldn't be keyword-only.For verification, first to get all functions changed:
To show the params in the docs:
To show the params in clinic:
And combined:
The last command shows any differences in positional/keyword markers or param names. On visual inspection, all diffs just seem to be differences in param names so the markers in the doc are correct.