Unverified Commit be5c4d49 authored by Robert Schütz's avatar Robert Schütz Committed by GitHub
Browse files

Merge pull request #287534 from dotlambda/python3Packages-pydantic_1

python3Packages: don't use pydantic_1
parents cc2cfef6 df833dab
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
{ 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 = [
+3 −2
Original line number Diff line number Diff line
@@ -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";
  };
}
+3 −2
Original line number Diff line number Diff line
@@ -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
+3 −7
Original line number Diff line number Diff line
@@ -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";
  };
}
+11 −4
Original line number Diff line number Diff line
@@ -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
  ];