-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
bpo-29341: Added path.like object to docstring in posixmodule.c and posixmodule.c.h #10101
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
|
All changes on the docstring have been verified and tested, and these |
| @@ -0,0 +1 @@ | |||
| Added path-like objects to docstrings of os methods that accept path | |||
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 find this a bit confusing. I would rewrite so it says:
Clarify in the docstrings of :mod:`os` methods that path-like objects are also accepted
as input parameters.
Modules/posixmodule.c
Outdated
| path: path_t | ||
| Path to be tested; can be string or bytes | ||
| Path to be tested; can be string, bytes, or path-like object |
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 think this needs an "a": or **a** path-like object? (The same for the rest of the methods)
|
@pablogsal Thanks so much for the review. I have made the changes suggested now! 👍 |
| os.access -> bool | ||
| path: path_t | ||
| Path to be tested; can be string or bytes |
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 add a . at the end of this sentence? :)
Path to be tested; can be string, bytes, or a path-like object.
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.
Sure! :)
Co-Authored-By: BNMetrics <[email protected]>
pablogsal
left a comment
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.
Thank you very much @BNMetrics for the PR and for the patience going through the review! 🎉
LGTM
|
Thank you so much @pablogsal ! |
|
Thanks @BNMetrics for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
|
Thanks @BNMetrics for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
Sorry, @BNMetrics and @pablogsal, I could not cleanly backport this to |
|
Sorry, @BNMetrics and @pablogsal, I could not cleanly backport this to |
|
Yup, I think it was a bit naive to think that the automatic backport will work. This is because the clinic file needs to be correctly regenerated after the patch is applied (which can have some conflicts as well). @BNMetrics Do you want to do the manual backport PRs? If you don't want to I can do them myself :) |
…os methods (pythonGH-10101) Some methods in the os module can accept path-like objects. This is documented in the general documentation but not in the function docstrings. To keep both in sync, the docstrings need to be updated to reflect that path-like objects are also accepted.. (cherry picked from commit b942707) Co-authored-by: BNMetrics <[email protected]>
|
…os methods (pythonGH-10101) Some methods in the os module can accept path-like objects. This is documented in the general documentation but not in the function docstrings. To keep both in sync, the docstrings need to be updated to reflect that path-like objects are also accepted.. (cherry picked from commit b942707) Co-authored-by: BNMetrics <[email protected]>
|
Ignore that, is an unrelated failure |
…os methods (pythonGH-10101) Some methods in the os module can accept path-like objects. This is documented in the general documentation but not in the function docstrings. To keep both in sync, the docstrings need to be updated to reflect that path-like objects are also accepted.. (cherry picked from commit b942707) Co-authored-by: BNMetrics <[email protected]>
https://bugs.python.org/issue29341