We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import asyncio import aiocontext context = aiocontext.Context() async def print_request(): print("Request ID:", context.get('request_id', 'unknown')) async def handle_request(): context['request_id'] = 42 await print_request() if __name__ == '__main__': loop = asyncio.get_event_loop() aiocontext.wrap_task_factory(loop) context.attach(loop) loop.run_until_complete(handle_request())
AttributeError: type object '_asyncio.Task' has no attribute 'current_task' sys:1: RuntimeWarning: coroutine 'handle_request' was never awaited
Python version 3.10
The text was updated successfully, but these errors were encountered:
No branches or pull requests
AttributeError: type object '_asyncio.Task' has no attribute 'current_task'
sys:1: RuntimeWarning: coroutine 'handle_request' was never awaited
Python version 3.10
The text was updated successfully, but these errors were encountered: