[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3ef7d1af5195 by Serhiy Storchaka in branch '2.7': Issue #25678: Copy buffer objects to null-terminated strings. https://hg.python.org/cpython/rev/3ef7d1af5195 -- ___ Python tracker

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset a13d9656f954 by Martin Panter in branch '3.5': Issue #24802: Update test case for ValueError in 3.5 https://hg.python.org/cpython/rev/a13d9656f954 New changeset 96cdd2532034 by Martin Panter in branch 'default': Issue #24802: Merge ValueError test

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-08 Thread Martin Panter
Martin Panter added the comment: Thanks for picking that up Serhiy -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: One post-commit comment: I would use ValueError instead of Exceptions in tests for 3.5+. This will help to avoid regression and can catch incompatibilities in other implementations. -- ___ Python tracker

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-06 Thread Martin Panter
Martin Panter added the comment: I have committed changes to Python 3. The compile() test now exists as test_compile.TestSpecifics.test_null_terminated. Serhiy: You set these bugs for Python 2 as well. Is there a way to produce a non-null-terminated buffer in Python 2 to help verify this?

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset a75336ac40e0 by Martin Panter in branch '3.4': Issue #24802: Copy bytes-like objects to null-terminated buffers if necessary https://hg.python.org/cpython/rev/a75336ac40e0 New changeset 95b9c07b27f7 by Martin Panter in branch '3.5': Issue #24802:

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, looks as this issue is not related to 2.7. -- assignee: serhiy.storchaka -> martin.panter versions: -Python 2.7 ___ Python tracker

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Great! Besides few nitpicks the patch LGTM. > However I don’t understand what you meant about restoring int(bytes, base) > behaviour. None of the patches here, nor in Issue 22896, touch long_new() in > /Objects/longobject.c. long_new() uses

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-04 Thread Martin Panter
Martin Panter added the comment: The patch looks good to me. However I don’t understand what you meant about restoring int(bytes, base) behaviour. None of the patches here, nor in Issue 22896, touch long_new() in /Objects/longobject.c. -- nosy: +martin.panter

[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer to merge issue24802 and issue24803 and discuss them at one place. Here is merged and revised patch. The patch is changed. There is a very rare corner case: when the type of argument is a subclass of bytes or bytearray with overloaded