-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Since pkg_resources module is now part of setuptools library. Directly importing pkg_resources throws an error on Python version 2.
I think the issue started from version 2.9.0 when this block was added to the semantic_version/init.py:
try:
# Python 3.8+
from importlib.metadata import version
__version__ = version("semantic_version")
except ImportError:
import pkg_resources
Error logs:
File "/builds/home/project/lib/python2.7/site-packages/semantic_version/__init__.py", line 16, in <module>
import pkg_resources
File "/builds/home/project/lib/python2.7/site-packages/pkg_resources/__init__.py", line 124
f"{v} is an invalid version and will not be supported in "
^
SyntaxError: invalid syntax
Metadata
Metadata
Assignees
Labels
No labels