classification
Title: Saving bytearray to binary plist file doesn't work
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Issues with binary plists
View: 32072
Assigned To: serhiy.storchaka Nosy List: ronaldoussoren, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-11-08 23:20 by serhiy.storchaka, last changed 2017-12-25 09:32 by serhiy.storchaka. This issue is now closed.

Messages (2)
msg305921 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-08 23:20
>>> import plistlib
>>> plistlib.dumps(bytearray(), fmt=plistlib.FMT_BINARY)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 962, in dumps
    dump(value, fp, fmt=fmt, skipkeys=skipkeys, sort_keys=sort_keys)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 955, in dump
    writer.write(value)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 703, in write
    self._flatten(value)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 741, in _flatten
    if (type(value), value) in self._objtable:
TypeError: unhashable type: 'bytearray'
msg309034 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-12-25 09:32
Fixed in issue32072.
History
Date User Action Args
2017-12-25 09:32:28serhiy.storchakasetstatus: open -> closed
superseder: Issues with binary plists
messages: + msg309034

resolution: duplicate
stage: resolved
2017-11-10 09:56:10serhiy.storchakasetassignee: serhiy.storchaka
2017-11-08 23:20:21serhiy.storchakacreate