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: pkg_resources is deprecated as an API #168

Closed
GergelyKalmar opened this issue Mar 6, 2023 · 1 comment · Fixed by #177
Closed

DeprecationWarning: pkg_resources is deprecated as an API #168

GergelyKalmar opened this issue Mar 6, 2023 · 1 comment · Fixed by #177
Labels
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

@GergelyKalmar
Copy link

I'm getting a DeprecationWarning when importing google_crc32c:

  File ".../secrets.py", line 9, in <module>
    import google_crc32c
  File ".../lib/python3.8/site-packages/google_crc32c/__init__.py", line 25, in <module>
    from google_crc32c import cext as impl
  File ".../lib/python3.8/site-packages/google_crc32c/cext.py", line 19, in <module>
    import google_crc32c.__config__  # type: ignore
  File ".../lib/python3.8/site-packages/google_crc32c/__config__.py", line 18, in <module>
    import pkg_resources
  File ".../lib/python3.8/site-packages/pkg_resources/__init__.py", line 121, in <module>
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

You can reproduce the issue by importing google_crc32c in a script and running it with -Wall.

@GergelyKalmar GergelyKalmar added 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. labels Mar 6, 2023
@GergelyKalmar
Copy link
Author

The issue is triggered by the change introduced in setuptools 67.5.0 (https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v6750).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

1 participant