klen / pylama

Code audit tool for python.
MIT License
1.05k stars 99 forks source link

Fixes to work with Python 3.12+ #254

Open bje- opened 4 months ago

bje- commented 4 months ago

This patch removes the dependence on pkg_resources which is not available by default in Python 3.12 and beyond. It switches from pkg_resources.iter_entry_points to import_metadata.entry_points. import_metadata is available in all supported versions of Python.

The other change removes the use of parse_requirements and just hardcodes the package dependencies in setup.py, which is arguably good practice anyway since not all developer-installed packages are required by the installation.

Finally, setuptools is added to requirements.txt since it is also no longer installed by default with Python 3.12.