Skip to content

Refresh zipfile.Path from zipp 4.1.2 #160104

Open

Description

@jaraco

Feature or enhancement

zipfile.Path is developed primarily as zipp
and synced downstream into the stdlib, per the development
methodology
.
It was last synced from zipp 3.23 in gh-135276. This issue tracks the refresh
to zipp 4.1.2.

Three behavior changes are in scope:

  • Path.iterdir() raises NotADirectoryError instead of ValueError when
    the path is not a directory (Raise NotADirectoryError from Path.iterdir jaraco/zipp#154, released in zipp 4.1.0). This is
    a breaking change — NotADirectoryError is an OSError, not a ValueError,
    so callers catching ValueError are affected. Main only; no backport.
  • glob() and rglob() character classes follow shell semantics
    (Fix negated glob character classes jaraco/zipp#162, released in zipp 4.1.1): a leading ! negates, ^ is a
    literal, and neither matches a path separator. Previously the character set
    was passed through to the regex engine unchanged, so [!a] and [^a] were
    both treated as regex negation and could match separators.
  • The workaround for the stacklevel bug in PyPy < 7.3.19 is removed
    (Stop working around bug in PyPy < 7.3.18 jaraco/zipp#149, released in zipp 4.0.0).

The remaining changes are test and lint cleanups that keep the two trees
byte-identical.

The str() fix also included in zipp 3.23.1 is being handled separately as a
backportable bugfix in gh-100609, and this refresh will build on it.

Linked PRs

Activity

  1. added
    type-featureA feature request or enhancement
    stdlibStandard Library Python modules in the Lib/ directory
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions