Commit graph

6 commits

Author SHA1 Message Date
Miss Islington (bot)
5030e81ded
[3.12] gh-126565: Skip zipfile.Path.exists check in write mode (GH-126576) (#126643)
gh-126565: Skip `zipfile.Path.exists` check in write mode (GH-126576)

When `zipfile.Path.open` is called, the implementation will check
whether the path already exists in the ZIP file. However, this check is
only required when the ZIP file is in read mode. By swapping arguments
of the `and` operator, the short-circuiting will prevent the check from
being run in write mode.

This change will improve the performance of `open()`, because checking
whether a file exists is slow in write mode, especially when the archive
has many members.
(cherry picked from commit 160758a574)

Co-authored-by: Jan Hicken <janhicken@users.noreply.github.com>
2024-11-10 15:14:48 +00:00
Miss Islington (bot)
95b073bdde
[3.12] gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354) (#123411)
gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354)

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-09-02 09:19:40 -04:00
Jason R. Coombs
f511a939b0
[3.12] gh-122903: Honor directories in zipfile.Path.glob. (GH-122908) (#122927)
(cherry picked from commit 6aa35f3002)
2024-08-12 01:03:03 +00:00
Miss Islington (bot)
dcc5182f27
[3.12] gh-122905: Sanitize names in zipfile.Path. (GH-122906) (#122923) 2024-08-11 20:35:17 -04:00
Miss Islington (bot)
060f58d877
[3.12] gh-106752: Sync with zipp 3.16.2 (GH-106757) (#106777)
gh-106752: Sync with zipp 3.16.2 (GH-106757)

* gh-106752: Sync with zipp 3.16.2

* Add blurb
(cherry picked from commit 22980dc7c9)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2023-07-15 10:15:24 -04:00
Jason R. Coombs
30f62748e9
[3.12] gh-106752: Move zipfile._path into its own package (GH-106753) (#106755)
* gh-106752: Move zipfile._path into its own package so it may have supplementary behavior.

* Add blurb.
(cherry picked from commit 03185f0c15)
2023-07-14 21:11:13 +00:00