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

Migrate to importlib.metadata. #85

Closed
wants to merge 2 commits into from

Conversation

emollier
Copy link

As initially identified in Debian bug #1083383, Fastaq depends on the Python module pkg_resources, deprecated since python3.11 and obsoleted in python3.13, in favor of importlib.metadata, available since python3.8.

In case Fastaq still needs to cover ancient Python interpreter versions preceeding 3.8, the change also includes a fallback to pkg_resources if the importlib is not located properly.

As initially identified in [Debian bug #1083383], Fastaq depends on
the Python module pkg_resources, [deprecated] since python3.11 and
obsoleted in python3.13, in favor of [importlib.metadata], available
since python3.8.

In case Fastaq still needs to cover ancient Python interpreter
versions preceeding 3.8, the change also includes a fallback to
pkg_resources if the importlib is not located properly.

[Debian bug #1083383]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1083383
[deprecated]: https://setuptools.pypa.io/en/latest/pkg_resources.html
[importlib.metadata]: https://docs.python.org/3.11/library/importlib.metadata.html#module-importlib.metadata

Signed-off-by: Étienne Mollier <emollier@debian.org>
When packaging information is missing, the initial proposal missed
falling back to the 'local' version properly.  This change adjusts the
try/except logic to accomodate to that situation properly.

Signed-off-by: Étienne Mollier <emollier@debian.org>
@martinghunt
Copy link
Collaborator

Thanks for this, sorry I didn't merge sooner. But - I think is now all sorted by (and might conflict with, haven't checked properly) by PR #86, which am about to merge ...?

@emollier
Copy link
Author

Hi martinghunt,

Thanks for your comment, no worries on the delay, I know way worse. ;)

I had a look at #86 and I agree that my merge request is now irrelevant, hereby closing it.

Have a nice day, :)
Étienne.

@emollier emollier closed this Nov 12, 2024
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.

2 participants