| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
`_PyUnicode_TransformDecimalAndSpaceToASCII()` missed trailing NUL char.
It caused buffer overflow in `_Py_string_to_number_with_underscores()`.
This bug is introduced in 9b6c60cb.
|
|
|
|
|
| |
in int(), float() and complex() parsers.
This also speeds up parsing non-ASCII numbers by around 20%.
|
|
|
|
|
| |
This undoes a853a8ba7850381d49b284295dd6f0dc491dbe44 except for the pytime.c
parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be
rounded into finite floats. Tests were added to very this behavior.
|
| |
|
|
|
|
| |
and tuple(). (#518)
|
|
|
|
| |
int(), bool(), float(), list() and tuple(). Specify the value as a
positional argument instead.
|
|
|
|
| |
Thanks to Georg Brandl for the patch.
|
|
|
|
|
|
| |
The deprecation warning is emitted if __float__ returns an instance of
a strict subclass of float. In a future versions of Python this can
be an error.
|
|\ |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
__bytes__, __trunc__, and __float__ returning instances of subclasses of
bytes, int, and float to subclasses of bytes, int, and float correspondingly.
|
| |
| |
| |
| |
| | |
__bytes__, __trunc__, and __float__ returning instances of subclasses of
bytes, int, and float to subclasses of bytes, int, and float correspondingly.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids possible buffer overreads when int(), float(), compile(), exec()
and eval() are passed bytes-like objects. Similar code is removed from the
complex() constructor, where it was not reachable.
Patch by John Leitch, Serhiy Storchaka and Martin Panter.
|
| |
| |
| |
| | |
Vajrasky Kok.
|
|/
|
|
|
|
|
| |
I have compared output between pre- and post-patch runs of these tests
to make sure there's nothing missing and nothing broken, on both
Windows and Linux. The only differences I found were actually tests
that were previously *not* run.
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
across platforms. Further, don't rely on Py_HUGE_VAL for float('inf').
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines
Issue #10596: Fix float.__mod__ to have the same behaviour as
float.__divmod__ with respect to signed zeros.
........
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines
Issue #10596: Fix float.__mod__ to have the same behaviour as
float.__divmod__ with respect to signed zeros.
........
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line
#9424: Replace deprecated assert* methods in the Python test suite.
........
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86003 | brian.curtin | 2010-10-30 19:03:45 -0500 (Sat, 30 Oct 2010) | 2 lines
Fix ResourceWarning. Use context manager to properly close file.
........
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r77452 | mark.dickinson | 2010-01-12 23:04:19 +0000 (Tue, 12 Jan 2010) | 23 lines
Merged revisions 77410,77421,77450-77451 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77410 | mark.dickinson | 2010-01-10 13:06:31 +0000 (Sun, 10 Jan 2010) | 1 line
Remove unused BCinfo fields and an unused macro.
........
r77421 | mark.dickinson | 2010-01-11 17:15:13 +0000 (Mon, 11 Jan 2010) | 1 line
Change a variable type to avoid signed overflow; replace repeated '19999' constant by a define.
........
r77450 | mark.dickinson | 2010-01-12 22:23:56 +0000 (Tue, 12 Jan 2010) | 4 lines
Issue #7632: Fix a problem with _Py_dg_strtod that could lead to
crashes in debug builds, for certain long numeric strings
corresponding to subnormal values.
........
r77451 | mark.dickinson | 2010-01-12 22:55:51 +0000 (Tue, 12 Jan 2010) | 2 lines
Issue #7632: Fix a bug in dtoa.c that could lead to incorrectly-rounded results.
........
................
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://pythondev@www.python.org/python/branches/py3k
................
r76485 | mark.dickinson | 2009-11-24 10:59:34 +0000 (Tue, 24 Nov 2009) | 9 lines
Merged revisions 76483 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76483 | mark.dickinson | 2009-11-24 10:54:58 +0000 (Tue, 24 Nov 2009) | 2 lines
round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this.
........
................
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r75890 | mark.dickinson | 2009-10-27 23:00:56 +0000 (Tue, 27 Oct 2009) | 1 line
Remove extra blank line accidentally introduced in r75885
........
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r75885 | mark.dickinson | 2009-10-27 22:12:20 +0000 (Tue, 27 Oct 2009) | 9 lines
Merged revisions 75883 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75883 | mark.dickinson | 2009-10-27 22:09:33 +0000 (Tue, 27 Oct 2009) | 1 line
Test long inputs to float
........
................
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
svn+ssh://svn.python.org/python/branches/py3k
........
r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line
convert old fail* assertions to assert*
........
|
|/ /
| |
| |
| | |
http://mail.python.org/pipermail/python-dev/2011-January/107735.html
|
| | |
|
| |
| |
| |
| | |
float.__divmod__ with respect to signed zeros.
|
| |
| |
| |
| |
| |
| | |
types. Added a new API function, PyUnicode_TransformDecimalToASCII(),
which transforms non-ASCII decimal digits in a Unicode string to their
ASCII equivalents.
|
| |
| |
| |
| | |
complex and Decimal. Allows greater control over when decimal points appear. Added to make transitioning from %-formatting easier. '#g' still has a problem with Decimal which I'll fix soon.
|
| | |
|
| | |
|
| |
| |
| |
| | |
(And similarly for complex numbers.)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82461 | benjamin.peterson | 2010-07-02 18:05:27 -0500 (Fri, 02 Jul 2010) | 1 line
don't require the presence of __getformat__ or __setformat__; use requires_IEEE_754 globally
........
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82117 | mark.dickinson | 2010-06-20 19:50:19 +0100 (Sun, 20 Jun 2010) | 1 line
Merge test_strtod and test_float string-to-float conversion tests.
........
|