mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-28 02:04:36 +03:00
Remove function deprecated and warning since 3.0 (1 Oct 2015)
This commit is contained in:
parent
d85dffd150
commit
e002207c5b
|
@ -462,15 +462,6 @@ class ImageFileDirectory_v2(collections.MutableMapping):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(dict(self))
|
return str(dict(self))
|
||||||
|
|
||||||
def as_dict(self):
|
|
||||||
"""Return a dictionary of the image's tags.
|
|
||||||
|
|
||||||
.. deprecated:: 3.0.0
|
|
||||||
"""
|
|
||||||
warnings.warn("as_dict() is deprecated. " +
|
|
||||||
"Please use dict(ifd) instead.", DeprecationWarning)
|
|
||||||
return dict(self)
|
|
||||||
|
|
||||||
def named(self):
|
def named(self):
|
||||||
"""
|
"""
|
||||||
:returns: dict of name|key: value
|
:returns: dict of name|key: value
|
||||||
|
|
|
@ -274,16 +274,6 @@ class TestFileTiff(PillowTestCase):
|
||||||
# Assert
|
# Assert
|
||||||
self.assertIsInstance(ret, str)
|
self.assertIsInstance(ret, str)
|
||||||
|
|
||||||
def test_as_dict_deprecation(self):
|
|
||||||
# Arrange
|
|
||||||
filename = "Tests/images/pil136.tiff"
|
|
||||||
im = Image.open(filename)
|
|
||||||
|
|
||||||
self.assert_warning(DeprecationWarning, im.tag_v2.as_dict)
|
|
||||||
self.assert_warning(DeprecationWarning, im.tag.as_dict)
|
|
||||||
self.assertEqual(dict(im.tag_v2), im.tag_v2.as_dict())
|
|
||||||
self.assertEqual(dict(im.tag), im.tag.as_dict())
|
|
||||||
|
|
||||||
def test_dict(self):
|
def test_dict(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
filename = "Tests/images/pil136.tiff"
|
filename = "Tests/images/pil136.tiff"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user