Remove functions deprecated and warning since 2.0 (15 Mar 2013) and raising exceptions since 3.0 (1 Oct 2015)

This commit is contained in:
hugovk 2017-05-27 21:52:43 +03:00
parent 08c8a7a35e
commit d85dffd150
4 changed files with 10 additions and 17 deletions

View File

@ -182,14 +182,6 @@ class Dib(object):
""" """
return self.image.tobytes() return self.image.tobytes()
def fromstring(self, *args, **kw):
raise NotImplementedError("fromstring() has been removed. " +
"Please use frombytes() instead.")
def tostring(self, *args, **kw):
raise NotImplementedError("tostring() has been removed. " +
"Please use tobytes() instead.")
class Window(object): class Window(object):
"""Create a Window with the given title size.""" """Create a Window with the given title size."""

View File

@ -107,15 +107,6 @@ class TestImageWinDib(PillowTestCase):
# Confirm they're the same # Confirm they're the same
self.assertEqual(dib1.tobytes(), dib2.tobytes()) self.assertEqual(dib1.tobytes(), dib2.tobytes())
def test_removed_methods(self):
# Arrange
im = hopper()
dib = ImageWin.Dib(im)
# Act/Assert
self.assertRaises(Exception, dib.tostring)
self.assertRaises(Exception, dib.fromstring)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()

View File

@ -0,0 +1,9 @@
4.2.0
-----
Removed Deprecated Items
========================
Several deprecated items have been removed.
* The methods :py:meth:`PIL.ImageWin.Dib.fromstring` and :py:meth:`PIL.ImageWin.Dib.tostring` have been removed.

View File

@ -6,6 +6,7 @@ Release Notes
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
4.2.0
4.1.1 4.1.1
4.1.0 4.1.0
4.0.0 4.0.0