From: xse Subject: Re: www/py-aiohttp appears to need devel/py-typing-extensions To: ports@openbsd.org Date: Thu, 23 Oct 2025 12:06:37 +0200 On 2025-10-23 11:09, Theo Buehler wrote: > On Thu, Oct 23, 2025 at 08:13:47AM +0200, xse wrote: >> Hello ports@, >> >> I encountered an error importing aiohttp on after upgrading to 7.8: > > Thanks for the report and the diff. > >> xse@krkrkr ~ $ python3 >> Python 3.12.11 (main, Oct 8 2025, 14:22:31) [Clang 19.1.7 ] on >> openbsd7 >> Type "help", "copyright", "credits" or "license" for more information. >> > > > import aiohttp > > If you look at the trace: > >> Traceback (most recent call last): >> File "", line 1, in >> File "/usr/local/lib/python3.12/site-packages/aiohttp/__init__.py", >> line 6, in >> from .client import ( >> File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", >> line >> 107, in >> from .tracing import Trace, TraceConfig >> File "/usr/local/lib/python3.12/site-packages/aiohttp/tracing.py", >> line 5, in >> from aiosignal import Signal > > You see that the error comes from aiosignal's __init__.py: > >> File >> "/usr/local/lib/python3.12/site-packages/aiosignal/__init__.py", >> line 14, in >> from typing_extensions import TypeVarTuple >> ModuleNotFoundError: No module named 'typing_extensions' >> >> >> Installing py3-typing_extensions fixes it so without being 100% sure >> of what I'm doing i guess the fix would be something like: > > So, while your patch works for py-aiohttp, it should really be applied > to py-aiosignal. Indeed that makes a lot more sense! > Since this changes the package, it needs a revision bump. Thank you for the insight :) > I commited this diff to -current and -stable: > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/devel/py-aiosignal/Makefile,v > diff -u -p -r1.6 -r1.7 > --- Makefile 12 Jul 2025 12:50:30 -0000 1.6 > +++ Makefile 23 Oct 2025 09:01:55 -0000 1.7 > @@ -3,6 +3,7 @@ COMMENT= manage callbacks in asyncio pro > MODPY_DISTV= 1.4.0 > DISTNAME= aiosignal-${MODPY_DISTV} > PKGNAME= py-${DISTNAME} > +REVISION= 0 > > CATEGORIES= devel > > @@ -16,7 +17,9 @@ MODULES= lang/python > MODPY_PYBUILD= setuptools > MODPY_PI= Yes > > -RUN_DEPENDS= devel/py-frozenlist > +# typing_extensions imported from __init__.py for Python <= 3.13 > +RUN_DEPENDS= devel/py-frozenlist \ > + devel/py-typing-extensions > TEST_DEPENDS= devel/py-test-asyncio \ > devel/py-test-cov