* [PATCH BlueZ 0/1] Fix GLib deprecation warning in example-gatt-client/server
@ 2024-05-31 19:36 Preston Hunt
2024-05-31 19:36 ` [PATCH BlueZ 1/1] test/example-gatt: fix deprecation warning Preston Hunt
2024-06-03 19:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
0 siblings, 2 replies; 4+ messages in thread
From: Preston Hunt @ 2024-05-31 19:36 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Preston Hunt
Updates example-gatt-client and example-gatt-server sample applications
in test/ directory to fix deprecation warning:
PyGIDeprecationWarning: GObject.MainLoop is deprecated; use
GLib.MainLoop instead
Also, remove python2 import since the script is run with a python3
shebang.
Preston Hunt (1):
test/example-gatt: fix deprecation warning
test/example-gatt-client | 7 ++-----
test/example-gatt-server | 11 ++++-------
2 files changed, 6 insertions(+), 12 deletions(-)
--
2.42.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH BlueZ 1/1] test/example-gatt: fix deprecation warning
2024-05-31 19:36 [PATCH BlueZ 0/1] Fix GLib deprecation warning in example-gatt-client/server Preston Hunt
@ 2024-05-31 19:36 ` Preston Hunt
2024-05-31 21:42 ` Fix GLib deprecation warning in example-gatt-client/server bluez.test.bot
2024-06-03 19:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
1 sibling, 1 reply; 4+ messages in thread
From: Preston Hunt @ 2024-05-31 19:36 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Preston Hunt
Use GLib instead of GObject to fix deprecation warning. Remove python2
gobject import.
---
test/example-gatt-client | 7 ++-----
test/example-gatt-server | 11 ++++-------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/test/example-gatt-client b/test/example-gatt-client
index 5e6bef9d7..38ca97eae 100755
--- a/test/example-gatt-client
+++ b/test/example-gatt-client
@@ -2,10 +2,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
import dbus
-try:
- from gi.repository import GObject
-except ImportError:
- import gobject as GObject
+from gi.repository import GLib
import sys
from dbus.mainloop.glib import DBusGMainLoop
@@ -189,7 +186,7 @@ def main():
global bus
bus = dbus.SystemBus()
global mainloop
- mainloop = GObject.MainLoop()
+ mainloop = GLib.MainLoop()
om = dbus.Interface(bus.get_object(BLUEZ_SERVICE_NAME, '/'), DBUS_OM_IFACE)
om.connect_to_signal('InterfacesRemoved', interfaces_removed_cb)
diff --git a/test/example-gatt-server b/test/example-gatt-server
index 77231c3ad..83b700901 100755
--- a/test/example-gatt-server
+++ b/test/example-gatt-server
@@ -7,10 +7,7 @@ import dbus.mainloop.glib
import dbus.service
import array
-try:
- from gi.repository import GObject
-except ImportError:
- import gobject as GObject
+from gi.repository import GLib
import sys
from random import randint
@@ -305,7 +302,7 @@ class HeartRateMeasurementChrc(Characteristic):
if not self.notifying:
return
- GObject.timeout_add(1000, self.hr_msrmt_cb)
+ GLib.timeout_add(1000, self.hr_msrmt_cb)
def StartNotify(self):
if self.notifying:
@@ -392,7 +389,7 @@ class BatteryLevelCharacteristic(Characteristic):
service)
self.notifying = False
self.battery_lvl = 100
- GObject.timeout_add(5000, self.drain_battery)
+ GLib.timeout_add(5000, self.drain_battery)
def notify_battery_level(self):
if not self.notifying:
@@ -649,7 +646,7 @@ def main():
app = Application(bus)
- mainloop = GObject.MainLoop()
+ mainloop = GLib.MainLoop()
print('Registering GATT application...')
--
2.42.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: Fix GLib deprecation warning in example-gatt-client/server
2024-05-31 19:36 ` [PATCH BlueZ 1/1] test/example-gatt: fix deprecation warning Preston Hunt
@ 2024-05-31 21:42 ` bluez.test.bot
0 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2024-05-31 21:42 UTC (permalink / raw)
To: linux-bluetooth, me
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=857808
---Test result---
Test Summary:
CheckPatch PASS 0.82 seconds
GitLint PASS 0.61 seconds
BuildEll PASS 24.44 seconds
BluezMake PASS 1728.31 seconds
MakeCheck PASS 14.17 seconds
MakeDistcheck PASS 211.65 seconds
CheckValgrind PASS 251.05 seconds
CheckSmatch PASS 361.44 seconds
bluezmakeextell PASS 132.11 seconds
IncrementalBuild PASS 1507.35 seconds
ScanBuild PASS 994.73 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ 0/1] Fix GLib deprecation warning in example-gatt-client/server
2024-05-31 19:36 [PATCH BlueZ 0/1] Fix GLib deprecation warning in example-gatt-client/server Preston Hunt
2024-05-31 19:36 ` [PATCH BlueZ 1/1] test/example-gatt: fix deprecation warning Preston Hunt
@ 2024-06-03 19:20 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2024-06-03 19:20 UTC (permalink / raw)
To: Preston Hunt; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 31 May 2024 12:36:21 -0700 you wrote:
> Updates example-gatt-client and example-gatt-server sample applications
> in test/ directory to fix deprecation warning:
>
> PyGIDeprecationWarning: GObject.MainLoop is deprecated; use
> GLib.MainLoop instead
>
> Also, remove python2 import since the script is run with a python3
> shebang.
>
> [...]
Here is the summary with links:
- [BlueZ,1/1] test/example-gatt: fix deprecation warning
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=684a17f7cc78
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-03 19:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 19:36 [PATCH BlueZ 0/1] Fix GLib deprecation warning in example-gatt-client/server Preston Hunt
2024-05-31 19:36 ` [PATCH BlueZ 1/1] test/example-gatt: fix deprecation warning Preston Hunt
2024-05-31 21:42 ` Fix GLib deprecation warning in example-gatt-client/server bluez.test.bot
2024-06-03 19:20 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.