From 67fa7c9bbbfcf41a009c35125338b7a49bdc4bb7 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Mon, 9 Oct 2023 08:55:33 +0200 Subject: [PATCH] Add a comment why igzip_threaded.open's defer capability is not used --- src/xopen/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xopen/__init__.py b/src/xopen/__init__.py index 151517c..66464a4 100644 --- a/src/xopen/__init__.py +++ b/src/xopen/__init__.py @@ -1048,6 +1048,8 @@ def _open_external_gzip_writer( def _open_gz(filename, mode: str, compresslevel, threads, **text_mode_kwargs): assert mode in ("rt", "rb", "wt", "wb", "at", "ab") + # With threads == 0 igzip_threaded defers to igzip.open, but that is not + # desirable as a reproducible header is required. if igzip_threaded and threads != 0: try: return igzip_threaded.open(