python-openapi / openapi-core

Openapi-core is a Python library that adds client-side and server-side support for the OpenAPI v3.0 and OpenAPI v3.1 specification.
BSD 3-Clause "New" or "Revised" License
287 stars 131 forks source link

[Bug]: New DeprecationWarning with aiohttp 3.9.4 #835

Closed musicinmybrain closed 2 months ago

musicinmybrain commented 2 months ago

Actual Behavior

With aiohttp 3.9.4 or 3.9.5 and pytest -v -k 'TestPetPhotoView':

========================================================================================== short test summary info ==========================================================================================
FAILED tests/integration/contrib/aiohttp/test_aiohttp_project.py::TestPetPhotoView::test_post_valid - DeprecationWarning: In v4, passing bytes will no longer create a file field. Please explicitly use the filename parameter or pass a BytesIO object.
=============================================================================== 1 failed, 5 passed, 1435 deselected in 5.14s ================================================================================

Expected Behavior

With aiohttp 3.9.3:

==================================================================================== 6 passed, 1435 deselected in 4.86s =====================================================================================

Steps to Reproduce

python3 -m venv _e
. _e/bin/activate
pip install -e .[django,falcon,fastapi,flask,requests,aiohttp,starlette]
pip install django djangorestframework falcon flask pytest pytest-cov python-multipart responses starlette strict-rfc3339 webob httpx deptry aiohttp pytest-aiohttp fastapi
python -m pytest -v -k 'TestPetPhotoView'

OpenAPI Core Version

0.19.1

OpenAPI Core Integration

aiohttp

Affected Area(s)

No response

References

https://github.com/aio-libs/aiohttp/commit/cebe526b9c34dc3a3da9140409db63014bc4cf19

Anything else we need to know?

No response

Would you like to implement a fix?

Yes