GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — bpo-43012: remove `pathlib._Accessor` by barneygale · Pull Request #25701 · python/cpython Conversation
|
|
Note that a lot of my previous pathlib bugfixes were partly in preparation for making this diff look OK! I was hoping to highlight that I'm pretty sure the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Bravo! I didn't realize yesterday with #25699 that it was temp code. I had seen your commits and misunderstood. I thought somehow your intent was to add a class in between Path and PurePath which leveraged moving all cwd, resolve, open, touch, into the accessor. I had done some performance testing that move of cwd, resolve, open, touch into the accessor and noted that it resulted in a significant slow down doing so. I have to imagine that moving everything out will do the exact opposite and make all of these slow down go away and speed up all of the other functions that had used the accessor. That said, I'm just a guy out there who happens to be using pathlib, but I think this is brilliant. Myself, I had been wondering about changing the name of accessor to common (or something similar) having also seen Pitrou's comment to you, since it seemed like a vestigial abstraction. But I like taking it out entirely even better. Remove the cruft and make it faster - this seems like a win! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yep! And you'll note that the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm also planning to perform an optimization pass, as I think there's a few |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@pitrou I think you wrote this code originally - do you have the time/inclination to review? Thanks so much! @serhiy-storchaka As you improved the performance of globbing in bpo-26032, do you have any feedback on the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
0124153 to
599e253
Compare
Thanks very much. I've renamed it to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I'll wait for #26153 to land before rebasing. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
b0dcbd2 to
7a0882b
Compare
|
I've rebased this PR. I believe it's ready for core review! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7a0882b to
d07f465
Compare
|
I'm still keen to land this if possible. Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
b55c5e7 to
013ddc6
Compare
|
Please avoid force push for future PRs, they make reviewing less pleasant: https://devguide.python.org/pullrequest/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can you add a news entry? Can be just one line or two about removing an obsolete layer and preparing the terrain for upcoming enhancements. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I've added a news entry now. I used your wording as it seemed spot on to me! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
These aren't necessary, and may slow things down.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
To me this looks ready to merge. Is anyone else reviewing it?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you for the reviews, everyone. If you can spare the time to continue reviewing this PR series, the next one is at #31085. Thanks so much! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Python 3.11 removed pathlib._Accessor in python/cpython#25701. This broke our patch when it replaced a call to `os.getcwd()` with `Path.cwd()` in `Path.absolute()`. As a classmethod `Path.cwd()` receives the class as its implicit first argument meaning we can have 0 or 1 arguments.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.