All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Fix: "quick fingers" issue with
_decomposefix.
- Issue with trace configuration.
- Issues with
_decompose. - Signature match in
eventsocket.
firebird.base.buffer.MemoryBuffer.get_rawmethod.get_rawmethod toBufferFactory,BytesBufferFactoryandCTypesBufferFactory.__repr__method forPyCodeandPyCallablethat will limit output to 50 characters.- Optional
encodingparameter forZMQAddressconstructor.
- Tests changed from
unittesttopytest, 96% code coverage. - Minimal Python version raised to 3.11.
- The
firebird.base.loggingmodule was completelly reworked. - Function
firebird.base.types.Conjunctiverenamed toconjunctive. firebird.base.collections.DataList.__init__parameterfrozenis now keyword-only.firebird.base.collections.DataList.extractparametercopyis now keyword-only.firebird.base.collections.DataList.sortparameterreverseis now keyword-only.firebird.base.collections.DataList.splitparameterfrozenis now keyword-only.firebird.base.collections.Registry.popitemparameterlastis now keyword-only.firebird.base.collections.BaseObjectCollection.containsparameterexprnow does not have default value.- Deprecated
firebird.base.config.create_configfunction was removed. firebird.base.config.DirectorySchemeparameterforce_homeis now keyword only.firebird.base.config.Optionparametersrequiredanddefaultare now keyword only.- Parameter
contextwas removed fromfirebird.base.trace.traceddecorator. - Option
contextwas removed fromfirebird.base.trace.BaseTraceConfig. - Log function return value as
reprrather thanstr. - Sentinel objects completely reworked. Individual sentinels are now classes derived from
Sentinel.
- Broken
firebird.base.types.Distinctsupport for dataclasses and hash function. - Raise
BufferErroristeadIOErrorinfirebird.base.buffer.MemoryBuffermethodsresize,readandread_number - Problem with
firebird.base.collections.Registry.popthat did not raisedKeyErrorwhendefaultwas not specified. - Bug in
firebird.base.collections.Registry.popitemwithlast= True. - Problem with name handling in
firebird.base.config.ConfigOption.clearandset_value. - Problem with
firebird.base.config.WindowsDirectorySchemeandfirebird.base.config.MacOSDirectorySchemeconstructors. - Problem with
firebird.base.config.ListOption.item_typesvalue. - Problem with internal
.Convertorinitialization infirebird.base.config.ListOption. - Use copy of
defaultlist stead direct use infirebird.base.config.ListOption. firebird.base.config.ListOption.get_formattedandfirebird.base.config.ListOption.get_as_strshould return typed values for multitype lists.firebird.base.config.ConfigOption.validateshould validate theConfigas well if defined.firebird.base.config.ConfigListOption.validateshould report error for empty list whenrequired.- Problem with conversion of flags from string in
firebird.base.strconv.
- New
EnvExtendedInterpolationclass incnfigmodule that extendsconfigparser.ExtendedInterpolationwith special handling for "env" section that returns value of specified environment variable, or empty string if such variable is not defined.
Error.getattr()should not mask the absence of__notes__attribute.
- Log record values
moduleandfilenamewere not assigned properly under Python 3.11 - Failed tests due to subtle changes in Python 3.11
- Downgrade dependency to protobuf>=4.23.4
- Update dependency to protobuf >=4.24.3
- Build system changed from setuptools to hatch
- Package version is now defined in firebird.base.about.py (version)
- .pyi file for config protobuf
- Bug with Config.get_config() and
plainbool argument.
- firebird.base.config.StrOption now supports preservation of significant leading whitespace for multiline values (like PyCodeOption).
- Bug in TraceManager.load_config().
-
Registration of already registered protobuf objects is now ignored instead raising exception.
-
Module firebird.base.config:
- Config.get_config() and Option.get_config() now provides
plainbool argument to return configuration text without comments. Deafult is False. - create_config is now deprecated, will be removed in version 2.0.
- Config.get_config() and Option.get_config() now provides
- Move away from setup.cfg to pyproject.toml, new source tree layout.
- Added internal functions firebird.base.types._decompose and firebird.base.types._power_of_two from stdlib enum module, because they were removed in Python 3.11.
- Module firebird.base.protobuf now uses importlib.metadata.entry_points instead pkg_resources.iter_entry_points.
- Improved documentation.
- Signature in firebird.base.config.IntOption.clear().
- Signature in firebird.base.trace.TraceManager.add_trace(). Keyword argument
decorator(with default) could not be used with args/kwargs, so it was removed. New firebird.base.trace.TraceManager.decorator attribute was added to firebird.base.trace.TraceManager that could be used to change trace decorator used for intrumentation.
- Optimizations.
- Cleanup of pylint warnings.
- Updated documentation.
- Documentation is now also provided as Dash / Zeal docset, downloadable from releases at github.
- Uregistered bug in trace.TraceConfig - redundant
flagsdefinition.
- Upgrade to protobuf 4.21.1. As this upgrade has consequences, please read https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
~firebird.base.buffermodule:
- Added firebird.base.buffer.MemoryBuffer.write_sized_string() for symetry with read_sized_string().
- Now firebird.base.buffer.MemoryBuffer string functions has also
errorsparameter in addition toencoding.
- Direct assignment to firebird.base.config.Config option raises a
ValueErrorexception with message "Cannot assign values to option itself, useoption.valueinstead".
- firebird.base.config.Config has new constructor keyword-only argument
description.
- Uregistered bug in config.ListOption - value and default was the same instance
- Layout produced by firebird.base.config.get_config() was changed.
- New function firebird.base.protobuf.get_message_factory.
- Module firebird.base.trace: Added:
apply_to_descendantsboolean configuration option to apply configuration also to all registered descendant classes. The default value isTrue.
- Bug in firebird.base.signal.eventsocket signature handling.
-
Build scheme changed to
PEP 517. -
Various changes to documentation and type hint adjustments.
-
firebird.base.config module:
- BREAKING CHANGE: ApplicationDirectoryScheme was replaced by DirectoryScheme class, and get_directory_scheme() has changed signature.
- Directory scheme was reworked and now also supports concept of HOME directory.
- New MacOS directory scheme support. As I don't have access to MacOS, this support should be considered EXPERIMENTAL. Any feedback about it's correctness is welcome.
- Added: New Config constructor keyword-only
boolargumentoptionaland associated Config.optional read-only property. - Added: Config.has_value() function.
- New class: PathOption for Configuration options with
pathlib.Pathvalue.
-
New module: signal - Callback system based on Signals and Slots, and "Delphi events"
-
New class: firebird.base.config.ApplicationDirectoryScheme
-
Introduced firebird.base.config.PROTO_CONFIG constant with fully qualified name for ConfigProto protobuf.
-
Module firebird.base.protobuf: Added direct support for key well-known data types
Empty,Any,Duration,Timestamp,Struct,Value,ListValueandFieldMask. They are automatically registered. New constants 'PROTO_' with fully qualified names. -
firebird.base.protobuf.create_message()
has new optionalserializedargument withbytes` that should be parsed into newly created message instance. -
New functions firebird.base.protobuf.struct2dict() and firebird.base.protobuf.dict2struct()
-
Modules firebird.base.trace: Added support for trace configuration based on firebird.base.config, using new classes BaseTraceConfig, TracedMethodConfig, TracedClassConfig and TraceConfig.
-
New methods in firebird.base.trace.TraceManager:
- load_config() to update trace from configuration.
- set_flag() and clear_flag().
-
New function firebird.base.types.load().
- firebird.base.types.load() function now supports
object_name[.object_name...]specifications instead singleobject_name. - firebird.base.config.Config.load_config(): raises error when section is missing, better error handling when exception is raised while loading options
- firebird.base.config.PyCallableOption signature argument could be inspect.Signature or Callable
- Optional argument
to_defaultin~firebird.base.config.Option.clear()is now keyword-only. - firebird.base.logging.get_logging_id() uses qualname instead name
- firebird.base.trace.TraceFlag value
DISABLEDwas renamed toNONE. - firebird.base.types.MIME now handles access to properties more efficiently and faster.
- Changes in documentation.
- Documentation: new examples for trace, logging and hooks
- Documentation: adjustments to css
- DataList is now generic class.
- DataList.extract() has new 'copy' argument.
- Promoted to stable
- More documentation
- New module: firebird.base.strconv - Data conversion from/to string
- New module: firebird.base.trace - Trace/audit for class instances
- Changed module: firebird.base.types, New classes: MIME - MIME type specification, PyExpr - Source code for Python expression, PyCode - Python source code and PyCallable - Source code for Python callable. Removed function: str2bool
- Reworked module: firebird.base.config - Classes for configuration definitions with new classes: ConfigOption - Configuration option with Config value, ConfigListOption - Configuration option with list of Config values, and DataclassOption - Configuration option with a dataclass value.
- Changed module: firebird.base.logging - Trace/audit functionality removed (into new module firebird.base.trace)
Initial release.