commit: e46dd735cd4dde58cf3f8ef3cd2b8b29561f5b3e Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Tue Jul 17 19:27:28 2018 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Tue Jul 17 19:27:28 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e46dd735
EventLoop: use python2.7 compatible **kwargs for call_* context arg Since python2.7 does not allow positional default arguments after *args, use **kwargs instead. Fixes: ae8cc32ccd81 ("EventLoop: add call_* context arg for python3.7 compat") pym/portage/util/_eventloop/EventLoop.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py index 69ccbac2c..084ff0c18 100644 --- a/pym/portage/util/_eventloop/EventLoop.py +++ b/pym/portage/util/_eventloop/EventLoop.py @@ -832,7 +832,7 @@ class EventLoop(object): return future.result() - def call_soon(self, callback, *args, context=None): + def call_soon(self, callback, *args, **kwargs): """ Arrange for a callback to be called as soon as possible. The callback is called after call_soon() returns, when control returns to the event @@ -862,7 +862,7 @@ class EventLoop(object): return self._handle(self._idle_add( self._call_soon_callback(callback, args)), self) - def call_soon_threadsafe(self, callback, *args, context=None): + def call_soon_threadsafe(self, callback, *args, **kwargs): """Like call_soon(), but thread safe.""" # idle_add provides thread safety return self._handle(self.idle_add( @@ -877,7 +877,7 @@ class EventLoop(object): """ return monotonic() - def call_later(self, delay, callback, *args, context=None): + def call_later(self, delay, callback, *args, **kwargs): """ Arrange for the callback to be called after the given delay seconds (either an int or float). @@ -912,7 +912,7 @@ class EventLoop(object): return self._handle(self.timeout_add( delay * 1000, self._call_soon_callback(callback, args)), self) - def call_at(self, when, callback, *args, context=None): + def call_at(self, when, callback, *args, **kwargs): """ Arrange for the callback to be called at the given absolute timestamp when (an int or float), using the same time reference as