diff --git a/setup.cfg b/setup.cfg index 0b5ba855a..857a7d308 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,8 +37,6 @@ install_requires = httpx>=0.26.0,<0.29.0 validators>=0.34.0,<1.0.0 authlib>=1.6.7,<2.0.0 - # When bumping authlib to >=2.0.0, remove the `authlib.jose` deprecation - # warning filter implemented in `weaviate/_authlib_compat.py`. pydantic>=2.12.0,<3.0.0 grpcio>=1.59.5,<1.80.0 protobuf>=4.21.6,<7.0.0 diff --git a/weaviate/__init__.py b/weaviate/__init__.py index f3b38dab5..2e7e5e58b 100644 --- a/weaviate/__init__.py +++ b/weaviate/__init__.py @@ -5,8 +5,6 @@ from importlib.metadata import PackageNotFoundError, version from typing import Any -from . import _authlib_compat # noqa: F401 # side-effect: silence authlib.jose deprecation - try: __version__ = version("weaviate-client") except PackageNotFoundError: diff --git a/weaviate/_authlib_compat.py b/weaviate/_authlib_compat.py deleted file mode 100644 index 402b169be..000000000 --- a/weaviate/_authlib_compat.py +++ /dev/null @@ -1,18 +0,0 @@ -"""Suppress the ``authlib.jose`` deprecation warning emitted by authlib >=1.7.0. - -authlib registers ``simplefilter("always", AuthlibDeprecationWarning)`` at import time, -so we must import the category first to insert our filter in front of it. - -Remove this module (and its import in ``weaviate/__init__.py``) once the ``authlib`` -pin in ``setup.cfg`` moves to ``>=2.0.0``. -""" - -import warnings - -from authlib.deprecate import AuthlibDeprecationWarning - -warnings.filterwarnings( - "ignore", - message=r"^authlib\.jose module is deprecated", - category=AuthlibDeprecationWarning, -)