14
0
Files
python-pydantic-core/python-pydantic-core.spec

94 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-pydantic-core
#
Accepting request 1240256 from home:ecsos:python - Update ot 2.27.2 - fix linux PGO wheel build in #1557 - Forward default_value calls to the underlying schema for DefinitionRefValidator in #1573 - Include JSON Schema input core schema in function schemas in #1572 - fix ValueError on year zero in #1583 - Changes from 2.27.1 - Simplify shared union serializer logic in #1538 - Tidy up some uses of Bound<'_, PyString>::to_str in #1544 - Fix serialization inference for complex types in python in #1549 - Bump to PyO3 v0.22.6 in #1550 - Fix performance regression for JSON tagged union in #1552 - Changes from 2.27.0 - Remove Url and MultiHostUrl docstrings, we moved them to pydantic in #1531 - Fix panic in validate_assignment when field has gone missing in #1532 - Fix for Union serializer: do not raise warnings in nested unions in #1513 - Fix _IncEx type alias to be compatible with mypy in #1537 - More union serialization tidying in #1536 - Fix wrap serializer breaking union serialization in presence of extra fields in #1530 - Support trailing-strings with allow_partial in #1539 - Changes from 2.26.0 * Fixes - Revert changes to url schemas that support cls, the 2x validation isn't worth it (and is breaking) in #1514 - Fix when coerce_numbers_to_str enabled and string has invalid unicode character in #1515 - Fix serializing complex values in enums in #1524 * Packaging - Bump serde from 1.0.213 to 1.0.214 in #1519 - Bump regex from 1.11.0 to 1.11.1 in #1520 - Bump jiter from 0.6.1 to 0.7.0 in #1521 - bump speedate to 0.15 in #1526 * New Features - Add allow_partial in #1512 - Changes from 2.25.1 - Bump jiter from 0.5.0 to 0.6.1 in #1498 - Update Pyodide to v0.26.3 in #1507 - Allow subclassing ValidationError and PydanticCustomError in #1413 - Revert "feat: add 'millisecond' option to ser_json_timedelta" in #1503 - Support subclass inits for Url and MultiHostUrl in #1508 - Changes from 2.25.0 - Properly enforce host_required for URLs in #1488 - Support revalidation of parametrized generics in #1489 - Support default factories taking validated data as an argument in #1491 - Changes from 2.24.2 - Add serialization key to InvalidSchema in #1482 - Changes from 2.24.1 * Packaging - Restore Windows aarch64 builds in #1464 - Limit windows builds to Rust 1.77 (to keep Windows 7 support) in #1463 - Bump pyo3 from 0.22.2 to 0.22.3 in #1472 - Bump serde from 1.0.209 to 1.0.210 in #1471 - Bump regex from 1.10.6 to 1.11.0 in #1470 * Fixes - Fix equality checks for primitives in literals in #1459 * Changes - Add invalid schema placeholder in #1469 - Relax intensity of error for issubclass and isinstance schemas from json in #1479 - Changes from 2.24.0 * Features - Add milliseconds option to ser_json_timedelta config parameterin #1427 - Add support for unpacked TypedDict to type hint variadic keyword arguments in ArgumentsValidator in #1451 * Fixes - Do not require padding when decoding base64 bytes in #1448 - Support wider variety of enum validation cases in #1456 OBS-URL: https://build.opensuse.org/request/show/1240256 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-core?expand=0&rev=14
2025-01-25 20:53:42 +00:00
# Copyright (c) 2025 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.35.1
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
2025-04-24 04:06:56 +00:00
BuildRequires: %{python_module base >= 3.9}
Accepting request 1240256 from home:ecsos:python - Update ot 2.27.2 - fix linux PGO wheel build in #1557 - Forward default_value calls to the underlying schema for DefinitionRefValidator in #1573 - Include JSON Schema input core schema in function schemas in #1572 - fix ValueError on year zero in #1583 - Changes from 2.27.1 - Simplify shared union serializer logic in #1538 - Tidy up some uses of Bound<'_, PyString>::to_str in #1544 - Fix serialization inference for complex types in python in #1549 - Bump to PyO3 v0.22.6 in #1550 - Fix performance regression for JSON tagged union in #1552 - Changes from 2.27.0 - Remove Url and MultiHostUrl docstrings, we moved them to pydantic in #1531 - Fix panic in validate_assignment when field has gone missing in #1532 - Fix for Union serializer: do not raise warnings in nested unions in #1513 - Fix _IncEx type alias to be compatible with mypy in #1537 - More union serialization tidying in #1536 - Fix wrap serializer breaking union serialization in presence of extra fields in #1530 - Support trailing-strings with allow_partial in #1539 - Changes from 2.26.0 * Fixes - Revert changes to url schemas that support cls, the 2x validation isn't worth it (and is breaking) in #1514 - Fix when coerce_numbers_to_str enabled and string has invalid unicode character in #1515 - Fix serializing complex values in enums in #1524 * Packaging - Bump serde from 1.0.213 to 1.0.214 in #1519 - Bump regex from 1.11.0 to 1.11.1 in #1520 - Bump jiter from 0.6.1 to 0.7.0 in #1521 - bump speedate to 0.15 in #1526 * New Features - Add allow_partial in #1512 - Changes from 2.25.1 - Bump jiter from 0.5.0 to 0.6.1 in #1498 - Update Pyodide to v0.26.3 in #1507 - Allow subclassing ValidationError and PydanticCustomError in #1413 - Revert "feat: add 'millisecond' option to ser_json_timedelta" in #1503 - Support subclass inits for Url and MultiHostUrl in #1508 - Changes from 2.25.0 - Properly enforce host_required for URLs in #1488 - Support revalidation of parametrized generics in #1489 - Support default factories taking validated data as an argument in #1491 - Changes from 2.24.2 - Add serialization key to InvalidSchema in #1482 - Changes from 2.24.1 * Packaging - Restore Windows aarch64 builds in #1464 - Limit windows builds to Rust 1.77 (to keep Windows 7 support) in #1463 - Bump pyo3 from 0.22.2 to 0.22.3 in #1472 - Bump serde from 1.0.209 to 1.0.210 in #1471 - Bump regex from 1.10.6 to 1.11.0 in #1470 * Fixes - Fix equality checks for primitives in literals in #1459 * Changes - Add invalid schema placeholder in #1469 - Relax intensity of error for issubclass and isinstance schemas from json in #1479 - Changes from 2.24.0 * Features - Add milliseconds option to ser_json_timedelta config parameterin #1427 - Add support for unpacked TypedDict to type hint variadic keyword arguments in ArgumentsValidator in #1451 * Fixes - Do not require padding when decoding base64 bytes in #1448 - Support wider variety of enum validation cases in #1456 OBS-URL: https://build.opensuse.org/request/show/1240256 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-core?expand=0&rev=14
2025-01-25 20:53:42 +00:00
BuildRequires: %{python_module inline-snapshot}
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-run-parallel}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module typing-inspection}
%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}
# https://github.com/pydantic/pydantic-core/issues/1755
%pytest_arch -k 'not (test_keyword_args or test_positional_args)'
%endif
%if %{without test}
%files %{python_files}
%{python_sitearch}/pydantic_core
%{python_sitearch}/pydantic_core-%{version}.dist-info
%endif
%changelog