From adec77b4c3631475c8430a60ccd11f65daa76179 Mon Sep 17 00:00:00 2001 From: Andre Hugo Date: Wed, 29 Apr 2026 08:09:52 -0700 Subject: [PATCH] fix: replace deprecated pkg_resources with pkgutil.extend_path Use pkgutil.extend_path directly instead of pkg_resources.declare_namespace to eliminate the pkg_resources deprecation warning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. The original code already used pkgutil.extend_path as a fallback for when pkg_resources wasn't available, so this is functionally equivalent. --- lark_oapi/ws/pb/google/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lark_oapi/ws/pb/google/__init__.py b/lark_oapi/ws/pb/google/__init__.py index d2d2a43c5..8db66d3d0 100644 --- a/lark_oapi/ws/pb/google/__init__.py +++ b/lark_oapi/ws/pb/google/__init__.py @@ -1,4 +1 @@ -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - __path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__)