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

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

chipx86
Review Board
release-4.0.x
reviewboard

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
Open all binary files as binary.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

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