Skip to content

Releases: smarie/python-pyfields

1.7.2 - bugfix

06 Nov 16:38
246cc24
Compare
Choose a tag to compare
  • Fixed TypeError: Neither typeguard not pytypes is installed even with typeguard installed. Fixed #91

See documentation page for details.

1.7.1 - Compatibility fix for typeguard `3.0.0`

04 May 13:11
Compare
Choose a tag to compare
  • Fixed TypeError: check_type() takes 2 positional arguments but 3 were given triggering erroneous FieldTypeError
    when typeguard>=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`

21 Jun 09:33
Compare
Choose a tag to compare
  • @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 new autocheck option in the copy_value factory.

  • @autofields and @autoclass now provide an exclude (resp. af_exclude) list, to list names for fields that should not be created. By default this contains a reserved name from abc.ABCMeta, for convenience. Fixes #84.

See documentation page for details.

1.6.2 - CI/CD migration

22 Mar 16:39
Compare
Choose a tag to compare
  • 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

24 Nov 12:38
Compare
Choose a tag to compare
  • Fixed an issue with autofields (and therefore autoclass 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`

23 Sep 09:14
Compare
Choose a tag to compare
  • Copied the relevant contents from autoclass so as to get rid of the dependency. Since we are in a pyfields 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 a to_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

22 Sep 15:48
Compare
Choose a tag to compare
  • 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

22 Sep 14:54
Compare
Choose a tag to compare
  • New @autoclass decorator directly available from pyfields. It is merely equivalent to the original @autoclass with option autofields=True, which makes it easier to use on classes with automatic fields. Fixes #75

See documentation page for details.

1.3.1 - bugfix

22 Sep 13:00
Compare
Choose a tag to compare
  • 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

21 Sep 11:15
Compare
Choose a tag to compare
  • 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.