Skip to content

test: ignore exchange_calendars' pandas 3.1 tz-values deprecation - #132

Merged
stefan-jansen merged 1 commit into
mainfrom
ci/exchange-calendars-pandas4-warning
Oct 8, 2026
Merged

stefan-jansen merged 1 commit into
mainfrom
ci/exchange-calendars-pandas4-warning

Conversation

@stefan-jansen

Copy link
Copy Markdown
Contributor

The Python 3.15 prerelease jobs install pandas 3.1.0rc0, which deprecates Series.values dropping timezone information (Pandas4Warning, a DeprecationWarning subclass). exchange_calendars' ExchangeCalendar.__init__ (exchange_calendar.py:403) still makes that call, so with filterwarnings = error every test that builds a calendar fails. This is why the prerelease checks and the Compatibility Gate fail on main and on #131.

  • Adds one ignore filter, matched on the exact warning message. pandas attributes the warning to pandas.core.series rather than the caller, so the message is what keeps it narrow.
  • Raises the warning-filter cap in test_quality_gates.py from 5 to 6.

Verified locally with pandas 3.1.0rc0: the full suite passes (2213 passed, 13 skipped). With the warning turned back into an error, all 20 failures trace through that one exchange_calendars line and none through ml4t code. The default environment also passes.

Remove the filter once an exchange_calendars release stops making the call.

🤖 Generated with Claude Code

pandas 3.1 deprecates Series.values dropping timezone information.
exchange_calendars' ExchangeCalendar.__init__ (exchange_calendar.py:403)
still does this, and with filterwarnings = error every test that builds a
calendar fails on the Python 3.15 prerelease jobs, which install pandas
3.1.0rc0. pandas attributes the warning to pandas.core.series, so the filter
is scoped by its exact message instead of the calling module. Under pandas
3.1.0rc0 all 20 occurrences in the suite come from that one exchange_calendars
line. The warning-filter cap moves from five to six to admit it.

Remove the filter once an exchange_calendars release stops calling
Series.values on tz-aware series.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 8, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@stefan-jansen
stefan-jansen merged commit ac19fed into main Oct 8, 2026
43 checks passed
@stefan-jansen
stefan-jansen deleted the ci/exchange-calendars-pandas4-warning branch October 8, 2026 21:05
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.

2 participants