From 90780ec3bc1f3fbb6aa8ff9cd4597da67feebb5a Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 8 Mar 2023 17:11:41 -0800 Subject: [PATCH] DROPME - temporarily upgrade to numpy-1.24.2 Temporarily upgrade to numpy-1.24.2 to enable CI testing of #5991. Restrict CI-tests to Python 3.8 only which permits installation of numpy-1.24.2 and numba. Note numba is not yet compatible with numpy-1.24 and its import raises SystemError exception SystemError: initialization of _internal failed without raising an exception Here we also add intentionally failing CI check to ensure this commit is not accidentally merged to master. Please revert this commit before merging the pull-request. --- .github/workflows/ci.yml | 17 ++++++++++++++--- cirq-core/requirements.txt | 7 ++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fa47ee070f..bc96dd58c72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,7 +149,7 @@ jobs: name: Pytest Ubuntu strategy: matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10' ] + python-version: [ '3.8' ] runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -185,6 +185,17 @@ jobs: - name: Test dependencies with pip-compile run: | pip-compile --resolver=backtracking dev_tools/requirements/deps/cirq-all.txt -o- + numpy-1_24-guard: + name: Deliberate failure for numpy-1.24 + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Exit with error status + run: | + echo "This check fails to prevent merging of a temporary upgrade to numpy-1.24" + echo + echo "Please revert the commit which introduced this test." + exit 1 build_docs: name: Build docs runs-on: ubuntu-20.04 @@ -244,7 +255,7 @@ jobs: name: Pytest Windows strategy: matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10' ] + python-version: [ '3.8' ] runs-on: windows-2019 steps: - uses: actions/checkout@v2 @@ -269,7 +280,7 @@ jobs: name: Pytest MacOS strategy: matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10' ] + python-version: [ '3.8' ] runs-on: macos-12 steps: - uses: actions/checkout@v2 diff --git a/cirq-core/requirements.txt b/cirq-core/requirements.txt index e26eef68637..68763890fcf 100644 --- a/cirq-core/requirements.txt +++ b/cirq-core/requirements.txt @@ -6,7 +6,12 @@ backports.cached_property~=1.0.1; python_version < '3.8' duet~=0.2.7 matplotlib~=3.0 networkx~=2.4 -numpy>=1.16,<1.24 + +# Here we temporarily bump-up to numpy-1.24 for sake of CI testing +# TODO(#5991) - revert this change before merge +# numpy>=1.16,<1.24 +numpy==1.24.2 + pandas sortedcontainers~=2.0 scipy