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 serhiy.storchaka
Recipients ezio.melotti, josh.r, pitrou, serhiy.storchaka, vstinner, xiang.zhang
Date 2016-11-14.09:20:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479115205.48.0.62449993936.issue21449@psf.upfronthosting.co.za>
In-reply-to
Content
There are yet few subtle details.

1. _PyUnicode_FromId() uses UTF-8 for decoding from C string, but PyUnicode_CompareWithASCIIString() uses Latin1. Two ways of comparison can return different results. Currently all identifiers are ASCII, thus perhaps we can ignore this issue for a time. Perhaps the simplest solution is to make PyUnicode_FromId() using ASCII or Latin1.

2. PyUnicode_READY() can fail either because Unicode object is misformed or due to MemoryError. The former case is unavoidable error and returning false is good. But the latter can be temporary error and we should add a fallback, compare wchar_t * representation of non-ready Unicode object with char * representation of identifier.
History
Date User Action Args
2016-11-14 09:20:05serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, ezio.melotti, josh.r, xiang.zhang
2016-11-14 09:20:05serhiy.storchakasetmessageid: <1479115205.48.0.62449993936.issue21449@psf.upfronthosting.co.za>
2016-11-14 09:20:05serhiy.storchakalinkissue21449 messages
2016-11-14 09:20:05serhiy.storchakacreate