From 417ae54c16069b130cdcc1650efafa179b1efc1b Mon Sep 17 00:00:00 2001 From: Daniel Holth Date: Thu, 6 Jun 2024 09:59:01 -0400 Subject: [PATCH] Use force_zip64=True when directly creating .conda files (#249) * use force_zip64=True when directly creating .conda files * add news --- news/248-use-zip64 | 20 ++++++++++++++++++++ src/conda_package_handling/conda_fmt.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 news/248-use-zip64 diff --git a/news/248-use-zip64 b/news/248-use-zip64 new file mode 100644 index 00000000..66e63a2e --- /dev/null +++ b/news/248-use-zip64 @@ -0,0 +1,20 @@ +### Enhancements + +* + +### Bug fixes + +* Use force_zip64=True when directly creating .conda files. Allows >2GB + (compressed) size. (#248) + +### Deprecations + +* + +### Docs + +* + +### Other + +* diff --git a/src/conda_package_handling/conda_fmt.py b/src/conda_package_handling/conda_fmt.py index 7f374c66..8d7d025e 100644 --- a/src/conda_package_handling/conda_fmt.py +++ b/src/conda_package_handling/conda_fmt.py @@ -123,7 +123,7 @@ def tell(self): sizer.add(file, filter=utils.anonymize_tarinfo) size = sizer.fileobj.size # type: ignore - with conda_file.open(component, "w") as component_file: + with conda_file.open(component, "w", force_zip64=True) as component_file: # only one stream_writer() per compressor() must be in use at a time component_stream = compress.stream_writer( component_file, size=size, closefd=False