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 = [ 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"; }; } 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 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"; }; } 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 ];