Skip to content
New issue

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

Update aiohttp requirements in keeping with tdryer/hangups master branch #960

Closed
sleavitt opened this issue Feb 19, 2019 · 3 comments
Closed

Comments

@sleavitt
Copy link

Description

aiohttp requirements need updating to stay in sync with tdryer/hangups master branch. The master branch (and tagged version 0.4.7) depends on 'aiohttp>=3.3,<4', whereas hangoutsbot depends on 'aiohttp>=1.3,<3', and this prevents hangups from working properly, as it attempts to reference a method ClientTimeout and can't because the version that hangoutsbot ends up with (2.3.10 currently) isn't new enough to support that method.

Output of /bot version

Expected behaviour

Actual behaviour

Steps to reproduce:

  1. Step one
  2. Step two
  3. ...

Log output

Paste relevant log output here (redact any secrets - API keys, etc.)
@Terrance
Copy link
Member

There's some incorrect usage of aiohttp ClientSession objects that needs fixing up -- currently we get warnings like this on exit:

Exception ignored in: <function ClientSession.__del__ at 0x7f47a11bbbf8>
Traceback (most recent call last):
 File "/opt/hangoutsbot/venv/lib/python3.7/site-packages/aiohttp/client.py", line 300, in __del__
TypeError: 'NoneType' object is not callable

Both telesync and SlackRTM create these objects but don't dispose of them correctly (or at all). The NoneType error here appears to be a bug in aiohttp's warning for unclosed sessions.

The breaking changes from aiohttp 2.x to 3.x are minimal and seem relatively safe with the rest of our code.

@Terrance
Copy link
Member

With finalisation of sessions implemented, I'm still seeing those aiohttp errors on exit, so I'm unsure what's causing them. In any case, bumping aiohttp and making finalisation async seems to work as expected.

@Terrance
Copy link
Member

aiohttp 3.x would raise the minimum Python version to 3.5.3, which is a tad recent for some users (Ubuntu 16.04 is stuck on 3.5.2, for example). It may be worth delaying this if we're affecting a sizeable proportion of users' bots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants