mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 11:35:52 +03:00
Removed ImagePalette methods, deprecated in 2.6
This commit is contained in:
parent
a3107af63f
commit
47366692d9
|
@ -17,7 +17,6 @@
|
|||
#
|
||||
|
||||
import array
|
||||
import warnings
|
||||
from PIL import ImageColor
|
||||
|
||||
|
||||
|
@ -136,26 +135,6 @@ def raw(rawmode, data):
|
|||
# --------------------------------------------------------------------
|
||||
# Factories
|
||||
|
||||
def _make_linear_lut(black, white):
|
||||
warnings.warn(
|
||||
'_make_linear_lut() is deprecated. '
|
||||
'Please call make_linear_lut() instead.',
|
||||
DeprecationWarning,
|
||||
stacklevel=2
|
||||
)
|
||||
return make_linear_lut(black, white)
|
||||
|
||||
|
||||
def _make_gamma_lut(exp):
|
||||
warnings.warn(
|
||||
'_make_gamma_lut() is deprecated. '
|
||||
'Please call make_gamma_lut() instead.',
|
||||
DeprecationWarning,
|
||||
stacklevel=2
|
||||
)
|
||||
return make_gamma_lut(exp)
|
||||
|
||||
|
||||
def make_linear_lut(black, white):
|
||||
lut = []
|
||||
if black == 0:
|
||||
|
|
|
@ -90,27 +90,6 @@ class TestImagePalette(PillowTestCase):
|
|||
self.assertEqual(lut[191], 60)
|
||||
self.assertEqual(lut[255], 255)
|
||||
|
||||
def test_private_make_linear_lut_warning(self):
|
||||
# Arrange
|
||||
from PIL.ImagePalette import _make_linear_lut
|
||||
black = 0
|
||||
white = 255
|
||||
|
||||
# Act / Assert
|
||||
self.assert_warning(
|
||||
DeprecationWarning,
|
||||
lambda: _make_linear_lut(black, white))
|
||||
|
||||
def test_private_make_gamma_lut_warning(self):
|
||||
# Arrange
|
||||
from PIL.ImagePalette import _make_gamma_lut
|
||||
exp = 5
|
||||
|
||||
# Act / Assert
|
||||
self.assert_warning(
|
||||
DeprecationWarning,
|
||||
lambda: _make_gamma_lut(exp))
|
||||
|
||||
def test_rawmode_valueerrors(self):
|
||||
# Arrange
|
||||
from PIL.ImagePalette import raw
|
||||
|
|
Loading…
Reference in New Issue
Block a user