Closed dioos886 closed 6 months ago
thank you
@dioos886 would you like to submit a pull request?
Hi @dioos886, I don't think importlib.resources
is the same as pkg_resources
:
>>> from importlib.resources import DistributionNotFound, VersionConflict
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'DistributionNotFound' from 'importlib.resources' (/usr/lib/python3.11/importlib/resources/__init__.py)
...
>>> from importlib.resources import require
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'require' from 'importlib.resources' (/usr/lib/python3.11/importlib/resources/__init__.py)
@shelld3v the deprecation warning is still present when running dirsearch with Python 3.12. I think this issue should not be closed.
dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import DistributionNotFound, VersionConflict
EDIT: sorry nevermind, seems to be a duplicate of #1321
Thank you
python 3.11 └─$ python dirsearch.py -h
/home/XXX/XX/XXXX/dirsearch-master/dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import DistributionNotFound, VersionConflict
Change the code on line 23 of dirsearch.py to the following.