Skip to content

Remove deprecated dt.weekofyear and dt.week accessors - #11742

Merged
headtr1ck merged 3 commits into
pydata:mainfrom
mohansree14:remove-dt-weekofyear
Oct 19, 2026
Merged

headtr1ck merged 3 commits into
pydata:mainfrom
mohansree14:remove-dt-weekofyear

Conversation

@mohansree14

@mohansree14 mohansree14 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Removes the DataArray.dt.weekofyear and DataArray.dt.week accessors. They have raised a FutureWarning since v0.16.2 (#4534). Users should call .dt.isocalendar().week instead.

This is one of the items in the "Top 10" checklist in #11721.

  • Removed both properties from DatetimeAccessor.
  • Removed the unused "weekofyear" entry from _DATETIMEINDEX_COMPONENTS.
  • Removed both from doc/api/deprecated.rst and doc/api-hidden.rst.
  • Removed the week/weekofyear special cases from test_field_access and test_dask_field_access. isocalendar().week keeps its coverage in test_isocalendar and test_isocalendar_dask.

Checklist

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude Code

[This is Claude Code on behalf of Mohansree Vijayakumar]

@headtr1ck headtr1ck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx!

@headtr1ck

Copy link
Copy Markdown
Collaborator

Would you mind checking the AI box in the PR description?

@headtr1ck
headtr1ck enabled auto-merge (squash) October 18, 2026 18:08
@headtr1ck
headtr1ck merged commit a39f47f into pydata:main Oct 19, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants