forked from matplotlib/matplotlib
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes matplotlib#1862: The PS backend would inadvertently close file …
…handles passed to it on Python 3. The TextIOWrapper that handles the encoding from unicode to ascii needs to be detached before its destructor is called, otherwise it will call close on the underlying file object. Also cleans up how with statements are handled to avoid the sometimes problematic null contextmanager.
- Loading branch information
Showing
1 changed file
with
19 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters