Skip to content

fcntl.lockf() is more powerful than written#6750

Merged
matrixise merged 4 commits into
python:masterfrom
lebigot:patch-1
Sep 13, 2019
Merged

fcntl.lockf() is more powerful than written#6750
matrixise merged 4 commits into
python:masterfrom
lebigot:patch-1

Conversation

@lebigot

@lebigot lebigot commented May 10, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

lebigot commented May 10, 2018

Copy link
Copy Markdown
Contributor Author

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

Thanks!

@BoboTiG

BoboTiG commented Mar 5, 2019

Copy link
Copy Markdown
Contributor

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

@BoboTiG BoboTiG left a comment

Copy link
Copy Markdown
Contributor

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)

@JulienPalard JulienPalard 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.

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
Copy Markdown

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
Copy Markdown
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) <lebigot@users.noreply.github.com>
@bedevere-bot

Copy link
Copy Markdown

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

@matrixise

Copy link
Copy Markdown
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) <lebigot@users.noreply.github.com>
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