1
0
Files
python-pydantic/python-pydantic.spec
Dirk Mueller 84df81fd33 - update to 2.7.1:
* Bump `pydantic-core` to `v2.18.2`
  * Ftp and Websocket connection strings support
  * Use field description for RootModel schema description when
    there is `…`
  * Fix `validation_alias` behavior with `model_construct` for
    `AliasChoices` and `AliasPath`
  * Revert `typing.Literal` and import it outside the
    TYPE_CHECKING block
  * Fix `Secret` serialization schema, applicable for unions
  * Fix `strict` application to `function-after` with
    `use_enum_values`
  * Address case where `model_construct` on a class which defines
    `model_post_init` fails with `AttributeError`
  * Fix `model_json_schema` with config types
  * 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
  * Adopt `jiter` `v0.2.0`
  * Extract attribute docstrings from `FieldInfo.description`
  * Add a `with_config` decorator to comply with typing spec
  * Allow an optional separator splitting the value and unit of
    the result of `ByteSize.human_readable`
  * Add generic `Secret` base type
  * Make use of `Sphinx` inventories for cross references in docs
  * Add environment variable to disable plugins

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=49
2024-04-27 07:47:30 +00:00

94 lines
2.8 KiB
RPMSpec

#
# spec file for package python-pydantic
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2019, Martin Hauke <mardnh@gmx.de>
#
# 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%{psuffix}
Version: 2.7.1
Release: 0
Summary: Data validation and settings management using python type hinting
License: MIT
URL: https://github.com/pydantic/pydantic
Source: https://github.com/pydantic/pydantic/archive/v%{version}.tar.gz#/pydantic-%{version}.tar.gz
BuildRequires: %{python_module hatch-fancy-pypi-readme}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module Faker}
BuildRequires: %{python_module cloudpickle}
BuildRequires: %{python_module dirty-equals}
BuildRequires: %{python_module email-validator >= 2.0}
BuildRequires: %{python_module pydantic == %{version}}
BuildRequires: %{python_module pytest-benchmark}
BuildRequires: %{python_module pytest-examples}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dotenv >= 0.10.4}
%endif
Requires: python-annotated-types >= 0.4.0
%if 0%{?python_version_nodots} < 310
Requires: python-eval-type-backport
%endif
Requires: python-pydantic-core == 2.18.2
Requires: python-typing_extensions >= 4.6.1
Suggests: python-email-validator >= 2.0
BuildArch: noarch
%python_subpackages
%description
Data validation and settings management using Python type hinting.
%prep
%autosetup -p1 -n pydantic-%{version}
%build
%pyproject_wheel
%install
%if %{without test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
%pytest
%endif
%if %{without test}
%files %{python_files}
%license LICENSE
%doc README.md HISTORY.md
%{python_sitelib}/pydantic
%{python_sitelib}/pydantic-%{version}.dist-info
%endif
%changelog