Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning for pkg_resources.declare_namespace("google.logging") #730

Closed
skshetry opened this issue Mar 6, 2023 · 2 comments · Fixed by #812
Closed

DeprecationWarning for pkg_resources.declare_namespace("google.logging") #730

skshetry opened this issue Mar 6, 2023 · 2 comments · Fixed by #812
Assignees
Labels
api: logging Issues related to the googleapis/python-logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@skshetry
Copy link

skshetry commented Mar 6, 2023

Starting from setuptools==67.3.0, it has started raising DeprecationWarning. Some libraries treat them as errors during testing.

See: https://setuptools.pypa.io/en/latest/history.html#v67-3-0.

/lib/python3.11/site-packages/pkg_resources/__init__.py:2804: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.logging')`.
  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)

See similar discussion in matplotlib/matplotlib#25244 and pypa/setuptools#3434 (comment).

Also opened a similar issue in google.cloud: googleapis/python-storage#1000.

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/python-logging API. label Mar 6, 2023
@daniel-sanche daniel-sanche added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jun 13, 2023
@meredithslota
Copy link
Contributor

Thanks for filing this — this is the broader issue for the whole set of Python libraries, we will be working on dropping pkg_resources at more or less the same time across all of them: googleapis/google-cloud-python#11184

@akx
Copy link

akx commented Nov 13, 2023

cc @parthea, you seem to be doing these fixes across @googleapis :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/python-logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants