From d57d02e827bd3f4b10f6cac303b0c659667dbfde Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sun, 26 Jan 2020 14:46:27 -0800 Subject: [PATCH] Remove leftover Python 2 compatibility shim In Python 3, __str__ should not return bytes. --- src/PIL/PdfParser.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/PIL/PdfParser.py b/src/PIL/PdfParser.py index 3267ee491..e8a4f620e 100644 --- a/src/PIL/PdfParser.py +++ b/src/PIL/PdfParser.py @@ -241,15 +241,11 @@ class PdfName: result.extend(make_bytes("#%02X" % b)) return bytes(result) - __str__ = __bytes__ - class PdfArray(list): def __bytes__(self): return b"[ " + b" ".join(pdf_repr(x) for x in self) + b" ]" - __str__ = __bytes__ - class PdfDict(collections.UserDict): def __setattr__(self, key, value):