Antoine Pitrou <pit...@free.fr> added the comment: The commit broke the Windows buildbots because (un)pickling a TextIOWrapper now raises an exception:
>>> f = open("LICENSE") >>> pickle.dumps(f) b'\x80\x03c_io\nTextIOWrapper\nq\x00)\x81q\x01}q\x02X\x04\x00\x00\x00modeq\x03X\x01\x00\x00\x00rq\x04sb.' >>> g = pickle.loads(pickle.dumps(f)) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: '_io.TextIOWrapper' object has no attribute '__dict__' It should be noted that it didn't work before, but no exception was raised. The result was just nonsensical: >>> f = open("LICENSE") >>> pickle.dumps(f) b'\x80\x03c_io\nTextIOWrapper\nq\x00)\x81q\x01.' >>> g = pickle.loads(pickle.dumps(f)) >>> g Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: I/O operation on uninitialized object The very fact that test_multiprocessing tries to pickle a file object is unfortunate, and is probably a bug in itself. test_multiprocessing is known for pickling lots of things, since it generally transfers a whole TestCase instance... ---------- assignee: -> pitrou nosy: +jnoller status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9935> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com