Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/_eventloop/
Date: Tue, 17 Jul 2018 19:28:02
Message-Id: 1531855648.e46dd735cd4dde58cf3f8ef3cd2b8b29561f5b3e.zmedico@gentoo
1 commit: e46dd735cd4dde58cf3f8ef3cd2b8b29561f5b3e
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 17 19:27:28 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 17 19:27:28 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e46dd735
7
8 EventLoop: use python2.7 compatible **kwargs for call_* context arg
9
10 Since python2.7 does not allow positional default arguments after
11 *args, use **kwargs instead.
12
13 Fixes: ae8cc32ccd81 ("EventLoop: add call_* context arg for python3.7 compat")
14
15 pym/portage/util/_eventloop/EventLoop.py | 8 ++++----
16 1 file changed, 4 insertions(+), 4 deletions(-)
17
18 diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py
19 index 69ccbac2c..084ff0c18 100644
20 --- a/pym/portage/util/_eventloop/EventLoop.py
21 +++ b/pym/portage/util/_eventloop/EventLoop.py
22 @@ -832,7 +832,7 @@ class EventLoop(object):
23
24 return future.result()
25
26 - def call_soon(self, callback, *args, context=None):
27 + def call_soon(self, callback, *args, **kwargs):
28 """
29 Arrange for a callback to be called as soon as possible. The callback
30 is called after call_soon() returns, when control returns to the event
31 @@ -862,7 +862,7 @@ class EventLoop(object):
32 return self._handle(self._idle_add(
33 self._call_soon_callback(callback, args)), self)
34
35 - def call_soon_threadsafe(self, callback, *args, context=None):
36 + def call_soon_threadsafe(self, callback, *args, **kwargs):
37 """Like call_soon(), but thread safe."""
38 # idle_add provides thread safety
39 return self._handle(self.idle_add(
40 @@ -877,7 +877,7 @@ class EventLoop(object):
41 """
42 return monotonic()
43
44 - def call_later(self, delay, callback, *args, context=None):
45 + def call_later(self, delay, callback, *args, **kwargs):
46 """
47 Arrange for the callback to be called after the given delay seconds
48 (either an int or float).
49 @@ -912,7 +912,7 @@ class EventLoop(object):
50 return self._handle(self.timeout_add(
51 delay * 1000, self._call_soon_callback(callback, args)), self)
52
53 - def call_at(self, when, callback, *args, context=None):
54 + def call_at(self, when, callback, *args, **kwargs):
55 """
56 Arrange for the callback to be called at the given absolute
57 timestamp when (an int or float), using the same time reference as