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.
- New
EnvExtendedInterpolation
class incnfig
module that extendsconfigparser.ExtendedInterpolation
with 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
module
andfilename
were 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
plain
bool 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
plain
bool 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
flags
definition.
- 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.buffer
module:
- Added firebird.base.buffer.MemoryBuffer.write_sized_string() for symetry with read_sized_string().
- Now firebird.base.buffer.MemoryBuffer string functions has also
errors
parameter in addition toencoding
.
- Direct assignment to firebird.base.config.Config option raises a
ValueError
exception with message "Cannot assign values to option itself, useoption.value
instead".
- 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_descendants
boolean 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
bool
argumentoptional
and associated Config.optional read-only property. - Added: Config.has_value() function.
- New class: PathOption for Configuration options with
pathlib.Path
value.
-
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
,ListValue
andFieldMask
. They are automatically registered. New constants 'PROTO_' with fully qualified names. -
firebird.base.protobuf.create_message()
has new optional
serializedargument with
bytes` 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_default
in~firebird.base.config.Option.clear()
is now keyword-only. - firebird.base.logging.get_logging_id() uses qualname instead name
- firebird.base.trace.TraceFlag value
DISABLED
was 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.