Tags: bluebinary/classicist
Tags
Null-Safe NullType Support (#9) Added support for creating custom data model classes and libraries that support nested and arbitrary attribute access without raising exceptions when accessing attributes that would otherwise return `None` via the new `Null` singleton. This can be used instead of the `None` singleton in scenarios where "null-safe" navigation is beneficial, and allows for writing clearer and more expressive code without nested attribute existence checks.
Enhanced Aliasing (#7) * Enhanced Aliasing Added support for aliasing classes and module-level functions via the `@alias` decorator, in addition to the earlier support provided by the `@alias` decorator for aliasing methods defined within classes supported by the `classicist` library’s `aliased` metaclass. Added additional unit testing for the aliasing functionality. Updated the `README` file and `CHANGELOG` to document the new functionality. Incremented the library version number to `1.0.2`. * Enhanced Aliasing Upgraded __Black__ to the latest version, 26.1.0, and fixed code formatting discrepancies between the locally formatted code and the formatting expected within GitHub Actions workflows run through the latest version of __Black__. Added additional error logging to help debug and issue with the unit tests under Python 3.9. * Enhanced Aliasing Possible fix for `@classmethod` aliasing in Python 3.9. * Enhanced Aliasing Updated `README` file. * Enhanced Aliasing Updated `README` file. * Enhanced Aliasing Updated `README` file. * Enhanced Aliasing Improved logging for aliasing. Updated `README` file.
Enhanced Aliasing (#2) * Enhanced Aliasing Added support for aliasing classes and module-level functions via the `@alias` decorator, in addition to the earlier support provided by the `@alias` decorator for aliasing methods defined within classes supported by the `classicist` library’s `aliased` metaclass. Added additional unit testing for the aliasing functionality. Updated the `README` file and `CHANGELOG` to document the new functionality. Incremented the library version number to `1.0.2`. * Enhanced Aliasing Upgraded __Black__ to the latest version, 26.1.0, and fixed code formatting discrepancies between the locally formatted code and the formatting expected within GitHub Actions workflows run through the latest version of __Black__. Added additional error logging to help debug and issue with the unit tests under Python 3.9. * Enhanced Aliasing Possible fix for `@classmethod` aliasing in Python 3.9.
New Functionality (#1) * New Functionality Added support for creating method aliases on classes via the new `@alias()` decorator and its associated `aliased` metaclass. Added support for creating arbitrary annotations on mutable code objects via the new `@annotation()` decorator, including on classes, methods, functions and most objects. Added support for marking code objects such as methods and functions as deprecated via the new `@deprecated` decorator and for checking deprecated status via `is_deprecated`. Added support for protecting classes and subclasses from attribute-shadowing, via the new `shadowproof` metaclass. The issue is usually caused by a subclass unintentionally redefining or overwriting an attribute value that has been inherited from a superclass and can otherwise be quite difficult to debug, as it may lead to unexpected behaviour in either the superclass or subclass without an immediately obvious cause. Python does not issue any warnings or raise any errors when most attributes are overwritten, aside from special cases mostly in the standard library on immutable objects. The `shadowproof` metaclass helps solve this issue by raising an `AttributeShadowingError` when this happens. Added support for marking functions and class methods as not being suitable for caching via the `@nocache` decorator; the decorator acts as clear code-documentation rather than a mechanism to prevent caching from taking place. * New Functionality Added `__future__.annotations` for backwards compatibility support for using union type hints in Python 3.9.