-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python311Packages.pydantic: 1.10.12 -> 2.3.0 #269633
Conversation
Should also help with |
Which is only broken because I introduced it before reverting pydantic back to 1.x. |
List of newly failing builds between master and this branch for Edit: Excluded builds that failed transitively.
|
Wondering if we want to provide |
for application? |
Looked at home-assistant and frigate, and it gets messy fast. I can upgrade frigate to 0.13.0rc6, but for home-assistant I don't think we can fix things without breaking something else. |
How many overrides would we need to fix home-assistant? |
Downgrade of aionotion and aiopurpleair, as well as fastapi, which for tests depends on commit 222c86ea948b8454314410f76ac05e64ea444e41 (HEAD -> pydantic2)
Author: Martin Weinelt <[email protected]>
Date: Tue Nov 28 19:49:23 2023 +0100
home-assistant: pin pydantic_1
and downgrade
- aionotion to 2023.05.5
- aiopurpleair 2022.12.1
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
index 8f5768fbd2c1..f682cfcf0492 100644
--- a/pkgs/servers/home-assistant/default.nix
+++ b/pkgs/servers/home-assistant/default.nix
@@ -50,6 +50,31 @@ let
};
});
+ aionotion = super.aionotion.overridePythonAttrs (old: rec {
+ version = "2023.05.5";
+ src = fetchFromGitHub {
+ owner = "bachya";
+ repo = "aionotion";
+ rev = "refs/tags/${version}";
+ hash = "sha256-/2sF8m5R8YXkP89bi5zR3h13r5LrFOl1OsixAcX0D4o=";
+ };
+ });
+
+ aiopurpleair = super.aiopurpleair.overridePythonAttrs (old: rec {
+ version = "2022.12.1";
+ src = fetchFromGitHub {
+ owner = "bachya";
+ repo = "aiopurpleair";
+ rev = "refs/tags/${version}";
+ hash = "sha256-YmJH4brWkTpgzyHwu9UnIWrY5qlDCmMtvF+KxQFXwfk=";
+ };
+ postPatch = ''
+ substituteInPlace pyproject.toml --replace \
+ '"setuptools >= 35.0.2", "wheel >= 0.29.0", "poetry>=0.12"' \
+ '"poetry-core"'
+ '';
+ });
+
aiowatttime = super.aiowatttime.overridePythonAttrs (oldAttrs: rec {
version = "0.1.1";
src = fetchFromGitHub {
@@ -201,6 +226,8 @@ let
};
});
+ pydantic = super.pydantic_1;
+
py-synologydsm-api = super.py-synologydsm-api.overridePythonAttrs (oldAttrs: rec {
version = "2.1.4";
src = fetchFromGitHub { |
I tried adding a conditional branch to fastapi for in case of pydantic override, and it might work. commit b27a86adf0c7c3b5e726cb2022214a9bf9a5f4d6
Author: natsukium <[email protected]>
Date: Tue Nov 28 22:33:12 2023 +0900
fixup! python311Packages.fastapi: add optional-dependencies for pydantic 2
diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix
index 3b4d31e59522..f311c9cc92e7 100644
--- a/pkgs/development/python-modules/fastapi/default.nix
+++ b/pkgs/development/python-modules/fastapi/default.nix
@@ -69,6 +69,7 @@ buildPythonPackage rec {
orjson
email-validator
uvicorn
+ ] ++ lib.optionals (lib.versionAtLeast pydantic.version "2") [
pydantic-settings
pydantic-extra-types
] ++ uvicorn.optional-dependencies.standard; |
@mweinelt Since aionotion and aiopurpleair are the packages whose main consumer is home-assistant, I have reverted the update. I applied a patch for v1 and v2 support instead. |
Frigate is fine. Will check on home-assistant in a bit.
😢 |
This comment was marked as outdated.
This comment was marked as outdated.
The last version to support pydantic 1.x.
@mweinelt It's ready to be merged into python-updates. |
Thank you for working that out! |
You can mark |
Description of changes
python311Packages.pydantic: 1.10.12 -> 2.3.0
Diff: pydantic/pydantic@refs/tags/v1.10.12...v2.3.0
Changelog: https://github.com/pydantic/pydantic/blob/v2.3.0/HISTORY.md
python311Packages.versioningit: 2.2.0 -> 2.2.1
Changelog: https://versioningit.readthedocs.io/en/latest/changelog.html
python311Packages.pydantic-settings: 2.0.3 -> 2.1.0
Diff: pydantic/pydantic-settings@v2.0.3...v2.1.0
python311Packages.fastapi: add optional-dependencies for pydantic 2
python311Packages.kanidm: 0.0.3 -> 0.0.3-unstable-2023-08-23
python311Packages.django-ninja: 0.22.2 -> 1.0.1
Diff: vitalik/django-ninja@v0.22.2...v1.0.1
Changelog: https://github.com/vitalik/django-ninja/releases/tag/v1.0.1
python311Packages.pythonfinder: 2.0.5 -> 2.0.6
Diff: sarugaku/pythonfinder@refs/tags/2.0.5...2.0.6
Changelog: https://github.com/sarugaku/pythonfinder/blob/v2.0.6/CHANGELOG.rst
stacs: pin pydantic<2
python311Packages.pyaussiebb: 0.0.18 -> 0.1.1
Diff: yaleman/pyaussiebb@refs/tags/v0.0.18...v0.1.1
Changelog: https://github.com/yaleman/pyaussiebb/blob/v0.1.1/CHANGELOG.md
python311Packages.demetriek: apply a pydantic>=2 compatible patch
python311Packages.aiopurpleair: 2022.12.1 -> 2023.10.0
Diff: bachya/aiopurpleair@refs/tags/2022.12.1...2023.10.0
Changelog: https://github.com/bachya/aiopurpleair/releases/tag/2023.10.0
python311Packages.aionotion: 2023.05.5 -> 2023.08.0
Diff: bachya/aionotion@2023.05.5...2023.08.0
Changelog: https://github.com/bachya/aionotion/releases/tag/2023.08.0
python311Packages.fastapi-mail: 1.3.1 -> 1.4.1
Diff: sabuhish/fastapi-mail@refs/tags/1.3.1...1.4.1
Changelog: https://github.com/sabuhish/fastapi-mail/releases/tag/1.4.1
python311Packages.rstcheck-core: 1.0.3 -> 1.2.0
Diff: rstcheck/rstcheck-core@refs/tags/v1.0.3...v1.2.0
Changelog: https://github.com/rstcheck/rstcheck-core/blob/v1.2.0/CHANGELOG.md
python311Packages.strawberry-graphql: fix test with pydantic>=2
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Priorities
Add a 👍 reaction to pull requests you find important.
Eval reports
https://gist.github.com/natsukium/3d7429de0b016cf07492f3561331d002
Known issue