Pyfields

Latest version: v1.7.2

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 6

0.11.0

Fixed fields initialization order in generated constructor methods:

- the order is now the same than the order of appearance in the class (and not reversed as it was). Fixed [36](https://github.com/smarie/python-pyfields/issues/36).
- the above is true, even in python < 3.6. Fixed [38](https://github.com/smarie/python-pyfields/issues/38)
- the order now takes into account first the ancestors and then the subclasses, for the most intuitive behaviour. Fixed [37](https://github.com/smarie/python-pyfields/issues/37).


See [documentation page](https://smarie.github.io/python-pyfields/changelog/) for details.

0.10.0

**Read-only fields**

- Read-only fields are now supported through `field(read_only=True)`. Fixes [33](https://github.com/smarie/python-pyfields/issues/33).

**Misc**

- All core exceptions now derive from a common `FieldError`, for easier exception handling.
- Now raising an explicit `ValueError` when a descriptor field is used with an old-style class in python 2. Fixes [34](https://github.com/smarie/python-pyfields/issues/34)

See [documentation page](https://smarie.github.io/python-pyfields/changelog/) for details.

0.9.1

- Minor performance improvement: `Converter.create_from_fun()` does not generate a new `type` everytime a converter needs to be created from a callable - now a single class `ConverterWithFuncs` is used. Fixed [32](https://github.com/smarie/python-pyfields/issues/32).

See [documentation page](https://smarie.github.io/python-pyfields/changelog/) for details.

0.9.0

**converters**

- Fields can now be equipped with converters by using `field(converters=...)`. Fixes [5](https://github.com/smarie/python-pyfields/issues/5)
- New method `trace_convert` to debug conversion issues. It is available both as an independent function and as a method on `Field`. Fixes [31](https://github.com/smarie/python-pyfields/issues/31)
- New decorator `<field>.converter` to add a converter to a field. Fixed [28](https://github.com/smarie/python-pyfields/issues/28).

**misc**

- The base `Field` class is now exposed at package level.

See [documentation page](https://smarie.github.io/python-pyfields/changelog/) for details.

0.8.0

**PEP484 type hints support**

- Now type hints relying on the `typing` module (PEP484) are correctly checked using whatever 3d party type checking library is available (`typeguard` is first looked for, then `pytypes` as a fallback). If none of these providers are available, a fallback implementation is provided, basically flattening `Union`s and replacing `TypeVar`s before doing `is_instance`. It is not guaranteed to support all `typing` subtelties. Fixes [7](https://github.com/smarie/python-pyfields/issues/7)

See [documentation page](https://smarie.github.io/python-pyfields/changelog/) for details.

0.7.0

**validators**

- New decorator `<field>.validator` to add a validator to a field. Fixed [9](https://github.com/smarie/python-pyfields/issues/9).
- Native fields are automatically transformed into descriptor fields when validators are added this way. Fixes [1](https://github.com/smarie/python-pyfields/issues/1).

See [documentation page](https://smarie.github.io/python-pyfields/changelog/) for details.

Page 5 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.