Skip to content

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

Open
mohansree14 wants to merge 2 commits into
pydata:mainfrom
mohansree14:remove-dt-weekofyear
Open

mohansree14 wants to merge 2 commits into
pydata:mainfrom
mohansree14:remove-dt-weekofyear

Conversation

@mohansree14

@mohansree14 mohansree14 commented Oct 15, 2026 •

Copy link
Copy Markdown

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]

This branch has not been deployed

No deployments
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.

1 participant