-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
bpo-34353: Added sockets to stat.filemode fallback python implementation #8703
bpo-34353: Added sockets to stat.filemode fallback python implementation #8703
Conversation
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 our records indicate you have not signed the CLA. For legal reasons we need you to sign this 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 You can check yourself Thanks again for your contribution, we look forward to reviewing it! |
New account, only now signed the CLA 👍 |
Could you update |
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.
Looks good. Just two more nits.
Lib/test/test_stat.py
Outdated
def test_socket(self): | ||
s = socket.socket(socket.AF_UNIX) | ||
s.bind(TESTFN) | ||
try: |
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 would cleaner to either do with socket.socket(socket.AF_UNIX): <rest of function>
or use self.addCleanup(s.close)
after the first line.
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.
Fixed
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.
I didn't realise you could use socket
as a context manager, I'll definitely be using that in the future! Thanks!
@@ -0,0 +1,2 @@ | |||
Added the "socket" option in the `stat.filemode()` Python implementation to | |||
match the C implementation. - GPery |
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.
You can add yourself to Misc/ACKS
. Usually, we leave names off NEWS entries, though.
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.
Fixed
2875629
to
cb9b170
Compare
https://bugs.python.org/issue34353