Remove function deprecated and warning since 3.0 (1 Oct 2015)

This commit is contained in:
hugovk 2017-05-27 21:55:42 +03:00
parent d85dffd150
commit e002207c5b
2 changed files with 4 additions and 23 deletions

View File

@ -462,15 +462,6 @@ class ImageFileDirectory_v2(collections.MutableMapping):
def __str__(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):
"""
:returns: dict of name|key: value

View File

@ -274,16 +274,6 @@ class TestFileTiff(PillowTestCase):
# Assert
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):
# Arrange
filename = "Tests/images/pil136.tiff"