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 lemburg
Recipients barry, ezio.melotti, flox, lemburg, ncoghlan, vstinner
Date 2013-11-10.15:39:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 10.11.2013 15:39, Nick Coghlan wrote:
> On 10 November 2013 23:21, Marc-Andre Lemburg <> wrote:
>> This doesn't look right:
>> diff -r 1ee45eb6aab9 Include/pyerrors.h
>> --- a/Include/pyerrors.h        Sat Nov 09 23:15:52 2013 +0200
>> +++ b/Include/pyerrors.h        Sun Nov 10 22:54:04 2013 +1000
>> ...
>> +PyAPI_FUNC(PyObject *) _PyErr_TrySetFromCause(
>> +    const char *prefix_format,   /* ASCII-encoded string  */
>> +    ...
>> +    );

Sorry about the false warning. After looking at those lines
again, I realized that the "..." is the argument ellipsis,
not some omitted code. At first this look like a function
definition to me :-)

> After sending my previous reply, I realised you may have been
> referring to the comment. I copied that from the PyErr_Format
> signature. According to
> the format string still has to be ASCII-encoded, and if that's no
> longer true, it's a separate bug from this one that will require a
> docs fix as well.

Also note that it's not clear whether the "ASCII"
refers to the format string or the resulting formatted string.
For the format string, ASCII would probably be fine, but
for the formatted string, UTF-8 should be allowed, since it's
not uncommon to add e.g. parameter strings that caused the
error to the error string.

That's a separate ticket, though.

>> In the error messages, I'd use "codecs.encode()" and "codecs.decode()"
>> (ie. with parens) instead of "codecs.encode" and "codecs.decode".
> Forgot to reply to this part - I like it, will switch it over before committing.

Date User Action Args
2013-11-10 15:39:51lemburgsetrecipients: + lemburg, barry, ncoghlan, vstinner, ezio.melotti, flox
2013-11-10 15:39:51lemburglinkissue17828 messages
2013-11-10 15:39:51lemburgcreate