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: Merge pathlib._abc into pathlib.types #130747

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Mar 1, 2025

There used to be a meaningful distinction between these modules: pathlib imported pathlib._abc but not pathlib.types, and so zero-cost type annotations could only be added to the latter. This is no longer the case (neither module is imported), so we move the ABCs as follows:

  • pathlib._abc.JoinablePath --> pathlib.types._JoinablePath
  • pathlib._abc.ReadablePath --> pathlib.types._ReadablePath
  • pathlib._abc.WritablePath --> pathlib.types._WritablePath

The pathlib._abc module is deleted.

There used to be a meaningful distinction between these modules: `pathlib`
imported `pathlib._abc` but not `pathlib.types`. This is no longer the
case (neither module is imported), so we move the ABCs as follows:

- `pathlib._abc.JoinablePath` --> `pathlib.types._JoinablePath`
- `pathlib._abc.ReadablePath` --> `pathlib.types._ReadablePath`
- `pathlib._abc.WritablePath` --> `pathlib.types._WritablePath`
@barneygale barneygale merged commit d0eb01c into python:main Mar 3, 2025
44 checks passed
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Ubuntu Shared 3.x (tier-1) has failed when building commit d0eb01c.

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/506/builds/10011) and take a look at the build logs.
  4. Check if the failure is related to this commit (d0eb01c) 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/506/builds/10011

Failed tests:

  • test.test_concurrent_futures.test_process_pool

Failed subtests:

  • test_force_shutdown_workers - test.test_concurrent_futures.test_process_pool.ProcessPoolSpawnProcessPoolExecutorTest.test_force_shutdown_workers
  • test_force_shutdown_workers - test.test_concurrent_futures.test_process_pool.ProcessPoolForkProcessPoolExecutorTest.test_force_shutdown_workers

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_importlib/metadata/fixtures.py", line 391, in _inner
    func(self, **args)
    ~~~~^^^^^^^^^^^^^^
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_concurrent_futures/test_process_pool.py", line 279, in test_force_shutdown_workers
    self.assertEqual(worker_process.exitcode, -signal.SIGTERM)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 255 != -15


Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_importlib/metadata/fixtures.py", line 391, in _inner
    func(self, **args)
    ~~~~^^^^^^^^^^^^^^
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_concurrent_futures/test_process_pool.py", line 281, in test_force_shutdown_workers
    self.assertEqual(worker_process.exitcode, -signal.SIGKILL)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 255 != -9

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