python-pydantic/python-pydantic.spec

94 lines
2.8 KiB
RPMSpec
Raw Normal View History

#
# 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/
#
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
%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}
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
Name: python-pydantic%{psuffix}
Version: 2.6.4
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
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
BuildRequires: %{python_module hatch-fancy-pypi-readme}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module packaging}
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
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}
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
%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.16.3
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
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
%pyproject_wheel
%install
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
%if %{without test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
%endif
%check
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
%if %{with test}
%pytest
%endif
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
%if %{without test}
%files %{python_files}
%license LICENSE
%doc README.md HISTORY.md
%{python_sitelib}/pydantic
- Update to 2.6.3: * Fix inheriting `Field` annotations in dataclasses * Fix warning for tuple of wrong size in `Union` * Fix `computed_field` JSON serializer `exclude_none` behavior * Check for `email-validator` version >= 2.0 * Add `NatsDsn` * Add `ConfigDict.ser_json_inf_nan` * Support `AliasGenerator` usage * Support `yyyy-MM-DD` datetime parsing * Added bits conversions to the `ByteSize` class * Add `eval_type_backport` to handle union operator * Add support for `dataclass` fields `init` * Implement pickling for `ValidationError` * Add unified tuple validator that can handle "variadic" tuples via PEP-646 * Drop Python3.7 support * Make `@validate_call` return a function instead of a custom descriptor * Introducing `classproperty` decorator for `model_computed_fields` * Move `getattr` warning in deprecated `BaseConfig` * Only hash `model_fields`, not whole `__dict__` * Fix overload position of `computed_field` * Fix issue `unittest.mock` deprecation warnings * Fix `to_snake` conversion * Add support for field `alias` in `dataclass` signature * Fix ordering of keys in `__dict__` with `model_construct` call * Fix usage of `@deprecated` * Add more support for private attributes in `model_construct` call * Support `pydantic.Field(repr=False)` in dataclasses * Override `dataclass_transform` behavior for `RootModel` * Refactor signature generation for simplicity * Fix ordering bug of PlainValidator annotation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=43
2024-03-07 03:28:22 +00:00
%{python_sitelib}/pydantic-%{version}.dist-info
%endif
%changelog