Skip to content

Commit 0eb3657

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pythongh-115605-qsbr
2 parents e7f3683 + 75c6c05 commit 0eb3657

186 files changed

Lines changed: 9887 additions & 1866 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Programs/test_frozenmain.h generated
9595
Python/Python-ast.c generated
9696
Python/executor_cases.c.h generated
9797
Python/generated_cases.c.h generated
98-
Python/tier2_redundancy_eliminator_cases.c.h generated
98+
Python/optimizer_cases.c.h generated
9999
Python/opcode_targets.h generated
100100
Python/stdlib_module_names.h generated
101101
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Python/ast_opt.c @isidentical
3838
Python/bytecodes.c @markshannon @gvanrossum
3939
Python/optimizer*.c @markshannon @gvanrossum
4040
Python/optimizer_analysis.c @Fidget-Spinner
41-
Python/tier2_redundancy_eliminator_bytecodes.c @Fidget-Spinner
41+
Python/optimizer_bytecodes.c @Fidget-Spinner
4242
Lib/test/test_patma.py @brandtbucher
4343
Lib/test/test_type_*.py @JelleZijlstra
4444
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum
@@ -249,3 +249,7 @@ Lib/test/test_interpreters/ @ericsnowcurrently
249249
# SBOM
250250
/Misc/sbom.spdx.json @sethmlarson
251251
/Tools/build/generate_sbom.py @sethmlarson
252+
253+
# Config Parser
254+
Lib/configparser.py @jaraco
255+
Lib/test/test_configparser.py @jaraco

.github/workflows/jit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
- '**jit**'
66
- 'Python/bytecodes.c'
77
- 'Python/optimizer*.c'
8-
- 'Python/tier2_redundancy_eliminator_bytecodes.c'
8+
- 'Python/optimizer_bytecodes.c'
99
push:
1010
paths:
1111
- '**jit**'
1212
- 'Python/bytecodes.c'
1313
- 'Python/optimizer*.c'
14-
- 'Python/tier2_redundancy_eliminator_bytecodes.c'
14+
- 'Python/optimizer_bytecodes.c'
1515
workflow_dispatch:
1616

1717
concurrency:

.github/workflows/reusable-macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
HOMEBREW_NO_ANALYTICS: 1
1818
HOMEBREW_NO_AUTO_UPDATE: 1
1919
HOMEBREW_NO_INSTALL_CLEANUP: 1
20+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
2021
PYTHONSTRICTEXTENSIONBUILD: 1
2122
strategy:
2223
fail-fast: false

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Lib/test/data/*
6969
/_bootstrap_python
7070
/Makefile
7171
/Makefile.pre
72+
iOS/Resources/Info.plist
7273
Mac/Makefile
7374
Mac/PythonLauncher/Info.plist
7475
Mac/PythonLauncher/Makefile

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Printing and clearing
105105
parameters help format the warning message; they have the same meaning and
106106
values as in :c:func:`PyUnicode_FromFormat`.
107107
``PyErr_WriteUnraisable(obj)`` is roughtly equivalent to
108-
``PyErr_FormatUnraisable("Exception ignored in: %R, obj)``.
108+
``PyErr_FormatUnraisable("Exception ignored in: %R", obj)``.
109109
If *format* is ``NULL``, only the traceback is printed.
110110
111111
.. versionadded:: 3.13

Doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@
101101
('c:func', 'dlopen'),
102102
('c:func', 'exec'),
103103
('c:func', 'fcntl'),
104+
('c:func', 'flock'),
104105
('c:func', 'fork'),
105106
('c:func', 'free'),
106107
('c:func', 'gettimeofday'),
107108
('c:func', 'gmtime'),
108109
('c:func', 'grantpt'),
110+
('c:func', 'ioctl'),
109111
('c:func', 'localeconv'),
110112
('c:func', 'localtime'),
111113
('c:func', 'main'),

Doc/library/array.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,3 @@ Examples::
279279

280280
`NumPy <https://numpy.org/>`_
281281
The NumPy package defines another array type.
282-

Doc/library/ast.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,15 @@ Node classes
103103
For example, to create and populate an :class:`ast.UnaryOp` node, you could
104104
use ::
105105

106-
node = ast.UnaryOp()
107-
node.op = ast.USub()
108-
node.operand = ast.Constant()
109-
node.operand.value = 5
110-
node.operand.lineno = 0
111-
node.operand.col_offset = 0
112-
node.lineno = 0
113-
node.col_offset = 0
114-
115-
or the more compact ::
116-
117106
node = ast.UnaryOp(ast.USub(), ast.Constant(5, lineno=0, col_offset=0),
118107
lineno=0, col_offset=0)
119108

109+
If a field that is optional in the grammar is omitted from the constructor,
110+
it defaults to ``None``. If a list field is omitted, it defaults to the empty
111+
list. If any other field is omitted, a :exc:`DeprecationWarning` is raised
112+
and the AST node will not have this field. In Python 3.15, this condition will
113+
raise an error.
114+
120115
.. versionchanged:: 3.8
121116

122117
Class :class:`ast.Constant` is now used for all constants.
@@ -140,6 +135,14 @@ Node classes
140135
In the meantime, instantiating them will return an instance of
141136
a different class.
142137

138+
.. deprecated-removed:: 3.13 3.15
139+
140+
Previous versions of Python allowed the creation of AST nodes that were missing
141+
required fields. Similarly, AST node constructors allowed arbitrary keyword
142+
arguments that were set as attributes of the AST node, even if they did not
143+
match any of the fields of the AST node. This behavior is deprecated and will
144+
be removed in Python 3.15.
145+
143146
.. note::
144147
The descriptions of the specific node classes displayed here
145148
were initially adapted from the fantastic `Green Tree

Doc/library/base64.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,24 @@ The modern interface provides:
244244
.. versionadded:: 3.4
245245

246246

247+
.. function:: z85encode(s)
248+
249+
Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ)
250+
and return the encoded :class:`bytes`. See `Z85 specification
251+
<https://rfc.zeromq.org/spec/32/>`_ for more information.
252+
253+
.. versionadded:: 3.13
254+
255+
256+
.. function:: z85decode(s)
257+
258+
Decode the Z85-encoded :term:`bytes-like object` or ASCII string *s* and
259+
return the decoded :class:`bytes`. See `Z85 specification
260+
<https://rfc.zeromq.org/spec/32/>`_ for more information.
261+
262+
.. versionadded:: 3.13
263+
264+
247265
The legacy interface:
248266

249267
.. function:: decode(input, output)

0 commit comments

Comments
 (0)