-
Notifications
You must be signed in to change notification settings - Fork 26
Add Python 3.14 support #401
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
- Add Python 3.14 to classifiers in setup.py - Add Python 3.14 to CI test matrix - Update dependency installation for Python 3.13+ to include 3.14 Fixes PolicyEngine#399 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #401 +/- ##
==========================================
+ Coverage 81.14% 81.88% +0.74%
==========================================
Files 197 198 +1
Lines 10228 10233 +5
Branches 1057 1038 -19
==========================================
+ Hits 8299 8379 +80
+ Misses 1640 1593 -47
+ Partials 289 261 -28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Status UpdatePython 3.14 was released on October 7, 2025. CI tests are currently failing because h5py doesn't have Python 3.14 wheels yet. Current Situation
Next StepsThis PR will remain in draft status until h5py 3.15 is released on PyPI. Once that happens, CI should pass and the PR can be marked ready for review. Tracking: h5py/h5py#2713 |
Update: h5py blocker resolved! 🎉The dependency blocker mentioned in the status update has been resolved:
This PR should be ready for a CI re-run to verify all tests pass. Once confirmed, it can be marked ready for review. |
|
While h5py 3.15.1 now supports Python 3.14, there's a critical bug that must be fixed first: Issue #407: The Example:
This is a blocker for Python 3.14 support - we cannot ship 3.14 until #407 is resolved. See also: PolicyEngine/policyengine-uk#1401 for the downstream impact on dividend tax calculations. |
Root Cause Investigation CompleteI've investigated the Python 3.14 compatibility issue (#407) and found the root cause: The ProblemThis is a NumPy bug, not a policyengine-core bug. NumPy's "temporary elision" optimization incorrectly identifies arrays as temporary on Python 3.14 due to the new
The FixUpgrade NumPy to 2.3.0+
Changes Needed for This PR
The h5py blocker is already resolved (3.15.1 supports 3.14). With numpy 2.3.5, Python 3.14 support should work correctly. |
|
Closing - the main Python 3.14 blocker (NumPy temporary elision bug) is now addressed in #409, and h5py 3.15.1 has Python 3.14 wheels available. |
Summary
This PR adds support for Python 3.14 to policyengine-core.
Changes
Test Plan
Related Issue
Fixes #399
🤖 Generated with Claude Code