From 6c48625bd7f891ec5c02999234399ad91dba076a Mon Sep 17 00:00:00 2001 From: Pavel Cisar Date: Mon, 2 Jun 2025 20:34:34 +0200 Subject: [PATCH 1/3] Release 2.0.2 * Fix: "quick fingers" issue with `_decompose` fix. --- CHANGELOG.md | 7 +++++++ docs/changelog.txt | 5 +++++ src/firebird/base/__about__.py | 2 +- src/firebird/base/config.py | 8 +------- src/firebird/base/trace.py | 3 +++ 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43256ad..16edf50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). + +## [2.0.2] - 2025-06-02 + +### Fixed + +- Fix: "quick fingers" issue with `_decompose` fix. + ## [2.0.1] - 2025-06-02 ### Fixed diff --git a/docs/changelog.txt b/docs/changelog.txt index d6d5dba..18bf2dd 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,6 +2,11 @@ Changelog ######### +Version 2.0.2 +============= + +* Fix: "quick fingers" issue with `_decompose` fix. + Version 2.0.1 ============= diff --git a/src/firebird/base/__about__.py b/src/firebird/base/__about__.py index bd89c60..8f05817 100644 --- a/src/firebird/base/__about__.py +++ b/src/firebird/base/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2020-present The Firebird Projects # # SPDX-License-Identifier: MIT -__version__ = "2.0.1" +__version__ = "2.0.2" diff --git a/src/firebird/base/config.py b/src/firebird/base/config.py index 1b65016..8750d1d 100644 --- a/src/firebird/base/config.py +++ b/src/firebird/base/config.py @@ -101,7 +101,7 @@ def __init__(self): NoSectionError, ) from decimal import Decimal, DecimalException -from enum import Enum, Flag +from enum import Enum, Flag, _high_bit from inspect import Parameter, Signature, signature from pathlib import Path from typing import Any, Generic, TypeVar, cast, get_type_hints @@ -175,12 +175,6 @@ def _decompose(flag, value): members.pop(0) return members, not_covered -def _power_of_two(value): - "Check if value is a power of two (internal helper for FlagOption)." - if value < 1: - return False - return value == 2 ** (value.bit_length() - 1) - class EnvExtendedInterpolation(ExtendedInterpolation): """.. versionadded:: 1.8.0 diff --git a/src/firebird/base/trace.py b/src/firebird/base/trace.py index 6362f68..cf4ed24 100644 --- a/src/firebird/base/trace.py +++ b/src/firebird/base/trace.py @@ -459,6 +459,7 @@ def is_registered(self, cls: type) -> bool: def clear(self) -> None: """Removes all trace specifications. """ + cls: TracedClass for cls in self._traced: cls.traced.clear() def register(self, cls: type) -> None: @@ -523,6 +524,7 @@ def trace_object(self, obj: Any, *, strict: bool=False) -> Any: if strict: raise TypeError(f"Class '{obj.__class__.__name__}' not registered for trace!") return obj + item: TracedItem for item in entry.traced: setattr(obj, item.method, item.decorator(*item.args, **item.kwargs)(getattr(obj, item.method))) return obj @@ -582,6 +584,7 @@ def with_name(name: str, obj: Any) -> bool: cls_kwargs = {} cls_kwargs.update(global_kwargs) cls_kwargs.update(build_kwargs(cls_cfg)) + cls_desc: TracedClass if (cls_desc := self._traced.find(partial(with_name, cls_name))) is None: if cfg.autoregister.value: cls = load(':'.join(cls_name.rsplit('.', 1))) From 7d36a9b782fd8c282ae03b9d3c11a235258e5072 Mon Sep 17 00:00:00 2001 From: Pavel Cisar Date: Mon, 2 Jun 2025 21:08:46 +0200 Subject: [PATCH 2/3] fix --- .github/FUNDING.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index cc93cff..268ea1c 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ # These are supported funding model platforms -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +github: [pcisar] patreon: # Replace with a single Patreon username open_collective: # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username @@ -12,4 +12,4 @@ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cl polar: # Replace with a single Polar username buy_me_a_coffee: # Replace with a single Buy Me a Coffee username thanks_dev: # Replace with a single thanks.dev username -custom: https://firebirdsql.org/en/donate/ +custom: # https://firebirdsql.org/en/donate/ From 4ca560008d53c048495f09596c0e6187d5fbf293 Mon Sep 17 00:00:00 2001 From: Pavel Cisar Date: Tue, 3 Jun 2025 08:47:44 +0200 Subject: [PATCH 3/3] Fix required Python version --- docs/index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.txt b/docs/index.txt index 86384c6..f36c4a0 100644 --- a/docs/index.txt +++ b/docs/index.txt @@ -21,7 +21,7 @@ Topic covered by `firebird-base` package: - Callback system based on Signals and Slots, and "Delphi events". -.. note:: Requires Python 3.8+ +.. note:: Requires Python 3.11+ .. tip:: You can download docset for Dash_ (MacOS) or Zeal_ (Windows / Linux) documentation readers from releases_ at github.