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: Saving bytearray to binary plist file doesn't work
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7, Python 3.6
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 2022-04-11 14:58 by admin. 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/", line 962, in dumps
    dump(value, fp, fmt=fmt, skipkeys=skipkeys, sort_keys=sort_keys)
  File "/home/serhiy/py/cpython/Lib/", line 955, in dump
  File "/home/serhiy/py/cpython/Lib/", line 703, in write
  File "/home/serhiy/py/cpython/Lib/", 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.
Date User Action Args
2022-04-11 14:58:54adminsetgithub: 76169
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