Skip to content

Fix bytes support in multipart uploads - #974

Merged
florimondmanca merged 2 commits into
masterfrom
fix-bytes-file-content
May 21, 2020
Merged

Fix bytes support in multipart uploads#974
florimondmanca merged 2 commits into
masterfrom
fix-bytes-file-content

Conversation

@florimondmanca

Copy link
Copy Markdown
Contributor

The files argument allows str/bytes along with file objects, but we were not handling the bytes branch yet (incorrectly treating that as file objects).

I've provided a test, but also have a follow-up PR coming to tighten up the type checking in the multipart implementation (which was too lose for mypy to catch this).

@florimondmancaflorimondmanca added the bug Something isn't working label May 21, 2020
@florimondmanca
florimondmancaforce-pushed the fix-bytes-file-content branch from 19d3a09 to 882994dCompareMay 21, 2020 14:17

@lovelydinosaurlovelydinosaur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, yup.

@florimondmanca
florimondmanca merged commit ab9ace2 into masterMay 21, 2020
@florimondmanca
florimondmanca deleted the fix-bytes-file-content branch May 21, 2020 14:25
@lovelydinosaurlovelydinosaur mentioned this pull request May 21, 2020
Kludex referenced this pull request in pydantic/httpx2 May 11, 2026
* Add proxy configuration to ConnectionPool
* Update tests for new proxy API, and nocover old classes.
* Update CHANGELOG
* Iterate refactor
* Revert "Iterate refactor"
This reverts commit e3835579d15cdbee17eaffb444bd427ddf94d41d.
---------
Co-authored-by: Tom Christie <tomchristie@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't working

Development

Successfully merging this pull request may close these issues.

2 participants

@florimondmanca@lovelydinosaur