From cebe2c422b0798a50224a92238ecc578f3423ed0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 Jan 2023 10:12:27 +0100 Subject: [PATCH 1/5] python310Packages.qcs-api-client: add changelog to meta --- pkgs/development/python-modules/qcs-api-client/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/qcs-api-client/default.nix b/pkgs/development/python-modules/qcs-api-client/default.nix index 74b688c232f4..bd1cb25b1868 100644 --- a/pkgs/development/python-modules/qcs-api-client/default.nix +++ b/pkgs/development/python-modules/qcs-api-client/default.nix @@ -88,6 +88,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for accessing the Rigetti QCS API"; homepage = "https://qcs-api-client-python.readthedocs.io/"; + changelog = "https://github.com/rigetti/qcs-api-client-python/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; }; From 208f0fc6ab2844d748b3779e435a6c74361ecc94 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 Jan 2023 10:20:23 +0100 Subject: [PATCH 2/5] python310Packages.qcs-api-client: 0.21.2 -> 0.21.3 Diff: https://github.com/rigetti/qcs-api-client-python/compare/refs/tags/v0.21.2...v0.21.3 Changelog: https://github.com/rigetti/qcs-api-client-python/releases/tag/v0.21.3 --- .../python-modules/qcs-api-client/default.nix | 29 ++++++------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/qcs-api-client/default.nix b/pkgs/development/python-modules/qcs-api-client/default.nix index bd1cb25b1868..f8886e344c57 100644 --- a/pkgs/development/python-modules/qcs-api-client/default.nix +++ b/pkgs/development/python-modules/qcs-api-client/default.nix @@ -10,6 +10,7 @@ , pyjwt , pytest-asyncio , pytestCheckHook +, pythonRelaxDepsHook , python-dateutil , pythonOlder , respx @@ -20,7 +21,7 @@ buildPythonPackage rec { pname = "qcs-api-client"; - version = "0.21.2"; + version = "0.21.3"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -29,11 +30,17 @@ buildPythonPackage rec { owner = "rigetti"; repo = "qcs-api-client-python"; rev = "refs/tags/v${version}"; - hash = "sha256-gQow1bNRPhUm4zRu2T5FpcgOTcS2F1TQIz8WP1K0Xww="; + hash = "sha256-GEsCyqawLX6fTICjAOOREsO5FsmV6U/5+sDOW1v+VKE="; }; + pythonRelaxDeps = [ + "attrs" + "httpx" + ]; + nativeBuildInputs = [ poetry-core + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -63,24 +70,6 @@ buildPythonPackage rec { }) ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'attrs = "^20.1.0"' 'attrs = "*"' \ - --replace 'httpx = "^0.15.0"' 'httpx = "*"' \ - --replace 'iso8601 = "^0.1.13"' 'iso8601 = "*"' \ - --replace 'pydantic = "^1.7.2"' 'pydantic = "*"' \ - --replace 'pyjwt = "^1.7.1"' 'pyjwt = "*"' - ''; - - disabledTestPaths = [ - # Test is outdated - "tests/test_client/test_additional_properties.py" - "tests/test_client/test_auth.py" - "tests/test_client/test_client.py" - "tests/test_client/test_datetime.py" - "tests/test_imports.py" - ]; - pythonImportsCheck = [ "qcs_api_client" ]; From c8e138a344b947599c6c4f59b927e001c2f75cb8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 Jan 2023 10:48:24 +0100 Subject: [PATCH 3/5] python310Packages.pyquil: add chagnelog to meta --- pkgs/development/python-modules/pyquil/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pyquil/default.nix b/pkgs/development/python-modules/pyquil/default.nix index 00351c5dc516..207a19918c47 100644 --- a/pkgs/development/python-modules/pyquil/default.nix +++ b/pkgs/development/python-modules/pyquil/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "rigetti"; repo = pname; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-Ur7dRxmnaAWXHk7c6NC3lBw59RRgh9vwAHFW00fViD4="; }; @@ -102,6 +102,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for creating Quantum Instruction Language (Quil) programs"; homepage = "https://github.com/rigetti/pyquil"; + changelog = "https://github.com/rigetti/pyquil/blob/v${version}/CHANGELOG.md"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; }; From 37e48418ac791959659ce98196b8db09adc8b0cb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 29 Jan 2023 11:40:19 +0100 Subject: [PATCH 4/5] python311Packages.qcs-api-client: disable tests on Python 3.11 --- .../python-modules/qcs-api-client/default.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/qcs-api-client/default.nix b/pkgs/development/python-modules/qcs-api-client/default.nix index f8886e344c57..48b0e0ac7e04 100644 --- a/pkgs/development/python-modules/qcs-api-client/default.nix +++ b/pkgs/development/python-modules/qcs-api-client/default.nix @@ -10,9 +10,10 @@ , pyjwt , pytest-asyncio , pytestCheckHook -, pythonRelaxDepsHook , python-dateutil +, pythonAtLeast , pythonOlder +, pythonRelaxDepsHook , respx , retrying , rfc3339 @@ -33,6 +34,15 @@ buildPythonPackage rec { hash = "sha256-GEsCyqawLX6fTICjAOOREsO5FsmV6U/5+sDOW1v+VKE="; }; + patches = [ + # Switch to poetry-core, https://github.com/rigetti/qcs-api-client-python/pull/2 + (fetchpatch { + name = "switch-to-poetry-core.patch"; + url = "https://github.com/rigetti/qcs-api-client-python/commit/32f0b3c7070a65f4edf5b2552648d88435469e44.patch"; + hash = "sha256-mOc+Q/5cmwPziojtxeEMWWHSDvqvzZlNRbPtOSeTinQ="; + }) + ]; + pythonRelaxDeps = [ "attrs" "httpx" @@ -61,14 +71,8 @@ buildPythonPackage rec { respx ]; - patches = [ - # Switch to poetry-core, https://github.com/rigetti/qcs-api-client-python/pull/2 - (fetchpatch { - name = "switch-to-poetry-core.patch"; - url = "https://github.com/rigetti/qcs-api-client-python/commit/32f0b3c7070a65f4edf5b2552648d88435469e44.patch"; - hash = "sha256-mOc+Q/5cmwPziojtxeEMWWHSDvqvzZlNRbPtOSeTinQ="; - }) - ]; + # Tests are failing on Python 3.11, Fatal Python error: Aborted + doCheck = !(pythonAtLeast "3.11"); pythonImportsCheck = [ "qcs_api_client" From 996f448a1bf40948485bc451a6976036902a065c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 29 Jan 2023 11:42:47 +0100 Subject: [PATCH 5/5] python310Packages.pyquil: 3.3.2 -> 3.3.3 Diff: https://github.com/rigetti/pyquil/compare/refs/tags/v3.3.2...v3.3.3 Changelog: https://github.com/rigetti/pyquil/blob/v3.3.3/CHANGELOG.md --- .../python-modules/pyquil/default.nix | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/pyquil/default.nix b/pkgs/development/python-modules/pyquil/default.nix index 207a19918c47..72ba19f8a2e8 100644 --- a/pkgs/development/python-modules/pyquil/default.nix +++ b/pkgs/development/python-modules/pyquil/default.nix @@ -12,7 +12,9 @@ , pytest-httpx , pytest-mock , pytestCheckHook +, pythonAtLeast , pythonOlder +, pythonRelaxDepsHook , qcs-api-client , respx , retry @@ -24,7 +26,7 @@ buildPythonPackage rec { pname = "pyquil"; - version = "3.3.2"; + version = "3.3.3"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -33,11 +35,16 @@ buildPythonPackage rec { owner = "rigetti"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-Ur7dRxmnaAWXHk7c6NC3lBw59RRgh9vwAHFW00fViD4="; + hash = "sha256-jA6nYQSfdxd9FCTMQlYTe/EbV39vV0h9F9Fgf1M0+SY="; }; + pythonRelaxDeps = [ + "lark" + ]; + nativeBuildInputs = [ poetry-core + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -55,21 +62,18 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + pytestCheckHook + ]; + + checkInputs = [ pytest-asyncio pytest-freezegun pytest-httpx pytest-mock - pytestCheckHook respx ipython ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'lark = "^0.11.1"' 'lark = "*"' \ - --replace 'qcs-api-client = ">=0.8.1,<0.21.0"' 'qcs-api-client = "*"' - ''; - disabledTestPaths = [ # Tests require network access "test/e2e/" @@ -85,6 +89,8 @@ buildPythonPackage rec { "test/unit/test_reference_wavefunction.py" # Out-dated "test/unit/test_qpu_client.py" + "test/unit/test_qvm_client.py" + "test/unit/test_reference_density.py" ]; disabledTests = [