Skip to content

Conversation

@max-sixty
Copy link
Collaborator

Summary

  • Completes the deprecation cycle for Dataset.update() return value that was started in v0.17
  • The method now returns None instead of self, aligning with Python's standard dict.update() behavior

Changes

  • Modified Dataset.update() to return None instead of self
  • Updated docstring to remove return value documentation
  • Added breaking change entry to changelog

Closes #10167

Test plan

  • All existing tests pass without modification (they weren't using the return value)
  • Verified the method still updates the dataset in-place
  • Pre-commit checks pass
  • Type checking passes

🤖 Generated with Claude Code

- Dataset.update() now returns None instead of self
- Removes deprecation that was started in v0.17 and scheduled for removal in v0.21
- Updates documentation to remove return value information
- Aligns behavior with standard dict.update() which returns None

Closes pydata#10167
Co-authored-by: Stephan Hoyer <shoyer@google.com>
@max-sixty max-sixty enabled auto-merge (squash) September 8, 2025 01:48
@max-sixty max-sixty merged commit 6336ffb into pydata:main Sep 8, 2025
36 checks passed
@max-sixty max-sixty deleted the 10167 branch September 8, 2025 02:05
brianhenn pushed a commit to ai2cm/ace that referenced this pull request Oct 15, 2025
Update `ZonalPowerSpectrumComparison.get_dataset` to account for the
fact that `xarray.Dataset.update` now solely operates in place, rather
than operating in place and returning the updated `Dataset`
(pydata/xarray#10717).

Partially addresses #2188
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecation of Dataset.update() returning a dataset object

2 participants