FS#72723 - [python-async-timeout] version 4.0.1 in [community-testing] breaks python-aiohttp

Attached to Project: Community Packages
Opened by Jonas Witschel (diabonas) - Friday, 12 November 2021, 10:25 GMT
Last edited by Jonas Witschel (diabonas) - Saturday, 13 November 2021, 21:42 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Felix Yan (felixonmars)
Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When upgrading to python-async-timeout 4.0.1-1 from [community-testing], the weechat-matrix Python plugin fails to load with the following error, which appears to be related to python-aiohttp:

11:18 python: stdout/stderr (?): Traceback (most recent call last):
11:18 python: stdout/stderr (?): File "/home/diabonas/.local/share/weechat/python/autoload/weechat-matrix.py", line 53, in <module>
11:18 python: stdout/stderr (?): from nio import RemoteProtocolError, RemoteTransportError, TransportType
11:18 python: stdout/stderr (?): File "/usr/lib/python3.9/site-packages/nio/__init__.py", line 2, in <module>
11:18 python: stdout/stderr (?): from .client import *
11:18 python: stdout/stderr (?): File "/usr/lib/python3.9/site-packages/nio/client/__init__.py", line 6, in <module>
11:18 python: stdout/stderr (?): from .async_client import AsyncClient, AsyncClientConfig, DataProvider
11:18 python: stdout/stderr (?): File "/usr/lib/python3.9/site-packages/nio/client/async_client.py", line 47, in <module>
11:18 python: stdout/stderr (?): from aiohttp import (
11:18 python: stdout/stderr (?): File "/usr/lib/python3.9/site-packages/aiohttp/__init__.py", line 6, in <module>
11:18 python: stdout/stderr (?): from .client import (
11:18 python: stdout/stderr (?): File "/usr/lib/python3.9/site-packages/aiohttp/client.py", line 35, in <module>
11:18 python: stdout/stderr (?): from . import hdrs, http, payload
11:18 python: stdout/stderr (?): File "/usr/lib/python3.9/site-packages/aiohttp/http.py", line 7, in <module>
11:18 python: stdout/stderr (?): from .http_parser import (
11:18 python: stdout/stderr (?): File "/usr/lib/python3.9/site-packages/aiohttp/http_parser.py", line 15, in <module>
11:18 python: stdout/stderr (?): from .helpers import NO_EXTENSIONS, BaseTimerContext
11:18 python: stdout/stderr (?): File "/usr/lib/python3.9/site-packages/aiohttp/helpers.py", line 667, in <module>
11:18 python: stdout/stderr (?): class CeilTimeout(async_timeout.timeout):
11:18 python: stdout/stderr (?): TypeError: function() argument 'code' must be code, not str

Temporarily downgrading python-async-timeout to the previous version 3.0.1-5 fixes the issue.

I have not had time to figure out what is going on yet, this is just a tracking bug for python-async-timeout to stay in the testing repos until the issue is fixed.

Additional info:
* python-async-timeout 4.0.1-1
* python-aiohttp 3.7.4.post0-1
* weechat-matrix 0.3.0-3

Steps to reproduce:
1. Enable the testing repositories and upgrade.
2. Install weechat-matrix, start weechat and use "/script load weechat-matrix.py" to attempt to load the plugin.
3. Observe the error reported above.
This task depends upon

Closed by  Jonas Witschel (diabonas)
Saturday, 13 November 2021, 21:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  python-aiohttp 3.8.0-1 in [community-testing]
Comment by Jonas Witschel (diabonas) - Friday, 12 November 2021, 10:36 GMT
It seems that python-aiohttp 3.7.4.post0 is not compatible with python-async-timeout >= 4: https://github.com/aio-libs/aiohttp/blob/v3.7.4.post0/setup.py#L71 I'll see whether python-aiohttp can be bumped to the latest version 3.8.0, which is compatible with the new python-async-timeout version: https://github.com/aio-libs/aiohttp/blob/v3.8.0/setup.cfg#L54 FWIW, this seems to the commit switching from async_timeout version 3 to 4: https://github.com/aio-libs/aiohttp/commit/48bf8c356c7c3bac5d520484ede5c35bd1795afb

Loading...