Skip to content

Commit 3fbc9c5

Browse files
authored
Merge branch 'main' into itertools_batched
2 parents c49fb17 + aafc53c commit 3fbc9c5

51 files changed

Lines changed: 1975 additions & 1047 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Python/traceback.c @iritkatriel
5555
/Lib/html/ @ezio-melotti
5656
/Lib/_markupbase.py @ezio-melotti
5757
/Lib/test/test_html*.py @ezio-melotti
58-
/Tools/scripts/*html5* @ezio-melotti
58+
/Tools/build/parse_html5_entities.py @ezio-melotti
5959

6060
# Import (including importlib).
6161
# Ignoring importlib.h so as to not get flagged on

.github/workflows/verify-ensurepip-wheels.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ on:
66
paths:
77
- 'Lib/ensurepip/_bundled/**'
88
- '.github/workflows/verify-ensurepip-wheels.yml'
9-
- 'Tools/scripts/verify_ensurepip_wheels.py'
9+
- 'Tools/build/verify_ensurepip_wheels.py'
1010
pull_request:
1111
paths:
1212
- 'Lib/ensurepip/_bundled/**'
1313
- '.github/workflows/verify-ensurepip-wheels.yml'
14-
- 'Tools/scripts/verify_ensurepip_wheels.py'
14+
- 'Tools/build/verify_ensurepip_wheels.py'
1515

1616
permissions:
1717
contents: read
@@ -29,4 +29,4 @@ jobs:
2929
with:
3030
python-version: '3'
3131
- name: Compare checksums of bundled pip and setuptools to ones published on PyPI
32-
run: ./Tools/scripts/verify_ensurepip_wheels.py
32+
run: ./Tools/build/verify_ensurepip_wheels.py

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Tools/ssl/win32
143143
Tools/freeze/test/outdir
144144

145145
# The frozen modules are always generated by the build so we don't
146-
# keep them in the repo. Also see Tools/scripts/freeze_modules.py.
146+
# keep them in the repo. Also see Tools/build/freeze_modules.py.
147147
Python/frozen_modules/*.h
148148
# The manifest can be generated at any time with "make regen-frozen".
149149
Python/frozen_modules/MANIFEST

Doc/library/token-list.inc

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/whatsnew/3.11.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,17 @@ Other CPython Implementation Changes
530530
and with the new :option:`--help-all`.
531531
(Contributed by Éric Araujo in :issue:`46142`.)
532532

533+
* Converting between :class:`int` and :class:`str` in bases other than 2
534+
(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal)
535+
now raises a :exc:`ValueError` if the number of digits in string form is
536+
above a limit to avoid potential denial of service attacks due to the
537+
algorithmic complexity. This is a mitigation for `CVE-2020-10735
538+
<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735>`_.
539+
This limit can be configured or disabled by environment variable, command
540+
line flag, or :mod:`sys` APIs. See the :ref:`integer string conversion
541+
length limitation <int_max_str_digits>` documentation. The default limit
542+
is 4300 digits in string form.
543+
533544

534545
.. _whatsnew311-new-modules:
535546

@@ -1884,6 +1895,17 @@ New Features
18841895
Porting to Python 3.11
18851896
----------------------
18861897

1898+
* Some macros have been converted to static inline functions to avoid
1899+
`macro pitfalls <https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html>`_.
1900+
The change should be mostly transparent to users,
1901+
as the replacement functions will cast their arguments to the expected types
1902+
to avoid compiler warnings due to static type checks.
1903+
However, when the limited C API is set to >=3.11,
1904+
these casts are not done,
1905+
and callers will need to cast arguments to their expected types.
1906+
See :pep:`670` for more details.
1907+
(Contributed by Victor Stinner and Erlend E. Aasland in :gh:`89653`.)
1908+
18871909
* :c:func:`PyErr_SetExcInfo()` no longer uses the ``type`` and ``traceback``
18881910
arguments, the interpreter now derives those values from the exception
18891911
instance (the ``value`` argument). The function still steals references

Include/internal/pycore_global_strings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
// The data structure & init here are inspired by Tools/scripts/deepfreeze.py.
11+
// The data structure & init here are inspired by Tools/build/deepfreeze.py.
1212

1313
// All field names generated by ASCII_STR() have a common prefix,
1414
// to help avoid collisions with keywords, etc.
@@ -25,7 +25,7 @@ extern "C" {
2525

2626
// XXX Order by frequency of use?
2727

28-
/* The following is auto-generated by Tools/scripts/generate_global_objects.py. */
28+
/* The following is auto-generated by Tools/build/generate_global_objects.py. */
2929
struct _Py_global_strings {
3030
struct {
3131
STRUCT_FOR_STR(anon_dictcomp, "<dictcomp>")

Include/internal/pycore_opcode.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_runtime_init_generated.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_token.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Auto-generated by Tools/scripts/generate_token.py */
1+
/* Auto-generated by Tools/build/generate_token.py */
22

33
/* Token types */
44
#ifndef Py_INTERNAL_TOKEN_H

Include/opcode.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)