Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pkg_resources with importlib #6273

Merged
merged 4 commits into from Apr 16, 2024

Conversation

maxnoe
Copy link
Contributor

@maxnoe maxnoe commented Apr 4, 2024

closes #6272

CHANGES.rst Outdated Show resolved Hide resolved
indico/legacy/pdfinterface/base.py Outdated Show resolved Hide resolved
@ThiefMaster ThiefMaster linked an issue Apr 4, 2024 that may be closed by this pull request
@ThiefMaster
Copy link
Member

I recommend not putting the issue reference in the commit message itself but only in the PR description. Otherwise it spams one line of being referenced into the issue whenever you rebase and forcepush. Not a big problem but slightly noisy.

indico/legacy/pdfinterface/latex.py Outdated Show resolved Hide resolved
indico/util/packaging.py Show resolved Hide resolved
@ThiefMaster
Copy link
Member

Please run isort indico and fix the linter error (see CI or ruff check and my other comment).

What do you think about using https://pypi.org/project/importlib-metadata/ instead of the stdlib one to avoid any nasty surprises with Python version updates? Or is the API of the stdlib version stable enough now? At least when I moved some of our libraries from setuptools to importlib.metadata, I got some nasty bugs when using the stdlib one on multiple Python versions, that were avoided with importlib-metadata. Of course Indico only supports 3.12 right now, but late this year when 3.13 comes out I plan to add support for it once all our dependencies are compatible, so we will once again be in a situation where differences between the stdlib one may be relevant.

`version` is REALLY REALLY generic...
@ThiefMaster ThiefMaster enabled auto-merge (squash) April 16, 2024 18:33
@ThiefMaster ThiefMaster changed the title Replace pkg_resources with importlib, fixes #6272 Replace pkg_resources with importlib Apr 16, 2024
Copy link
Member

@ThiefMaster ThiefMaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, works fine!

@ThiefMaster ThiefMaster merged commit ebd989b into indico:master Apr 16, 2024
9 checks passed
@maxnoe maxnoe deleted the remove_pkg_resources branch April 16, 2024 21:17
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.

Replace pkg_resources with importlib.metadata / importlib.resource
2 participants