mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Divide floats to eliminate deprecation warning.
When running python 2.7 with the `-3` flag the following warning occurs > .../PIL/Image.py:48: DeprecationWarning: classic int division MAX_IMAGE_PIXELS = int(1024 * 1024 * 1024 / 4 / 3) Simply changing the 4 and 3 to be floats instead eliminates the warning and, because the result is cast, the resulting `int` stays the same for python 2 and 3.
This commit is contained in:
parent
eb3b9618cd
commit
74f751037f
|
@ -46,7 +46,7 @@ class _imaging_not_installed(object):
|
|||
|
||||
|
||||
# Limit to around a quarter gigabyte for a 24 bit (3 bpp) image
|
||||
MAX_IMAGE_PIXELS = int(1024 * 1024 * 1024 / 4 / 3)
|
||||
MAX_IMAGE_PIXELS = int(1024 * 1024 * 1024 // 4 // 3)
|
||||
|
||||
try:
|
||||
# give Tk a chance to set up the environment, in case we're
|
||||
|
|
Loading…
Reference in New Issue
Block a user