GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-39895: Move `pathlib.Path.touch()` implementation into the path accessor by barneygale · Pull Request #18838 · python/cpython

Conversation

@barneygale

@barneygale barneygale commented Mar 8, 2020 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Mar 8, 2020
@the-knights-who-say-ni

the-knights-who-say-ni commented Mar 8, 2020

Copy link
Copy Markdown

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 Missing

Our records indicate the following people have not signed the CLA:

@barneygale

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
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting review label Mar 8, 2020
@the-knights-who-say-ni the-knights-who-say-ni added CLA signed and removed CLA not signed labels Mar 9, 2020
@barneygale

barneygale commented Mar 9, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pitrou pitrou added the skip news label Apr 17, 2020
pitrou
pitrou approved these changes Apr 17, 2020
View reviewed changes

@pitrou pitrou left a comment

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Apr 17, 2020
@barneygale
barneygale force-pushed the bpo-39895-pathlib-accessor-touch branch from 767e7c3 to 3b001d4 Compare May 29, 2020 01:00
@barneygale

barneygale commented May 29, 2020

Copy link
Copy Markdown
Contributor Author

Rebased

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@barneygale
bpo-39895: Move pathlib.Path.touch() implementation into the path a…
17e3af2
…ccessor.
@barneygale
barneygale force-pushed the bpo-39895-pathlib-accessor-touch branch from 3b001d4 to 17e3af2 Compare January 22, 2021 00:21
@barneygale

barneygale commented Jan 22, 2021

Copy link
Copy Markdown
Contributor Author

@pitrou can this be merged? Thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba
zooba merged commit 986da8e into python:master Apr 7, 2021
@bedevere-bot bedevere-bot removed the awaiting merge label Apr 7, 2021
@barneygale barneygale mentioned this pull request Apr 7, 2021
bpo-40107: stop using os.open() to implement pathlib.Path.open() #25240
Merged
@alexdelorenzo alexdelorenzo mentioned this pull request Apr 16, 2021
Python 3.10 alpha 7 introduces new changes to pathlib alexdelorenzo/aiopath#4
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pitrou pitrou pitrou approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@barneygale @the-knights-who-say-ni @pitrou @zooba @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.