fix: remove pkg_resources fallback for setuptools 82+ compatibility
Summary
Remove deprecated pkg_resources fallback code for Python < 3.8 compatibility.
Root Cause
The code used a version check to conditionally import from importlib.metadata (Python 3.8+) or fall back to pkg_resources (removed in setuptools 82, PEP 740, Feb 2026):
if LooseVersion(sys.version) >= LooseVersion("3.8.0"):
from importlib.metadata import version
TRITON_CLIENT_VERSION = LooseVersion(version("tritonclient"))
else:
import pkg_resources
TRITON_CLIENT_VERSION = LooseVersion(pkg_resources.get_distribution("tritonclient").version)
The else branch using pkg_resources is dead code for Python 3.8+ and will fail on setuptools 82+.
Fix
Remove the else branch and use importlib.metadata.version() directly. Since Python 3.8 is the minimum supported version, the sys.version check is redundant.
Files Changed
triton/deployment_toolkit/triton_performance_runner/model_analyzer/runner.pytriton/deployment_toolkit/triton_performance_runner/perf_analyzer/runner.pyTools/PyTorch/TimeSeriesPredictionPlatform/triton/run_performance_on_triton.pyPyTorch/Forecasting/TFT/triton/run_performance_on_triton.py
Fixes #ISSUE
Bug label request for bounty tracking on Algora/IssueHunt. This PR removes deprecated pkg_resources fallback code for setuptools 82+ (PEP 740, Feb 2026) compatibility. The else branch using pkg_resources is dead code for Python 3.8+ and will fail on setuptools 82+.