Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-128520: Divide pathlib ABCs into three classes #128523

Merged
merged 4 commits into from
Jan 11, 2025

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Jan 5, 2025

In the private pathlib ABCs, rename PurePathBase to JoinablePath, and split PathBase into ReadablePath and WritablePath. This improves the API fit for read-only virtual filesystems.

The split of PathBase entails a similar split of CopyWorker (implements copying) and the test cases in test_pathlib_abc.

In a later patch, we'll make WritablePath inherit directly from JoinablePath rather than ReadablePath, which will help with write-only filesystems. For a couple of reasons, this isn't quite possible yet.

In the private pathlib ABCs, rename `PurePathBase` to `JoinablePath`, and
split `PathBase` into `ReadablePath` and `WritablePath`. This improves the
API fit for read-only virtual filesystems.

The split of `PathBase` entails a similar split of `CopyWorker` (implements
copying) and the test cases in `test_pathlib_abc`. For a couple of reasons,
this isn't quite possible yet.

In a later patch, we'll make `WritablePath` inherit directly from
`JoinablePath` rather than `ReadablePath`.
@barneygale barneygale merged commit 22a4421 into python:main Jan 11, 2025
36 checks passed
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable Refleaks 3.x has failed when building commit 22a4421.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/123/builds/536) and take a look at the build logs.
  4. Check if the failure is related to this commit (22a4421) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/123/builds/536

Failed tests:

  • test.test_multiprocessing_forkserver.test_processes

Test leaking resources:

  • test_processes: memory blocks
  • test_processes: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 21, done.        
remote: Counting objects:   4% (1/21)        
remote: Counting objects:   9% (2/21)        
remote: Counting objects:  14% (3/21)        
remote: Counting objects:  19% (4/21)        
remote: Counting objects:  23% (5/21)        
remote: Counting objects:  28% (6/21)        
remote: Counting objects:  33% (7/21)        
remote: Counting objects:  38% (8/21)        
remote: Counting objects:  42% (9/21)        
remote: Counting objects:  47% (10/21)        
remote: Counting objects:  52% (11/21)        
remote: Counting objects:  57% (12/21)        
remote: Counting objects:  61% (13/21)        
remote: Counting objects:  66% (14/21)        
remote: Counting objects:  71% (15/21)        
remote: Counting objects:  76% (16/21)        
remote: Counting objects:  80% (17/21)        
remote: Counting objects:  85% (18/21)        
remote: Counting objects:  90% (19/21)        
remote: Counting objects:  95% (20/21)        
remote: Counting objects: 100% (21/21)        
remote: Counting objects: 100% (21/21), done.        
remote: Compressing objects:  10% (1/10)        
remote: Compressing objects:  20% (2/10)        
remote: Compressing objects:  30% (3/10)        
remote: Compressing objects:  40% (4/10)        
remote: Compressing objects:  50% (5/10)        
remote: Compressing objects:  60% (6/10)        
remote: Compressing objects:  70% (7/10)        
remote: Compressing objects:  80% (8/10)        
remote: Compressing objects:  90% (9/10)        
remote: Compressing objects: 100% (10/10)        
remote: Compressing objects: 100% (10/10), done.        
remote: Total 11 (delta 8), reused 3 (delta 1), pack-reused 0 (from 0)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to '22a442181d5f1ac496dac08e24fd852de404882f'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 22a442181d5 GH-128520: Divide pathlib ABCs into three classes (#128523)
Switched to and reset branch 'main'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2298: buildbottest] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants