Skip to content

Conversation

effigies
Copy link
Member

@effigies effigies commented Sep 13, 2022

Bug introduced in #1013 and reported in #1137. Added a test that fails with an unexpected error, and then updated _signature_matches_extension to not accept any sniff. (If the file was compressed, the sniff would be read from the uncompressed stream. If it wasn't compressed, the sniff would be empty.)

Some updates to make the same machinery work transparently for .zst.

Closes #1137.

@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Merging #1138 (fcd489b) into master (2838c06) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1138      +/-   ##
==========================================
- Coverage   91.80%   91.80%   -0.01%     
==========================================
  Files         101      101              
  Lines       12454    12453       -1     
  Branches     2433     2432       -1     
==========================================
- Hits        11434    11433       -1     
  Misses        693      693              
  Partials      327      327              
Impacted Files Coverage Δ
nibabel/filename_parser.py 92.04% <ø> (ø)
nibabel/filebasedimages.py 92.05% <100.00%> (ø)
nibabel/loadsave.py 84.49% <100.00%> (-0.12%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@effigies
Copy link
Member Author

@Sikerdebaard Would you care to try this branch out?

@Sikerdebaard
Copy link

This code works in my particular environment. The new unit test case also succeeds. Looks good to me. :)

Any idea in what version this fix will be merged? I've monkeypatched it for current versions, but I'd like to add a version check so that it doesn't monkeypatch starting at the fixed version.

@effigies
Copy link
Member Author

effigies commented Sep 14, 2022

The next release will be 5.0.0.

Thanks for looking it over and testing!

@effigies effigies merged commit feb2063 into nipy:master Sep 14, 2022
@effigies effigies deleted the fix/1137 branch September 14, 2022 11:17
@effigies effigies added this to the 5.0.0 milestone Jan 3, 2023
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