[issue27073] redundant checks in long_add and long_sub

2016-05-21 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file42921/CPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue27073> ___ ___ Python-bug

[issue27073] redundant checks in long_add and long_sub

2016-05-21 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file42922/patchedCPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue27073> ___ ___ Pytho

[issue27073] redundant checks in long_add and long_sub

2016-05-21 Thread Oren Milman
Oren Milman added the comment: Thanks for the reviews! I added an assert in long_add (in long_sub it might be that the result is 0). The updated diff file is attached. -- Added file: http://bugs.python.org/file42926/issue27073.diff ___ Python

[issue27111] redundant variables in long_add and long_sub

2016-05-24 Thread Oren Milman
New submission from Oren Milman: the proposed changes In Objects/longobject.c in long_add and long_sub, the variables 'result' and 'r' (respectively), are used only once, and don't seem to make the code any clearer. It seems the 'result

[issue27111] redundant variables in long_add and long_sub

2016-05-24 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file42974/patchedCPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue27111> ___ ___ Pytho

[issue27111] redundant variables in long_add and long_sub

2016-05-24 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file42975/CPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue27111> ___ ___ Python-bug

[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-09-13 Thread Oren Milman
Changes by Oren Milman : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker <http://bugs.python.org/issue27441> ___ ___ Python-bugs-list mailing list Unsub

[issue27111] redundant variables in long_add and long_sub

2016-09-13 Thread Oren Milman
Changes by Oren Milman : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker <http://bugs.python.org/issue27111> ___ ___ Python-bugs-list mailing list Unsub

[issue27222] redundant checks and a weird use of goto statements in long_rshift

2016-09-13 Thread Oren Milman
Changes by Oren Milman : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker <http://bugs.python.org/issue27222> ___ ___ Python-bugs-list mailing list Unsub

[issue28129] assertion failures in ctypes

2016-09-13 Thread Oren Milman
New submission from Oren Milman: current state In Modules\_ctypes\_ctypes.c, there are six functions with assertions that might fail: 1. CDataType_from_buffer 2. CDataType_from_buffer_copy 3. PyCPointerType_set_type 4. PyCPointerType_from_param 5

[issue28129] assertion failures in ctypes

2016-09-13 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file44637/issue28129_ver1.diff ___ Python tracker <http://bugs.python.org/issue28

[issue28129] assertion failures in ctypes

2016-09-13 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44638/CPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue28129> ___ ___ Python-bug

[issue28129] assertion failures in ctypes

2016-09-13 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44639/patchedCPythonTestOutput_ver1.txt ___ Python tracker <http://bugs.python.org/issue28129> ___ ___

[issue27298] redundant iteration over digits in _PyLong_AsUnsignedLongMask

2016-09-23 Thread Oren Milman
Changes by Oren Milman : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker <http://bugs.python.org/issue27298> ___ ___ Python-bugs-list mailing list Unsub

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2016-09-23 Thread Oren Milman
New submission from Oren Milman: current state In few places in the codebase, PyArg_ParseTuple is called in order to parse a normal tuple (instead of the usual case of parsing the arguments tuple of a function). In some of these places, failure of PyArg_ParseTuple is

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2016-09-23 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44797/patchedCPythonTestOutput_ver1.txt ___ Python tracker <http://bugs.python.org/issue28261> ___ ___

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2016-09-23 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file44796/issue28261_ver1.diff ___ Python tracker <http://bugs.python.org/issue28

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2016-09-23 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44798/CPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue28261> ___ ___ Python-bug

[issue28272] a redundant check in maybe_small_long

2016-09-25 Thread Oren Milman
New submission from Oren Milman: current state In Objects/longobject.c, the function maybe_small_long first checks whether v (the received PyLongObject pointer) is not NULL. However, currently in every call to maybe_small_long, it is already guaranteed that v is not

[issue28272] a redundant check in maybe_small_long

2016-09-25 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44816/patchedCPythonTestOutput_ver1.txt ___ Python tracker <http://bugs.python.org/issue28272> ___ ___

[issue28272] a redundant check in maybe_small_long

2016-09-25 Thread Oren Milman
Changes by Oren Milman : Removed file: http://bugs.python.org/file44816/patchedCPythonTestOutput_ver1.txt ___ Python tracker <http://bugs.python.org/issue28272> ___ ___

[issue28272] a redundant check in maybe_small_long

2016-09-25 Thread Oren Milman
Changes by Oren Milman : Removed file: http://bugs.python.org/file44815/CPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue28272> ___ ___ Python-bug

[issue28272] a redundant check in maybe_small_long

2016-09-25 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44817/patchedCPythonTestOutput_ver1.txt ___ Python tracker <http://bugs.python.org/issue28272> ___ ___

[issue28272] a redundant check in maybe_small_long

2016-09-25 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44818/CPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue28272> ___ ___ Python-bug

[issue28272] a redundant check in maybe_small_long

2016-09-25 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file44819/issue28272_ver1.diff ___ Python tracker <http://bugs.python.org/issue28

[issue28272] a redundant check in maybe_small_long

2016-09-26 Thread Oren Milman
Oren Milman added the comment: I looked at the assembly, and saw maybe_small_long is not inlined, but I agree that other compilers (or future compilers) might introduce some optimization that would elide the check. Also, as expected (thanks to branch prediction, I guess), a little

[issue28272] a redundant check in maybe_small_long

2016-09-26 Thread Oren Milman
Oren Milman added the comment: my build (release): Python 3.7.0a0 (default:da2c96cf2ce6, Sep 26 2016, 13:08:47) [MSC v.1900 32 bit (Intel)] on win32 ISTM we can close this issue. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-28 Thread Oren Milman
New submission from Oren Milman: current state On my Windows 10, on a 32-bit Python, The following runs fine: import array array.array('L').append(2 ** 32 - 1) However, in the following, an OverflowError('Python int too large to convert to C l

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-28 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44861/CPythonTestOutput.txt ___ Python tracker <http://bugs.python.org/issue28298> ___ ___ Python-bug

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-28 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file44862/issue28298_ver1.diff ___ Python tracker <http://bugs.python.org/issue28

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-28 Thread Oren Milman
Changes by Oren Milman : -- versions: +Python 3.7 ___ Python tracker <http://bugs.python.org/issue28298> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Oren Milman
Oren Milman added the comment: You are right about the terminology of course. My bad. Anyway, the bug is not related to __index__ (or nb_index), because the three aforementioned functions are using (in case '!PyLong_Check(v)') PyArg_Parse with the formats 'l' or 'L&#x

[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Oren Milman
Oren Milman added the comment: Ah, I should have read more about __int__ and __index__ before writing my last reply. So IIUC, this is a somewhat painful issue, which could be resolved by: * #20092 * replacing _PyLong_FromNbInt with PyNumber_Index in: - Objects/longobject.c (as

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
New submission from Oren Milman: current state Due to the implementation of socket_htons (in Modules/socketmodule.c), in case the received integer does not fit in 16-bit unsigned integer, but does fit in a positive C int, it is silently truncated to 16-bit unsigned

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44912/patchedCPythonTestOutput_ver1.txt ___ Python tracker <http://bugs.python.org/issue28332> ___ ___

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file44913/issue28332_ver1.diff ___ Python tracker <http://bugs.python.org/issue28

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
Oren Milman added the comment: Thanks for the review :) I changed some stuff, according to your comments (and replied to one comment in Rietveld). Version2 diff and test output are attached. -- Added file: http://bugs.python.org/file44922/issue28332_ver2.diff

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44923/patchedCPythonTestOutput_ver2.txt ___ Python tracker <http://bugs.python.org/issue28332> ___ ___

[issue28376] assertion failure in rangeobject.c

2016-10-06 Thread Oren Milman
New submission from Oren Milman: current state An assertion in Objects/rangeobject.c might fail: >>> type(iter(range(0))) >>> type(iter(range(0)))(1, 1, 0) Assertion failed: step != 0, file ..\Objects\rangeobject.c, line 895 This is

[issue28376] assertion failure in rangeobject.c

2016-10-06 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44985/patchedCPythonTestOutput_ver1.txt ___ Python tracker <http://bugs.python.org/issue28376> ___ ___

[issue28376] assertion failure in rangeobject.c

2016-10-06 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file44986/issue28376_ver1.diff ___ Python tracker <http://bugs.python.org/issue28

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Oren Milman added the comment: The diff files for 3.5 and 3.6 are attached (I only added @test.support.cpython_only, as you suggested). The diff file for 3.7 is also attached. It contains: - removing rangeiter_new - tests to verify one cannot create instances of range_iterator or

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44996/issue28376_CPython36_ver2.diff ___ Python tracker <http://bugs.python.org/issue28376> ___ ___ Pytho

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44997/issue28376_CPython37_ver2.diff ___ Python tracker <http://bugs.python.org/issue28376> ___ ___ Pytho

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44998/patchedCPython35TestOutput_ver2.txt ___ Python tracker <http://bugs.python.org/issue28376> ___ ___

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44999/patchedCPython36TestOutput_ver2.txt ___ Python tracker <http://bugs.python.org/issue28376> ___ ___

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45000/patchedCPython37TestOutput_ver2.txt ___ Python tracker <http://bugs.python.org/issue28376> ___ ___

[issue26906] Special method lookup fails on unitialized types

2016-10-08 Thread Oren Milman
Oren Milman added the comment: (Just to save time for anyone interested) The last demonstration of the bug Serhiy mentioned is caused by the following (this was right only until Serhiy's patch earlier today): - before importing collections.abc, str_iterator is not initialized, which

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45020/patchedCPython36TestOutput_ver3.txt ___ Python tracker <http://bugs.python.org/issue28376> ___ ___

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45019/issue28376_CPython37_ver3.diff ___ Python tracker <http://bugs.python.org/issue28376> ___ ___ Pytho

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Oren Milman added the comment: The diff files for 3.6 and 3.7 are attached (named '*ver3.diff'). Changes: - in 3.6, added: * raising a DeprecationWarning in rangeiter_new * a test to verify the DeprecationWarning is raised - in 3.7: * changed the tes

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45021/patchedCPython37TestOutput_ver3.txt ___ Python tracker <http://bugs.python.org/issue28376> ___ ___

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Oren Milman added the comment: Alright, just added 'with test.support.check_warnings(('', DeprecationWarning)):'. *ver4.diff is attached. I ran the tests again (this time using 'python_d.exe -We -m test -j3'), and they were successful :) That was totally my ba

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-09 Thread Oren Milman
Oren Milman added the comment: Thanks for the reviews and patience :) -- ___ Python tracker <http://bugs.python.org/issue28376> ___ ___ Python-bugs-list mailin

[issue12974] array module: deprecate '__int__' conversion support for array elements

2016-10-09 Thread Oren Milman
Changes by Oren Milman : -- nosy: +Oren Milman ___ Python tracker <http://bugs.python.org/issue12974> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15988] Inconsistency in overflow error messages of integer argument

2016-10-15 Thread Oren Milman
Oren Milman added the comment: Sorry for taking so long to come up with a patch.. proposed changes 1. in Python/getargs.c in seterror, the following patches: - add a parameter 'p_format_code' - a pointer to the format code whose convers

[issue15988] Inconsistency in overflow error messages of integer argument

2016-10-15 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45108/testPatches.py ___ Python tracker <http://bugs.python.org/issue15988> ___ ___ Python-bugs-list mailin

<    1   2   3   4