Skip to content

Releases: petee-d/stereotype

v1.5.4

27 Jan 15:16
Compare
Choose a tag to compare

v1.5.4

Small fixes:

  • Fixed SchematicsModelField conversion error handling

(v1.5.3 was improperly tagged and contains an early version of the above change)

v1.5.3

13 Nov 09:37
Compare
Choose a tag to compare
v1.5.3 Pre-release
Pre-release

Small Fixes:

  • ConversionError from Schematics was handled as a TypeError instead of being converted to ConversionError from stereotype.

v1.5.2

28 Oct 18:59
856d178
Compare
Choose a tag to compare

Small fixes:

  • Fixed SchematicsModelField mapping of list item errors (index wasn't forced to string)

v1.5.1

28 May 08:57
70a74b5
Compare
Choose a tag to compare

Small fixes:

  • Fixed bug in DataError.errors when errors were reported both by the dict and of some of its items

v1.5.0

23 Mar 12:15
3d7a204
Compare
Choose a tag to compare

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

v1.4.3

28 Feb 09:53
Compare
Choose a tag to compare

Changes:

  • Made it much easier to declare custom fields with required parameters

v1.4.2

28 Feb 09:52
292c50c
Compare
Choose a tag to compare

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

v1.4.1

19 Oct 12:31
895005a
Compare
Choose a tag to compare

Features:

  • Model attributes with ClassVar won't be interpreted as fields, like in dataclasses

Fixes:

  • Fixed being unable to declare roles for abstract models

v1.4.0

17 Oct 15:00
Compare
Choose a tag to compare

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

v1.3.1

24 Aug 11:34
Compare
Choose a tag to compare

v1.3.1

Fixes:

  • Fixed Missing behavior with deepcopy