Issue2077

classification
Title: marshal doesn't raise error when fed unmarshalable object
Type: behaviour Severity: major
Components: Core Versions: Jython 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: akuchling, irmen, zyasoft
Priority: high Keywords: patch

Created on 2013-08-26.14:27:20 by irmen, last changed 2014-10-06.03:13:21 by zyasoft.

Files
File name Uploaded Description Edit Remove
issue2077.patch akuchling, 2014-04-15.21:49:15
Messages
msg8088 (view) Author: Irmen de Jong (irmen) Date: 2013-08-26.14:27:19
marshal.dump(s) doesn't raise the appropriate ValueError when asked to marshal an unmarshalable object. Rather, it returns the string "?".

Observed behavior in Jython 2.7-b1:

>>> import marshal
>>> class Test(object): pass
...
>>> marshal.dumps(Test())
'?'
>>>


Expected behavior as shown by CPython 2.7:

>>> import marshal
>>> class Test(object): pass
...
>>> marshal.dumps(Test())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unmarshallable object
>>>
msg8288 (view) Author: A.M. Kuchling (akuchling) Date: 2014-04-15.21:49:15
Patch attached.
msg8865 (view) Author: Jim Baker (zyasoft) Date: 2014-07-05.02:50:36
Target beta 4
History
Date User Action Args
2014-10-06 03:13:21zyasoftsetpriority: high
assignee: zyasoft
2014-07-05 02:50:36zyasoftsetnosy: + zyasoft
messages: + msg8865
2014-04-15 21:49:15akuchlingsetfiles: + issue2077.patch
keywords: + patch
messages: + msg8288
nosy: + akuchling
2013-08-26 14:27:20irmencreate