Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
barneygale merged 3 commits intopython:mainfrombarneygale:is-pypi-switch
Mar 21, 2025

Conversation

barneygale
Copy link
Contributor

@barneygalebarneygale commentedMar 16, 2025
edited by bedevere-appbot
Loading

Adjust the tests for thepathlib.types module so that they can be run against thepathlib-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 againstPurePath andPath.

For compatibility with older Python versions, we stop usingzipfile.ZipFile.mkdir() andzipfile.ZipInfo._for_archive().

Adjust the tests for the `pathlib.types` module so that they can be runagainst the `pathlib-abc` PyPI package, which is a backport of the modulefor older Python versions.Specifically, we add a `.support.is_pypi` switch that is false in thestdlib and true in the pathlib-abc package. This controls which packagewe 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()`.
@barneygalebarneygaleenabled auto-merge (squash)March 21, 2025 21:54
@barneygalebarneygale merged commitcf9d1a4 intopython:mainMar 21, 2025
38 checks passed
seehwan pushed a commit to seehwan/cpython that referenced this pull requestApr 16, 2025
…on#131315)Adjust the tests for the `pathlib.types` module so that they can be runagainst the `pathlib-abc` PyPI package, which is a backport of the modulefor older Python versions.Specifically, we add a `.support.is_pypi` switch that is false in thestdlib and true in the pathlib-abc package. This controls which packagewe 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()`.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
skip newstestsTests in the Lib/test dirtopic-pathlib
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@barneygale

[8]ページ先頭

©2009-2025 Movatter.jp