1
0

19 Commits

Author SHA256 Message Date
432b74e3d2 - update to 1.10.7:
* Fix creating schema from model using `ConstrainedStr` with
    `regex` as dict key
  * Address bug in mypy plugin caused by
    explicit_package_bases=True
  * Add implicit defaults in the mypy plugin for Field with no
    default argument
  * Fix schema generated for Enum values used as Literals in
    discriminated unions
  * Fix mypy failures caused by the pydantic mypy plugin when
    users define `from_orm` in their own classes
  * Fix `InitVar` usage with pydantic dataclasses, mypy version
    `1.1.1` and the custom mypy plugin
  * Implement logic to support creating validators from non
    standard callables by using defaults to identify them and
    unwrapping `functools.partial` and `functools.partialmethod`
    when checking the signature
  * Fix mypy plugin for v1.1.1, and fix `dataclass_transform`
    decorator for pydantic dataclasses
  * Raise `ValidationError`, not `ConfigError`, when a
    discriminator value is unhashable
  * Fix broken parametrized bases handling with `GenericModel`s
    with complex sets of models
  * Invalidate mypy cache if plugin config changes
  * Fix `RecursionError` when deep-copying dataclass types
    wrapped by pydantic
  * Fix `X | Y` union syntax breaking `GenericModel`

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=32
2023-03-27 10:02:30 +00:00
3859f30f38 - Disable DeprecationWarning in tests to avoid error with the latest
setuptools and pkg_resources deprecation

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=30
2023-03-16 07:19:57 +00:00
250101fc0c - update to v1.10.4:
* Change dependency to typing-extensions>=4.2.0, #4885 by @samuelcolvin
  * fix parsing of custom root models, #4883 by @gou177
  * fix: use dataclass proxy for frozen or empty dataclasses, #4878 by
    @PrettyWood
  * Fix schema and schema_json on models where a model instance is a one of
    default values, #4781 by @Bobronium
  * Add Jina AI to sponsors on docs index page, #4767 by @samuelcolvin
  * fix: support assignment on DataclassProxy, #4695 by @PrettyWood
  * Add postgresql+psycopg as allowed scheme for PostgreDsn to make it
    usable with SQLAlchemy 2, #4689 by @morian
  * Allow dict schemas to have both patternProperties and
    additionalProperties, #4641 by @jparise
  * Fixes error passing None for optional lists with unique_items, #4568 by
    @mfulgo
  * Fix GenericModel with Callable param raising a TypeError, #4551 by
    @mfulgo
  * Fix field regex with StrictStr type annotation, #4538 by @sisp
  * Correct dataclass_transform keyword argument name from field_descriptors
    to field_specifiers, #4500 by @samuelcolvin
  * fix: avoid multiple calls of __post_init__ when dataclasses are
    inherited, #4487 by @PrettyWood
  * Reduce the size of binary wheels, #2276 by @samuelcolvin

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=28
2023-01-02 20:23:23 +00:00
Steve Kowalik
4b1c6e6331 - Update to 1.10.2:
* Prevent long (length > 4_300) strings/bytes as input to int fields, see
    python/cpython#95778 and CVE-2020-10735
  * fix: dataclass wrapper was not always called
  * Use tomllib on Python 3.11 when parsing mypy configuration
  * Basic fix of GenericModel cache to detect order of arguments in Union models
  * Fix mypy plugin when using bare types like list and dict as default_factory
  * Add __hash__ method to pydancic.color.Color class
  * Refactor the whole pydantic dataclass decorator to really act like its
    standard lib equivalent. It hence keeps __eq__, __hash__, ... and makes
    comparison with its non-validated version possible.
  * Now that Config.extra is supported, dataclass ignores by default extra
    arguments (like BaseModel)
  * Fix PEP487 __set_name__ protocol in BaseModel for PrivateAttrs
  * Allow for custom parsing of environment variables via parse_env_var in
    Config
  * Fix StrictStr does not raise ValidationError when max_length is present
    in Field
  * Make SecretStr and SecretBytes hashable
  * Fix StrictBytes does not raise ValidationError when max_length is present
    in Field
  * Add support for bare type
  * Support Python 3.11, including binaries for 3.11 in PyPI
  * Add support for re.Pattern
  * Fix __post_init_post_parse__ is incorrectly passed keyword arguments when
    no __post_init__ is defined
  * Fix implicitly importing ForwardRef and Callable from pydantic.typing
    instead of typing and also expose MappingIntStrAny
  * remove Any types from the dataclass decorator so it can be used with the
    disallow_any_expr mypy option

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=26
2022-09-09 00:58:49 +00:00
Steve Kowalik
bf67906633 - Add patch remove-pkg_resources.patch:
* Use packaging, not pkg_resources for versions.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=24
2022-07-19 09:21:21 +00:00
a8bc96b8c7 Accepting request 983594 from home:stroeder:python
Update to 1.9.1

OBS-URL: https://build.opensuse.org/request/show/983594
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=22
2022-06-18 19:21:32 +00:00
Steve Kowalik
256cc834ee - Skip some truculent tests.
- Clean up non-required Python 3.6 {Build,}Requires.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=21
2022-02-02 04:14:28 +00:00
Steve Kowalik
cdd36c50e2 Accepting request 944129 from home:bnavigator:py310_nonring
Update for python310 compatibility.

This is resolvable in Factory/standard, but obviously not in snapshots yet.

