From 01e0cfc5633e0b1646c29d9cfb301e101157db0b Mon Sep 17 00:00:00 2001 From: Anjandev Momi Date: Wed, 21 Jan 2026 17:16:23 -0800 Subject: [PATCH] remove deprecated pkg_resources package UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources packag e is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources --- uhd_restpy/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uhd_restpy/connection.py b/uhd_restpy/connection.py index 181a794b5..9c06ef6d0 100644 --- a/uhd_restpy/connection.py +++ b/uhd_restpy/connection.py @@ -26,7 +26,7 @@ import time import json import logging -import pkg_resources +from importlib.metadata import version from requests import Session, request, utils from requests.exceptions import ConnectTimeout from io import BufferedReader @@ -109,7 +109,7 @@ def __init__( try: logging.getLogger(__name__).info( "using ixnetwork-restpy version %s" - % pkg_resources.get_distribution("ixnetwork-restpy").version + % version("ixnetwork-restpy") ) except Exception as e: logging.getLogger(__name__).warning(