Issue 39895: `pathlib.Path.touch()` calls `os.close()` without using accessor - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barneygale, steve.dower
Priority: normal Keywords: patch

Created on 2020-03-08 03:52 by barneygale, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18838 merged barneygale, 2020-03-08 04:01
Messages (2)
msg363631 - (view) Author: Barney Gale (barneygale) * Date: 2020-03-08 03:52
`Path.touch()` does a lot of os-specific /stuff/ that should probably live in the accessor. Perhaps most importantly, is calls `os.close()` on whatever `accessor.open()` returns, which is problematic for those wishing to write their own accessor that doesn't work on a file descriptor level.
msg390390 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-04-07 00:25
New changeset 986da8effcd2e9e9334ae016928ef795fb93c373 by Barney Gale in branch 'master':
bpo-39895: Move `pathlib.Path.touch()` implementation into the path accessor. (GH-18838)
https://github.com/python/cpython/commit/986da8effcd2e9e9334ae016928ef795fb93c373