GH-50579: [Python] Fix test_categorical_order_survives_roundtrip pandas 3.X deprecation#50608
Merged
Merged
Conversation
…p pandas 3.0.3 deprecation
Contributor
Author
rok
approved these changes
Jul 22, 2026
rok
left a comment
Member
There was a problem hiding this comment.
This is straightforward enough, thanks!
Member
|
@github-actions crossbow submit wheel-macos-monterey-cp311-cp311-* wheel-manylinux-2-28-cp311-cp311-* wheel-musllinux-1-2-cp311-cp311-arm64 wheel-windows-*-amd64 |
|
Revision: 73e1511 Submitted crossbow builds: ursacomputing/crossbow @ actions-726ee0454c |
Member
|
The failing wheel jobs are all due to simdjson work in progress. Merging! |
Member
|
Thanks for the quick fix @GujaLomsadze ! |
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.
Rationale for this change
Follow-up to #50543.
test_categorical_order_survives_roundtripconstructs apd.Categoricalwith value "a" not in categories["b","c","d"]. pandas 3.0.3raises a deprecation for out-of-category values, which #50543's filterwarnings
config now turns into an error - failing nightly wheels across platforms.
What changes are included in this PR?
Replace the out-of-category
"a"value with an explicitNone, preserving thetest's intent (ordered categorical with non-sorted categories survives a Parquet
roundtrip, ARROW-6302) plus a null.
Are these changes tested?
Yes. Reproduced the failure with pandas 3.0.3, confirmed the test passes after
the change; all categorical tests in the module pass.
Are there any user-facing changes?
No.
Closes #50579.