This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Pickle tests fail w/o _pickle extension
Type: behavior Stage: needs patch
Components: Extension Modules, Tests Versions: Python 3.0
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: alexandre.vassalotti Nosy List: alexandre.vassalotti, amaury.forgeotdarc, christian.heimes
Priority: high Keywords: patch

Created on 2008-11-21 02:45 by christian.heimes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
fix_issue4374.diff alexandre.vassalotti, 2008-11-22 01:10
Messages (4)
msg76160 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-11-21 02:45
$ rm build/lib.linux-x86_64-3.0-pydebug/
$ ./python Lib/test/ -R:: test_pickle
test test_pickle failed -- Traceback (most recent call last):
  File "/home/heimes/dev/python/py3k/Lib/test/", line
1032, in test_bad_init
    self.assertRaises(pickle.PicklingError, BadPickler().dump, 0)
  File "/home/heimes/dev/python/py3k/Lib/", line 311, in
    callableObj(*args, **kwargs)
  File "/home/heimes/dev/python/py3k/Lib/", line 225, in dump
    if self.proto >= 2:
AttributeError: 'BadPickler' object has no attribute 'proto'

1 test failed:
[59279 refs]
msg76220 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) 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) * (Python committer) 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, 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) * (Python committer) Date: 2008-12-27 09:31
Committed in r67940.
Date User Action Args
2022-04-11 14:56:41adminsetgithub: 48624
2008-12-27 09:32:11alexandre.vassalottisetstatus: open -> closed
resolution: fixed
2008-12-27 09:31:00alexandre.vassalottisetmessages: + msg78347
2008-11-22 01:10:42alexandre.vassalottisetfiles: + fix_issue4374.diff
keywords: + patch
messages: + msg76228
2008-11-21 23:18:20amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg76220
2008-11-21 23:12:03benjamin.petersonsetassignee: alexandre.vassalotti
nosy: + alexandre.vassalotti
2008-11-21 02:45:49christian.heimescreate