Releases: xoeye/typecats
v2.0.2
What's Changed
- Fix failing test on 3.7 from cattrs bug by @xaviergmail in #16
- Allow unstructuring of attrs classes in typing. Any-typed fields by @xaviergmail in #17
Full Changelog: v2.0.1...v2.0.2
v2.0.1
Changes
- Fix structuring of generic wildcats (#15) by @xaviergmail
This release was made possible by the following contributors:
@jwsloan and @xaviergmail
v2.0.0
Changes
Breaking changes:
Upgrades cattrs from 1.1.2 to 22.1.0, attrs from 20.3.0 to 21.4.0 and switches to the GenConverter, which supports the newer style type annotations (e.g, list[] instead of typing.List[]).
Detailed validation from cattrs is enabled by default. Disable it if you wish by calling set_detailed_validation_mode_not_threadsafe(enable=False)
Removed typecats.types.CommonStructuringExceptions. Structuring validation errors are now all typecats.StructuringErrors (aliased to cattrs.errors.BaseValidationError), regardless of detailed validation.
MyPy plugin changed from resolving from builtins. to builtins. to avoid errors. This might not work on older mypy versions.
Other changes:
Exports register_struc_hook_func and register_unstruc_hook_func, which are methods bound to typecats's default cattrs converter.
Changed imports from cattr to cattrs
Supports Python 3.8 and 3.9.
Changed function parameter types from cattrs.Converter to cattrs.GenConverter where necessary, though typecats assumes GenConverter throughout, so you should probably update too.
This release was made possible by the following contributors:
v2.0.0rc1
Changes
Breaking changes:
- Upgrades
cattrs
from 1.1.2 to 22.1.0,attrs
from 20.3.0 to 21.4.0 and switches to the
GenConverter, which supports the newer style type annotations (e.g, list[] instead of typing.List[]). - Detailed validation from cattrs is enabled by default. Disable it if you wish by calling
set_detailed_validation_mode_not_threadsafe(enable=False)
- Removed
typecats.types.CommonStructuringExceptions
. Structuring validation errors are now alltypecats.StructuringError
s (aliased tocattrs.errors.BaseValidationError
), regardless of detailed validation. - MyPy plugin changed from resolving from
__builtins__.<type>
tobuiltins.<type>
to avoid errors. This might not work on older mypy versions.
Other changes:
- Exports
register_struc_hook_func
andregister_unstruc_hook_func
, which are methods bound to typecats's default cattrs converter. - Changed imports from
cattr
tocattrs
- Supports Python 3.8 and 3.9.
- Changed function parameter types from
cattrs.Converter
tocattrs.GenConverter
where necessary, though typecats assumesGenConverter
throughout, so you should probably update too.
This release was made possible by the following contributors:
@jwsloan, @xaviergmail and Peter Gaultney
1.7.1
1.7.0
v1.7.0 fix setup and readme compatibility notes
1.6.1
Fixed bug in unstruc_strip_defaults and for Wildcat equality testing.
1.5.0
Merge pull request #4 from xoeye/feature/strip-attrs-defaults 1.5.0: Allow stripping of attrs defaults on unstructure
1.4.0 - integrate with application-provided cattrs Converters
See CHANGES.md for a fuller description of what this offers.
1.1.1
Fix user-defined validators not being preserved for attributes with no default type.