- Fixed bug in Union of literals serialisation.
- Fixed parsing and serialisation of concrete subclasses of generic types.
- Support for Python 3.11
- Bug fixes of global overrides rewriting specific overrides
- Support for self-recursive data (like a typical union of JSONValue)
- Support for
Type[None]
: python/mypy#3754
- Minor internal interface changes, no b/w compatibility issues.
- Slightly better error reports of Union parsing
- Bugfix for unions serialisation of mappings
- Support for typing.NewType
- Support for forward references and recursive types
- Python 3.9 support
- Mapping nested values are serialized according to their custom type definition.
- Experimental tokenizer implementation.
- Support for
bytes
.
- Mapping types properly deserialize/serialize non-string hashable values.
- Dropped support for Python 3.6;
- Support for classes deriving Generic[T, U, ...];
- Added new type
typeit.custom_types.JsonString
- helpful when dealing with JSON strings encoded into JSON strings.
- Support for default values at construction time.
- Support for overrides of init-based types (and dataclasses).
- Support for global attribute name overrides with
typeit.flags.GlobalNameOverride
typeit.TypeConstructor
is now recommended overtypeit.type_constructor
.- The latter is left for backward compatibility.
NonStrictPrimitives
andSumTypeDict
are now recommended over correspondingNON_STRICT_PRIMITIVES
SUM_TYPE_DICT
. The latter are left for backward compatibility.
- Support Python 3.8
- Generalized attribute name normalization
- SumType variants are attribute-strict #48
- Combinator for flags and extensions #45
- Change interface for Flags and Extensions
- SumType from/to mapping #43
- Support explicit tags for SumType Variants #32
- Parser memoization #38
- Fix root object validation error handling
- Support builtins parsing #24
- Codegen for Sequence root objects #37
- [api breaking change] simpler error handling interface
- Added support for regular classes with annotated
__init__
.
- Experimental support for SumType.
typeit.iter_invalid
replacestypeit.utils.iter_invalid_data
.- Add support for
pyrsistent.typing.PVector
andpyrsistent.typing.PMap
types. - Add support for
Literals
.
pyrsistent
is now part of minimal dependencies.- Add support for chaining / compositional API for overrides.
- Fix bug in serialization of union types.
- Fix bug in parsing union types with sequence variants.
- Primitive types switched to strict matching.
- Non-strict primitives flag NonStrictPrimitives is available for overrides.
- Added support for typing.Mapping
- Added support for pathlib.Path
- Dependencies were split into minimal / extras.
- utils.iter_invalid_data() does not throws KeyError when sample value is missing.
- Added a utility function for iterating over invalid data samples.
- Internal dependencies updated.
- Fixed bug in Union serialization.
- Added support for overrides;
- Added support for fixed-length Tuples;
- Added support for Sets.