Releases: matthewwardrop/spec-classes
Releases · matthewwardrop/spec-classes
v1.5.7
v1.5.6
This a minor release that improves to minor things:
functools.cached_property
is now correctly detected as a descriptor and skipped during attribute default preparation.- In
type_label
:UnionType
s from Python 3.10+ are show the nested types, and bothUnion
andUnionType
types are now formatted in the Python 3.10 style: e.g. "int | str".
v1.5.5
Improves the robustness of sentinel checks.
v1.5.4
DO NOT USE. Introduced some sentinel related bugs.
v1.5.3
This is a minor release with one minor new feature: support for passing spec_classes.UNCHANGED
to scalar attribute transformations to skip the setting of new values; especially useful in combination with attribute preparers (where you may not want to commit a null cached value).
v1.5.2
This is a minor release with one fix:
- In multithreaded contexts, it is possible to experience issues bootstrapping spec-classes due to race conditions when replacing the new method.
v1.5.1
This is a minor release which fixes one minor oversight:
- The
Alias
type will now protect thefallback
, if provided, by deepcopying it prior to returning it; preventing accidental mutations downstream.
v1.5.0
This is a relatively small feature release, which:
- adds support for nested
Alias
instances (e.g.Alias("a.b.c['d']")
). - fixes labeling of
Literal
types.
v1.4.5
This is another minor release:
- Extended type checking to
tuple
andtype
annotations. - Removed weakref'ed spec-class instance state that was slowing down instantiation of simple classes by as much as 400%.
- Fixed
_GenericAlias
catching all errors during setting of__orig_class
in Python 3.11+ (preventingKeyed*
classes from raising on type errors). - Migrated to
ruff
tooling for linting.
v1.4.4
This is a minor release that fixes one issue affecting spec-class state imputation when spec-classes are coming from deserialized representations.