Skip to content

Commit 38b5230

Browse files
authored
Merge branch 'python:main' into patch-129545
2 parents db494fb + 12db452 commit 38b5230

24 files changed

+317
-165
lines changed

Doc/extending/embedding.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ interesting part with respect to embedding Python starts with ::
196196

197197
After initializing the interpreter, the script is loaded using
198198
:c:func:`PyImport_Import`. This routine needs a Python string as its argument,
199-
which is constructed using the :c:func:`PyUnicode_FromString` data conversion
200-
routine. ::
199+
which is constructed using the :c:func:`PyUnicode_DecodeFSDefault` data
200+
conversion routine. ::
201201

202202
pFunc = PyObject_GetAttrString(pModule, argv[2]);
203203
/* pFunc is a new reference */

Include/internal/pycore_magic_number.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ Known values:
270270
Python 3.14a5 3615 (CALL_FUNCTION_EX always take a kwargs argument)
271271
Python 3.14a5 3616 (Remove BINARY_SUBSCR and family. Make them BINARY_OPs)
272272
Python 3.14a6 3617 (Branch monitoring for async for loops)
273-
Python 3.14a6 3618 (Renumber RESUME opcode from 149 to 128)
273+
Python 3.14a6 3618 (Add oparg to END_ASYNC_FOR)
274+
Python 3.14a6 3619 (Renumber RESUME opcode from 149 to 128)
274275
275276
Python 3.15 will start with 3650
276277
@@ -283,7 +284,7 @@ PC/launcher.c must also be updated.
283284
284285
*/
285286

286-
#define PYC_MAGIC_NUMBER 3618
287+
#define PYC_MAGIC_NUMBER 3619
287288
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
288289
(little-endian) and then appending b'\r\n'. */
289290
#define PYC_MAGIC_NUMBER_TOKEN \

Include/internal/pycore_opcode_metadata.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/opcode_ids.h

Lines changed: 59 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/_opcode_metadata.py

Lines changed: 59 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/dis.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
STORE_FAST_STORE_FAST = opmap['STORE_FAST_STORE_FAST']
5353
IS_OP = opmap['IS_OP']
5454
CONTAINS_OP = opmap['CONTAINS_OP']
55+
END_ASYNC_FOR = opmap['END_ASYNC_FOR']
5556

5657
CACHE = opmap["CACHE"]
5758

@@ -605,7 +606,8 @@ def get_argval_argrepr(self, op, arg, offset):
605606
argval = self.offset_from_jump_arg(op, arg, offset)
606607
lbl = self.get_label_for_offset(argval)
607608
assert lbl is not None
608-
argrepr = f"to L{lbl}"
609+
preposition = "from" if deop == END_ASYNC_FOR else "to"
610+
argrepr = f"{preposition} L{lbl}"
609611
elif deop in (LOAD_FAST_LOAD_FAST, STORE_FAST_LOAD_FAST, STORE_FAST_STORE_FAST):
610612
arg1 = arg >> 4
611613
arg2 = arg & 15
@@ -745,7 +747,8 @@ def _parse_exception_table(code):
745747

746748
def _is_backward_jump(op):
747749
return opname[op] in ('JUMP_BACKWARD',
748-
'JUMP_BACKWARD_NO_INTERRUPT')
750+
'JUMP_BACKWARD_NO_INTERRUPT',
751+
'END_ASYNC_FOR') # Not really a jump, but it has a "target"
749752

750753
def _get_instructions_bytes(code, linestarts=None, line_offset=0, co_positions=None,
751754
original_code=None, arg_resolver=None):

Lib/sqlite3/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def runsource(self, source, filename="<input>", symbol="single"):
4646
"""Override runsource, the core of the InteractiveConsole REPL.
4747
4848
Return True if more input is needed; buffering is done automatically.
49-
Return False is input is a complete statement ready for execution.
49+
Return False if input is a complete statement ready for execution.
5050
"""
5151
match source:
5252
case ".version":

0 commit comments

Comments
 (0)