Removed warnings check

This commit is contained in:
Andrew Murray 2015-12-09 16:55:33 +11:00
parent 112240d3a2
commit 5f904ace9d
3 changed files with 9 additions and 21 deletions

View File

@ -2103,7 +2103,6 @@ def frombuffer(mode, size, data, decoder_name="raw", *args):
if decoder_name == "raw":
if args == ():
if warnings:
warnings.warn(
"the frombuffer defaults may change in a future release; "
"for portability, change the call to read:\n"

View File

@ -31,16 +31,11 @@
#
import numbers
import warnings
from PIL import Image, ImageColor
from PIL._util import isStringType
try:
import warnings
except ImportError:
warnings = None
##
# A simple 2D drawing interface for PIL images.
# <p>
@ -99,7 +94,6 @@ class ImageDraw(object):
"Please use keyword arguments instead.")
def setfont(self, font):
if warnings:
warnings.warn("setfont() is deprecated. " +
"Please set the attribute directly instead.")
# compatibility

View File

@ -30,11 +30,6 @@ from PIL._util import isDirectory, isPath
import os
import sys
try:
import warnings
except ImportError:
warnings = None
class _imagingft_not_installed(object):
# module placeholder