You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aiohttp v4 would bring few changes incompatible with Kopf and would break both the CI/CD pipelines and the Kopf-based operators. Some of these issues can be proactively fixed now. Others can be prevented by non-upgrading to v4.
The main incompatibility is that it is now impossible to inherit from aiohttp.ClientSession — explicitly restrictred in aiohttp.
This PR converts our APISession from inheriting aiohttp.ClientSession to containing aiohttp.ClientSession (i.e. a composition instead of inheritance).
Since it is not a session anymore, it is also renamed to a context — the closest semantic equivalent I could find. Nevertheless, it is not part of the public interface, so we are free to change and rename it as needed.
Beside of that, it also resolves the design flaw with few private/protected fields injected into the conceptually irrelevant 3rd-party session objects.
This PR, however, does NOT make Kopf fully compatible with aiohttp v4. Beside of the ClientSession, aresponses (used in tests) has some issues with the new aiohttp, and aiohttp v4 itself has incompatibilities with async-timeout v4.
It is not wise to dive that deep into the dependencies. Instead, we restrict aiohttp to major v3, and wait until v4 is released and stabilised (now, it is all in alpha).
Types of Changes
Bug fix (non-breaking change which fixes an issue)
Refactor/improvements
The text was updated successfully, but these errors were encountered:
aiohttp
v4 would bring few changes incompatible with Kopf and would break both the CI/CD pipelines and the Kopf-based operators. Some of these issues can be proactively fixed now. Others can be prevented by non-upgrading to v4.Description
The main incompatibility is that it is now impossible to inherit from
aiohttp.ClientSession
— explicitly restrictred inaiohttp
.This PR converts our
APISession
from inheritingaiohttp.ClientSession
to containingaiohttp.ClientSession
(i.e. a composition instead of inheritance).Since it is not a session anymore, it is also renamed to a context — the closest semantic equivalent I could find. Nevertheless, it is not part of the public interface, so we are free to change and rename it as needed.
Beside of that, it also resolves the design flaw with few private/protected fields injected into the conceptually irrelevant 3rd-party session objects.
This PR, however, does NOT make Kopf fully compatible with
aiohttp
v4. Beside of the ClientSession,aresponses
(used in tests) has some issues with the newaiohttp
, andaiohttp
v4 itself has incompatibilities withasync-timeout
v4.It is not wise to dive that deep into the dependencies. Instead, we restrict
aiohttp
to major v3, and wait until v4 is released and stabilised (now, it is all in alpha).Types of Changes
The text was updated successfully, but these errors were encountered: