mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +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
|
# Declare tostring as alias to tobytes
|
||||||
def tostring(self, *args, **kw):
|
def tostring(self, *args, **kw):
|
||||||
|
"""Deprecated alias to tobytes.
|
||||||
|
|
||||||
|
.. deprecated:: 2.0
|
||||||
|
"""
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
'tostring() is deprecated. Please call tobytes() instead.',
|
'tostring() is deprecated. Please call tobytes() instead.',
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user