Skip to content

Releases: smarie/python-pyfields

1.2.0 - `getfields` improvements and new `get_field_values`

23 Jun 09:28

Choose a tag to compare

  • getfields can now be executed on an instance, and provides a public_only option. Fixes #69

  • New get_field_values method to get an ordered dict-like of field name: value. Fixes #70

See documentation page for details.

1.1.5 - bugfix

12 Jun 12:17

Choose a tag to compare

  • @autofields now correctly skips @property and more generally, descriptor members. Fixes #67

See documentation page for details.

1.1.4 - better python 2 packaging

24 Apr 16:51

Choose a tag to compare

  • packaging improvements: set the "universal wheel" flag to 1, and cleaned up the setup.py. In particular removed dependency to six. Fixes #66

See documentation page for details.

1.1.3 - smaller wheel

17 Apr 09:21

Choose a tag to compare

  • tests folder is now excluded from generated package wheel. Fixed #65

See documentation page for details.

1.1.2 - type hint fix (minor)

15 Apr 15:55

Choose a tag to compare

  • Now converters={'*': ...} does not appear as a type hint error. Fixed #64

See documentation page for details.

1.1.1 - PEP561 compatibility

22 Jan 12:06

Choose a tag to compare

  • Misc: Package is now PEP561 compatible. Fixed #61

See documentation page for details.

1.1.0 - @autofields and default values improvements

22 Jan 11:18

Choose a tag to compare

  • New @autofields decorator. This decorator can be used to drastically reduce boilerplate code, similar to pydantic and attrs. This is compliant with python 2.7 and 3.5+ but is more useful when the type hints can be provided in class member annotations, so from 3.6+. Fixed #55

  • Default values are now validated/converted as normal values. If the default value is provided in default=<value> or as a default_factory=copy_value(<value>), this is done only once per field, to accelerate future access. If the value was converted on the way, the converted value is used to replace the default value, or the default value copied by the factory. Fixed #57

  • Misc: removed makefun usage in validate_n_convert.py : was overkill. Also fixed a few type hints.

See documentation page for details.

1.0.3 - bugfix

10 Dec 16:58
cdd5402

Choose a tag to compare

  • Fixed bug with super().__init__ not behaving as expected. Fixed #53

See documentation page for details.

1.0.2 - bugfixes

22 Nov 16:20

Choose a tag to compare

  • User-provided nonable status was wrongly overriden automatically when the field was attached to the class. Fixed #51
  • Fixed an issue with type validation when typeguard is used and a tuple of types is provided instead of a Union. Fixed #52

See documentation page for details.

1.0.1 - `pyproject.toml`

18 Nov 11:24

Choose a tag to compare

Added pyproject.toml

See documentation page for details.