-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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-39895: Move pathlib.Path.touch()
implementation into the path accessor
#18838
bpo-39895: Move pathlib.Path.touch()
implementation into the path accessor
#18838
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
I think this doesn't require a NEWS entry as it's an internal refactor, assuming that subclassing Path/Accessor isn't (yet) properly supported. |
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.
LGTM. Could you please merge/rebase from master and fix the conflicts?
767e7c3
to
3b001d4
Compare
Rebased |
3b001d4
to
17e3af2
Compare
@pitrou can this be merged? Thanks |
Path.touch()
does a lot of os-specific /stuff/ that should probably live in the accessor. Perhaps most importantly, is callsos.close()
on whateveraccessor.open()
returns, which is problematic for those wishing to write their own accessor that doesn't work on a file descriptor level.This PR:
Path.touch()
via the path's accessor, in conformity with most otherPath
methods._NormalAccessor.touch()
method_NormalAccessor.utime()
(which was only used bytouch()
)Path._raw_open()
(which was only used bytouch()
)https://bugs.python.org/issue39895