From 80ddcfe760756ed473323b5d29bdedae374a3767 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 16 Aug 2016 13:56:17 +0100 Subject: [PATCH] fix deprecation warning for stopiteration see pep 479 https://www.python.org/dev/peps/pep-0479/ --- lib/matplotlib/type1font.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/matplotlib/type1font.py b/lib/matplotlib/type1font.py index b414b8dfaaa7..b161b53ee8c8 100644 --- a/lib/matplotlib/type1font.py +++ b/lib/matplotlib/type1font.py @@ -306,8 +306,7 @@ def suppress(tokens): b'/FontMatrix': replace(fontmatrix), b'/UniqueID': suppress} - while True: - token, value = next(tokens) + for token, value in tokens: if token is cls._name and value in table: for value in table[value](itertools.chain([(token, value)], tokens)):