8000 versionadded/changed to 3.11; update What's New. · python/cpython@e51cb02 · GitHub
[go: up one dir, main page]

Skip to content

Commit e51cb02

Browse files
committed
versionadded/changed to 3.11; update What's New.
1 parent c6e7f33 commit e51cb02

File tree

8 files changed

+16
-34
lines changed

8 files changed

+16
-34
lines changed

Doc/library/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ are always available. They are listed here in alphabetical order.
910910
.. versionchanged:: 3.11
911911
The delegation to :meth:`__trunc__` is deprecated.
912912

913-
.. versionchanged:: 3.12
913+
.. versionchanged:: 3.11
914914
:class:`int` string inputs and string representations can be limited to
915915
help avoid denial of service attacks. A :exc:`ValueError` is raised when
916916
the limit is exceeded while converting a string *x* to an :class:`int` or

Doc/library/json.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Basic Usage
258258
be used to use another datatype or parser for JSON integers
259259
(e.g. :class:`float`).
260260

261-
.. versionchanged:: 3.12
261+
.. versionchanged:: 3.11
262262
The default *parse_int* of :func:`int` now limits the maximum length of
263263
the integer string via the interpreter's :ref:`integer string
264264
conversion length limitation <int_max_str_digits>` to help avoid denial

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5523,7 +5523,7 @@ Verification:
55235523
... '571186405732').to_bytes(53, 'big')
55245524
...
55255525

5526-
.. versionadded:: 3.12
5526+
.. versionadded:: 3.11
55275527

55285528
.. audit-event:: int/digits/to_decimal value
55295529

@@ -5594,7 +5594,7 @@ Information about the default and minimum can be found in :attr:`sys.int_info`:
55945594
* :data:`sys.int_info.str_digits_check_threshold <sys.int_info>` is the lowest
55955595
accepted value for the limit (other than 0 which disables it).
55965596

5597-
.. versionadded:: 3.12
5597+
.. versionadded:: 3.11
55985598

55995599
.. caution::
56005600

Doc/library/sys.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ always available.
544544
.. versionchanged:: 3.11
545545
Added the ``safe_path`` attribute for :option:`-P` option.
546546

547-
.. versionchanged:: 3.12
547+
.. versionchanged:: 3.11
548548
Added the ``int_max_str_digits`` attribute.
549549

550550

@@ -732,7 +732,7 @@ always available.
732732
Returns the current value for the :ref:`integer string conversion length
733733
limitation <int_max_str_digits>`. See also :func:`set_int_max_str_digits`.
734734

735-
.. versionadded:: 3.12
735+
.. versionadded:: 3.11
736736

737737
.. function:: getrefcount(object)
738738

@@ -1029,7 +1029,7 @@ always available.
10291029

10301030
.. versionadded:: 3.1
10311031

1032-
.. versionchanged:: 3.12
1032+
.. versionchanged:: 3.11
10331033
Added ``default_max_str_digits`` and ``str_digits_check_threshold``.
10341034

10351035

@@ -1337,7 +1337,7 @@ always available.
13371337
<int_max_str_digits>` used by this interpreter. See also
13381338
:func:`get_int_max_str_digits`.
13391339

1340-
.. versionadded:: 3.12
1340+
.. versionadded:: 3.11
13411341

13421342
.. function:: setprofile(profilefunc)
13431343

Doc/library/test.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ The :mod:`test.support` module defines the following functions:
10181018
context to allow execution of test code that needs a different limit
10191019
on the number of digits when converting between an integer and string.
10201020

1021-
.. versionadded:: 3.12
1021+
.. versionadded:: 3.11
10221022

10231023

10241024
The :mod:`test.support` module defines the following classes:

Doc/using/cmdline.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ Miscellaneous options
585585
.. versionadded:: 3.11
586586
The ``-X frozen_modules`` option.
587587

588-
.. versionadded:: 3.12
588+
.. versionadded:: 3.11
589589
The ``-X int_max_str_digits`` option.
590590

591591
.. versionadded:: 3.12
@@ -775,7 +775,7 @@ conflict.
775775
interpreter's global :ref:`integer string conversion length limitation
776776
<int_max_str_digits>`.
777777

778-
.. versionadded:: 3.12
778+
.. versionadded:: 3.11
779779

780780
.. envvar:: PYTHONIOENCODING
781781

Doc/whatsnew/3.12.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,11 @@ Other Language Changes
8484
(Contributed by Serhiy Storchaka in :gh:`87995`.)
8585

8686
* Converting between :class:`int` and :class:`str` in bases other than 2
87-
(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal)
88-
now raises a :exc:`ValueError` if the number of digits in string form is
89-
above a limit to avoid potential denial of service attacks due to the
90-
algorithmic complexity. This is a mitigation for `CVE-2020-10735
91-
<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735>`_.
92-
This limit can be configured or disabled by environment variable, command
93-
line flag, or :mod:`sys` APIs. See the :ref:`integer string conversion
94-
length limitation <int_max_str_digits>` documentation. The default limit
95-
is 4300 digits in string form.
87+
(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) now
88+
generates an :ref:`auditing event <auditing>` whenever the estimated number
89+
of digits is above :data:`sys.int_info.str_digits_check_threshold
90+
<sys.int_info>`. See the :ref:`integer string conversion length limitation
91+
<int_max_str_digits>` documentation.
9692

9793

9894
New Modules

Misc/NEWS.d/next/Security/2022-08-07-16-53-38.gh-issue-95778.ch010gps.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0