-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Getting this message when using xphyle in a Python 3.11 environment.
UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
The following works on newer Python versions.
from importlib.metadata import version
__version__ = version("xphyle")
I haven't tested it yet, but you should be able to support both newer and older versions with something like this.
try:
from importlib.metadata import version
__version__ = version(__name__)
except:
import pkg_resources
__version__ = pkg_resources.get_distribution(__name__).version
Metadata
Metadata
Assignees
Labels
No labels