Wysdom

Latest version: v0.2.1

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

Scan your dependencies

Page 1 of 2

0.2.1

Bug fixes

* 49 - Removed an erroneous print statement that was causing verbose debug output

0.2.0

Enhancements

47 - Allow multiple subclasses of RegistersSubclasses to have the same register_as value. Classes and instances returned by `registered_subclass` and `registered_subclass_instance` are now always strict subclasses of the class invoking the method, and will only throw a KeyError if there are multiple valid subclasses with the same key. See the docstring for `RegisteredSubclasses.registered_subclass` for more details.

Compatibility Changes

47 - Please note that this update breaks backward compatibility on `RegisteredSubclasses.registered_subclasses` which now returns `Dict[str, List[Type[RegistersSubclasses]]]` instead of `Dict[str, Type[RegistersSubclasses]]`. If you have existing code that uses this method, please replace calls to `RegisteredSubclasses.registered_subclasses()` with `RegisteredSubclasses.registered_subclasses()[0]`.

0.1.5

Enhancements

* 45 - added parameter `persist_defaults` to UserProperty. If this parameter is set to True and a UserProperty also has either the `default` or `default_function` parameter , when the UserProperty returns a default value that value will also be explicitly stored in the underlying data object. This was the default behavior before 0.1.4. This is often desirable behavior if the UserProperty returns another object and your code expects it to return the same object instance each time it is accessed, and so is now provided as a configurable parameter.

Bug fixes

* 42 - default values of a `UserProperty` will now be returned as the type declared in `property_type`, as before 0.1.4

0.1.4

Bug Fixes:

* 42 - accessing a `UserProperty` that has a `default` or `default_function` will no longer set that property permanently in the underlying data.

0.1.3

Enhancements:

* 40 - added `optional` parameter to UserProperty:


middle_name = UserProperty(str, optional=True)

0.1.2

Enhancements

* 28 - added function wysdom.schema to look up an object's schema, allowing jsonschema validation checks in the style

schema(element).is_valid(instance)

* 33 - JSON schemas are now built using named references, meaning it is now possible to have recursive schemas (e.g. Person objects containing other Person objects)

Bug fixes

* 30 - object schemas not being correctly rendered as dicts when members of a SchemaArray

Technical changes

* 31 - new implementations of copy and deepcopy

Documentation

* 37 - completed initial user guide and API documentation

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.