From a69a162e8b098f9ca9c2fb9e88a8e5ca27bb8eb1 Mon Sep 17 00:00:00 2001 From: Google Colaboratory Team Date: Wed, 2 Sep 2026 22:14:24 -0700 Subject: [PATCH] Remove use of deprecated pkg_resources PiperOrigin-RevId: 975508668 --- google/__init__.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/google/__init__.py b/google/__init__.py index 7b7d064b..ad2916be 100644 --- a/google/__init__.py +++ b/google/__init__.py @@ -13,12 +13,5 @@ # limitations under the License. """Google namespace package.""" -# pylint:disable=g-import-not-at-top -try: - import pkg_resources - - pkg_resources.declare_namespace(__name__) -except ImportError: - import pkgutil - - __path__ = pkgutil.extend_path(__path__, __name__) +# https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages +__path__ = __import__('pkgutil').extend_path(__path__, __name__)