Skip to content

MAINT: pkg_resources deprecation - #824

Merged
ElDeveloper merged 5 commits into
biocore:masterfrom
lizgehret:pkg-resources-depr
Oct 13, 2025
Merged

ElDeveloper merged 5 commits into
biocore:masterfrom
lizgehret:pkg-resources-depr

Conversation

@lizgehret

Copy link
Copy Markdown
Contributor

Replaces call to pkg_resources with the relevant importlib command.

We recently completed an org-wide sprint in QIIME 2 to remove all deprecated calls to pkg_resources. After completing this, I noticed there was still a deprecation warning within our latest QIIME 2 development environments:

/Users/elizabethgehret/miniconda3/envs/q2dev-amp/lib/python3.10/site-packages/emperor/__init__.py:9: 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.

Our next release is at the end of this month, so this change ensures continued compatibility post-release after pkg_resources is fully removed in November/December of this year.

@ElDeveloper

Copy link
Copy Markdown
Member

Thank you so much @lizgehret!

@lizgehret

lizgehret commented Oct 10, 2025 •

Copy link
Copy Markdown
Contributor Author

Hmm, this is an interesting failure. The importlib.metadata module has been around since python 3.8, so this shouldn't be a problem... let me take a closer look to see why that's not being found.

Fixed and confirmed CI passes on my fork; this should be good to re-run @ElDeveloper!

@ElDeveloper

Copy link
Copy Markdown
Member

Looks great, would you mind adding a note to the ChangeLog?

@ElDeveloper
ElDeveloper merged commit 4e8e2fd into biocore:master Oct 13, 2025
4 checks passed
@lizgehret

lizgehret commented Oct 14, 2025 •

Copy link
Copy Markdown
Contributor Author

Looks great, would you mind adding a note to the ChangeLog?

Happy to; thanks @ElDeveloper! Looks like you beat me to it; thank you!

@lizgehret

Copy link
Copy Markdown
Contributor Author

Hey @ElDeveloper I wanted to circle back on this and see if you were planning to create a new emperor release any time soon and/or if you would be open to doing that so we can update our emperor version pin to pull in the updates from this PR? I should have checked in about this when I originally opened the PR, so sorry for the delayed follow-up about it!

@ElDeveloper

Copy link
Copy Markdown
Member

@lizgehret almost done with the release, just have to upload to PyPI.

@lizgehret

Copy link
Copy Markdown
Contributor Author

Hey @ElDeveloper, ah that's great!! Thank you 🙏🏻

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