mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #3537 from radarhere/pickle
Fixed pickling of iTXt class with protocol > 1
This commit is contained in:
commit
65c55402b9
BIN
Tests/images/itxt_chunks.png
Normal file
BIN
Tests/images/itxt_chunks.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
|
@ -67,9 +67,13 @@ class TestPickle(PillowTestCase):
|
|||
"Tests/images/non_zero_bb.png",
|
||||
"Tests/images/non_zero_bb_scale2.png",
|
||||
"Tests/images/p_trns_single.png",
|
||||
"Tests/images/pil123p.png"
|
||||
"Tests/images/pil123p.png",
|
||||
"Tests/images/itxt_chunks.png"
|
||||
]:
|
||||
self.helper_pickle_string(pickle, test_file=test_file)
|
||||
for protocol in range(0, pickle.HIGHEST_PROTOCOL + 1):
|
||||
self.helper_pickle_string(pickle,
|
||||
protocol=protocol,
|
||||
test_file=test_file)
|
||||
|
||||
def test_pickle_l_mode(self):
|
||||
# Arrange
|
||||
|
|
|
@ -194,7 +194,7 @@ class iTXt(str):
|
|||
|
||||
"""
|
||||
@staticmethod
|
||||
def __new__(cls, text, lang, tkey):
|
||||
def __new__(cls, text, lang=None, tkey=None):
|
||||
"""
|
||||
:param cls: the class to use when creating the instance
|
||||
:param text: value for this key
|
||||
|
|
Loading…
Reference in New Issue
Block a user