Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [3.12] gh-111765: Move old PyFloat_* tests to ↵ | Miss Islington (bot) | 2023-11-07 | 1 | -65/+0 |
| | | | | | | | Lib/test/test_capi/test_float.py (GH-111766) (GH-111818) (cherry picked from commit a077b2fbb88f5192bb47e514334f760bf08d0295) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> | ||||
* | [3.12] gh-109546: Add more tests for formatting floats and fractions ↵ | Miss Islington (bot) | 2023-10-02 | 1 | -2/+7 |
| | | | | | | | | (GH-109548) (#109557) gh-109546: Add more tests for formatting floats and fractions (GH-109548) (cherry picked from commit beb5ec5817b645562ebbdd59f25683a93061c32c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> | ||||
* | gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202) | Sebastian Berg | 2023-05-10 | 1 | -4/+1 |
| | | | | | | | | | | This PR removes `_Py_dg_stdnan` and `_Py_dg_infinity` in favour of using the standard `NAN` and `INFINITY` macros provided by C99. This change has the side-effect of fixing a bug on MIPS where the hard-coded value used by `_Py_dg_stdnan` gave a signalling NaN rather than a quiet NaN. --------- Co-authored-by: Mark Dickinson <dickinsm@gmail.com> | ||||
* | gh-95605: Fix `float(s)` error message when `s` contains only whitespace ↵ | Mark Dickinson | 2022-08-10 | 1 | -0/+4 |
| | | | | | (GH-95665) This PR fixes the error message from float(s) in the case where s contains only whitespace. | ||||
* | GH-94808: Cover handling non-finite numbers from round when ndigits is ↵ | Michael Droettboom | 2022-07-14 | 1 | -0/+5 |
| | | | | provided (GH-94860) | ||||
* | gh-84623: Remove unused imports in tests (#93772) | Victor Stinner | 2022-06-13 | 1 | -1/+0 |
| | |||||
* | bpo-45995: add "z" format specifer to coerce negative 0 to zero (GH-30049) | John Belmonte | 2022-04-11 | 1 | -12/+10 |
| | | | | | | | | Add "z" format specifier to coerce negative 0 to zero. See https://github.com/python/cpython/issues/90153 (originally https://bugs.python.org/issue45995) for discussion. This covers `str.format()` and f-strings. Old-style string interpolation is not supported. Co-authored-by: Mark Dickinson <dickinsm@gmail.com> | ||||
* | bpo-46906: Add PyFloat_Pack8() to the C API (GH-31657) | Victor Stinner | 2022-03-11 | 1 | -1/+73 |
| | | | | | | | | | | | | | | | | | | | | | | Add new functions to pack and unpack C double (serialize and deserialize): * PyFloat_Pack2(), PyFloat_Pack4(), PyFloat_Pack8() * PyFloat_Unpack2(), PyFloat_Unpack4(), PyFloat_Unpack8() Document these functions and add unit tests. Rename private functions and move them from the internal C API to the public C API: * _PyFloat_Pack2() => PyFloat_Pack2() * _PyFloat_Pack4() => PyFloat_Pack4() * _PyFloat_Pack8() => PyFloat_Pack8() * _PyFloat_Unpack2() => PyFloat_Unpack2() * _PyFloat_Unpack4() => PyFloat_Unpack4() * _PyFloat_Unpack8() => PyFloat_Unpack8() Replace the "unsigned char*" type with "char*" which is more common and easy to use. | ||||
* | bpo-46852: Restore test_getformat() test (GH-31601) | Victor Stinner | 2022-02-27 | 1 | -3/+11 |
| | |||||
* | bpo-46852: Remove the float.__set_format__() method (GH-31585) | Victor Stinner | 2022-02-25 | 1 | -70/+0 |
| | | | | | | Remove the undocumented private float.__set_format__() method, previously known as float.__set_format__() in Python 3.7. Its docstring said: "You probably don't want to use this function. It exists mainly to be used in Python's test suite." | ||||
* | bpo-45668: Fix PGO tests without test extensions (GH-29315) | Christian Heimes | 2021-11-01 | 1 | -1/+2 |
| | |||||
* | bpo-43413: Fix handling keyword arguments in subclasses of some buitin ↵ | Serhiy Storchaka | 2021-09-12 | 1 | -0/+27 |
| | | | | | | | | classes (GH-26456) * Constructors of subclasses of some buitin classes (e.g. tuple, list, frozenset) no longer accept arbitrary keyword arguments. * Subclass of set can now define a __new__() method with additional keyword parameters without overriding also __init__(). | ||||
* | bpo-44954: Fix wrong result in float.fromhex corner case (GH-27834) | Mark Dickinson | 2021-08-20 | 1 | -0/+14 |
| | |||||
* | bpo-28395: Remove unnecessary semicolons in tests (GH-26868) | Dong-hee Na | 2021-06-23 | 1 | -4/+4 |
| | |||||
* | bpo-43475: Fix the Python implementation of hash of Decimal NaN (GH-26679) | Serhiy Storchaka | 2021-06-12 | 1 | -0/+19 |
| | |||||
* | bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25171) | Inada Naoki | 2021-04-04 | 1 | -2/+2 |
| | | | | | | | | | | | * Fix test_float * Fix _osx_support * Fix test_fstring * Fix test_gc * Fix test_gzip * Fix test_hashlib * Fix unrelated whitespace issue Co-authored-by: Ned Deily <nad@python.org> | ||||
* | bpo-41873: Add vectorcall for float() (GH-22432) | Dennis Sweeney | 2020-09-29 | 1 | -0/+3 |
| | |||||
* | bpo-38629: implement __floor__ and __ceil__ for float type (GH-16985) | Batuhan Taşkaya | 2019-12-15 | 1 | -0/+28 |
| | |||||
* | bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108) | Serhiy Storchaka | 2019-06-01 | 1 | -0/+15 |
| | |||||
* | bpo-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929) | Serhiy Storchaka | 2019-03-05 | 1 | -9/+8 |
| | |||||
* | bpo-35560: Remove assertion from format(float, "n") (GH-11288) | Xtreak | 2019-01-07 | 1 | -0/+19 |
| | | | | | Fix an assertion error in format() in debug build for floating point formatting with "n" format, zero padding and small width. Release build is not impacted. Patch by Karthikeyan Singaravelan. | ||||
* | bpo-34087: Fix buffer overflow in int(s) and similar functions (GH-8274) | INADA Naoki | 2018-07-14 | 1 | -0/+3 |
| | | | | | | `_PyUnicode_TransformDecimalAndSpaceToASCII()` missed trailing NUL char. It caused buffer overflow in `_Py_string_to_number_with_underscores()`. This bug is introduced in 9b6c60cb. | ||||
* | bpo-31979: Simplify transforming decimals to ASCII (#4336) | Serhiy Storchaka | 2017-11-13 | 1 | -1/+1 |
| | | | | | in int(), float() and complex() parsers. This also speeds up parsing non-ASCII numbers by around 20%. | ||||
* | bpo-31373: remove overly strict float range checks (#3486) | Benjamin Peterson | 2017-09-11 | 1 | -0/+6 |
| | | | | | 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. | ||||
* | bpo-29773: Add more cases for testing string to float conversion errors. (#580) | Serhiy Storchaka | 2017-03-09 | 1 | -8/+20 |
| | |||||
* | bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() ↵ | Serhiy Storchaka | 2017-03-06 | 1 | -2/+2 |
| | | | | and tuple(). (#518) | ||||
* | bpo-29695: Deprecated using bad named keyword arguments in builtings: (#486) | Serhiy Storchaka | 2017-03-05 | 1 | -0/+4 |
| | | | | int(), bool(), float(), list() and tuple(). Specify the value as a positional argument instead. | ||||
* | Issue #26331: Implement the parsing part of PEP 515. | Brett Cannon | 2016-09-09 | 1 | -1/+23 |
| | | | | Thanks to Georg Brandl for the patch. | ||||
* | Issue #26983: float() now always return an instance of exact float. | Serhiy Storchaka | 2016-06-03 | 1 | -8/+13 |
| | | | | | | 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. | ||||
* | Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses. | Serhiy Storchaka | 2016-05-12 | 1 | -0/+18 |
|\ | |||||
| * | Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses. | Serhiy Storchaka | 2016-05-12 | 1 | -0/+18 |
| | | |||||
* | | Issue #23277: Remove unused imports in tests. | Serhiy Storchaka | 2016-04-24 | 1 | -1/+0 |
|/ | |||||
* | Issue #24731: Fixed crash on converting objects with special methods | Serhiy Storchaka | 2015-11-25 | 1 | -0/+15 |
|\ | | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly. | ||||
| * | Issue #24731: Fixed crash on converting objects with special methods | Serhiy Storchaka | 2015-11-25 | 1 | -0/+15 |
| | | | | | | | | | | __bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly. | ||||
* | | Issue #24802: Merge null termination fixes from 3.4 into 3.5 | Martin Panter | 2015-11-07 | 1 | -2/+36 |
|\ \ | |/ | |||||
| * | Issue #24802: Copy bytes-like objects to null-terminated buffers if necessary | Martin Panter | 2015-11-07 | 1 | -2/+36 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | | Issue 19933: Provide default argument for ndigits in round. Patch by ↵ | Steve Dower | 2015-04-15 | 1 | -0/+8 |
| | | | | | | | | Vajrasky Kok. | ||||
* | | Issue #21741: Update 147 test modules to use test discovery. | Zachary Ware | 2015-04-13 | 1 | -14/+1 |
|/ | | | | | | | 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. | ||||
* | fix up import style | Benjamin Peterson | 2015-03-09 | 1 | -5/+8 |
| | |||||
* | remove redundant test | Benjamin Peterson | 2015-03-06 | 1 | -5/+0 |
| | |||||
* | fix potential refleak in PyFloat_AsDouble (closes #23590) | Benjamin Peterson | 2015-03-06 | 1 | -0/+6 |
| | |||||
* | Issue 19572: More silently skipped tests explicitly skipped. | Zachary Ware | 2013-12-08 | 1 | -1/+1 |
|\ | |||||
| * | Issue 19572: More silently skipped tests explicitly skipped. | Zachary Ware | 2013-12-08 | 1 | -1/+1 |
| | | |||||
* | | #17080: improve error message of float/complex when the wrong type is passed. | Ezio Melotti | 2013-11-07 | 1 | -0/+1 |
|/ | |||||
* | Remove untests for non-existent functionality. | Mark Dickinson | 2012-04-29 | 1 | -10/+0 |
| | |||||
* | Issue #14521: Make result of float('nan') and float('-nan') more consistent ↵ | Mark Dickinson | 2012-04-29 | 1 | -0/+13 |
| | | | | across platforms. Further, don't rely on Py_HUGE_VAL for float('inf'). | ||||
* | merge 3.2 | Benjamin Peterson | 2011-10-28 | 1 | -0/+6 |
|\ | |||||
| * | bring is_integer into tested existence | Benjamin Peterson | 2011-10-28 | 1 | -0/+6 |
| | | |||||
* | | #11565: Merge with 3.2. | Ezio Melotti | 2011-03-16 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | #11565: Merge with 3.1. | Ezio Melotti | 2011-03-16 | 1 | -2/+2 |
| |\ |