-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
fcntl.lockf() is more powerful than written #6750
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
Conversation
The proposed change reflects what is raised when given an incorrect *fd*: ``` TypeError: argument must be an int, or have a fileno() method. ```
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. When your account is ready, please add a comment in this pull request Thanks again to your contribution and we look forward to looking at it! |
I have signed the CLA (login Eric Lebigot, GitHub name lebigot). Thanks! |
Thanks @lebigot ! Do you mind opening an issue on http://bugs.python.org/, link it there and add a NEWs entry (you can use https://blurb-it.herokuapp.com/ for that)? |
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.
👍 (perhaps a NEWs entry + BPO is killer for such change)
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.
Could you stick to the existing wording, like in flock and fcntl:
[...] fd (file objects providing a fileno() method are accepted as well).
?
(Issue and NEWs entry are not needed for such small changes.)
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Thanks @lebigot for the PR, and @matrixise for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
(cherry picked from commit 77cd0ce) Co-authored-by: Eric O. LEBIGOT (EOL) <[email protected]>
GH-16125 is a backport of this pull request to the 3.8 branch. |
Thank you for your contribution, I have merged into master and 3.8. |
(cherry picked from commit 77cd0ce) Co-authored-by: Eric O. LEBIGOT (EOL) <[email protected]>
The fcntl.lockf() function is more powerful than written: it accepts more than only file descriptors, as indicated in the proposed change, which is consistent with the error message one gets from using an incorrect fd argument.
(The fcntl.flock() function already mentions the more general usage.)