-
-
Notifications
You must be signed in to change notification settings - Fork 866
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
S3Boto3Storage.open(name, "r")
doesn't handle newlines properly
#1351
Comments
S3Boto3Storage.read()
doesn't handle newlines properlyS3Boto3Storage.open(name, "r")
doesn't handle newlines properly
Thanks for opening an issue. When you say "as you expect" can you link me to docs where the expected behavior is to change the file contents in that way? |
Thanks for your reply. This is the default behaviour of text-mode files in Python: https://docs.python.org/3/library/functions.html#open
Django's builtin storage classes also adhere to this API, which is how we discovered this discrepancy - when changing from a django-builtin storage backend to a django-storages one, the newlines in one of our tests started playing up. |
With S3Boto3Storage, opening a file in text mode (
"r"
) doesn't properly convert windows newlines ("\r\n"
) to"\n"
as you'd expect. Neither does it handle\r
as\n
The text was updated successfully, but these errors were encountered: