Skip to content

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

Merged
merged 4 commits into from
Sep 13, 2019
Merged

Conversation

lebigot
Copy link
Contributor

@lebigot lebigot commented May 10, 2018

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.)

lebigot added 2 commits May 10, 2018 13:53
The proposed change reflects what is raised when given an incorrect *fd*:
```
TypeError: argument must be an int, or have a fileno() method.
```
@the-knights-who-say-ni
Copy link

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
and a Python core developer will remove the CLA not signed label
to make the bot check again.

Thanks again to your contribution and we look forward to looking at it!

@lebigot
Copy link
Contributor Author

lebigot commented May 10, 2018

I have signed the CLA (login Eric Lebigot, GitHub name lebigot).

Thanks!

@BoboTiG
Copy link
Contributor

BoboTiG commented Mar 5, 2019

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)?

Copy link
Contributor

@BoboTiG BoboTiG left a 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)

Copy link
Member

@JulienPalard JulienPalard left a 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.)

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@matrixise matrixise merged commit 77cd0ce into python:master Sep 13, 2019
@miss-islington
Copy link
Contributor

Thanks @lebigot for the PR, and @matrixise for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 13, 2019
(cherry picked from commit 77cd0ce)

Co-authored-by: Eric O. LEBIGOT (EOL) <[email protected]>
@bedevere-bot
Copy link

GH-16125 is a backport of this pull request to the 3.8 branch.

@matrixise
Copy link
Member

Thank you for your contribution, I have merged into master and 3.8.

miss-islington added a commit that referenced this pull request Sep 13, 2019
(cherry picked from commit 77cd0ce)

Co-authored-by: Eric O. LEBIGOT (EOL) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants