summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch
diff options
context:
space:
mode:
authorFrank de Brabander <debrabander@gmail.com>2024-07-26 15:01:35 +0200
committerKhem Raj <raj.khem@gmail.com>2024-07-26 09:51:39 -0700
commitbee8b9bbc48e5ee9a4b67aed09027e62143eb34c (patch)
tree3db63d1169ca941424a8787f7fca05c42577dbf3 /meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch
parent42a9f8f311a0131595dc9e8a119bffba436c0b16 (diff)
downloadmeta-openembedded-bee8b9bbc48e5ee9a4b67aed09027e62143eb34c.tar.gz
python3-pydantic-core: fix incompatible version
The recipe for pydantic currently is at version 2.7.2. This project specifies in its pyproject.toml that it depends on pydantic-core version 2.18.4. Because an older 2.16.3 version of pydantic-core was used now, a simple bit of code will break. from enum import Enum from pydantic import BaseModel class Color(str, Enum): RED = "RED" BLUE = "BLUE" class Car(BaseModel): color: Color print(Car(color=Color.RED)) This will upgrade the python3-pydantic-core recipe to make it compatible with python3-pydantic, so that the above snippet of code will no longer fail. Two patches are removed, these backports are now included in the upstream code. A new patch is added to set the required rust compiler from 1.76 to 1.75. Version 1.76 is not actually needed. File python3-pydantic-core-crates.inc is regenerated by running 'bitbake -c update_crates python3-pydantic-core'. The recipes RDEPENDS now includes python3-compression. The pydantic schema validator imports 'importlib.metadata' which wants to import 'zipfile'. The buildpaths QA check is skipped. This should be fixed at some point, but it was already failing before this change. Signed-off-by: Frank de Brabander <debrabander@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch')
-rw-r--r--meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch b/meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch
new file mode 100644
index 0000000000..c4e6f2f6ab
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pydantic-core/0001-Set-rust-version-from-1.76-to-1.75-in-Cargo.toml.patch
@@ -0,0 +1,29 @@
1From 6e1852228a2aa38cc76b9a968bba6b603efa5b28 Mon Sep 17 00:00:00 2001
2From: Frank de Brabander <debrabander@gmail.com>
3Date: Thu, 25 Jul 2024 13:50:44 +0200
4Subject: [PATCH] Set rust version from 1.76 to 1.75 in Cargo.toml
5
6Current openembedded-core uses 1.75 and this packages doesn't actually
7require a newer version.
8
9Upstream-Status: Inappropriate
10---
11 Cargo.toml | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/Cargo.toml b/Cargo.toml
15index 8f0ea44..10b277c 100644
16--- a/Cargo.toml
17+++ b/Cargo.toml
18@@ -24,7 +24,7 @@ include = [
19 "!tests/.pytest_cache",
20 "!*.so",
21 ]
22-rust-version = "1.76"
23+rust-version = "1.75"
24
25 [dependencies]
26 pyo3 = { version = "0.21.2", features = ["generate-import-lib", "num-bigint"] }
27--
282.39.2
29