Skip to content

Commit 0dbcd08

Browse files
Merge branch 'main' into fix/129640
2 parents c17135e + 12db452 commit 0dbcd08

33 files changed

+510
-251
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/_pyio.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,13 @@ def _checkWritable(self, msg=None):
16451645
def read(self, size=None):
16461646
"""Read at most size bytes, returned as bytes.
16471647
1648-
Only makes one system call, so less data may be returned than requested
1648+
If size is less than 0, read all bytes in the file making
1649+
multiple read calls. See ``FileIO.readall``.
1650+
1651+
Attempts to make only one system call, retrying only per
1652+
PEP 475 (EINTR). This means less data may be returned than
1653+
requested.
1654+
16491655
In non-blocking mode, returns None if no data is available.
16501656
Return an empty bytes object at EOF.
16511657
"""
@@ -1661,8 +1667,13 @@ def read(self, size=None):
16611667
def readall(self):
16621668
"""Read all data from the file, returned as bytes.
16631669
1664-
In non-blocking mode, returns as much as is immediately available,
1665-
or None if no data is available. Return an empty bytes object at EOF.
1670+
Reads until either there is an error or read() returns size 0
1671+
(indicates EOF). If the file is already at EOF, returns an
1672+
empty bytes object.
1673+
1674+
In non-blocking mode, returns as much data as could be read
1675+
before EAGAIN. If no data is available (EAGAIN is returned
1676+
before bytes are read) returns None.
16661677
"""
16671678
self._checkClosed()
16681679
self._checkReadable()

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/gettext.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
# to do binary searches and lazy initializations. Or you might want to use
4242
# the undocumented double-hash algorithm for .mo files with hash tables, but
4343
# you'll need to study the GNU gettext code to do this.
44-
#
45-
# - Support Solaris .mo file formats. Unfortunately, we've been unable to
46-
# find this format documented anywhere.
4744

4845

4946
import operator

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)