tdryer / hangups

the first third-party instant messaging client for Google Hangouts
https://hangups.readthedocs.io/
MIT License
1.71k stars 190 forks source link

DeprecationWarning from aiohttp #452

Closed das7pad closed 5 years ago

das7pad commented 5 years ago

aiohttp complains about using the conn_timeout parameter in the aiohttp.ClientSession init.

See this travis log for example: https://travis-ci.org/das7pad/hangoutsbot/jobs/481612446#L578

/some-venv/src/hangups/hangups/http_utils.py:35: DeprecationWarning: conn_timeout is deprecated, use timeout argument instead
    conn_timeout=CONNECT_TIMEOUT)

Snippet in hangups: https://github.com/tdryer/hangups/blob/9c3b147f606b5753bb2c33961dcc83130829e8aa/hangups/http_utils.py#L34-L35

das7pad commented 5 years ago

The timeout parameter was introduced in v3.3.0, tagged on 2018-06-01: https://github.com/aio-libs/aiohttp/commit/7d136fbc0662d49f5659c0423e0b3e1126652f78 The conn_timeout got deprecated in v3.5.0, tagged on 2018-12-23: https://github.com/aio-libs/aiohttp/commit/dfdf51081d85350749192b07acab870679ca1bca

das7pad commented 5 years ago

The current setup.py has a wide version constraint: aiohttp>=1.3,<4.

https://github.com/tdryer/hangups/blob/9c3b147f606b5753bb2c33961dcc83130829e8aa/setup.py#L29

This patch would drop support for aiohttp<3.3.0: https://github.com/tdryer/hangups/commit/b69396d824a848a30fcfb481306411622fade44d

Specifying the timeout base on aiohttp version feels wrong.