-
Notifications
You must be signed in to change notification settings - Fork 30
Add Python 3.13 support and fix enum behavior difference #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #239 +/- ##
==========================================
+ Coverage 86.24% 87.58% +1.34%
==========================================
Files 26 28 +2
Lines 1076 1144 +68
==========================================
+ Hits 928 1002 +74
+ Misses 148 142 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I actually think we don't need to worry too much about simul-dropping — if you are on 3.10 you'll simply get a slightly older napari-animation, but it'll work. Right? |
|
I'm a bit confused about the state of things here. Everything is green and most comments are addressed (I still think we don't need a nested if with I think let's merge and then we make updates in follow-ups. Yes? |
|
@jni I added back 3.10 for pyside for linux and window (no mac since I couldn't get it to work). I also updated the ci to output in the run name to have the qt_package displayed. Let me go back (now that CI is green) and check the nested guard that you mention. Honestly, I spent most of my time fighting with tox and CI, as they were not as explicit as I would have expected. Thankfully, @psobolewskiPhD had the fail-fast toggled to false in his PR which ultimately unblocked me. |
|
@jni Removed the nested check and improved the naming of the guard variables. This should be ready to land. Thanks for the feedback. |
Addressed the suggestions made in the review.
|
I'm going to merge this and see if it gets picked up by the new napari-hub. |
|
Just a quick note: we really shouldn't drop py310 in this repo, because it will make it incompatible with pyside2. For the time being, we need to keep that for the bundle, until we move everything over to pyside6. |
|
@psobolewskiPhD the old version of napari-animation would still be available for the bundle if the bundle was on 3.10! But it's actually on 3.11! |
|
Oh right conda-forge has somewhat newer packages! |
|
I only dropped 3.10 for mac and pyside. It should be available on other platforms. @psobolewskiPhD |
Closes #237. This PR adds Python 3.13 support.
Co-authored with @psobolewskiPhD using #240 code changes for CI.
Key Changes
napari_animation/_enum_compat.py):- Python 3.13 introduced stricter enum handling requiring
enum.member()wrapper for callable values- Created compatibility layer that detects Python version and conditionally wraps enum values
- Updated Easing and Interpolation enums to use this wrapper
- Added Python 3.13 to test matrix
- Updated GitHub Actions from v4 to v5
- Black updated to v25.1.0 with py313 target
- Added skip-string-normalization to preserve quote styles
- Fixed ruff linting and Black formatting issues
- Added comprehensive enum compatibility tests
- Updated mocking for Python 3.10 compatibility
The changes ensure napari-animation works seamlessly across Python 3.10-3.13 while maintaining backward compatibility.