From 32a714a31317313e6e9ad7454429e0e1f062f78c Mon Sep 17 00:00:00 2001 From: Yaroslav Soroko <36443074+Ysoroko@users.noreply.github.com> Date: Thu, 23 Jun 2022 17:06:00 +0200 Subject: [PATCH] Replace deprecated GObject by GLib Using GObject.MainLoop method provokes a deprecation working during compilation: "GObject.MainLoop is deprecated; use GLib.MainLoop instead" Replacing GObject.MainLoop() by GLib.MainLoop() fixes the issue and works perfectly. --- gatt/gatt_linux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gatt/gatt_linux.py b/gatt/gatt_linux.py index 5fdb9d7..4511915 100644 --- a/gatt/gatt_linux.py +++ b/gatt/gatt_linux.py @@ -10,7 +10,7 @@ import re -from gi.repository import GObject +from gi.repository import GLib from . import errors @@ -86,7 +86,7 @@ def disconnect_signals(): self._properties_changed_signal.remove() self._interface_added_signal.remove() - self._main_loop = GObject.MainLoop() + self._main_loop = GLib.MainLoop() try: self._main_loop.run() disconnect_signals()