Releases: smarie/python-pyfields
1.7.2 - bugfix
- Fixed
TypeError: Neither typeguard not pytypes is installed
even withtypeguard
installed. 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 given
triggering erroneousFieldTypeError
whentypeguard>=3.0.0
is used. Fixed #87
See documentation page for details.
1.7.0 - Better support for non-deep-copiable default values in `@autofields`
-
@autofields
and@autoclass
now 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 newautocheck
option in thecopy_value
factory. -
@autofields
and@autoclass
now 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 thereforeautoclass
too) 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
autoclass
so as to get rid of the dependency. Since we are in apyfields
context 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_dict
pair 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
@autoclass
so that it is much easier to access the relevant arguments from underlying@autofields
and@autoclass
. Fixed #78
See documentation page for details.
1.4.0 - new `@autoclass` decorator
- New
@autoclass
decorator directly available frompyfields
. It is merely equivalent to the original@autoclass
with 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
@autofields
even 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.