commit 2ccbd4b2e6bcb153413dfbfd79b893a90f08cc1df29d83908567f5e93f02d93d Author: Dirk Mueller Date: Mon Jul 1 17:06:13 2024 +0000 - update to 2.20.0: * Tidy up `tagged_union_schema` * Improvements in `Union` matching logic during validation * Fix `Union` validation logic when `extra='allow'` * Add list `fail_fast` config option * Update to PyO3 0.22, add Python 3.13 support - update to 2.19.0: * Lower MSRV to 1.75 * Bump `libc` from 0.2.147 to 0.2.155 * Make `ValidatorFunctionWrapHandler` positional only * Reuse `re.Pattern` object in regex patterns * Add ser_json_inf_nan='strings' mode to produce valid JSON OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-core?expand=0&rev=10 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/_service b/_service new file mode 100644 index 0000000..dc90db9 --- /dev/null +++ b/_service @@ -0,0 +1,10 @@ + + + + pydantic_core-2.20.0.tar.gz + xz + false + + + + diff --git a/pydantic_core-2.20.0.tar.gz b/pydantic_core-2.20.0.tar.gz new file mode 100644 index 0000000..97be92c --- /dev/null +++ b/pydantic_core-2.20.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:366be8e64e0cb63d87cf79b4e1765c0703dd6313c729b22e7b9e378db6b96877 +size 388463 diff --git a/python-pydantic-core.changes b/python-pydantic-core.changes new file mode 100644 index 0000000..e65e27d --- /dev/null +++ b/python-pydantic-core.changes @@ -0,0 +1,93 @@ +------------------------------------------------------------------- +Mon Jul 1 17:05:35 UTC 2024 - Dirk Müller + +- update to 2.20.0: + * Tidy up `tagged_union_schema` + * Improvements in `Union` matching logic during validation + * Fix `Union` validation logic when `extra='allow'` + * Add list `fail_fast` config option + * Update to PyO3 0.22, add Python 3.13 support +- update to 2.19.0: + * Lower MSRV to 1.75 + * Bump `libc` from 0.2.147 to 0.2.155 + * Make `ValidatorFunctionWrapHandler` positional only + * Reuse `re.Pattern` object in regex patterns + * Add ser_json_inf_nan='strings' mode to produce valid JSON + +------------------------------------------------------------------- +Thu Jun 6 14:46:29 UTC 2024 - Dirk Müller + +- update to 2.18.4: + * Bump uuid from 1.7.0 to 1.8.0 + * Bump serde from 1.0.197 to 1.0.203 + * Bump the python-packages group with 6 updates + * Uprev `jiter` to v0.4.1 +- update to 2.18.3: + * Bump `serde_json` from 1.0.114 to 1.0.116 + * Bump the python-packages group with 7 updates + * Bump `regex` from 1.10.3 to 1.10.4 + * Bump `pyo3` from 0.21.1 to 0.21.2 + * Bump `uraimo/run-on-arch-action` from 2.7.1 to 2.7.2 + +------------------------------------------------------------------- +Sat Apr 27 07:55:51 UTC 2024 - Dirk Müller + +- update to 2.18.2: + * Support multiple zeros as an `int` + * Fix validation of `int`s with leading unary plus + * Fix interaction between `extra != 'ignore'` and + `from_attributes=True` + * Handle error from `Enum`'s `missing` function as + `ValidationError` + * Fix memory leak with `Iterable` validation +- update to 2.18.1: + * allow serialization functions to upgrade warnings to + exceptions + * Fix: add `coerce_numbers_to_str option` in `StringSchema` + * Trim leading zeros before parsing `str` -> `int` + * Prevent trailing dots in integers +- update to 2.18.0: + * update to PyO3 0.21 final + * Add coerce_numbers_to_str option in str_schema + * caching strings from JSON + * fix build warnings on python <3.11 + * Fixes for `ser_json_inf_nan` inference + * Adopt jiter `0.2.0` +- update to 2.17.0: + * Add benchmarks for serializing model with complete schema + * Prevent panicking when `__dict__` changes during iteration + * Fix `TzInfo` equality check based on offset + * Fix stack overflow due to recursion in some recursive + serializer schemas. + * Use PEP570 syntax + * Fix parsing `BigInt` from `str` + * Use new typing syntax for `_pydantic_core.pyi` + * separate `Input` trait `'a` and `'py` lifetimes + * Fix json serialization when `computed_field` is excluded + * Implement `Input` for `str` + * Move list validation to produce an associated type + * Remove `with_new_extra` + * Associated types for arguments in Input + * Associated types for dict in input + * Remaining associated types + * Refactor `Input` trait to have single `as_python` cast for + python inputs + * Allow case where `__pydantic_extra__` is `None`, even if + `extra='allow'` + * Add ability to pass `context` to serialization + * Add `serialize_as_any` runtime flag support + +------------------------------------------------------------------- +Tue Mar 12 00:24:28 UTC 2024 - Steve Kowalik + +- Sprinkle in multibuild to avoid build cycles. + +------------------------------------------------------------------- +Sat Mar 9 13:15:13 UTC 2024 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Wed Mar 6 06:34:37 UTC 2024 - Steve Kowalik + +- Initial release of 2.16.3 diff --git a/python-pydantic-core.spec b/python-pydantic-core.spec new file mode 100644 index 0000000..2139b7c --- /dev/null +++ b/python-pydantic-core.spec @@ -0,0 +1,88 @@ +# +# spec file for package python-pydantic-core +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%{?sle15_python_module_pythons} +Name: python-pydantic-core%{psuffix} +Version: 2.20.0 +Release: 0 +Summary: Core functionality for pydantic validation and serialization +License: MIT +URL: https://github.com/pydantic/pydantic-core +Source0: https://files.pythonhosted.org/packages/source/p/pydantic-core/pydantic_core-%{version}.tar.gz +Source1: vendor.tar.xz +BuildRequires: %{python_module maturin >= 1} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module typing-extensions >= 4.6.0} +BuildRequires: cargo-packaging +BuildRequires: python-rpm-macros +# SECTION test requirements +%if %{with test} +BuildRequires: %{python_module dirty-equals} +BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module pydantic-core == %{version}} +BuildRequires: %{python_module pytest-benchmark} +BuildRequires: %{python_module pytest-mock} +BuildRequires: %{python_module pytest-timeout} +BuildRequires: %{python_module pytest} +%endif +# /SECTION +BuildRequires: fdupes +Requires: python-typing-extensions >= 4.6.0 +%python_subpackages + +%description +This package provides the core functionality for +[pydantic](https://docs.pydantic.dev) validation and serialization. + +Pydantic-core is currently around 17x faster than pydantic V1. + +%prep +%autosetup -p1 -n pydantic_core-%{version} -a1 + +%build +# The build takes quite a long time, so we don't want to build this while under test. +%if %{without test} +%pyproject_wheel +%endif + +%install +%if %{without test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} +%endif + +%check +%if %{with test} +%pytest_arch +%endif + +%if %{without test} +%files %{python_files} +%{python_sitearch}/pydantic_core +%{python_sitearch}/pydantic_core-%{version}.dist-info +%endif + +%changelog diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..26a51f5 --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f26e6c3cddf7380d4d209770f640946b2cc590daca9bda39dde11905f2a860d9 +size 4153476