Parsyfiles

Latest version: v2.9.1

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

Scan your dependencies

Page 1 of 4

2.9.1

* The list of subclass is now smaller in case of generics, which avoids duplicate exploration
* a bug was introduced in 2.9.0 that made the root parser create chains that would not make sense. Fixed this.
* failing test collection now can make the CI build fail

2.9.0

* Improved subclass detection (now passing all the tests !). Fixes 19 and Fixes 21
* Subclasses are now handled as cascading parsers: this leads to more verbose output but everything is inside the same framework of parser cascade in terms of output
* some exceptions/warning messages were improved

2.8.0

* Improved readability of errors by removing the `__cause__` of `CascadeError` and `NoSubclassCouldBeInstantiated`
* Improved the error messages in `NoSubclassCouldBeInstantiated` and in `CascadeError`. In particular the order of exceptions display was fixed.
* Slightly improved subclasses detection. Now relying on `pytypes`
* Fixed issue with `attrs` and improved detection of optionality (if a default value is provided then the attribute is optional)

2.7.1

* Fixed sub-subclass detection [21](https://github.com/smarie/python-parsyfiles/issues/21)
* Some log warnings were hidden, in particular those explaining why instances of a given class could not be instantiated from constructor.

2.7.0

* Added support for Forward References in PEP484 annotations. Fixes [20](https://github.com/smarie/python-parsyfiles/issues/20). This unlocks parsing infinitely-nested collections: you just have to create a collection type that contains a union to itself such as in `InfiniteRecursiveDictOfA = Dict[str, Union[A, 'InfiniteRecursiveDictOfA']]`. Note that infinite unions are detected and handled correctly (such as `Foo = Union[str, 'Foo']`)
* Fixed a bug with type inspection for attrs classes

2.6.1

* fixed `__init__` file: `__all__` contained a wrong entry
* the central logger `default_logger` is now independent from the `RootParser` class
* fixed a conversion bug for `Union` types (or `TypeVar`s with union constraints): now all alternate conversion paths are tried even in case of an exception in a converter.
* The `<dict_to_object>` converter and the `Multifile object parser` now both support generic types when looking for subclasses (although strong compliance of the subclasses with the `TypeVar` constraints are not further checked). The method to list these subclasses is in a central place to ensure consistency
* Now there are two error types for invalid type hints : `TypeInformationRequiredError` (no type hint) and `InvalidPEP484TypeHint` (invalid type hint). This PEP484-compliance check is also now done in a central place to ensure consistency.
* The `<dict_to_object>` converter and the `Multifile object parser` now benefit from a cache in order to know if a given class can be built from its constructor, or its subclasses. This leads to much less log warning messages

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.