Skip to content
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

Bug: S3Boto3StorageFile opened in wb mode encodes bytearray contents to string #958

Closed
altostratous opened this issue Nov 20, 2020 · 0 comments · Fixed by #965
Closed

Bug: S3Boto3StorageFile opened in wb mode encodes bytearray contents to string #958

altostratous opened this issue Nov 20, 2020 · 0 comments · Fixed by #965

Comments

@altostratous
Copy link

Description

The write function in S3Boto3StorageFile uses force_bytes which unexpectedly encodes objects of type bytearray causing the content be like "b'bytearray(..." instead of "...".

How to reproduce

Just from a S3 storage open a file with mode 'wb' and write `bytearray()' to it.

Python >= 3.1
boto3==1.15.13

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 a pull request may close this issue.

1 participant