From 653a3c52d0e30cc7adb4559d890d177702b4caa1 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Le Borgne Date: Wed, 11 Nov 2026 23:04:48 +0000 Subject: [PATCH] [CI] Replace the pytest<9.2 cap with pytest-benchmark>=5.3.1 #12313 capped pytest below 9.2 in the cuda.cccl.examples lanes because pytest 9.2.0 removed the private Function._nodeid, which pytest-benchmark 5.3.0 read in its benchmark fixture (ionelmc/pytest-benchmark#321). pytest-benchmark 5.3.1 reads the public nodeid instead, so require it and let pytest float again, as the TODO asked. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN --- ci/util/python/run_examples_tests.sh | 4 ++-- ci/windows/run_examples_tests.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/util/python/run_examples_tests.sh b/ci/util/python/run_examples_tests.sh index 0726d408b55a..9764ef413117 100755 --- a/ci/util/python/run_examples_tests.sh +++ b/ci/util/python/run_examples_tests.sh @@ -30,8 +30,8 @@ if [[ "${ctk_flavor}" == "cu" ]]; then cupy_req="${cupy_req}[ctk]" fi -# TODO: drop "pytest<9.2" once pytest-benchmark supports pytest 9.2 (Function._nodeid removal, ionelmc/pytest-benchmark#321) -python -m pip install "${CUDA_CCCL_WHEEL_PATH}[test-${ctk_flavor}${cuda_major_version}]" "${cupy_req}" pytest-benchmark "pytest<9.2" +# pytest-benchmark < 5.3.1 fails with pytest >= 9.2 (Function._nodeid removal, ionelmc/pytest-benchmark#321) +python -m pip install "${CUDA_CCCL_WHEEL_PATH}[test-${ctk_flavor}${cuda_major_version}]" "${cupy_req}" "pytest-benchmark>=5.3.1" cd "${repo_root}/python/cuda_cccl/tests/" python -m pytest -n 6 test_examples.py diff --git a/ci/windows/run_examples_tests.ps1 b/ci/windows/run_examples_tests.ps1 index ed8a8311450d..39b766da4d2d 100644 --- a/ci/windows/run_examples_tests.ps1 +++ b/ci/windows/run_examples_tests.ps1 @@ -41,8 +41,8 @@ $repoRoot = Get-RepoRoot $wheelPath = Get-OnePathMatch -Path (Join-Path $repoRoot 'wheelhouse') -Pattern '^cuda_cccl-.*\.whl' -File # pytest-benchmark is for the host-benchmark smoke test below. -# TODO: drop "pytest<9.2" once pytest-benchmark supports pytest 9.2 (Function._nodeid removal, ionelmc/pytest-benchmark#321) -Invoke-Checked { & $python -m pip install -U pip "pytest<9.2" pytest-xdist pytest-benchmark } "Failed to install pytest / pytest-xdist / pytest-benchmark" +# pytest-benchmark < 5.3.1 fails with pytest >= 9.2 (Function._nodeid removal, ionelmc/pytest-benchmark#321) +Invoke-Checked { & $python -m pip install -U pip pytest pytest-xdist "pytest-benchmark>=5.3.1" } "Failed to install pytest / pytest-xdist / pytest-benchmark" # CuPy is required by the cuda.compute examples and is not part of the test extras. # It resolves curand/cublas/... through cuda-pathfinder at first use and nothing # else installs them, so request its own `ctk` extra on the pip-toolkit lanes.