From 8526b31cf83712b37352b63630632d5eed20abfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Mon, 6 May 2024 16:49:18 +0200 Subject: [PATCH] Remove deprecated pkg_resources, replace with importlib Requires Python >= 3.8 references QubesOS/qubes-issues#9195 --- qubesidle/idleness_monitor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qubesidle/idleness_monitor.py b/qubesidle/idleness_monitor.py index 81f0cee..b8d6381 100644 --- a/qubesidle/idleness_monitor.py +++ b/qubesidle/idleness_monitor.py @@ -21,7 +21,7 @@ import os import asyncio import subprocess -import pkg_resources +import importlib.metadata TIMEOUT_SECONDS = 15 * 60 @@ -37,8 +37,8 @@ def load_watchers(self): :return: None """ - for entry_point in pkg_resources.iter_entry_points( - 'qubes_idle_watcher'): + for entry_point in importlib.metadata.entry_points( + group='qubes_idle_watcher'): self.add_watcher(entry_point.load()()) def add_watcher(self, watcher):