Skip to content

Commit

Permalink
Remove deprecated pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarta committed May 6, 2024
1 parent 02537ee commit a3ca3f5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions remote_gui/remote_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# pylint: disable=wrong-import-position,import-error
import sys
import gi
import pkg_resources
import importlib.resources
import subprocess
import threading
import typing
Expand All @@ -43,8 +43,10 @@ def __init__(self, **properties):

# load objects
self.builder: Gtk.Builder = Gtk.Builder()
self.builder.add_from_file(pkg_resources.resource_filename(
__name__, 'remote_gui.glade'))
glade_ref = importlib.resources.files(
__name__).joinpath('remote_gui.glade')
with importlib.resources.as_file(glade_ref) as path:
self.builder.add_from_file(str(path))

# ask window
self.ask_window: AskWindow = AskWindow(
Expand Down

0 comments on commit a3ca3f5

Please sign in to comment.