79575615

Date: 2025-04-15 16:28:21
Score: 0.5
Natty:
Report link

I'm not really sure what the root cause of this is but I've had a similar problem that is resolved by using this bit of code instead of ensureDeferred

def as_deferred(f):
    return Deferred.fromFuture(asyncio.ensure_future(f))

I found this to be the best guidance about mixing twisted and asyncio
https://meejah.ca/blog/python3-twisted-and-asyncio

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kevin R.