From 6128f34c6dc4af528b9ca56eb8894c5f598c95c4 Mon Sep 17 00:00:00 2001 From: NotSoSuper Date: Sun, 18 Sep 2016 13:47:45 -0400 Subject: [PATCH 1/2] simple fix to annoying warning with pyfiglet --- PIL/ImageFont.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/ImageFont.py b/PIL/ImageFont.py index 9341b1e96..46aeb7e33 100644 --- a/PIL/ImageFont.py +++ b/PIL/ImageFont.py @@ -315,7 +315,7 @@ def load_default(): f = ImageFont() f._load_pilfont_data( # courB08 - BytesIO(base64.decodestring(b''' + BytesIO(base64.decodebytes(b''' UElMZm9udAo7Ozs7OzsxMDsKREFUQQoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @@ -407,7 +407,7 @@ AJsAEQAGAAAAAP/6AAX//wCbAAoAoAAPAAYAAAAA//oABQABAKAACgClABEABgAA////+AAGAAAA pQAKAKwAEgAGAAD////4AAYAAACsAAoAswASAAYAAP////gABgAAALMACgC6ABIABgAA////+QAG AAAAugAKAMEAEQAGAAD////4AAYAAgDBAAoAyAAUAAYAAP////kABQACAMgACgDOABMABgAA//// +QAGAAIAzgAKANUAEw== -''')), Image.open(BytesIO(base64.decodestring(b''' +''')), Image.open(BytesIO(base64.decodebytes(b''' iVBORw0KGgoAAAANSUhEUgAAAx4AAAAUAQAAAAArMtZoAAAEwElEQVR4nABlAJr/AHVE4czCI/4u Mc4b7vuds/xzjz5/3/7u/n9vMe7vnfH/9++vPn/xyf5zhxzjt8GHw8+2d83u8x27199/nxuQ6Od9 M43/5z2I+9n9ZtmDBwMQECDRQw/eQIQohJXxpBCNVE6QCCAAAAD//wBlAJr/AgALyj1t/wINwq0g From c865e2cf444cf438633207ac414d206d756f6a96 Mon Sep 17 00:00:00 2001 From: NotSoSuper Date: Sun, 18 Sep 2016 14:59:52 -0400 Subject: [PATCH 2/2] Python 3.0 fixes --- PIL/ImageFont.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PIL/ImageFont.py b/PIL/ImageFont.py index 46aeb7e33..17a5aa72d 100644 --- a/PIL/ImageFont.py +++ b/PIL/ImageFont.py @@ -313,6 +313,8 @@ def load_default(): from io import BytesIO import base64 f = ImageFont() + if sys.version_info < (3, 1): + base64.decodebytes = base64.decodestring f._load_pilfont_data( # courB08 BytesIO(base64.decodebytes(b'''