Repository navigation
Fix nightly MultiIndex test failure and new test warnings - #11655
Merged
headtr1ck merged 4 commits intoOct 1, 2026
Merged
Conversation
pandas nightly raises a KeyError instead of an IndexError when the key is longer than the number of MultiIndex levels. Fixes pydata#11652 Co-authored-by: Claude <noreply@anthropic.com>
Pass missing linewidths to LineCollection as nan instead of masked values, which matplotlib converts with a "converting a masked element to nan" warning, and skip them in the legend. Ignore zarr's warning about experimental automatic shard shape inference in the test that uses shards="auto" on purpose. Co-authored-by: Claude <noreply@anthropic.com>
dcherian
approved these changes
Oct 1, 2026
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.
Description
Nightly failure (#11652):
TestPandasMultiIndex::test_selexpects anIndexErrorwhen the key has more entries than the MultiIndex has levels. pandas nightly (3.1.0.dev) now raisesKeyError: 'Key length (3) exceeds index depth (2)'there, while released pandas raises an (accidental)IndexError: list index out of range. The test now accepts both.New warnings (not present in CI a week ago):
UserWarning: Warning: converting a masked element to nan.from the newlinesplot tests (Add LineCollection plot #7173):_linepassed the masked linewidths fromcbook._combine_masksdirectly toLineCollection, which matplotlib converts to nan with a warning, both when drawing and inlegend_elements. Masked linewidths are now passed as nan explicitly, andlegend_elementsskips nan linewidths, so the legend is unchanged.ZarrUserWarning: Automatic shard shape inference is experimentalfromtest_write_regular_shards_still_works['auto'], which usesshards="auto"on purpose. The warning is now ignored for that case only.Checklist
AI Disclosure
Tools: Claude Code (Claude Opus 5.5)
[This is Claude Code on behalf of Michael Niklas]
🤖 Generated with Claude Code