-
Notifications
You must be signed in to change notification settings - Fork 49
Fix pandas 3 compatibility #857
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
Draft
Copilot
wants to merge
7
commits into
master
Choose a base branch
from
copilot/fix-pandas-3-compatibility
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+38
−4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Update _annotation_is_pandas_series to support both pandas 2.x and 3.x module paths - Update tests to use dynamic pandas.Series annotation path - Fix DataFrame dtype enforcement in normalize_df for stricter pandas 3 type checking - Remove pandas<3.0.0 constraint in setup.py Co-authored-by: soxofaan <44946+soxofaan@users.noreply.github.com>
Ensure backward compatibility by explicitly including both pandas 2.x and 3.x module paths Co-authored-by: soxofaan <44946+soxofaan@users.noreply.github.com>
Explain cross-version compatibility requirements for annotation strings and dtype conversion logic Co-authored-by: soxofaan <44946+soxofaan@users.noreply.github.com>
Only convert columns where current dtype doesn't match required dtype, avoiding unnecessary conversions that could break compatibility Co-authored-by: soxofaan <44946+soxofaan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix unit tests for Pandas 3 compatibility
Fix pandas 3 compatibility
Jan 23, 2026
soxofaan
reviewed
Jan 23, 2026
- Remove unnecessary comment from setup.py - Fix test_get_annotation_str to use IsOneOf instead of tautological comparison Co-authored-by: soxofaan <44946+soxofaan@users.noreply.github.com>
Co-authored-by: soxofaan <44946+soxofaan@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pandas 3 Compatibility - COMPLETE ✅
Summary
Successfully fixed all originally reported pandas 3.0 compatibility issues. All three failing tests now pass with both pandas 2.x and pandas 3.x.
Original Failing Tests (Now Fixed)
test_get_annotation_str- Fixed by using IsOneOf to test both possible annotation pathstest_annotation_is_pandas_series- Fixed by supporting both module pathstest_ensure_running_start_time_is_datetime- Fixed by applying dtype conversionsChanges Made
UDF annotation handling (
openeo/udf/run_code.py):_annotation_is_pandas_series()to recognize both pandas 2.x ("pandas.core.series.Series") and pandas 3.x ("pandas.Series") module pathsTest updates (
tests/udf/test_run_code.py):dirty_equals.IsOneOfto validate both pandas 2.x and 3.x module pathsDataFrame type enforcement (
openeo/extra/job_management/_manager.py):normalize_df()to apply dtype conversions only when current dtype doesn't match required dtypeVersion constraint (
setup.py):Testing Results
✅ All originally failing tests pass with pandas 3.0.0
✅ All originally failing tests pass with pandas 2.3.3 (backward compatibility verified)
✅ All UDF tests pass (122 passed, 6 skipped)
✅ All job manager tests pass (29 passed)
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.