bpo-29341: Added path.like object to docstring in posixmodule.c and posixmodule.c.h#10101
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.
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.
|
|
||
| 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.
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.
Could you add a . at the end of this sentence? :)
Path to be tested; can be string, bytes, or a path-like object.
Co-Authored-By: BNMetrics <luna@bnmetrics.com>
pablogsal
left a comment
There was a problem hiding this comment.
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 <luna@bnmetrics.com>
|
…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 <luna@bnmetrics.com>
|
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 <luna@bnmetrics.com>
https://bugs.python.org/issue29341