[Python-checkins] Improve zip64 limit error message (#95892)

kumaraditya303 webhook-mailer at python.org
Wed Nov 30 06:14:47 EST 2022


https://github.com/python/cpython/commit/59665d0280c2299ea87e9af45cedc90656cb6f55
commit: 59665d0280c2299ea87e9af45cedc90656cb6f55
branch: main
author: dmjohnsson23 <dmjohn235 at gmail.com>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2022-11-30T16:44:41+05:30
summary:

Improve zip64 limit error message (#95892)

files:
M Lib/zipfile/__init__.py

diff --git a/Lib/zipfile/__init__.py b/Lib/zipfile/__init__.py
index 8f834267b28c..e1833dd1772d 100644
--- a/Lib/zipfile/__init__.py
+++ b/Lib/zipfile/__init__.py
@@ -1202,10 +1202,10 @@ def close(self):
                 if not self._zip64:
                     if self._file_size > ZIP64_LIMIT:
                         raise RuntimeError(
-                            'File size unexpectedly exceeded ZIP64 limit')
+                            'File size too large, try using force_zip64')
                     if self._compress_size > ZIP64_LIMIT:
                         raise RuntimeError(
-                            'Compressed size unexpectedly exceeded ZIP64 limit')
+                            'Compressed size too large, try using force_zip64')
                 # Seek backwards and write file header (which will now include
                 # correct CRC and file sizes)
 



More information about the Python-checkins mailing list