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
which would use this conditional dependency: importlib-metadata; python_version < '3.8'
You could also just do #12 instead. Flit sources the metadata version from a version string in __init__.py so this would just become __version__ = '0.17.4'
The text was updated successfully, but these errors were encountered:
This usage of pkg_resources is breaking for me in Windows. I haven't done exhaustive testing, but L144 in __init__.py was throwing "distribution was not found" errors in a clean venv in Python 3.11.8 (Windows).
Using the importlib approach resolved the error.
Python 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import altgraph
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Toby\_code\venv\altgraph\Lib\site-packages\altgraph\__init__.py", line 144, in <module>
__version__ = pkg_resources.require("altgraph")[0].version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Toby\_code\venv\altgraph\Lib\site-packages\pkg_resources\__init__.py", line 909, in require
needed = self.resolve(parse_requirements(requirements))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Toby\_code\venv\altgraph\Lib\site-packages\pkg_resources\__init__.py", line 795, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found and is required by the application
pkg_resources
is provided by setuptools:altgraph/altgraph/__init__.py
Line 144 in e288b53
The stdlib’s replacement for this line would be
If you want to be compatible with Python <3.8, you could do:
which would use this conditional dependency:
importlib-metadata; python_version < '3.8'
You could also just do #12 instead. Flit sources the metadata version from a version string in
__init__.py
so this would just become__version__ = '0.17.4'
The text was updated successfully, but these errors were encountered: