[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: committed r66224 + r66225. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: You could also surround the PyErr_NoMemory with #ifndef PGEN. ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Thu, Sep 4, 2008 at 5:48 PM, Amaury Forgeot d'Arc <[EMAIL PROTECTED]> wrote: > > Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > > pgen does not exist on Windows... > > What if I simply remove the call to PyErr_NoMemory? >

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: pgen does not exist on Windows... What if I simply remove the call to PyErr_NoMemory? It is not strictly necessary: the function already returns NULL without an exception set, for example when the file cannot be opened. ___

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I think this patch should be reverted. It causes a linking error because pgen isn't linked to libpython; it doesn't find the _PyErr_NoMemory symbol. -- nosy: +benjamin.peterson ___ Python tracke

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: Your patch looks fine, Amaury. -- assignee: -> amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11372/check_findencoding_malloc.diff ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Right, here is an updated patch Added file: http://bugs.python.org/file11376/check_findencoding_malloc.diff ___ Python tracker <[EMAIL PROTECTED]> _

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: If PyMem_MALLOC() returns NULL, shouldn't MemoryError be set? ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: In PyTokenizer_FindEncoding(), PyMem_MALLOC may return NULL. Another patch attached. -- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file11372/check_findencoding_malloc.diff _

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-03 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- priority: release blocker -> deferred blocker ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3773] Check for errors when using PyTokenizer_FindEncoding()

2008-09-03 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- title: Check for errors -> Check for errors when using PyTokenizer_FindEncoding() ___ Python tracker <[EMAIL PROTECTED]> ___ __