Skip to content

Commit

Permalink
Remove deprecated pkg_resources, replace with importlib
Browse files Browse the repository at this point in the history
Requires Python >= 3.8

references QubesOS/qubes-issues#9195
  • Loading branch information
marmarta committed May 6, 2024
1 parent de4a1d1 commit 8526b31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qubesidle/idleness_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import os
import asyncio
import subprocess
import pkg_resources
import importlib.metadata

TIMEOUT_SECONDS = 15 * 60

Expand All @@ -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(

Check warning on line 40 in qubesidle/idleness_monitor.py

View check run for this annotation

Codecov / codecov/patch

qubesidle/idleness_monitor.py#L40

Added line #L40 was not covered by tests
group='qubes_idle_watcher'):
self.add_watcher(entry_point.load()())

def add_watcher(self, watcher):
Expand Down

0 comments on commit 8526b31

Please sign in to comment.