[gnome-builder] Python: Avoid identifier 'async', which became a keyword in 3.7
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] Python: Avoid identifier 'async', which became a keyword in 3.7
- Date: Wed, 11 Jul 2018 16:29:53 +0000 (UTC)
commit 2908ac4b75eacf15ddd0df25bab52b6bd35cae01
Author: Simon McVittie <smcv debian org>
Date: Wed Jul 11 11:57:06 2018 +0100
Python: Avoid identifier 'async', which became a keyword in 3.7
This is an incompatible change, but so is async becoming an identifier.
Fixes: #565
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903558
Signed-off-by: Simon McVittie <smcv debian org>
src/libide/Ide.py | 6 +++---
src/plugins/jedi/jedi_plugin.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/Ide.py b/src/libide/Ide.py
index fcea6372a..4aa565086 100644
--- a/src/libide/Ide.py
+++ b/src/libide/Ide.py
@@ -41,9 +41,9 @@ class _Gio_DBusMethodInfo:
in_args = None
out_signature = None
-def DBusMethod(dbus_interface, in_signature=None, out_signature=None, async=False):
+def DBusMethod(dbus_interface, in_signature=None, out_signature=None, is_async=False):
def decorator(func):
- func._is_async = async
+ func._is_async = is_async
func._dbus_method = _Gio_DBusMethodInfo()
func._dbus_method.interface = dbus_interface
@@ -54,7 +54,7 @@ def DBusMethod(dbus_interface, in_signature=None, out_signature=None, async=Fals
in_signature_list = GLib.Variant.split_signature('('+in_signature+')')
arg_names = inspect.getargspec(func).args
arg_names.pop(0) # eat "self" argument
- if async: arg_names.pop(0) # eat "invocation"
+ if is_async: arg_names.pop(0) # eat "invocation"
if len(in_signature) != len(arg_names):
raise TypeError('specified signature %s for method %s does not match length of arguments' %
(str(in_signature_list), func.func_name))
for pair in zip(in_signature_list, arg_names):
diff --git a/src/plugins/jedi/jedi_plugin.py b/src/plugins/jedi/jedi_plugin.py
index 9c5ac2527..985c1f605 100644
--- a/src/plugins/jedi/jedi_plugin.py
+++ b/src/plugins/jedi/jedi_plugin.py
@@ -617,7 +617,7 @@ class JediService(Ide.DBusService):
self.queue = {}
self.handler_id = 0
- @Ide.DBusMethod('org.gnome.builder.plugins.jedi', in_signature='siis', out_signature='a(issass)',
async=True)
+ @Ide.DBusMethod('org.gnome.builder.plugins.jedi', in_signature='siis', out_signature='a(issass)',
is_async=True)
def CodeComplete(self, invocation, filename, line, column, content):
if filename in self.queue:
request = self.queue.pop(filename)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]