Draft
Conversation
- 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>
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
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.