async with aiohttp.ClientSession() as client:
html = await fetch(client)
print(html)
This throws an unexpected error
from typing import Final
import svcs
from aiohttp import ClientSession
REGISTRY: Final = svcs.Registry()
REGISTRY.register_factory(ClientSession, ClientSession)
..\src\my_file.py:9: in <module>
REGISTRY.register_factory(ClientSession, ClientSession)
..\.venv\Lib\site-packages\svcs\_core.py:254: in register_factory
rs = self._register_factory(
..\.venv\Lib\site-packages\svcs\_core.py:329: in _register_factory
svc_type, factory, _takes_container(factory), enter, ping
..\.venv\Lib\site-packages\svcs\_core.py:433: in _takes_container
raise TypeError(msg)
E TypeError: Factories must take 0 or 1 parameters.
This works:
This throws an unexpected error