SIGN IN SIGN UP

GH-128520: pathlib ABCs: allow tests to be run externally (#131315)

Adjust the tests for the `pathlib.types` module so that they can be run
against the `pathlib-abc` PyPI package, which is a backport of the module
for older Python versions.

Specifically, we add a `.support.is_pypi` switch that is false in the
stdlib and true in the pathlib-abc package. This controls which package
we import, and whether or not we run tests against `PurePath` and `Path`.

For compatibility with older Python versions, we stop using
`zipfile.ZipFile.mkdir()` and `zipfile.ZipInfo._for_archive()`.
B
Barney Gale committed
cf9d1a4b6b28a76a49edba4028d5533195172287
Parent: 56d0f9a
Committed by GitHub <noreply@github.com> on 3/21/2025, 10:18:20 PM