From 2c93bb0302f93526c0ef749f719a7d2d8a3885bf Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 2 Jun 2020 10:33:57 -0400 Subject: [PATCH] Drop use of deprecated `trio.Event.clear()` --- piker/brokers/questrade.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piker/brokers/questrade.py b/piker/brokers/questrade.py index 37526890..9d2d3892 100644 --- a/piker/brokers/questrade.py +++ b/piker/brokers/questrade.py @@ -84,7 +84,7 @@ def refresh_token_on_err(tries=3): for i in range(1, tries): try: try: - client._request_not_in_progress.clear() + client._request_not_in_progress = trio.Event() return await wrapped(*args, **kwargs) finally: client._request_not_in_progress.set() @@ -303,7 +303,7 @@ class Client: # token whereby their service can't handle concurrent requests # to differnet end points (particularly the auth ep) which # causes hangs and premature token invalidation issues. - self._has_access.clear() + self._has_access = trio.Event() try: # don't allow simultaneous token refresh requests async with self._mutex: