浏览代码

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 <buildroot@bubu1.eu>
[Julien: add reference to commits introducing the issue]
Signed-off-by: Julien Olivain <ju.o@free.fr>
Marcus Hoffmann 2 月之前
父节点
当前提交
e05648d133

+ 1 - 1
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

+ 4 - 2
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

+ 5 - 0
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):