Skip to content

Commit

Permalink
Add a comment why igzip_threaded.open's defer capability is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
rhpvorderman committed Oct 9, 2023
1 parent 6bdb778 commit 67fa7c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xopen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 67fa7c9

Please sign in to comment.