-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Using MultipartWriter.append_json breaks in 3.9.4 with AssertionError "assert CONTENT_DISPOSITION in payload.headers" #8326
Comments
Got this issue here: https://github.com/aiogram/aiogram/actions/runs/8664683869/job/23761669236?pr=1459 Example of usage with previous version: |
Through these convenience methods, we should probably add Content-Disposition automatically. But, I guess the one question is how to name the parts? Shouldn't there be an expected name by the receiving service, which the user should be using? |
Note that these are just asserts, so you can likely use |
But this update breaks all existing tests What's wrong with this usage? What should I edit to make 3.9.4 works? |
Wait, that code does set content-disposition. Why are we getting the error there too? Think you can create a test quickly in a PR here? |
Sure, wait a minute |
Ah, wait, you're getting the payload after the append and then setting it, but the check is happening during the append. Maybe we can move the check later... |
Describe the bug
After upgrading to 3.9.4 the following example code that used to work in 3.9.3 starts failing. I think the issue was introduced in 7d0be3f
To Reproduce
Expected behavior
This should print a text response, but instead it fails with an AssertionError
Logs/tracebacks
aiohttp Version
multidict Version
yarl Version
OS
macOS 14.1.1
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: