4dn-dcic / pairix

1D/2D indexing and querying on bgzipped text file with a pair of genomic coordinates
MIT License
86 stars 14 forks source link

Avoid a Python 3.10 regression in iterating GzipFiles #71

Open stefanor opened 2 years ago

stefanor commented 2 years ago

Open the file with a context manager, so we're holding onto a reference to it, for the lifetime of the iteration.

This avoids hitting https://bugs.python.org/issue45475 which affects python3.10 3.10.0-4 in Debian.