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.

classification
Title: plistlib.writePlist documentation clarification for file object
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: ezio.melotti, lanhel, python-dev
Priority: normal Keywords:

Created on 2013-04-30 13:22 by lanhel, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg188160 - (view) Author: Lance Helsten (lanhel) Date: 2013-04-30 13:22
plistlib.writePlist documentation states """Write 'rootObject' to a .plist file. 'pathOrFile' may either be a file name or a (writable) file object.""", but if a text IO object is given for the pathOrFile object (e.g. ``io.TextIOBase`` or ``sys.stdout``) a ``TypeError`` with message "must be str, not bytes" is raised.

To clarify the documentation should be changed to be """...or a (writable, binary) file object.""".
msg188161 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-04-30 13:34
New changeset 6e9d21761fc1 by Ezio Melotti in branch '3.3':
#17881: clarify documentation of plistlib.
http://hg.python.org/cpython/rev/6e9d21761fc1

New changeset 1ec6d3cc217d by Ezio Melotti in branch 'default':
#17881: merge with 3.3.
http://hg.python.org/cpython/rev/1ec6d3cc217d
msg188162 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-04-30 13:35
Fixed, thanks for the report!
History
Date User Action Args
2022-04-11 14:57:45adminsetgithub: 62081
2013-04-30 13:35:15ezio.melottisetstatus: open -> closed

assignee: ezio.melotti
components: + Documentation
versions: + Python 3.3, Python 3.4, - Python 3.2
nosy: + ezio.melotti

messages: + msg188162
resolution: fixed
stage: resolved
2013-04-30 13:34:43python-devsetnosy: + python-dev
messages: + msg188161
2013-04-30 13:22:22lanhelcreate