mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #917 from mgedmin/patch-2
Mention that Image.tostring() is deprecated
This commit is contained in:
commit
f358c692c6
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user