classification
Title: `pathlib.Path.touch()` calls `os.close()` without using accessor
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.10
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 2021-04-07 11:36 by steve.dower. 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
History
Date User Action Args
2021-04-07 11:36:08steve.dowersetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.10, - Python 3.9
2021-04-07 00:25:42steve.dowersetnosy: + steve.dower
messages: + msg390390
2020-03-08 04:01:28barneygalesetkeywords: + patch
stage: patch review
pull_requests: + pull_request18195
2020-03-08 03:52:39barneygalecreate