Repository navigation
fix: Restore imagecodecs.jxr_decode alias for czifile <= 2019.7.2.2 - #1515
Conversation
Reviewer's GuideImplementationRestore the missing JPEG XR compatibility alias for older czifile versions before importing czifile, preventing import failures with newer imagecodecs.
DocumentationAdd the 0.17.2 release notes documenting the czifile compatibility fix.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
czifile 2019.7.2.2 (the newest release available on conda-forge for Python < 3.12) calls the deprecated `imagecodecs.jxr_decode` alias at import time. That alias was removed in imagecodecs 2026.3.6, so `import PartSegImage` fails. Restore the alias (it pointed to `jpegxr_decode`) before importing czifile.
1ce8a3b to
d210a86
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1515 +/- ##
===========================================
- Coverage 92.63% 92.61% -0.02%
===========================================
Files 211 211
Lines 33247 33248 +1
===========================================
- Hits 30797 30793 -4
- Misses 2450 2455 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Summary
The conda-forge build of PartSeg 0.17.1 (conda-forge/partseg-feedstock#27) fails at
import PartSegImage:On Python 3.11, conda-forge only has czifile 2019.7.2.2, because every newer release requires Python >= 3.12. czifile 2019.7.2.3, which fixes this, is only on PyPI. czifile 2019.7.2.2 uses the deprecated
imagecodecs.jxr_decodealias, and imagecodecs 2026.3.6 removed that alias from its_COMPATIBILITYtable. Project CI doesn't catch this because it installs from PyPI: Python 3.11 gets czifile 2019.7.2.3, and Python 3.10 gets imagecodecs 2025.3.30, which still has the alias.This PR restores
imagecodecs.jxr_decode = imagecodecs.jpegxr_decodebeforeczifileis imported. It only does so when czifile < 2019.7.2.3, the alias is missing, andjpegxr_decodeis available.Test plan
czifile==2019.7.2.2andimagecodecs==2026.3.6. With the fix, the import works andDECOMPRESS[4] is imagecodecs.jpegxr_decode.Summary by Sourcery
Allow older czifile releases to import successfully with newer imagecodecs versions.
Bug Fixes:
jxr_decodealias.Chores:
Summary by CodeRabbit