[issue16323] Wrong C API documentation for locale encoding
Roundup Robot added the comment: New changeset af45e9ec35f0 by Andrew Svetlov in branch '3.3': Remove redundant sentence from c-api docs (issue #16323) http://hg.python.org/cpython/rev/af45e9ec35f0 New changeset efedd0f62a7e by Andrew Svetlov in branch 'default': Merge: remove redundant sentence from c-api docs (issue #16323) http://hg.python.org/cpython/rev/efedd0f62a7e -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Andrew Svetlov added the comment: Removed bad sentence. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Roundup Robot added the comment: New changeset 11629c14ce1f by Andrew Svetlov in branch '3.3': Issue #16323: Fix wrong C API documentation for locale encoding. http://hg.python.org/cpython/rev/11629c14ce1f New changeset 6f3d3003acf3 by Andrew Svetlov in branch 'default': Merge issue #16323: Fix wrong C API documentation for locale encoding. http://hg.python.org/cpython/rev/6f3d3003acf3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Andrew Svetlov added the comment: Fixed. Thanks. -- nosy: +asvetlov resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Serhiy Storchaka added the comment: I think the sentence If a byte sequence can be decoded as a surrogate character and *errors* is not ``strict``, then the byte sequence is escaped using the ``surrogateescape`` error handler instead of being decoded. is redundant. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Andrew Svetlov added the comment: Really I don't know what's better. Victor, what do you think? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
STINNER Victor added the comment: If a byte sequence can be decoded as a surrogate character and *errors* is not ``strict``, then the byte sequence is escaped using the ``surrogateescape`` error handler instead of being decoded. I don't understand this sentence but it sounds to be wrong. The surrogateescape is only used if errors=surrogateescape... If errors is set and is different to strict and surrogateescape, an error is raised. 2012/11/28 Andrew Svetlov rep...@bugs.python.org: Andrew Svetlov added the comment: Really I don't know what's better. Victor, what do you think? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Berker Peksag added the comment: Hum, this is not correct. There are three valid values: - NULL: strict - strict: strict - surrogateescape: use PEP 383 Thanks for the correction, Victor. Here's the updated patch. -- Added file: http://bugs.python.org/file27770/issue16323_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Berker Peksag added the comment: Also, the documentation for PyUnicode_DecodeLocaleAndSize() is wrong. Patch attached. Related changeset: http://hg.python.org/cpython/rev/07802351ccad -- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file27750/issue16323.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
Serhiy Storchaka added the comment: Victor, you forgot to update the documentation. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
STINNER Victor added the comment: Encode a Unicode object to the current locale encoding. The encoder is strict if *errors* is equal to ``strict``, otherwise it uses the ``'surrogateescape'`` error handler (:pep:`383`). Hum, this is not correct. There are three valid values: - NULL: strict - strict: strict - surrogateescape: use PEP 383 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16323] Wrong C API documentation for locale encoding
New submission from Serhiy Storchaka: The documentation for PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale() are wrong. The second parameter described as int surrogateescape, but actually it is const char *errors. -- assignee: docs@python components: Documentation, Unicode messages: 173760 nosy: docs@python, ezio.melotti, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Wrong C API documentation for locale encoding type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com