Commit Graph

26 Commits

Author SHA1 Message Date
Andrew Murray
6cd99fc3cf
Merge branch 'master' into rm-2.7 2019-10-08 18:57:27 +11:00
Jon Dufresne
64032061c0 Move several imports to the top-level of the file
This better follows PEP 8 style guide:

https://www.python.org/dev/peps/pep-0008/#imports

> Imports are always put at the top of the file, just after any module
> comments and docstrings, and before module globals and constants.

This also avoids duplicate import code within the same file.
2019-10-07 06:28:36 -07:00
Hugo
538d9e2e5d Upgrade Python syntax with pyupgrade --py3-plus 2019-10-07 14:30:59 +03:00
Hugo
af770a6c55 Drop support for EOL Python 2.7 2019-10-07 14:30:59 +03:00
Jon Dufresne
d50445ff30 Introduce isort to automate import ordering and formatting
Similar to the recent adoption of Black. isort is a Python utility to
sort imports alphabetically and automatically separate into sections. By
using isort, contributors can quickly and automatically conform to the
projects style without thinking. Just let the tool do it.

Uses the configuration recommended by the Black to avoid conflicts of
style.

Rewrite TestImageQt.test_deprecated to no rely on import order.
2019-07-06 16:11:35 -07:00
Hugo
53a7e35004 Format with Black 2019-06-10 18:22:46 +03:00
Hugo
77d1c609f3
Merge pull request #3635 from radarhere/eps
Changed EPS subprocess stdout from devnull to None
2019-03-11 21:15:18 +02:00
Hugo
b75210d824
Merge pull request #3572 from jdufresne/seek-constants
Replace .seek() magic numbers with io.SEEK_* constants
2019-02-27 23:30:27 +02:00
Hugo
f7134f1c18
Merge pull request #3628 from jdufresne/dep-plugin-version
Deprecate PIL.*ImagePlugin.__version__ attributes
2019-02-12 15:39:43 +02:00
Andrew Murray
54f6cc7ea2 Changed subprocess stdout from devnull to None 2019-02-06 19:07:53 +11:00
Jon Dufresne
a11fed32b3 Deprecate PIL.*ImagePlugin.__version__ attributes
Use PIL.__version__ instead.
2019-02-02 17:39:55 -08:00
Andrew Murray
258ec6d129 Changed subprocess stdin from devnull to None 2019-01-25 18:49:10 +11:00
Jon Dufresne
a00fc33c04 Replace .seek() magic numbers with io.SEEK_* constants
A bit more readable.

https://docs.python.org/3/library/io.html#io.IOBase.seek
2019-01-12 18:22:07 -08:00
Hugo
a3079eab9e flake8: E127 continuation line over-indented for visual indent 2018-11-11 19:01:10 +02:00
Andrew Murray
0adeb82e98 Changed Image size property to be read-only by default 2018-09-30 13:45:18 +10:00
Hugo
98caf40507
Merge pull request #3378 from hugovk/windows-gs-popup
Hide the Ghostscript progress dialog popup on Windows
2018-09-29 23:09:16 +03:00
Hugo
9e54c14dfa
Merge pull request #2214 from jdufresne/eps-text-wrapper
Use TextIOWrapper.detach() instead of NoCloseStream
2018-09-26 15:34:24 +03:00
Hugo
ae415907cb flake8 and tidy up 2018-09-26 14:38:44 +03:00
Hugo
f13c150f00 Hide the Ghostscript progress dialog on Windows 2018-09-26 14:38:33 +03:00
Jon Dufresne
37f10651bd Clean up commented out debug print statements 2018-09-04 20:02:42 -07:00
Jon Dufresne
7e67b9c58f Use TextIOWrapper.detach() instead of NoCloseStream
Usage and this pattern is discussed in Python bug: https://bugs.python.org/issue21363
2018-09-04 19:30:36 -07:00
Jon Dufresne
1ba14783d2 Avoid deprecated 'U' mode when opening files
Instead, use PSFile() wrapper to handle all newline in the EPS spec.

Update line ending tests to handle all combinations of '\n' and '\r'.

Fixes warning "DeprecationWarning: 'U' mode is deprecated" in tests.
2018-07-01 08:07:59 -07:00
Andrew Murray
b4e6cdadac Added py3 variable to _util 2018-04-20 09:19:13 +10:00
Hugo
13767f045f Use named version attributes and simplify version checks 2018-03-12 10:35:29 +02:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00