mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Mention that Image.tostring() is deprecated
This mirrors the deprecation notice in the docstring of fromstring(). I'm assuming that tostring() and fromstring() were both deprecated at the same time (Pillow 2.0); I haven't gone out of my way to verify that assumption.
This commit is contained in:
parent
bf22cdebd1
commit
a2a033ad2d
|
@ -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