diff --git a/CHANGES/3964.doc b/CHANGES/3964.doc new file mode 100644 index 00000000000..70ee051a18a --- /dev/null +++ b/CHANGES/3964.doc @@ -0,0 +1 @@ +Removed deprecation warning in tracing example docs diff --git a/docs/client_advanced.rst b/docs/client_advanced.rst index 37b01a09a94..02ab6d446c1 100644 --- a/docs/client_advanced.rst +++ b/docs/client_advanced.rst @@ -280,10 +280,10 @@ same request and to the same :class:`TraceConfig` class, perhaps:: async def on_request_start( session, trace_config_ctx, params): - trace_config_ctx.start = session.loop.time() + trace_config_ctx.start = asyncio.get_event_loop().time() async def on_request_end(session, trace_config_ctx, params): - elapsed = session.loop.time() - trace_config_ctx.start + elapsed = asyncio.get_event_loop().time() - trace_config_ctx.start print("Request took {}".format(elapsed))