Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1000680: python3-aiohttp: fails to import, "TypeError: function() argument 'code' must be code, not str"

1,118 views
Skip to first unread message

Sandro Tosi

unread,
Nov 26, 2021, 10:20:03 PM11/26/21
to
Package: python3-aiohttp
Version: 3.7.4-2+b1
Severity: grave
X-Debbugs-Cc: mo...@debian.org
Control: affects -1 uvloop

Hello,
simply importing aiohttp results in an error:

root@zion:/# python3.9 -c "import aiohttp"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/aiohttp/__init__.py", line 6, in <module>
from .client import (
File "/usr/lib/python3/dist-packages/aiohttp/client.py", line 35, in <module>
from . import hdrs, http, payload
File "/usr/lib/python3/dist-packages/aiohttp/http.py", line 7, in <module>
from .http_parser import (
File "/usr/lib/python3/dist-packages/aiohttp/http_parser.py", line 15, in <module>
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/lib/python3/dist-packages/aiohttp/helpers.py", line 667, in <module>
class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str


root@zion:/# python3.10 -c "import aiohttp"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/aiohttp/__init__.py", line 6, in <module>
from .client import (
File "/usr/lib/python3/dist-packages/aiohttp/client.py", line 35, in <module>
from . import hdrs, http, payload
File "/usr/lib/python3/dist-packages/aiohttp/http.py", line 7, in <module>
from .http_parser import (
File "/usr/lib/python3/dist-packages/aiohttp/http_parser.py", line 15, in <module>
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/lib/python3/dist-packages/aiohttp/helpers.py", line 667, in <module>
class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str


this is from an up-to-date, clean chroot.

This is already affecting uvloop, likely all other aiohttop rdeps are affected too.

Regards,
Sandro


-- System Information:
Debian Release: 11.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.14.0-4-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-aiohttp depends on:
ii libc6 2.32-4
ii python3 3.9.8-1
ii python3-async-timeout 3.0.1-1.1
ii python3-attr 20.3.0-1
ii python3-chardet 4.0.0-1
ii python3-multidict 5.1.0-1
ii python3-typing-extensions 3.10.0.2-1
ii python3-yarl 1.6.3-2

Versions of packages python3-aiohttp recommends:
ii libjs-jquery 3.5.1+dfsg+~3.5.5-7

python3-aiohttp suggests no packages.

-- no debconf information

Boyuan Yang

unread,
Nov 28, 2021, 3:00:03 PM11/28/21
to
Hi,

在 2021-11-27星期六的 23:23 -0500,Sandro Tosi写道:
> Boyuan,
> you caused this by uploading python-async-timeout 4.x
>
> https://tracker.debian.org/news/1280914/accepted-python-async-timeout-401-1-source-into-unstable/
>
> while aiohttp is incompatible with it.
>
> Apparently the latest version of aiohttp supports async-timeout > 4.0
>
> https://github.com/aio-libs/aiohttp/blob/v3.8.1/setup.cfg#L54
>
> are you going to handle this upgrade?

Thanks for the info and sorry for the breakage; obviously I should have
uploaded it into Experimental first. I am looking into fixing the issue
(ideally through upgrade of all related packages) but this may take some time.
If you already have a solution, it would be even better.

Thanks,
Boyuan Yang

Piotr Ożarowski

unread,
Nov 28, 2021, 3:10:03 PM11/28/21
to
[Boyuan Yang, 2021-11-28]
> Thanks for the info and sorry for the breakage; obviously I should have
> uploaded it into Experimental first. I am looking into fixing the issue
> (ideally through upgrade of all related packages) but this may take some time.
> If you already have a solution, it would be even better.

I already fixed it by upgrading aiohttp. It needs 2 NEW packages that I
packaged and uploaded, one of them is already accepted, second it
waiting for review. Unfortunately I uploaded my previous build (tagged
1~exp1 in the git repo, but uploaded -1 so version in unstable needs
aiosignal ASAP - I asked one of the ftp-masters if it's possible to
check it sooner and hopefully unstable will be fixed soon)

Boyuan Yang

unread,
Dec 21, 2021, 7:50:04 PM12/21/21
to
Hi,

在 2021-11-28星期日的 20:51 +0100,Piotr Ożarowski写道:
All related packages (finally!) migrated to Testing; now we can consider this
bug to be fully solved.

Cheers,
Boyuan
signature.asc
0 new messages