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

Fix a DeprecationWarning from aiohttp in TestPetPhotoView #836

Closed musicinmybrain closed 2 months ago

musicinmybrain commented 2 months ago

The warning says, “In v4, passing bytes will no longer create a file field. Please explicitly use the filename parameter or pass a BytesIO object.” This commit implements the latter approach.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.28%. Comparing base (fb0ea95) to head (72c9dca). Report is 23 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #836 +/- ## ========================================== + Coverage 90.26% 90.28% +0.02% ========================================== Files 147 148 +1 Lines 4302 4313 +11 Branches 524 527 +3 ========================================== + Hits 3883 3894 +11 Misses 317 317 Partials 102 102 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

musicinmybrain commented 2 months ago

I failed to reference the bug that this fixes: https://github.com/python-openapi/openapi-core/issues/835

p1c2u commented 2 months ago

@musicinmybrain thanks for the contribution