You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2026. It is now read-only.
Since setuptools version 67.3.1, the use of pkg_resources.declare_namespace() is deprecated (and in fact the use of pkg_resources in it's entirety, see https://setuptools.pypa.io/en/latest/pkg_resources.html) and will throw a DeprecationWarning on use. This library and function is currently being used in the various __init__.py files in this project.
Environment details
OS type and version: Ubuntu 22.04.3 LTS
Python version: 3.10.12
pip version: 23.3
google-cloud-core version: 2.3.3
Steps to reproduce
Have setuptools >= 67.3.1 installed (released 14 Feb 2023, latest version at time of writing is 68.2.2)
import google.cloud in python code (either directly or via a module with a dependency on google.cloud)
run the python code, for example using pytest
Code example
importgoogle.cloud
Stack trace
.venv/lib/python3.10/site-packages/pkg_resources/__init__.py:2804
/.venv/lib/python3.10/site-packages/pkg_resources/__init__.py:2804: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)