question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deny to use async def and generators with @value decorator.

See original GitHub issue

Suggest @operation decorator instead with await within the story method.

We won’t make await during DI process. It’ll be too hard to implement and probably will cause hard to find bugs.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:29 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
proofit404commented, Jul 25, 2019

Superseded by #132 and #133.

1reaction
agronholmcommented, Jul 22, 2019

That class inherits from .futures.PyFuture which is just an alias for asyncio.Future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deny to use async def and generators with @value decorator.
Since Foo needs the connection we have to initialize it using async def . We cannot connect during __init__ since it cannot be...
Read more >
Python Generators/Coroutines/Async IO with examples
Enables the generator use “yield from” to call native coroutines(async def), and also enables the generator coroutine to be called by native ...
Read more >
Async IO in Python: A Complete Walkthrough
This tutorial will give you a firm grasp of Python's approach to async IO, which is a concurrent programming design that has received...
Read more >
PEP 525 – Asynchronous Generators
Asynchronous Generators. A Python generator is any function containing one or more yield expressions: def func ...
Read more >
Asynchronous decorator for both generators and coroutines
Since decorated returns an object created by calling a function defined with async def inner , it is functionally equivalent to being async...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found