Skip to content

Fixed PSDraw stdout Python 3 compatibility#1365

Merged
hugovk merged 1 commit intopython-pillow:masterfrom
radarhere:psdraw
Jul 31, 2015
Merged

Fixed PSDraw stdout Python 3 compatibility#1365
hugovk merged 1 commit intopython-pillow:masterfrom
radarhere:psdraw

Conversation

@radarhere
Copy link
Copy Markdown
Member

If no file pointer is provided, PSDraw uses sys.stdout. This causes some bugs in Python 3.

To demonstrate, I've added a test.

hugovk added a commit that referenced this pull request Jul 31, 2015
Fixed PSDraw stdout Python 3 compatibility
@hugovk hugovk merged commit e442a72 into python-pillow:master Jul 31, 2015
@hugovk
Copy link
Copy Markdown
Member

hugovk commented Jul 31, 2015

Thanks.

@radarhere radarhere deleted the psdraw branch July 31, 2015 22:39
temaxter added a commit to temaxter/Pillow that referenced this pull request Dec 1, 2017
Fix to issue python-pillow#1365 breaks saving pbm files (possibly other types?)
to stdout with Python 2.7. Only the magic number and size rows are
printed.

New issue is fixed by testing Python version and not returning
prematurely if version is < 3. Passes tests with both Python 2.7.12
and 3.5.2 (Ubuntu 16.04).
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 this pull request may close these issues.

4 participants