3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #287534 from dotlambda/python3Packages-pydantic_1

python3Packages: don't use pydantic_1
This commit is contained in:
Robert Schütz 2024-02-13 21:10:03 +00:00 committed by GitHub
commit be5c4d491e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 17 deletions

View file

@ -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 = [

View file

@ -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";
};
}

View file

@ -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

View file

@ -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";
};
}

View file

@ -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
];