-
-
Notifications
You must be signed in to change notification settings - Fork 363
Support Python 3.14 #2158
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
base: main
Are you sure you want to change the base?
Support Python 3.14 #2158
Conversation
Signed-off-by: Fridolin Glatter <[email protected]>
18a32e4 to
53af0fb
Compare
|
Some more investigation: it looks to me like https://github.com/unionai-oss/pandera/blob/main/pandera/api/function_dispatch.py#L20 is the only line adding functions to the |
The behavior under
typing-inspect was written several years ago when the introspection capabilities of the typing module itself were much worse. I haven't checked your code but it may be easier to drop use of typing-inspect and use typing directly. |
Signed-off-by: Fridolin Glatter <[email protected]>
9ecb7ec to
24e8762
Compare
|
Thanks for chiming in here :) |
|
Yes, replacing the rest will be a bit more work and refactoring. Not my decision whether that's worth doing, but in my opinion it's usually nice to minimize third-party dependencies. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2158 +/- ##
==========================================
- Coverage 94.28% 93.63% -0.65%
==========================================
Files 91 136 +45
Lines 7013 10821 +3808
==========================================
+ Hits 6612 10132 +3520
- Misses 401 689 +288 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Based on modelcontextprotocol/python-sdk#1451, I think the build issue on 3.14 may just be because of outdated Looks like I also need to update some tests to be compatible with Ibis 11.0. And I also accidentally committed without signing off, so I'll fix that. |
|
Thanks for contributing here :) and estimate they'll release wheels with 3.14 support in Q4. |
Ah, yes, I was looking at https://github.com/unionai-oss/pandera/actions/runs/18922471107/job/54022290027?pr=2158. The docs jobs are clearly failing due to Ray, but I assume it's not so bad to just exclude that from the 3.14 test. @cosmicBboy do you know why the |
Mainly to keep the uv dependency deterministic. We can definitely bump this to the latest uv version |
Signed-off-by: Deepyaman Datta <[email protected]>
4878e86 to
3aab68e
Compare
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
OK, let me try bumping it to see if it resolves the issue. I think can probably make the CI a bit more |
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
My bad, the failure was due to the pinned Pydantic version not supporting 3.14; can probably revert this later (might bump it in a separate PR). |
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
|
@cosmicBboy @FilipAisot Pretty much all of the remaining failures on 3.14 (on Ubuntu and OSX; not solving for Windows right now) look like they're related to an attributed that's expected to be there from The only other issue I see would be resolved once Pyogrio 0.12.0 is released on PyPI: https://github.com/geopandas/pyogrio/blob/e211838ed4978792eda7764c0790beb01c0110a8/CHANGES.md?plain=1#L28 |
Hi there :)
This week, Python 3.14 was released. So we've been trying to check if we can support it already in the packages we maintain.
One of these attempts is iiasa/ixmp4#209, which is now running into an error with pandera/pandas. This error is also described in pandas-dev/pandas#62711 (though not originally by me and the original description doesn't mention Python 3.14). It's just that the traceback seems very similar, so it might well be related.
Either way, this is an exemplary traceback I'm seeing (full logs can be found here):
Traceback
These tests work fine with Python 3.13 (in both cases, I'm using pandas 2.3.1 and pandera 0.25.0), but they fail with Python 3.14.
Looking at the code here, I'm assuming it could be
pandera/pandera/engines/engine.py
Line 149 in 48ba659
pandera/pandera/api/extensions.py
Line 81 in 48ba659
pandera/pandera/api/base/checks.py
Line 106 in 48ba659
dtype), but I'm not sure. It's just that thedtypein the first case is coming fromtyping.get_type_hints(), which wasn't officially changed in Python 3.14, but I know that e.g. pydantic had to adjust how they handle annotations in their metaclasses because of changes in 3.14. They now use the recommended new annotationlib for that, which might be necessary here, too.I'm hoping that running the CI tests on Python 3.14, which this PR achieves, will point in the right direction and will allow you to officially support Python 3.14 :)