Skip to content

Commit

Permalink
Fix how we're provisionally setting the coroutine tracking depth (#449)
Browse files Browse the repository at this point in the history
* Use sys.set_coroutine_origin_tracking_depth instead of non-existent loop.set_coroutine_tracking_depth
  • Loading branch information
FasterSpeeding authored Jan 25, 2021
1 parent 4472654 commit a1bd5a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hikari/impl/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def run(
if coroutine_tracking_depth is not None:
try:
# Provisionally defined in CPython, may be removed without notice.
loop.set_coroutine_tracking_depth(coroutine_tracking_depth) # type: ignore[attr-defined]
sys.set_coroutine_origin_tracking_depth(coroutine_tracking_depth) # type: ignore[attr-defined]
except AttributeError:
_LOGGER.log(
ux.TRACE, "cannot set coroutine tracking depth for %s, no functionality exists for this", loop
Expand Down

0 comments on commit a1bd5a0

Please sign in to comment.