Issue 4374: Pickle tests fail w/o _pickle extension (original ) (raw ) Issue4374
Created on 2008-11-21 02:45 by christian.heimes , last changed 2022-04-11 14:56 by admin . This issue is now closed .
Files
File name
Uploaded
Description
Edit
fix_issue4374.diff
alexandre.vassalotti,2008-11-22 01:10
Messages (4)
msg76160 - (view)
Author: Christian Heimes (christian.heimes) *
Date: 2008-11-21 02:45
$ rm build/lib.linux-x86_64-3.0-pydebug/_pickle.so $ ./python Lib/test/regrtest.py -R:: test_pickle test_pickle test test_pickle failed -- Traceback (most recent call last): File "/home/heimes/dev/python/py3k/Lib/test/pickletester.py", line 1032, in test_bad_init self.assertRaises(pickle.PicklingError, BadPickler().dump, 0) File "/home/heimes/dev/python/py3k/Lib/unittest.py ", line 311, in failUnlessRaises callableObj(*args, **kwargs) File "/home/heimes/dev/python/py3k/Lib/pickle.py ", line 225, in dump if self.proto >= 2: AttributeError: 'BadPickler' object has no attribute 'proto' 1 test failed: test_pickle [59279 refs]
msg76220 - (view)
Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) *
Date: 2008-11-21 23:18
The test could be skipped for the pure-python version of pickle: after all, it just tests that the interpreter does not segfault... A simpler change is to change the expected exception into "Exception".
msg76228 - (view)
Author: Alexandre Vassalotti (alexandre.vassalotti) *
Date: 2008-11-22 01:10
I think the best way to fix this is to add sanity checks similar to the ones in _pickle. The checks are obviously useless in pickle.py, but I think it is simpler than to try to skip tests, and it gives a nicer error message to people who forget to call __init__ when subclassing.
msg78347 - (view)
Author: Alexandre Vassalotti (alexandre.vassalotti) *
Date: 2008-12-27 09:31
Committed in r67940 .
History
Date
User
Action
Args
2022-04-11 14:56:41
admin
set
github: 48624
2008-12-27 09:32:11
alexandre.vassalotti
set
status: open -> closedresolution: fixed
2008-12-27 09:31:00
alexandre.vassalotti
set
messages: +
2008-11-22 01:10:42
alexandre.vassalotti
set
files: + fix_issue4374.diff keywords: + patch messages: +
2008-11-21 23🔞20
amaury.forgeotdarc
set
nosy: + amaury.forgeotdarc messages: +
2008-11-21 23:12:03
benjamin.peterson
set
assignee: alexandre.vassalotti nosy: + alexandre.vassalotti
2008-11-21 02:45:49
christian.heimes
create