[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffcb321ba9c0 by Serhiy Storchaka in branch '2.7':
Issue #28998: More APIs now support longs as well as ints.
https://hg.python.org/cpython/rev/ffcb321ba9c0

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added checks for errors in C code (they are needed even without supporting 
Python longs, PyInt_AsLong() can fail with Python ints) and a fast path for 
Python longs in PyInt_AsLong() (avoid creating temporary Python int).

--
assignee:  -> serhiy.storchaka
Added file: http://bugs.python.org/file46028/py2_int_long_2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
Added file: http://bugs.python.org/file45935/py2_int_long.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28998] Unifying Long Integers and Integers in 2.7

2016-12-17 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Since implementing PEP 237 (Unifying Long Integers and Integers) in Python 2.4 
int and long instances became interchangeable. Virtually any function that 
needs an integer, accepts both int and long. But there are few places where 
only int is accepted. Since it is easy unintentionally convert int to long (add 
and subtract large int, or add 0L), this can lead to subtle errors in rare 
circumstances.

Proposed patch makes few places that accepted only int accepting long too. This 
mainly is changing isinstance(x, int) to isinstance(x, (int, long)).

--
components: Extension Modules, Library (Lib)
messages: 283479
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Unifying Long Integers and Integers in 2.7
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com