v5.0.0
Release created on: 02.07.2023 - 18:23:02
New Features
- New
ExtendedType
features:- Added support for mixin-classes and delayed creation of slots. (@skoehler)
- Added automatic initializers for annotated fields (previously causing an exception due to slots). (@skoehler)
- Added automatic initializers for annotated class fields (previously causing an exception due to slots). (@skoehler)
- Added new helper methods in
ExtendedType
:_computeSlots
,_aggregateMixinSlots
,_iterateBaseClasses
, and_iterateBaseClassPaths
.
- Added new decorators:
@slotted
@mixin
@singleton
@readonly
, and@notimplemented
.
- Added JSON support for
pyTooling.Configuration
. - New
Platform
features:- Added
PythonVersion
toPlatform
to distinguish Python versions. - Added
PythonImplementation
toPlatform
to distinguish CPython and PyPy.
- Added
- Added dummy implementations of
__notes__
andadd_note()
to exception base classes and derived classes to workaround that missing feature for older Python versions (<3.11). - New exceptions in
pyTooling.MetaClasses
:ExtendedTypeError
BaseClassWithoutSlotsError
BaseClassWithNonEmptySlotsError
BaseClassIsNotAMixinError
DuplicateFieldInSlotsError
.
- New graph features:
GetVertexByID
GetVertexByValue
- New vertex operations:
IterateAllOutboundPathsAsVertexList
Delete
(itself)DeleteEdgeTo
,DeleteEdgeFrom
,DeleteLinkTo
,DeleteLinkFrom
.
- New edge operations:
Delete
(itself)
- New link operations:
Delete
(itself)
pyToolong.StateMachine
package (alpha version).
Changes
- Bumped dependencies.
ExtendedType
:- Enhanced error handling in
mergedicts
andzipdicts
. - Improved performance of of
mergedicts
by 10x. - Moved exceptions
AbstractClassError
andMustOverrideClassError
frompyTooling.Exceptions
topyTooling.MetaClasses
- Moved module
pyTooling.Common.Platform
topyTooling.Platform
.- Moved nested class
pyTooling.Common.Platform.Platform.Platforms
topyTooling.Platform
.
- Moved nested class
- Renamed
ObjectWithSlots
toSlottedObject
. - Renamed
Semversion
toSemanticVersion
andCalVersion
toCalendarVersion
. - Marked
@overload
marked function overloads (signature variants) aspragma: no cover
. - Fixed
ClassVar
s inpyTooling.Configuration
.
Bug Fixes
- Reworked
ExtendedType
when used with slots in multiple inheritance scenarios. (@skoehler) - Reworked internal inheritance graphs to fulfill the needed of ExtendedType using slots and the mixin feature.
- Fixed
pyTooling.Configuration
andpyTooling.Configuration.YAML
. - Fixed
pyTooling.GraphML
. - Fixed
pyTooling.TerminalUI
.
- Fixed
- Lots of documentation and doc-string updates.
- Fixes to the ReST syntax especially to
.. todo::
. - Fixed some method modifiers in
ExtendedType
.
Documentation
- Updated dependencies:
- Added tabs to denote Bash commands for Linux vs. PowerShell commands for Windows.
- Added dependency lists for performance testing and benchmarking.
- Documented
firstKey
,firstValue
,firstItem
. - Documented
License
. - New glossary items.
- Updated installation instructions.
- Introduced new tabs feature to switch code variants.
- Added local packaging and installation instructions.
- Documented enumerations in
pyTooling.Graph
. - Documented abstract data model for configurations.
- Updated existing documentation pages.
- Added documentation for JSON.
- Listed
StateMachine
in documentation (alpha).
Test Cases
- Added more benchmarks for:
mergedicts
zipdicts
- Object creation with and without modified
__call__
in meta-class.
- New unit tests:
- Dictionary functions:
firstKey
,firstValue
,firstItem
,zipdicts
andmergedicts
. sizeof
pyTooling.Configuration.JSON
- Dictionary functions:
- Added lots of new testcases for:
ExtendedType
especially for using slots and mixins in linear and multiple inheritance usecases.@export
@readonly
- Graph
GetVertexByID
GetVertexByValue
- Vertex:
IterateAllOutboundPathsAsVertexList
Subject to Changes
AddedPythonVersion
toPlatform
.
⇒ this field should be usingSemVersion
instead of a custom version class.
Already address in this version.As a workaround__call__
ofExtendedType
needed to be patched.
⇒ It's envisioned to modify the algorithm how__new__
is modified and swapped, so only classes with modified__new__
have a performance hit, but not all object creations using meta-classExtendedType
.
Already address in this version.
Known issues
- A mixin-class can be instantiated. A follow up version will mark such a class as abstract.
- Some documentation sections needs an update/review due to latest changes.
- Missing documentation for
pyTooling.TerminalUI
.
- Missing documentation for
- CPython implementation has a bug:
python/cpython#105888
The current workaround has a huge performance impact on object creation.
Closes #42.