Commit Graph

7 Commits

Author SHA1 Message Date
Khem Raj
51baa456a2
python3-pydantic-core: Upgrade to 2.25.0
Needed for py 3.13 support in pydantic 2.9 recipe

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-10-28 21:25:23 -07:00
Tim Orling
6f0a41130c
python3-pydantic-core: backport patch
We've seen TMPDIR [build-paths] contamination in the
built pydantic_core/_pydantic_core.cpython-*-*-linux-gnu.so

See discussion upstream in:
https://github.com/pydantic/pydantic-core/issues/1365

Backport fix from:
e07c41b3ba

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-09 14:25:29 -07:00
Tim Orling
982db9fe07
python3-pydantic-core: upgrade 2.18.4 -> 2.21.0
* Refresh -crates.inc
* Drop rust 1.76 to 1.75 patch, upstream reverted [1]
* Add ptest RDEPENDS [2]:
  - python3-dateutil
  - python3-tzdata
  - python3-zoneinfo
* Add python3-misc to ptest RDEPENDS as we need Lib/timeit.py

Full commit log:
https://github.com/pydantic/pydantic-core/compare/v2.18.4...v2.21.0

[1] ebef5bdf92
[2] https://github.com/pydantic/pydantic-core/blob/v2.21.0/tests/requirements.txt

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-09 14:25:29 -07:00
Frank de Brabander
bee8b9bbc4
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>
2024-07-26 09:51:39 -07:00
Khem Raj
39d164f0c3
python3-pydantic-core: Fix build with python 3.12.4
This needs to be upgraded to 2.19+ but until then
backport a fix to keep it building.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Tim Orling <ticotimo@gmail.com>
2024-06-12 12:50:45 -07:00
Khem Raj
9f0e513211
python3-pydantic-core: Fix build for arches without 64bit atomics
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-02-27 17:51:18 -08:00
Tim Orling
446124784b
python3-pydantic-core: enable ptest
* Add to ptest-packagelists-meta-python.inc "FAST" under 30 seconds

Signed-off-by: Tim Orling <ticotimo@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-21 08:00:42 -08:00