summaryrefslogtreecommitdiff
path: root/.readthedocs.yml
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-01-31 07:59:07 +0100
committerGitHub <noreply@github.com>2024-01-31 07:59:07 +0100
commit517dac6ff84df742e85590e53785daaeed792913 (patch)
treef28d19a6bb8633e08f9b86d844dc308b494be31a /.readthedocs.yml
parent376653ec3dd81adae058643f22a91f02a4661818 (diff)
downloadspack-517dac6ff84df742e85590e53785daaeed792913.tar.gz
spack-517dac6ff84df742e85590e53785daaeed792913.tar.bz2
spack-517dac6ff84df742e85590e53785daaeed792913.tar.xz
spack-517dac6ff84df742e85590e53785daaeed792913.zip
compression.py: refactor + bug fix (#42367)
Improve naming, so it's clear file "extensions" are not taken in the `PurePath(path).suffix` sense as the original function name suggests, but rather that the files are opened and their magic bytes are classified. Add type hints. Fix a bug where `stream.read(num_bytes)` was run on the compressed stream instead of the uncompressed stream, which can potentially break detection of tar.bz2 files. Ensure that when peeking into streams for magic bytes, they are reset to their original position upon return. Use new API in `spack logs`.
Diffstat (limited to '.readthedocs.yml')
0 files changed, 0 insertions, 0 deletions