Conversation
From the "small cleanups" list in pydata#11721: - Dataset.argmax() without dim warned about argmin (copy-paste), and both messages were missing a space before "since". - reset_encoding warned with a plain UserWarning and named the wrong version; use FutureWarning and 2023.10, when it actually shipped. - cftime_range's docstring cited the unreleased 2025.02.0. - decode_cf_variables installed a global "once" warnings filter for the decode_timedelta deprecation, which was finalized in pydata#11173. - TreeNode.lineage warned twice by calling the deprecated iter_lineage. Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
Closing as a duplicate of #11724, which was opened first. Sorry for the overlap! [This is Claude Code on behalf of Yagnik Trivedi] |
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
Fixes the "Small cleanups" item from the deprecation tracker in #11721:
Dataset.argmax()warning saidargmin(copy-paste fromargmin). Both messages were also missing a space, producing"no argument,since".reset_encodingwarned with a plainUserWarningand said "deprecated since 2023.11", but it shipped in v2023.10.0. It now usesFutureWarning, like the other deprecations, with the correct version. This is the only change that alters behaviour: filters onFutureWarningnow catch it, and filters onUserWarningno longer do.cftime_rangedocstring cited.. deprecated:: 2025.02.0, which was never released; it is now2025.03.0.decode_cf_variablescalledwarnings.filterwarnings("once", "decode_timedelta", FutureWarning)on every decode, permanently modifying the user's global warning filters. The deprecation it served was finalized in Finalize change in behavior ofdecode_timedelta=None#11173, so it is removed (along with the now-unusedimport warnings).TreeNode.lineagewarned twice, because it returnedself.iter_lineage(), which is itself deprecated. It now builds the tuple directly.Tests: one regression test per behavioural fix (
reset_encodingon Dataset/DataArray/Variable, the argmin/argmax message,lineagewarning exactly once,decode_cfleavingwarnings.filtersunchanged). All 9 fail onmainand pass here. The full test suite passes locally apart from tests needing scipy/pyarrow, which aren't installed in my environment and fail identically onmain.Checklist
whats-new.rstAI Disclosure
Tools: Claude Code (Claude Opus 5.5). I chose this item from Tracking: open deprecations #11721; the agent located each issue, wrote the fixes and tests, and wrote this description at my direction.