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
/home/windi/.pyenv/versions/3.12.4/lib/python3.12/site-packages/aws_msk_iam_sasl_signer/MSKAuthTokenProvider.py:11: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
It is a fairly trivial fix, just replace return f"{LIB_NAME}/{pkg_resources.get_distribution(LIB_NAME).version}" in __get_user_agent__() with return f"{LIB_NAME}/{importlib.metadata.version(LIB_NAME)}"
e.g.,
import importlib.metadata
# …
def __get_user_agent__():
"""
Builds the user-agent
Returns:
str: The user-agent identifying this signer library.
"""
return f"{LIB_NAME}/{importlib.metadata.version(LIB_NAME)}"
The text was updated successfully, but these errors were encountered:
benwebber
added a commit
to benwebber/aws-msk-iam-sasl-signer-python
that referenced
this issue
Nov 22, 2024
Description
pkg_resources
was removed in Python 3.12 and offloaded into thesetuptools
library. The recommendation (see https://setuptools.pypa.io/en/latest/pkg_resources.html) is to useimportlib.metadata
.Deprecatin warning:
It is a fairly trivial fix, just replace
return f"{LIB_NAME}/{pkg_resources.get_distribution(LIB_NAME).version}"
in__get_user_agent__()
withreturn f"{LIB_NAME}/{importlib.metadata.version(LIB_NAME)}"
e.g.,
The text was updated successfully, but these errors were encountered: