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

Use importlib_metadata for getting the version #11

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

hfreire
Copy link
Contributor

@hfreire hfreire commented Sep 6, 2023

It seems with python 3.11 pkg_resources is deprecated: https://setuptools.pypa.io/en/latest/pkg_resources.html

When releasing python-chargeamps make sure to bump it in the hass-chargeamps repo and make a new release as this is needed for the latest version of home-assistant.

@@ -1,3 +1,3 @@
import pkg_resources
from importlib_metadata import version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not supposed to be importlib.metadata ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You actually have both options available to you. I'm not sure about the benefits/drawbacks for each in the long run. I'll update to importlib.metadata and let you decide the way forward.

chargeamps/__init__.py Outdated Show resolved Hide resolved
@jschlyter jschlyter merged commit 7a2b728 into kirei:main Sep 8, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants