cpython/Lib/zipfile
Jan Hicken 160758a574
gh-126565: Skip zipfile.Path.exists check in write mode (#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.
2024-11-10 09:57:24 -05:00
..
_path gh-126565: Skip zipfile.Path.exists check in write mode (#126576) 2024-11-10 09:57:24 -05:00
__init__.py gh-113977, gh-120754: Remove unbounded reads from zipfile (GH-122101) 2024-11-02 22:28:51 -07:00
__main__.py gh-112578: Fix RuntimeWarning when running zipfile (GH-112579) 2023-12-03 13:09:29 +02:00