fix: remove deprecated pkg_resources usage ahead of planned removal in Setuptools ≥81#1058
Merged
bgruening merged 7 commits intobioconda:masterfrom Jan 9, 2026
Merged
Conversation
Contributor
aliciaaevans
left a comment
There was a problem hiding this comment.
One minor comment, but otherwise looks good.
| vers_version, vers_is_legacy = _parse_or_legacy(vers) | ||
| # allow prerelease only if current is prerelease | ||
| if vers_version.is_prerelease and not current_version.is_prerelease: | ||
| if ( |
Contributor
There was a problem hiding this comment.
Even thought Python allows it, I think it'd be preferable to have _parse_or_legacy return None rather than trying to getattr from an ambiguous str|Version. The string isn't actually needed anyway since vers is there. Maybe rearrange some ifs here.
| 'bioconda_utils', | ||
| 'bioconda_utils-requirements.txt') | ||
| ).read()) | ||
| # pkg_resources (deprecated) is replaced with importlib.resources |
Contributor
There was a problem hiding this comment.
I don't think this comment is really needed.
| ) | ||
| schema = yaml.safe_load(open(fn)) | ||
|
|
||
| # Load packaged schema without pkg_resources (deprecated) |
Contributor
There was a problem hiding this comment.
Same here, it doesn't hurt, but not really needed to refer to the old way of doing things.
aliciaaevans
approved these changes
Jan 8, 2026
Contributor
aliciaaevans
left a comment
There was a problem hiding this comment.
I'm going to go ahead and approve this since my comments were optional and we probably should get it in.
Member
|
Thanks everyone! |
bgruening
pushed a commit
that referenced
this pull request
Jan 9, 2026
🤖 I have created a release *beep* *boop* --- ## [3.9.2](v3.9.1...v3.9.2) (2026-01-09) ### Bug Fixes * remove deprecated pkg_resources usage ahead of planned removal in Setuptools ≥81 ([#1058](#1058)) ([0ef2df1](0ef2df1)) * unexpected arg 'label' ([#1065](#1065)) ([16f2ab9](16f2ab9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
bgruening
pushed a commit
to bioconda/bioconda-common
that referenced
this pull request
Feb 9, 2026
## Summary - Bump `BIOCONDA_UTILS_TAG` from `v3.9.1` to `v3.9.2` ## Problem `setuptools 82.0.0` (now on conda-forge) removed the `pkg_resources` module. `bioconda-utils v3.9.1` imports `pkg_resources` in `utils.py:43`, causing all fresh CircleCI ARM builds to fail with: ``` ModuleNotFoundError: No module named 'pkg_resources' ``` ## Fix `v3.9.2` (released 2026-01-09) includes PR bioconda/bioconda-utils#1058 which removes the deprecated `pkg_resources` usage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces all uses of the deprecated pkg_resources API in
utils.py,docker_utils.py, andautobump.pywithimportlib.resourcesandpackaging.versionequivalents.Adds a smoke test for
validate_configto ensure schema validation works without pkg_resources.Closes #1056