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

Stream class is broken due to aiohttp 3.11 breaking change 'FlowControlDataQueue' #918

Closed
idan-rahamim-lendbuzz opened this issue Nov 18, 2024 · 11 comments

Comments

@idan-rahamim-lendbuzz
Copy link

This is broken:

queue: aiohttp.FlowControlDataQueue[Message] = aiohttp.FlowControlDataQueue(

Because of aiohttp 3.11 breaking change:

aio-libs/aiohttp#9685

@asvetlov
Copy link
Member

@bdraco could you take a look please?
I think the report is related to your recent changes.

@bdraco
Copy link
Member

bdraco commented Nov 18, 2024

We could restore that class even though it won't be used internally for backwards compatibility

@bdraco
Copy link
Member

bdraco commented Nov 18, 2024

@achimnol FlowControlDataQueue is not used anymore internally in aiohttp. Is better to change here or restore that class in 3.11 and wait until 4.x to fully drop it?

Realized its smaller than I thought so not so hard to maintain back-compat in 3.11, however it will go away in 4.x. see #919

bdraco added a commit to aio-libs/aiohttp that referenced this issue Nov 18, 2024
While we no longer use this internally, aiodocker uses it
see aio-libs/aiodocker#918
@bdraco
Copy link
Member

bdraco commented Nov 18, 2024

I'm going to restore it and release 3.11.3

Please note that it will go away permanently in 4.x so its will probably be best to vendor the code in that PR if aiodocker will still need this class when 4.x is released.

@bdraco
Copy link
Member

bdraco commented Nov 19, 2024

created #919 so its not lost track of

@bdraco
Copy link
Member

bdraco commented Nov 19, 2024

3.11.3 releasing with FlowControlDataQueue restored.

Can be watched here https://github.com/aio-libs/aiohttp/actions/runs/11903509416

@bdraco bdraco closed this as completed Nov 19, 2024
patchback bot pushed a commit to aio-libs/aiohttp that referenced this issue Nov 19, 2024
bdraco pushed a commit to aio-libs/aiohttp that referenced this issue Nov 19, 2024
@idan-rahamim-lendbuzz
Copy link
Author

idan-rahamim-lendbuzz commented Nov 19, 2024

@asvetlov
@bdraco
Now i get another error AttributeError: 'ResponseHandler' object has no attribute 'force_close'
It comes from line 93 of stream.py

@bdraco
Copy link
Member

bdraco commented Nov 19, 2024

@idan-rahamim-lendbuzz Can you post the full trace?

@idan-rahamim-lendbuzz
Copy link
Author

@idan-rahamim-lendbuzz Can you post the full trace?

Traceback (most recent call last):
File
"/Users/idan.rahamim/repos/sheriff-spec-tator/sheriff_spec_tator/utils/entities.py",
line 51, in validate
await validate_method()
File
"/Users/idan.rahamim/repos/sheriff-spec-tator/sheriff_spec_tator/validation/requirements
/bronze/production_dockerfile.py", line 38, in validate_general
if await DockerUtils.docker_exec_output("id -u") != "0":
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/idan.rahamim/repos/sheriff-spec-tator/sheriff_spec_tator/utils/docker.py", line
47, in docker_exec_output
chunk = await exec_start.read_out()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/idan.rahamim/Library/Caches/pypoetry/virtualenvs/sheriff-spec-tator-jHopqe-F-py3
.12/lib/python3.12/site-packages/aiodocker/stream.py", line 98, in read_out
await self._init()
File
"/Users/idan.rahamim/Library/Caches/pypoetry/virtualenvs/sheriff-spec-tator-jHopqe-F-py3
.12/lib/python3.12/site-packages/aiodocker/stream.py", line 93, in _init
protocol.force_close()
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ResponseHandler' object has no attribute 'force_close'

@bdraco
Copy link
Member

bdraco commented Nov 19, 2024

Looks like that has a different cause

aio-libs/aiohttp#8920

@bdraco
Copy link
Member

bdraco commented Nov 19, 2024

Since this is a separate problem, and the original issue here has been fixed I've opened #920

Please continue there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants