Open all binary files as binary and save to storage using basenames.

Review Request #10481 — Created March 31, 2019 and submitted

Information

Review Board
release-4.0.x

Reviewers

This updates our various file opening calls to explicitly open any
binary files as binary. While not a real problem on Python 2.x, Python
3.x requires this in order to get byte strings out instead of Unicode
strings.

It also ensures that any time we write a file using a Django storage
backend, we're providing a basename and not a file path, in order to
avoid issues on Django 1.11.

Unit tests pass on Python 2.7 with Django 1.6 and 3.5-3.7 with
Django 1.11 (with other in-progress changes).

Summary ID
Open all binary files as binary.
This updates our various file opening calls to explicitly open any binary files as binary. While not a real problem on Python 2.x, Python 3.x requires this in order to get byte strings out instead of Unicode strings.
b46a3996cff39c038840d852bc9147b72aeb9ba7
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (527bd6e)
Loading...