OBS-URL: https://build.opensuse.org/request/show/944129
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=20
2022-01-05 23:16:35 +00:00
35d63c53cf Accepting request 892675 from home:mcalabkova:branches:devel:languages:python
- Update to 1.8.2 (bsc#1186019, CVE-2021-29510)
  * Security fix: Fix date and datetime parsing so passing either 'infinity' 
    or float('inf') (or their negative values) does not cause an infinite loop
  * Allow passing json_encoders in class kwargs
  * support arbitrary types with custom __eq__
  * Hypothesis plugin for testing
  * support for NamedTuple and TypedDict
  * Support Annotated hints on model fields
  * frozen parameter on Config to allow models to be hashed
  * Breaking Change, remove old deprecation aliases from v1
  * Breaking Change: always validate only first sublevel items with each_item
  * many more changes, see upstream changelog

OBS-URL: https://build.opensuse.org/request/show/892675
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=18
2021-05-13 11:44:17 +00:00
2980a88758 Accepting request 861663 from home:mcalabkova:branches:devel:languages:python
Staging:I

- Update to 1.7.3
  * python 3.9 support
  * Private model attributes
  * "secrets files" support in BaseSettings
  * convert stdlib dataclasses to pydantic dataclasses and use stdlib dataclasses in models
  * few bugfixes
- Drop validate-config.patch

OBS-URL: https://build.opensuse.org/request/show/861663
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=16
2021-01-08 13:36:08 +00:00
eefd1e9b88 Accepting request 853452 from home:bnavigator:branches:devel:languages:python
- Add dataclasses requirement for Python 3.6: Fixes Leap 15.2 build
  and future TW python36 flavor gh#openSUSE/python-rpm-macros#66

OBS-URL: https://build.opensuse.org/request/show/853452
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=14
2020-12-07 02:13:16 +00:00
9829629887 Accepting request 841234 from home:mcalabkova:branches:devel:languages:python:pytest
- Add upstream patch validate-config.patch which fixes build with new pytest

OBS-URL: https://build.opensuse.org/request/show/841234
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=12
2020-10-12 09:00:06 +00:00
a7cf5b3f7d Accepting request 824025 from home:jayvdb:py-submit
- Update to v1.6.1
  * fix validation and parsing of nested models with default_factory
- from v1.6
  * ...

OBS-URL: https://build.opensuse.org/request/show/824025
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=10
2020-08-03 15:45:24 +00:00
4da4f1c674 - update to 1.5.1
* Signature generation with `extra: allow` never uses a field name, #1418 by @prettywood
  * Avoid mutating `Field` default value, #1412 by @prettywood

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=8
2020-06-09 19:24:43 +00:00
Tomáš Chvátal
2d2e1aa133 Accepting request 795387 from home:mnhauke
- Update to version 1.5
  * Make includes/excludes arguments for .dict(), ._iter(), ...,
    immutable
  * Always use a field's real name with includes/excludes in
    model._iter(), regardless of by_alias, #1397 by @AlexECX
  * Update constr regex example to include start and end lines,
  * Confirm that shallow model.copy() does make a shallow copy of
    attributes
  * Renaming model_name argument of main.create_model()
    to __model_name to allow using model_name as a field name
  * Replace raising of exception to silent passing for non-Var
    attributes in mypy plugin
  * Remove typing_extensions dependency for python 3.8
  * Make SecretStr and SecretBytes initialization idempotent
  * document making secret types dumpable using the json method
  * fix card number length check in PaymentCardNumber,
    PaymentCardBrand  now inherits from str
  * Have BaseModel inherit from Representation to make mypy happy
    when overriding __str__
  * Allow None as input to all optional list fields
  * Add datetime field to default_factory example
  * Allow subclasses of known types to be encoded with superclass
    encoder
  * Exclude exported fields from all elements of a list/tuple of
    submodels/dicts with '__all__', #1286 by @masalim2
  * Add pydantic.color.Color objects as available input for Color
    fields
  * In examples, type nullable fields as Optional, so that these
    are valid mypy annotations
  * Make pattern_validator() accept pre-compiled Pattern objects.

OBS-URL: https://build.opensuse.org/request/show/795387
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=6
2020-04-19 09:15:51 +00:00
Tomáš Chvátal
83bc55a86a Accepting request 786480 from home:mcalabkova:branches:devel:languages:python
- Update to version 1.4
  * rename Schema to Field, make it a function to placate mypy
  * Implement root_validator and rename root errors from __obj__ to __root__
  * Added initvars support to post_init_post_parse
  * complete rewrite of URL parsing logic
  * BaseSettings now uses the special env settings to define which 
    environment variables to read, not aliases
  * add support for assert statements inside validators
  * Change the precedence of aliases so child model aliases override 
    parent aliases, including using alias_generator
  * Add a mypy plugin for type checking BaseModel.__init__ and more
  * Add support for typing.Literal for Python 3.8
  * Add a ByteSize type for converting byte string (1GB) to plain bytes
  * Add support for required Optional with name: Optional[AnyType] = Field(...) 
    and refactor ModelField creation to preserve required parameter value
  * Add __eq__ to SecretStr and SecretBytes to allow "value equals"
  * Add support for nested generic models
  * alias precedence logic changed so aliases on a field always take 
    priority over an alias from alias_generator
  * many more fixes and improvements

OBS-URL: https://build.opensuse.org/request/show/786480
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=4
2020-03-19 13:37:43 +00:00
e79e4f9946 Accepting request 732119 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/732119
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydantic?expand=0&rev=1
2019-09-23 10:37:58 +00:00
Tomáš Chvátal
afb20ae79e - Format with spec-cleaner
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=2
2019-09-20 09:57:08 +00:00
Tomáš Chvátal
996be1231d Accepting request 732025 from home:mnhauke
Initial package fro python-pydantic

OBS-URL: https://build.opensuse.org/request/show/732025
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic?expand=0&rev=1
2019-09-20 09:56:46 +00:00