Releases: smarie/python-pyfields
1.7.2 - bugfix
- Fixed
TypeError: Neither typeguard not pytypes is installedeven withtypeguardinstalled. Fixed #91
See documentation page for details.
1.7.1 - Compatibility fix for typeguard `3.0.0`
- Fixed
TypeError: check_type() takes 2 positional arguments but 3 were giventriggering erroneousFieldTypeError
whentypeguard>=3.0.0is used. Fixed #87
See documentation page for details.
1.7.0 - Better support for non-deep-copiable default values in `@autofields`
-
@autofieldsand@autoclassnow raise an error when a field definition can not be valid, because the default value can not be deep-copied. This will help users detect issues such as #84 earlier. Implementation is done through a newautocheckoption in thecopy_valuefactory. -
@autofieldsand@autoclassnow provide anexclude(resp.af_exclude) list, to list names for fields that should not be created. By default this contains a reserved name fromabc.ABCMeta, for convenience. Fixes #84.
See documentation page for details.
1.6.2 - CI/CD migration
- This is a technical release with no code change, to validate the new Github Actions workflow.
See documentation page for details.
1.6.1 - Bugfix
- Fixed an issue with
autofields(and thereforeautoclasstoo) where a field would be mistakenly recreated on a subclass when that subclass does not define type hints while the parent class defines type hints. Fixes #81
See documentation page for details.
1.6.0 - we now have our own version of `@autoclass`
- Copied the relevant contents from
autoclassso as to get rid of the dependency. Since we are in apyfieldscontext there were many things that could be dropped and remaining code could be easily copied over. Also took this opportunity to replace the dict view with ato_dict/from_dictpair of methods, this seems less intrusive in the class design. Finally the parameter names have been simplified, see API reference for details. Fixes #79
See documentation page for details.
1.5.0 - updated `@autoclass` signature
- Improved
@autoclassso that it is much easier to access the relevant arguments from underlying@autofieldsand@autoclass. Fixed #78
See documentation page for details.
1.4.0 - new `@autoclass` decorator
- New
@autoclassdecorator directly available frompyfields. It is merely equivalent to the original@autoclasswith optionautofields=True, which makes it easier to use on classes with automatic fields. Fixes #75
See documentation page for details.
1.3.1 - bugfix
- Fields order are preserved by
@autofieldseven in the case of a field with just a type annotation. Fixed #76
See documentation page for details.
1.3.0 - Support for Forward references, PEP563 and class-level access
-
String forward references in type hints, and PEP563 behaviour, is now supported. When this case happense, the type hint resolution is delayed until the field is first accessed. Fixes #73
-
Accessing a field definition from a class directly is now enabled, since PyCharm fixed their autocompletion bug. Fixes #12
See documentation page for details.