File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ install_requires =
3737 httpx>=0.26.0,<0.29.0
3838 validators>=0.34.0,<1.0.0
3939 authlib>=1.6.7,<2.0.0
40+ # When bumping authlib to >=2.0.0, remove the `authlib.jose` deprecation
41+ # warning filter implemented in `weaviate/_authlib_compat.py`.
4042 pydantic>=2.12.0,<3.0.0
4143 grpcio>=1.59.5,<1.80.0
4244 protobuf>=4.21.6,<7.0.0
Original file line number Diff line number Diff line change 55from importlib .metadata import PackageNotFoundError , version
66from typing import Any
77
8+ from . import _authlib_compat # noqa: F401 # side-effect: silence authlib.jose deprecation
9+
810try :
911 __version__ = version ("weaviate-client" )
1012except PackageNotFoundError :
Original file line number Diff line number Diff line change 1+ """Suppress the ``authlib.jose`` deprecation warning emitted by authlib >=1.7.0.
2+
3+ authlib registers ``simplefilter("always", AuthlibDeprecationWarning)`` at import time,
4+ so we must import the category first to insert our filter in front of it.
5+
6+ Remove this module (and its import in ``weaviate/__init__.py``) once the ``authlib``
7+ pin in ``setup.cfg`` moves to ``>=2.0.0``.
8+ """
9+
10+ import warnings
11+
12+ from authlib .deprecate import AuthlibDeprecationWarning
13+
14+ warnings .filterwarnings (
15+ "ignore" ,
16+ message = r"^authlib\.jose module is deprecated" ,
17+ category = AuthlibDeprecationWarning ,
18+ )
You can’t perform that action at this time.
0 commit comments