From 39b3aed5f385c9474f7e7bc7da08f9cd4db220bb Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Tue, 7 Apr 2026 22:24:57 +0300 Subject: [PATCH] fix(ci): hybrid pip download - single call for cross-platform deps The per-dep loop regressed pydantic/pydantic-core compatibility: each dep resolves transitive versions independently, so 'pydantic' brings core 2.41.5 while 'pydantic-settings' brings core 2.45.0, and the later wheel overwrites the earlier during site-packages unzip, producing: SystemError: pydantic-core 2.45.0 is incompatible with pydantic, which requires 2.41.5 Fix: single pip-download call for CORE_DEPS + VIS_DEPS so pip resolves compatible transitive versions. Keep the per-dep loop with --pre only for WIN_DEPS, where each dep needs its own platform/non-platform fallback and winsdk requires --pre for its beta wheels. --- build-dist-windows.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/build-dist-windows.sh b/build-dist-windows.sh index 08a4671..e6b3e5d 100644 --- a/build-dist-windows.sh +++ b/build-dist-windows.sh @@ -67,12 +67,19 @@ VIS_DEPS=( "numpy>=1.24.0,<2.0" ) -ALL_DEPS=("${CORE_DEPS[@]}" "${WIN_DEPS[@]}" "${VIS_DEPS[@]}") +# Resolve core + visualizer deps in a SINGLE call so pip picks compatible +# transitive versions (notably pydantic/pydantic-core must match). +# Per-dep loops resolve each dep independently and can leave mismatched +# transitive versions that overwrite each other in the site-packages unzip. +CROSS_DEPS=("${CORE_DEPS[@]}" "${VIS_DEPS[@]}") +pip download --quiet --no-cache-dir --dest "$WHEEL_DIR" \ + --platform win_amd64 --python-version "${PYTHON_SHORT}" \ + --implementation cp --only-binary :all: \ + "${CROSS_DEPS[@]}" -# Per-dep loop with --pre (winsdk only ships beta wheels, e.g. 1.0.0b10). -# Single-call resolution fails when one Windows-only dep can't resolve in -# the Linux fallback branch, so we resolve each dep independently. -for dep in "${ALL_DEPS[@]}"; do +# Windows-only deps in a loop with --pre: winsdk only ships beta wheels +# (1.0.0bNN) and each dep needs its own platform/non-platform fallback. +for dep in "${WIN_DEPS[@]}"; do pip download --pre --quiet --no-cache-dir --dest "$WHEEL_DIR" \ --platform win_amd64 --python-version "${PYTHON_SHORT}" \ --implementation cp --only-binary :all: \