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
When using connect_get_namespaced_pod_exec in version 31.0.1 of kubernetes_asyncio, the function returns an aiohttp.client._BaseRequestContextManager object instead of the expected aiohttp.client_ws.ClientWebSocketResponse. This behavior differs from version 29.0.1, where the correct object (ClientWebSocketResponse) is returned. This change breaks code that relies on the ClientWebSocketResponse, as _BaseRequestContextManager does not implement aiter.
Code Example
The relevant part of the code that triggers the issue:
The issue causes failures in any logic that depends on the ClientWebSocketResponse object, such as iterating over the WebSocket response. This regression makes it impossible to handle WebSocket streams in the same manner as with version 29.x.
Steps to Reproduce
Use the provided code snippet with kubernetes_asyncio version 31.0.1.
Observe the returned object type from connect_get_namespaced_pod_exec.
It seems the return value of connect_get_namespaced_pod_exec was unintentionally altered in version 31.x to return a _BaseRequestContextManager instead of a ClientWebSocketResponse. This may be a regression introduced by changes in the kubernetes_asyncio library or its dependencies.
Request
Please investigate and ensure that connect_get_namespaced_pod_exec returns ClientWebSocketResponse as it did in earlier versions. This behavior is essential for handling WebSocket streams correctly.
Workaround
There is currently no clear workaround to resolve this, as the required functionality (_aiter_) is unavailable in _BaseRequestContextManager.
Additional Context
Logs from both versions (29.0.1 and 31.0.1) are included above for reference. If you need further information, I am happy to provide additional details.
The text was updated successfully, but these errors were encountered:
I have to confirm that it's a breaking change which was introduced in 31.1.0 [#328]
I should have mentioned about it in the changelog file, I'll do it later today.
Description
When using connect_get_namespaced_pod_exec in version 31.0.1 of kubernetes_asyncio, the function returns an aiohttp.client._BaseRequestContextManager object instead of the expected aiohttp.client_ws.ClientWebSocketResponse. This behavior differs from version 29.0.1, where the correct object (ClientWebSocketResponse) is returned. This change breaks code that relies on the ClientWebSocketResponse, as _BaseRequestContextManager does not implement aiter.
Code Example
The relevant part of the code that triggers the issue:
Expected Behavior (Version 29.0.1)
The
connect_get_namespaced_pod_exec
method returns aClientWebSocketResponse
, as shown in the logs:Actual Behavior (Version 31.0.1)
The method returns _BaseRequestContextManager instead, causing the code to break since
_BaseRequestContextManager
does not implement_aiter_
:Impact
The issue causes failures in any logic that depends on the
ClientWebSocketResponse
object, such as iterating over the WebSocket response. This regression makes it impossible to handle WebSocket streams in the same manner as with version29.x
.Steps to Reproduce
kubernetes_asyncio
version31.0.1
.connect_get_namespaced_pod_exec
.Environment
•
kubernetes_asyncio
version:31.0.1
(issue observed),29.0.1
(working as expected)• Python version:
3.12.7
•
aiohttp
version:3.10.10
Possible Cause
It seems the return value of
connect_get_namespaced_pod_exec
was unintentionally altered in version31.x
to return a_BaseRequestContextManager
instead of aClientWebSocketResponse
. This may be a regression introduced by changes in thekubernetes_asyncio
library or its dependencies.Request
Please investigate and ensure that
connect_get_namespaced_pod_exec
returnsClientWebSocketResponse
as it did in earlier versions. This behavior is essential for handling WebSocket streams correctly.Workaround
There is currently no clear workaround to resolve this, as the required functionality (
_aiter_
) is unavailable in_BaseRequestContextManager
.Additional Context
Logs from both versions (
29.0.1
and31.0.1
) are included above for reference. If you need further information, I am happy to provide additional details.The text was updated successfully, but these errors were encountered: