Title: bpo-39895: Move `pathlib.Path.touch()` implementation into the path accessor by barneygale · Pull Request #18838 · python/cpython · GitHub
Open Graph Title: bpo-39895: Move `pathlib.Path.touch()` implementation into the path accessor by barneygale · Pull Request #18838 · python/cpython
X Title: bpo-39895: Move `pathlib.Path.touch()` implementation into the path accessor by barneygale · Pull Request #18838 · python/cpython
Description: 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. This PR: Routes Path.touch() via the path's accessor, in conformity with most other Path methods. Adds an _NormalAccessor.touch() method Removes _NormalAccessor.utime() (which was only used by touch()) Removes Path._raw_open() (which was only used by touch()) https://bugs.python.org/issue39895
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/python/cpython/pull/18838
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:ef5e7abc-da71-3bcc-ab38-daade15e6605 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 881A:366DBA:9065DA:C16ED4:69697B8E |
| html-safe-nonce | 9fe4da8c09b9d0f3274704ead4b4e05198f2bd67b3b29bba6e4de76cf8143a07 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODFBOjM2NkRCQTo5MDY1REE6QzE2RUQ0OjY5Njk3QjhFIiwidmlzaXRvcl9pZCI6IjQ3ODg1MjczNzczMDM1NjcyNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e0e1c4972e2d47d8f1b6ce1a52a487f514033a7a58ef1af18398c11e2ea8c737 |
| hovercard-subject-tag | pull_request:385223143 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/18838/checks |
| twitter:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 48f380098b30acbb700b04f1724481ca10d574fc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width