Skip to content

Make IsalError exceptions picklable - #321

Merged
rhpvorderman merged 1 commit into
pycompression:developfrom
ptweezy:picklable-isalerror
Nov 6, 2026
Merged

rhpvorderman merged 1 commit into
pycompression:developfrom
ptweezy:picklable-isalerror

Conversation

@ptweezy

@ptweezy ptweezy commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

An isal_zlib.error raised in a multiprocessing or concurrent.futures worker process does not reach the parent process, because pickling it raises PicklingError. For example, cutadapt -j 2 on a gzip file with invalid deflate data waits forever without an error message. src/isal/igzip_libmodule.c creates the class as igzip_lib.IsalError, and no module named igzip_lib exists. This PR uses isal.igzip_lib.IsalError, the name tracebacks now show, and adds test_failure_pickle to tests/test_igzip_lib.py, which fails on develop. PR #318 still uses the old name.

Checklist

  • Pull request details were added to CHANGELOG.rst
  • Documentation was updated (if needed)

The class was created as "igzip_lib.IsalError", so pickle looked for it
in a module named igzip_lib, which does not exist. An error raised in a
worker process could not be sent to the parent process.
@rhpvorderman

Copy link
Copy Markdown
Collaborator

Great find. Thanks!

@rhpvorderman
rhpvorderman merged commit d0f9218 into pycompression:develop Nov 6, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants