Merge pull request #917 from mgedmin/patch-2

Mention that Image.tostring() is deprecated
This commit is contained in:
Hugo 2014-09-23 14:13:09 +03:00
commit f358c692c6

View File

@ -664,6 +664,10 @@ class Image:
# Declare tostring as alias to tobytes
def tostring(self, *args, **kw):
"""Deprecated alias to tobytes.
.. deprecated:: 2.0
"""
warnings.warn(
'tostring() is deprecated. Please call tobytes() instead.',
DeprecationWarning,