Skip to content

REF: stop DatetimeArray methods from reading self.freq#65209

Merged
mroeschke merged 4 commits intopandas-dev:mainfrom
jbrockmendel:ref-array-no-freq-5
Apr 14, 2026
Merged

REF: stop DatetimeArray methods from reading self.freq#65209
mroeschke merged 4 commits intopandas-dev:mainfrom
jbrockmendel:ref-array-no-freq-5

Conversation

@jbrockmendel
Copy link
Copy Markdown
Member

Summary

  • DatetimeArray methods (tz_convert, tz_localize, normalize, to_period, is_month_start/end, is_quarter_start/end, is_year_start/end) no longer read self.freq for computation
  • Freq management for these methods is handled by DatetimeIndex overrides
  • Part of GH#24566 (moving freq from DTA/TDA arrays to Index)

Test plan

  • pytest pandas/tests/indexes/datetimes/ -x -q (3558 passed)
  • pytest pandas/tests/series/accessors/test_dt_accessor.py -x -q (315 passed)
  • pre-commit checks pass
  • mypy clean (no new errors)

🤖 Generated with Claude Code

@jbrockmendel jbrockmendel added the Refactor Internal refactoring of code label Apr 13, 2026
jbrockmendel and others added 3 commits April 13, 2026 15:26
Array methods (tz_convert, tz_localize, normalize, to_period,
is_month_start/end, is_quarter_start/end, is_year_start/end)
no longer read self.freq. Freq management is handled by
DatetimeIndex overrides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…date test expectation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mroeschke mroeschke added this to the 3.1 milestone Apr 14, 2026
@mroeschke mroeschke merged commit b7be5a4 into pandas-dev:main Apr 14, 2026
45 checks passed
@mroeschke
Copy link
Copy Markdown
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-array-no-freq-5 branch April 14, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Internal refactoring of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants