Releases: smarie/python-pyfields
1.2.0 - `getfields` improvements and new `get_field_values`
-
getfieldscan now be executed on an instance, and provides apublic_onlyoption. Fixes #69 -
New
get_field_valuesmethod to get an ordered dict-like of field name: value. Fixes #70
See documentation page for details.
1.1.5 - bugfix
@autofieldsnow correctly skips@propertyand more generally, descriptor members. Fixes #67
See documentation page for details.
1.1.4 - better python 2 packaging
- packaging improvements: set the "universal wheel" flag to 1, and cleaned up the
setup.py. In particular removed dependency tosix. Fixes #66
See documentation page for details.
1.1.3 - smaller wheel
testsfolder is now excluded from generated package wheel. Fixed #65
See documentation page for details.
1.1.2 - type hint fix (minor)
- Now
converters={'*': ...}does not appear as a type hint error. Fixed #64
See documentation page for details.
1.1.1 - PEP561 compatibility
- Misc: Package is now PEP561 compatible. Fixed #61
See documentation page for details.
1.1.0 - @autofields and default values improvements
-
New
@autofieldsdecorator. This decorator can be used to drastically reduce boilerplate code, similar topydanticandattrs. 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 adefault_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
makefunusage invalidate_n_convert.py: was overkill. Also fixed a few type hints.
See documentation page for details.
1.0.3 - bugfix
- Fixed bug with
super().__init__not behaving as expected. Fixed #53
See documentation page for details.
1.0.2 - bugfixes
- User-provided
nonablestatus was wrongly overriden automatically when the field was attached to the class. Fixed #51 - Fixed an issue with type validation when
typeguardis used and a tuple of types is provided instead of aUnion. Fixed #52
See documentation page for details.
1.0.1 - `pyproject.toml`
Added pyproject.toml
See documentation page for details.