Stereotype

Latest version: v1.5.0

Safety actively analyzes 627310 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.5.0

Small features:
* Added `get` and `__getitem__` (`model["field"]`) to `Model`
* Can be used to retrieve fields (incl. serializable), properties and explicit slots
* Explicit `AnyField` allows using any type annotation, not just `typing.Any`

Fixes:
* Fixed `repr` for models with `AnyField`

1.4.3

Changes:
* Made it much easier to declare custom fields with required parameters

1.4.2

Changes:
* Improved Python 3.10 support
* New Union (`|`) and `list` & `dict` annotations now work in Python 3.10+ with `from __future__ import annotations`
* Support of Schematics 2 for `SchematicsModelField` (Schematics 1 doesn't work in Python 3.10+)
* Note Schematics 2 doesn't seem to support deep copy by default

Fixes:
* Fixed being unable to inherit from non-Model classes
* Fixed inheritance of abstract Models from non-abstract Models
* Fixed field validator callbacks not executing within compound field items

1.4.1

Features:
* Model attributes with `ClassVar` won't be interpreted as fields, like in dataclasses

Fixes:
* Fixed being unable to declare roles for abstract models

1.4.0

Features:
* Added `Model.fields_for_role` class method for inspecting `Field` objects usually displayed by a role

Changes:
* Added external documentation using sphinx, simplified README.md
* Added contribution guideline, Makefile and other developer experience improvements
* Started raising `ConfigurationError` if a `Model` attribute is an explicit `Field` but lacks a type annotation

1.3.1

Fixes:
* Fixed `Missing` behavior with `deepcopy`

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.