1
0
python-pydantic/python-pydantic.changes
2022-02-02 04:14:28 +00:00

214 lines
10 KiB
Plaintext

-------------------------------------------------------------------
Wed Feb 2 04:12:37 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
- Skip some truculent tests.
- Clean up non-required Python 3.6 {Build,}Requires.
-------------------------------------------------------------------
Wed Jan 5 16:08:23 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 1.9.0
* add python 3.10 support, #2885 by @PrettyWood
* Discriminated unions, #619 by @PrettyWood
* Config.smart_union for better union logic, #2092 by @PrettyWood
* Binaries for Macos M1 CPUs, #3498 by @samuelcolvin
* Complex types can be set via nested environment variables, e.g.
foo___bar, #3159 by @Air-Mark
* add a dark mode to pydantic documentation, #2913 by @gbdlin
* Add support for autocomplete in VS Code via
__dataclass_transform__, #2721 by @tiangolo
* Add "exclude" as a field parameter so that it can be configured
using model config, #660 by @daviskirk
- Full changelog in HISTORY.md
-------------------------------------------------------------------
Thu May 13 11:07:30 UTC 2021 - Markéta Machová <mmachova@suse.com>
- 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
-------------------------------------------------------------------
Fri Jan 8 13:10:40 UTC 2021 - Markéta Machová <mmachova@suse.com>
- 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
-------------------------------------------------------------------
Mon Dec 7 01:00:22 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Add dataclasses requirement for Python 3.6: Fixes Leap 15.2 build
and future TW python36 flavor gh#openSUSE/python-rpm-macros#66
-------------------------------------------------------------------
Mon Oct 12 08:58:44 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- Add upstream patch validate-config.patch which fixes build with new pytest
-------------------------------------------------------------------
Sun Aug 2 15:14:47 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Add optional test dependencies
- Recommend optional runtime dependency python-typing_extensions
- Remove unused runtime dependency ujson
- Update to v1.6.1
* fix validation and parsing of nested models with default_factory
- from v1.6
* Modify validators for conlist and conset to not have always=True
* Add port check to AnyUrl (can't exceed 65536) ports are 16 insigned
bits: 0 <= port <= 2**16-1 src: rfc793 header format
* Document default regex anchoring semantics
* Use chain.from_iterable in class_validators.py. This is a faster
and more idiomatic way of using itertools.chain. Instead of computing
all the items in the iterable and storing them in memory, they are
computed one-by-one and never stored as a huge list.
This can save on both runtime and memory space
* Add conset(), analogous to conlist()
* make pydantic errors (un)pickable
* Allow custom encoding for dotenv files
* Ensure SchemaExtraCallable is always defined to get type hints on BaseConfig
* Update datetime parser to support negative timestamps
* Update mypy, remove AnyType alias for Type[Any]
* Adjust handling of root validators so that errors are aggregated
from all failing root validators, instead of reporting on only
the first root validator to fail
* Make __modify_schema__ on Enums apply to the enum schema rather
than fields that use the enum
* Fix behavior of __all__ key when used in conjunction with index
keys in advanced include/exclude of fields that are sequences
* Subclass validators do not run when referencing a List field
defined in a parent class when each_item=True
* change schema.field_class_to_schema to support frozenset in schema
* Call __modify_schema__ only for the field schema
* Move the assignment of field.validate_always in fields.py so the
always parameter of validators work on inheritance
* Added support for UUID instantiation through 16 byte strings such
as b'\x12\x34\x56\x78' * 4.
This was done to support BINARY(16) columns in sqlalchemy
* Add a test assertion that default_factory can return a singleton
* Add NameEmail.__eq__ so duplicate NameEmail instances are
evaluated as equal
* Add datamodel-code-generator link in pydantic document site
* Added a "Discussion of Pydantic" section to the documentation,
with a link to "Pydantic Introduction" video
* Avoid some side effects of default_factory by calling it only
once if possible and by not setting a default value in the schema
* Added docs about dumping dataclasses to JSON
* Make BaseModel.__signature__ class-only, so getting __signature__
from model instance will raise AttributeError
* include 'format': 'password' in the schema for secret types
* Modify schema constraints on ConstrainedFloat so that
exclusiveMinimum and minimum are not included in the schema if
they are equal to -math.inf and exclusiveMaximum and maximum are
not included if they are equal to math.inf
* Squash internal __root__ dicts in .dict() (and, by extension, in .json())
* Move const validator to post-validators so it validates the parsed value
* Fix model validation to handle nested literals
* Remove user_required = True from RedisDsn, neither user nor
password are required
* Remove extra allOf from schema for fields with Union and custom Field
* Updates OpenAPI schema generation to output all enums as separate
models. Instead of inlining the enum values in the model schema,
models now use a $ref property to point to the enum definition
-------------------------------------------------------------------
Tue Jun 9 19:24:27 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- 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
-------------------------------------------------------------------
Sat Apr 18 19:11:39 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- 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.
Fix str_validator() return type to str
* Support instance methods and class methods with
@validate_arguments
* Add default_factory argument to Field to create a dynamic
default value by passing a zero-argument callable
* add support for NewType of List, Optional, etc
* fix mypy signature for root_validator
* Fixed parsing of nested 'custom root type' models
* Add validate_arguments function decorator which checks the
arguments to a function matches type annotations
* Add __signature__ to models
* Refactor ._iter() method, 10x speed boost for dict(model)
-------------------------------------------------------------------
Thu Mar 19 13:25:26 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- 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
-------------------------------------------------------------------
Fri Sep 20 09:56:55 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Format with spec-cleaner
-------------------------------------------------------------------
Thu Sep 19 20:25:27 UTC 2019 - Martin Hauke <mardnh@gmx.de>
- Initial package, version 0.32.2