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.

Author vstinner
Recipients Arfrever, amaury.forgeotdarc, ezio.melotti, lemburg, loewis, vstinner
Date 2010-03-05.01:02:01
SpamBayes Score 5.221908e-07
Marked as misclassified No
Message-id <1267750924.63.0.535205045403.issue6697@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a fix for object.c (object_pyunicode_asstring-py3k.patch):

- PyObject_GenericGetAttr(): Replace PyErr_Format("... %.400s", ..., _PyUnicode_AsString(name)) by PyErr_Format("... %U", ..., name), as done in PyObject_GenericSetAttr(). Note that the string will no more be truncated to 400 bytes
- PyObject_GetAttr(), PyObject_SetAttr(): Catch _PyUnicode_AsString() error

It fixes the crash getattr(1, "\uDAD1\uD51E") (used as a test in the patch).
History
Date User Action Args
2010-03-05 01:02:05vstinnersetrecipients: + vstinner, lemburg, loewis, amaury.forgeotdarc, ezio.melotti, Arfrever
2010-03-05 01:02:04vstinnersetmessageid: <1267750924.63.0.535205045403.issue6697@psf.upfronthosting.co.za>
2010-03-05 01:02:02vstinnerlinkissue6697 messages
2010-03-05 01:02:02vstinnercreate