Skip to content

Commit 6c48625

Browse files
committed
Release 2.0.2
* Fix: "quick fingers" issue with `_decompose` fix.
1 parent 17a6478 commit 6c48625

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
8+
## [2.0.2] - 2025-06-02
9+
10+
### Fixed
11+
12+
- Fix: "quick fingers" issue with `_decompose` fix.
13+
714
## [2.0.1] - 2025-06-02
815

916
### Fixed

docs/changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
#########
44

5+
Version 2.0.2
6+
=============
7+
8+
* Fix: "quick fingers" issue with `_decompose` fix.
9+
510
Version 2.0.1
611
=============
712

src/firebird/base/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2020-present The Firebird Projects <www.firebirdsql.org>
22
#
33
# SPDX-License-Identifier: MIT
4-
__version__ = "2.0.1"
4+
__version__ = "2.0.2"

src/firebird/base/config.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __init__(self):
101101
NoSectionError,
102102
)
103103
from decimal import Decimal, DecimalException
104-
from enum import Enum, Flag
104+
from enum import Enum, Flag, _high_bit
105105
from inspect import Parameter, Signature, signature
106106
from pathlib import Path
107107
from typing import Any, Generic, TypeVar, cast, get_type_hints
@@ -175,12 +175,6 @@ def _decompose(flag, value):
175175
members.pop(0)
176176
return members, not_covered
177177

178-
def _power_of_two(value):
179-
"Check if value is a power of two (internal helper for FlagOption)."
180-
if value < 1:
181-
return False
182-
return value == 2 ** (value.bit_length() - 1)
183-
184178
class EnvExtendedInterpolation(ExtendedInterpolation):
185179
""".. versionadded:: 1.8.0
186180

src/firebird/base/trace.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ def is_registered(self, cls: type) -> bool:
459459
def clear(self) -> None:
460460
"""Removes all trace specifications.
461461
"""
462+
cls: TracedClass
462463
for cls in self._traced:
463464
cls.traced.clear()
464465
def register(self, cls: type) -> None:
@@ -523,6 +524,7 @@ def trace_object(self, obj: Any, *, strict: bool=False) -> Any:
523524
if strict:
524525
raise TypeError(f"Class '{obj.__class__.__name__}' not registered for trace!")
525526
return obj
527+
item: TracedItem
526528
for item in entry.traced:
527529
setattr(obj, item.method, item.decorator(*item.args, **item.kwargs)(getattr(obj, item.method)))
528530
return obj
@@ -582,6 +584,7 @@ def with_name(name: str, obj: Any) -> bool:
582584
cls_kwargs = {}
583585
cls_kwargs.update(global_kwargs)
584586
cls_kwargs.update(build_kwargs(cls_cfg))
587+
cls_desc: TracedClass
585588
if (cls_desc := self._traced.find(partial(with_name, cls_name))) is None:
586589
if cfg.autoregister.value:
587590
cls = load(':'.join(cls_name.rsplit('.', 1)))

0 commit comments

Comments
 (0)