From bba5faf629f6f3b6c62960e5a9ab1e7b9e922961 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 21 Mar 2026 11:52:19 -0500 Subject: [PATCH] fix: avoid log warning if same entry point is found multiple times kind of an edge case and maybe only relevant to python 3.8 --- src/wuttjamaican/util.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/wuttjamaican/util.py b/src/wuttjamaican/util.py index a3ac393..fb3b970 100644 --- a/src/wuttjamaican/util.py +++ b/src/wuttjamaican/util.py @@ -168,11 +168,17 @@ def load_entry_points(group, lists=False, ignore_errors=False): entry_points.setdefault(entry_point.name, []).append(ep) else: if entry_point.name in entry_points: - log.warning( - "overwriting existing key '%s' with entry point: %s", - entry_point.name, - ep, - ) + # TODO: not sure why the "same" entry point can be + # discovered multiple times, but in practice i did + # see this. however it was on a python 3.8 system + # so i'm guessing that has something to do with + # it. we'll avoid the warning if that's the case. + if entry_points[entry_point.name] is not ep: + log.warning( + "overwriting existing key '%s' with entry point: %s", + entry_point.name, + ep, + ) entry_points[entry_point.name] = ep return entry_points