From e05648d133500e57bea85092d4d08b7116df9ea6 Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Fri, 23 May 2025 12:47:39 +0200 Subject: [PATCH] package/python-pydantic-core: downgrade to 2.33.2 to sync with pydantic pydantic pins an exact version of pydantic-core in it's pyproject.toml [1]. This was missed during the last pydantic bump where pydantic-core was erroneously updated to the latest release instead, in commit [2] and [3]. Modify the pydantic runtime test to catch this error in the future. [1] https://github.com/pydantic/pydantic/blob/v2.11.4/pyproject.toml#L49 [2] https://gitlab.com/buildroot.org/buildroot/-/commit/e1c939e4269130fd0ef857c63a0f752f9e5c13ec [3] https://gitlab.com/buildroot.org/buildroot/-/commit/e42de820cd598d6ed7045fd4f06aa1429a359e05 Signed-off-by: Marcus Hoffmann [Julien: add reference to commits introducing the issue] Signed-off-by: Julien Olivain --- package/python-pydantic-core/python-pydantic-core.hash | 2 +- package/python-pydantic-core/python-pydantic-core.mk | 6 ++++-- support/testing/tests/package/sample_python_pydantic.py | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package/python-pydantic-core/python-pydantic-core.hash b/package/python-pydantic-core/python-pydantic-core.hash index ebfc50e508..735abcb4c6 100644 --- a/package/python-pydantic-core/python-pydantic-core.hash +++ b/package/python-pydantic-core/python-pydantic-core.hash @@ -1,4 +1,4 @@ # Locally calculated after vendoring -sha256 34e84faa734d981ca1f383844ac057434108e657667f115363abd93ac65486a6 python-pydantic-core-2.34.1-cargo4.tar.gz +sha256 d075c06f299090879748db99ab202a253e9a2b22ee4140b96c0257257b9351c8 python-pydantic-core-2.33.2-cargo4.tar.gz # Locally computed sha256 checksums sha256 2afdd30d54b4d62b6f488a6bcc1546e84ec5061f13f4209c03d012348783795a LICENSE diff --git a/package/python-pydantic-core/python-pydantic-core.mk b/package/python-pydantic-core/python-pydantic-core.mk index 48fd4960af..5085b906d5 100644 --- a/package/python-pydantic-core/python-pydantic-core.mk +++ b/package/python-pydantic-core/python-pydantic-core.mk @@ -4,10 +4,12 @@ # ################################################################################ -PYTHON_PYDANTIC_CORE_VERSION = 2.34.1 +# python-pydantic pins an exact version of pydantic-core in pyproject.toml, +# make sure to sync pydantic-core to this version when updating pydantic +PYTHON_PYDANTIC_CORE_VERSION = 2.33.2 PYTHON_PYDANTIC_CORE_SOURCE_PYPI = pydantic_core-$(PYTHON_PYDANTIC_CORE_VERSION).tar.gz PYTHON_PYDANTIC_CORE_SITE = $(PYTHON_PYDANTIC_CORE_SITE_PYPI)/$(PYTHON_PYDANTIC_CORE_SOURCE_PYPI)?buildroot-path=filename -PYTHON_PYDANTIC_CORE_SITE_PYPI = https://files.pythonhosted.org/packages/42/fa/5f682f3db14e14f7b5b7f5008ac24594b93943d1da4facbacff5876624cf +PYTHON_PYDANTIC_CORE_SITE_PYPI = https://files.pythonhosted.org/packages/ad/88/5f2260bdfae97aabf98f1778d43f69574390ad787afb646292a638c923d4 PYTHON_PYDANTIC_CORE_SETUP_TYPE = maturin PYTHON_PYDANTIC_CORE_LICENSE = MIT PYTHON_PYDANTIC_CORE_LICENSE_FILES = LICENSE diff --git a/support/testing/tests/package/sample_python_pydantic.py b/support/testing/tests/package/sample_python_pydantic.py index 4c22f5ede4..1c6e949211 100644 --- a/support/testing/tests/package/sample_python_pydantic.py +++ b/support/testing/tests/package/sample_python_pydantic.py @@ -1,6 +1,11 @@ from datetime import datetime from pydantic import BaseModel, PositiveInt +from pydantic.version import check_pydantic_core_version + +# pydantic pins an exact version of pydantic core +# verify these are in sync in buildroots packaging +assert check_pydantic_core_version() class User(BaseModel):