Index: Lib/test/pickletester.py =================================================================== --- Lib/test/pickletester.py (revision 62635) +++ Lib/test/pickletester.py (working copy) @@ -585,7 +585,7 @@ p = self.dumps(None, proto) self.assertEqual(p, expected) - oob = protocols[-1] + 1 # a future protocol + oob = list(protocols)[-1] + 1 # a future protocol badpickle = pickle.PROTO + bytes([oob]) + build_none try: self.loads(badpickle)