memoize
memoize copied to clipboard
Fix for `RuntimeError: await wasn't used with future`
Whole stacktrace looks like
2024-04-24T11:54:47.263047179Z stdout F File "/home/paas/application/lib/memoize/wrapper.py", line 128, in wrapper
2024-04-24T11:54:47.263051198Z stdout F result = await refresh(current_entry, key, value_future_provider, configuration_snapshot)
2024-04-24T11:54:47.263055379Z stdout F ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-24T11:54:47.263071169Z stdout F File "/home/paas/application/lib/memoize/wrapper.py", line 73, in refresh
2024-04-24T11:54:47.263075329Z stdout F entry = await update_statuses.await_updated(key)
2024-04-24T11:54:47.263079169Z stdout F ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-24T11:54:47.263082849Z stdout F RuntimeError: await wasn't used with future
I changed GitHub Actions config, so tests would be executed on PRs - could you update the branch (merging latest changes from master) so we could check is tests start and pass?
The stacktrace looks bad, but I'm afraid this may not be a solution. Currently await_updated is used with no await, so instead of Awaitable[sth] the result would be Awaitable[Awaitable[sth]]