From 24ceaae5db24b7cd38a28dc27f657337a685ce01 Mon Sep 17 00:00:00 2001 From: Ryan Min Date: Mon, 26 Oct 2026 21:47:29 +0900 Subject: [PATCH] fix: pin pandas-market-calendars to the verified 5.4.0 release market_pipeline_lib.reference.sessions raises CalendarSourceDrift for any installed pandas-market-calendars other than XNYS_CALENDAR_LIBRARY_VERSION (5.4.0), but pyproject allowed >=5.4,<6. Since 5.5.0 was published on 2026-10-05, a fresh install (CI and the production image) resolves 5.5.0: 11 reference-catalog unit tests and 6 integration tests fail, and xnys_sessions() raises inside the built image. Pin the exact release the XNYS boundaries were verified against, with a note that the pin and the constant must move together. Verified on CPython 3.12.13: ruff, mypy, gate3 (1090 passed, coverage 89.10%), gate8 with Testcontainers PostgreSQL 16 + LocalStack (160 passed, 0 skipped), and the production image reports 5.4.0 and classifies 2024-11-27..30 correctly. Co-Authored-By: Claude Opus 5.5 --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2a8f3f8..e3ae4ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,9 @@ dependencies = [ "lxml>=6,<7", "numpy>=2,<3", "pandas>=3,<4", - "pandas-market-calendars>=5.4,<6", + # `market_pipeline_lib.reference.sessions` refuses any release but the one its XNYS + # boundaries were verified against (XNYS_CALENDAR_LIBRARY_VERSION). Bump both together. + "pandas-market-calendars==5.4.0", "psycopg[binary]>=3.2,<4", # Parquet contract fixtures include the producer version in their metadata. # Keep the writer exact so byte-for-byte determinism is portable across CI and local runs.