fix: _bcrypt.__about__.__version__ log warning (#3136)

This commit is contained in:
Vlad Stan
2025-04-30 20:44:55 +03:00
committed by GitHub
parent c4d0540e76
commit 32cbf16d91
+11
View File
@@ -1,7 +1,9 @@
from __future__ import annotations
from dataclasses import dataclass
from typing import Callable
import bcrypt
from pydantic import BaseModel
@@ -9,6 +11,15 @@ def _do_nothing(*_):
pass
@dataclass
class SolveBugBcryptWarning:
__version__: str = getattr(bcrypt, "__version__") # noqa
# fix annoying warning in the logs
setattr(bcrypt, "__about__", SolveBugBcryptWarning()) # noqa
class CoreAppExtra:
register_new_ext_routes: Callable = _do_nothing
register_new_ratelimiter: Callable