Issue #25761: Improved error reporting about truncated pickle data in

C implementation of unpickler.  UnpicklingError is now raised instead of
AttributeError and ValueError in some cases.
This commit is contained in:
Serhiy Storchaka 2016-09-06 23:55:11 +03:00
parent df6ff7bcca
commit 90493ab30c
3 changed files with 46 additions and 41 deletions

View file

@ -139,8 +139,7 @@ if has_c_implementation:
class CUnpicklerTests(PyUnpicklerTests):
unpickler = _pickle.Unpickler
bad_stack_errors = (pickle.UnpicklingError,)
truncated_errors = (pickle.UnpicklingError, EOFError,
AttributeError, ValueError)
truncated_errors = (pickle.UnpicklingError,)
class CPicklerTests(PyPicklerTests):
pickler = _pickle.Pickler