benjamin-hodgson / asynqp

An AMQP library for asyncio
MIT License
84 stars 29 forks source link

Deprecation warning for asyncio.async() #97

Closed romantolkachyov closed 7 years ago

romantolkachyov commented 7 years ago

I've got this warning when I run tests:

tests/test_app.py::test_inbound_handler
  /Users/roman/virtualenvs/messaging/lib/python3.6/site-packages/asynqp/protocol.py:118: DeprecationWarning: asyncio.async() function is deprecated, use ensure_future()
    self.send_hb_task = asyncio.async(self.send_heartbeat(interval), loop=self.loop)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
benjamin-hodgson commented 7 years ago

Thanks! I would accept a pull request fixing this.

romantolkachyov commented 7 years ago

I've just push changes. It's quite simple because ensure_future has the same interface.