From 3c60f44d330d74e33141db89b5eefb0d278daf71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 9 Feb 2024 09:29:54 -0800 Subject: [PATCH 1/5] python311Packages.stravalib: don't pin pydantic --- pkgs/development/python-modules/stravalib/default.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/stravalib/default.nix b/pkgs/development/python-modules/stravalib/default.nix index a87f18b929e4..8f9898657b65 100644 --- a/pkgs/development/python-modules/stravalib/default.nix +++ b/pkgs/development/python-modules/stravalib/default.nix @@ -3,7 +3,7 @@ , buildPythonPackage , fetchFromGitHub , pint -, pydantic_1 # use pydantic 2 on next release +, pydantic , pythonOlder , pytz , requests @@ -26,11 +26,6 @@ buildPythonPackage rec { hash = "sha256-U+QlSrijvT77/m+yjhFxbcVTQe51J+PR4Kc8N+qG+wI="; }; - postPatch = '' - # Remove on next release - sed -i 's/pydantic==1.10.9/pydantic/' pyproject.toml - ''; - nativeBuildInputs = [ setuptools setuptools-scm @@ -39,7 +34,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ arrow pint - pydantic_1 + pydantic pytz requests responses @@ -58,5 +53,6 @@ buildPythonPackage rec { changelog = "https://github.com/stravalib/stravalib/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ sikmir ]; + broken = lib.versionAtLeast pydantic.version "2"; }; } From 4de8afef2385940828e9652222b4171b512b6169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 9 Feb 2024 09:32:51 -0800 Subject: [PATCH 2/5] python311Packages.qcs-api-client: don't pin pydantic --- pkgs/development/python-modules/qcs-api-client/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qcs-api-client/default.nix b/pkgs/development/python-modules/qcs-api-client/default.nix index 60ed1433794a..6b542b7d04f0 100644 --- a/pkgs/development/python-modules/qcs-api-client/default.nix +++ b/pkgs/development/python-modules/qcs-api-client/default.nix @@ -6,7 +6,7 @@ , httpx , iso8601 , poetry-core -, pydantic_1 +, pydantic , pyjwt , pytest-asyncio , pytestCheckHook @@ -47,6 +47,7 @@ buildPythonPackage rec { "attrs" "httpx" "iso8601" + "pydantic" ]; nativeBuildInputs = [ @@ -58,7 +59,7 @@ buildPythonPackage rec { attrs httpx iso8601 - pydantic_1 + pydantic pyjwt python-dateutil retrying From 72d13f6fdc5c51dc785155e8fec337289c5f7374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 9 Feb 2024 09:37:42 -0800 Subject: [PATCH 3/5] python311Packages.aioopenexchangerates: don't pin pydantic --- .../python-modules/aioopenexchangerates/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aioopenexchangerates/default.nix b/pkgs/development/python-modules/aioopenexchangerates/default.nix index 6f18127ed167..668274ff85df 100644 --- a/pkgs/development/python-modules/aioopenexchangerates/default.nix +++ b/pkgs/development/python-modules/aioopenexchangerates/default.nix @@ -1,13 +1,14 @@ { lib , aiohttp , aioresponses -, pydantic_1 +, pydantic , buildPythonPackage , fetchFromGitHub , poetry-core , pytest-aiohttp , pytestCheckHook , pythonOlder +, pythonRelaxDepsHook }: buildPythonPackage rec { @@ -31,11 +32,16 @@ buildPythonPackage rec { nativeBuildInputs = [ poetry-core + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "pydantic" ]; propagatedBuildInputs = [ aiohttp - pydantic_1 + pydantic ]; nativeCheckInputs = [ From 71c2705c9bb19fb1e47dc36e6cb64c178b74f949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 9 Feb 2024 21:57:56 -0800 Subject: [PATCH 4/5] python311Packages.pycfmodel: don't pin pydantic --- pkgs/development/python-modules/pycfmodel/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pycfmodel/default.nix b/pkgs/development/python-modules/pycfmodel/default.nix index cd847241f60c..e0d072684e26 100644 --- a/pkgs/development/python-modules/pycfmodel/default.nix +++ b/pkgs/development/python-modules/pycfmodel/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchFromGitHub , httpx -, pydantic_1 +, pydantic , pytestCheckHook , pythonOlder , setuptools @@ -27,7 +27,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - pydantic_1 + pydantic ]; nativeCheckInputs = [ @@ -54,5 +54,6 @@ buildPythonPackage rec { changelog = "https://github.com/Skyscanner/pycfmodel/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; + broken = versionAtLeast pydantic.version "2"; }; } From df833dab9cb1bbf03ac6921fe758473eaf2d6d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 9 Feb 2024 22:01:28 -0800 Subject: [PATCH 5/5] cfripper: pin pydantic_1 --- pkgs/tools/security/cfripper/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/security/cfripper/default.nix b/pkgs/tools/security/cfripper/default.nix index 5e13a2df14c8..c597f2e85602 100644 --- a/pkgs/tools/security/cfripper/default.nix +++ b/pkgs/tools/security/cfripper/default.nix @@ -3,7 +3,14 @@ , python3 }: -python3.pkgs.buildPythonApplication rec { + +let + python = python3.override { + packageOverrides = self: super: { + pydantic = self.pydantic_1; + }; + }; +in python.pkgs.buildPythonApplication rec { pname = "cfripper"; version = "1.15.3"; pyproject = true; @@ -20,11 +27,11 @@ python3.pkgs.buildPythonApplication rec { --replace "pluggy~=0.13.1" "pluggy" \ ''; - nativeBuildInputs = with python3.pkgs; [ + nativeBuildInputs = with python.pkgs; [ setuptools ]; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = with python.pkgs; [ boto3 cfn-flip click @@ -35,7 +42,7 @@ python3.pkgs.buildPythonApplication rec { setuptools ]; - nativeCheckInputs = with python3.pkgs; [ + nativeCheckInputs = with python.pkgs; [ moto pytestCheckHook ];