Skip to content

Conversation

@bje-
Copy link

@bje- bje- commented Jun 21, 2024

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.

- Eliminate the use of pkg_resources which is no longer installed with
  Python 3.12 and greater.

- Add setuptools to requirements.txt which is no longer included in
  Python distributions (>= 3.12).
@bje-
Copy link
Author

bje- commented Apr 9, 2025

Ping?

@bje-
Copy link
Author

bje- commented Jun 8, 2025

Can this PR be merged, please?

@Famlam
Copy link

Famlam commented Jun 8, 2025

Maybe ping @klen in case it went unnoticed

It seems that even installing setuptools manually will stop working soon

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.

@mshonichev
Copy link

ping @klen :)

Can this PR be merged, please, it's very annoying to suppress warnings in CI and it freaks me out that pylama would stop working after CI pipelines upgrade to python 3.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants