Skip to content

Conversation

jcekstrom
Copy link

Summary

Updated _content.py: encode_content to accept a bytearray as well as
bytes/str as a static content type. This allows sending a mutable bytearray
without having to cast to an immutable bytes object, trigging a memory
copy before sending.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

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

Successfully merging this pull request may close these issues.

1 participant