- Notifications
You must be signed in to change notification settings - Fork576
Closed
Description
As ofsetuptools==80.9.0, when importingnapalm, the following warning is shown aboutpkg_resources being deprecated and slated for removal in December:
Python 3.12.10 (main, Apr 9 2025, 03:49:38) [Clang 20.1.0 ] on darwinType "help", "copyright", "credits" or "license" for more information.>>> import napalm/Users/me/dir/.venv/lib/python3.12/site-packages/napalm/__init__.py:1: 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. import pkg_resourcesThe referencedsetuptools link includes more details (emphasis mine):
Use of
pkg_resourcesis deprecated in favor ofimportlib.resources,importlib.metadataand their backports (importlib_resources,importlib_metadata). Some useful APIs are also provided bypackaging (e.g. requirements and version parsing). Users should refrain from new usage ofpkg_resourcesandshould work to port to importlib-based solutions.
setuptoolsissue #3085 anddraft PR #5007 have some additional discussion.
In our project we have pinnedsetuptools<80.9.0 to avoid the warning for now.
Metadata
Metadata
Assignees
Labels
No labels