summaryrefslogtreecommitdiff
path: root/index.rst
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2023-04-04 10:59:13 -0700
committerBob Ippolito <bob@redivi.com>2023-04-04 10:59:13 -0700
commit59dac4e82cd6766fc31a9389d573d732580eaab5 (patch)
tree2cba0cbde6419fa11c6111d82f64b989c46455ec /index.rst
parent1e495c1199f56c2e8e7931f20bda7481842e18ff (diff)
downloadsimplejson-59dac4e82cd6766fc31a9389d573d732580eaab5.tar.gz
SJ-PT-23-03: Backport integer string length limitation to limit quadratic parsing
Diffstat (limited to 'index.rst')
-rw-r--r--index.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/index.rst b/index.rst
index fbb52b5..a10ccb7 100644
--- a/index.rst
+++ b/index.rst
@@ -412,6 +412,13 @@ Basic Usage
be used to use another datatype or parser for JSON integers
(e.g. :class:`float`).
+ .. versionchanged:: 3.19.0
+ The integer to string conversion length limitation introduced in
+ Python 3.11 has been backported. An attempt to parse an integer
+ with more than 4300 digits will result in an exception unless a
+ suitable alternative parser is specified
+ (e.g. :class:`decimal.Decimal`)
+
*parse_constant*, if specified, will be called with one of the following
strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be used to
raise an exception if invalid JSON numbers are encountered.
@@ -502,6 +509,13 @@ Encoders and decoders
be used to use another datatype or parser for JSON integers
(e.g. :class:`float`).
+ .. versionchanged:: 3.19.0
+ The integer to string conversion length limitation introduced in
+ Python 3.11 has been backported. An attempt to parse an integer
+ with more than 4300 digits will result in an exception unless a
+ suitable alternative parser is specified
+ (e.g. :class:`decimal.Decimal`)
+
*parse_constant*, if specified, will be called with one of the following
strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be used to
raise an exception if invalid JSON numbers are encountered.