Files
cpython/Python
Gregory P. Smith 8eb079f102 [3.10] gh-158446: Reject float format precision near INT_MAX (GH-158474) (#158482)
Formatting a float or complex with a precision within about 1000 of
INT_MAX could crash or produce incorrect output.
PyOS_double_to_string() now raises ValueError("precision too big") for
such precisions, as the format string parsers already do for
precisions above INT_MAX.

The limit applies regardless of presentation type or value, so a few
calls that previously succeeded (inf, nan, or 'g' with such a
precision) now raise as well.
(cherry picked from commit b7b4f3ecf2)
2026-10-01 01:29:08 +01:00
..
…
2017-09-14 18:13:16 -07:00

Miscellaneous source files for the main Python shared library