Issue2744

classification
Title: Support buffer type in marshal.dump(s)
Type: behaviour Severity: normal
Components: Library Versions:
Milestone:
process
Status: pending Resolution: fixed
Dependencies: Superseder:
Assigned To: jeff.allen Nosy List: jeff.allen
Priority: normal Keywords:

Created on 2019-03-22.07:31:47 by jeff.allen, last changed 2019-03-23.08:54:51 by jeff.allen.

Messages
msg12386 (view) Author: Jeff Allen (jeff.allen) Date: 2019-03-22.07:31:47
I noticed, when updating test_marshal, that we skip remove test_buffer in StringTestCase, and if we don't skip, it fails.

I'm making this a FIXME skip. buffer objects (and all types with the buffer interface, I think), are emitted as str (bytes). Python 2:

>>> from marshal import dumps, loads
>>> a = bytearray("hello")
>>> loads(dumps(a))
'hello'
>>> loads(dumps(buffer(a)))
'hello'
msg12390 (view) Author: Jeff Allen (jeff.allen) Date: 2019-03-23.08:54:51
Taking this in with some other marshal bugs discovered in review of #2077.

Now in codebase at: https://hg.python.org/jython/rev/1e7671d4af8d
History
Date User Action Args
2019-03-23 08:54:51jeff.allensetstatus: open -> pending
assignee: jeff.allen
resolution: fixed
messages: + msg12390
title: Support buffer type in marshal operations -> Support buffer type in marshal.dump(s)
2019-03-22 07:31:47jeff.allencreate