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

zipfile.Path.name uses inappropriate Windows semantics #123693

Closed
jaraco opened this issue Sep 4, 2024 · 1 comment
Closed

zipfile.Path.name uses inappropriate Windows semantics #123693

jaraco opened this issue Sep 4, 2024 · 1 comment
Labels
3.10 only security fixes OS-windows type-bug An unexpected behavior, bug, or error

Comments

@jaraco
Copy link
Member

jaraco commented Sep 4, 2024

Bug report

Bug description:

In #123426 (comment), we learned that Python 3.10 (only) ended up with a version of zipfile.Path that uses pathlib.Path (platform-variable) behavior for parsing the name. As a result, zipfiles with names like V: foo or foo\bar get incorrect names and are thus broken.

This issue was revealed by applying additional tests for GH-123270.

The issue was corrected incidentally in zipp 3.16.2 and Python 3.11. The issue does not affect Python 3.9.

CPython versions tested on:

3.10

Operating systems tested on:

Windows

Linked PRs

@jaraco jaraco added type-bug An unexpected behavior, bug, or error OS-windows 3.10 only security fixes labels Sep 4, 2024
jaraco added a commit to jaraco/cpython that referenced this issue Sep 4, 2024
…ePosixPath for platform-agnostic behavior.

Aligns with Python 3.9 and 3.11 behavor and fixes failing tests.
jaraco added a commit to jaraco/cpython that referenced this issue Sep 4, 2024
ambv pushed a commit that referenced this issue Sep 5, 2024
…file.Path.name. (#123694)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286)
(cherry picked from commit 17b77bb)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
@hugovk hugovk closed this as completed Sep 15, 2024
@hugovk
Copy link
Member

hugovk commented Sep 15, 2024

PR merged, closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants