aio-libs / aiozipkin

Distributed tracing instrumentation for asyncio with zipkin
Apache License 2.0
187 stars 31 forks source link

example/queue: Application.make_handler(...) is deprecated #195

Open kevinqqnj opened 5 years ago

kevinqqnj commented 5 years ago

Thanks for the good examples. There's warning when running example/queue: queue/runner.py:19: DeprecationWarning: Application.make_handler(...) is deprecated, use AppRunner API instead

python 3.7.2 aiozipkin==0.5.0 aiohttp==3.5.4 aiojobs==0.2.2

Checked latest aiohttp doc., maybe need to update like this (it works without warnings):

# /examples/queue/runner.py
def run():
    ...
    fe_handler = web.AppRunner(fe_app)
    be_handler = web.AppRunner(be_app)
    handlers = [fe_handler, be_handler]

    loop_run(fe_handler.setup())
    loop_run(be_handler.setup())

    loop_run(loop.create_server(fe_handler.server, host, fe_port))
    loop_run(loop.create_server(be_handler.server, host, be_port))
jettify commented 5 years ago

Sorry for late reply, good catch! Would you like to submit PR with proposed fixes?

kevinqqnj commented 5 years ago

Hi, it depends on python version. Not actual bugs. Maybe we can keep as it is.