Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR] [246] Prepare for aiohttp v4, but stay with v3 #277

Closed
kopf-archiver bot opened this issue Aug 18, 2020 · 0 comments
Closed

[PR] [246] Prepare for aiohttp v4, but stay with v3 #277

kopf-archiver bot opened this issue Aug 18, 2020 · 0 comments
Labels
archive bug Something isn't working

Comments

@kopf-archiver
Copy link

kopf-archiver bot commented Aug 18, 2020

A pull request by nolar at 2019-12-23 12:50:27+00:00
Original URL: zalando-incubator/kopf#277
Merged by nolar at 2020-01-09 11:40:53+00:00

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.

Issue : closes #246

Description

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
@kopf-archiver kopf-archiver bot closed this as completed Aug 18, 2020
@kopf-archiver kopf-archiver bot changed the title [archival placeholder] [PR] [246] Prepare for aiohttp v4, but stay with v3 Aug 19, 2020
@kopf-archiver kopf-archiver bot added the bug Something isn't working label Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archive bug Something isn't working
Projects
None yet
Development

No branches or pull requests

0 participants