Skip to content

Fix pkg_resources deprecation warning#1032

Open
lkkmpn wants to merge 2 commits intometa-pytorch:masterfrom
lkkmpn:fix-pkg-resources
Open

Fix pkg_resources deprecation warning#1032
lkkmpn wants to merge 2 commits intometa-pytorch:masterfrom
lkkmpn:fix-pkg-resources

Conversation

@lkkmpn
Copy link

@lkkmpn lkkmpn commented Sep 23, 2025

Summary:

Fix #1023 by switching to importlib.metadata (or the importlib_metadata backport for Python 3.7) to get the Torch version in the fallback case.

Test plan:

A unit test has been added to test this fallback case.

@meta-cla meta-cla bot added the cla signed label Sep 23, 2025
@thomasloux
Copy link

Now that plg_ressources has been removed from setuptools: pypa/setuptools#5007
It would be great to merge this PR. Otherwise, if you have this error, fix "setuptools<82" in your pyproject.toml or requirements.txt

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix pkg_resources warning

2 participants