Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 531fcf7

Browse files
committed
Merge remote-tracking branch 'upstream/main' into tvobject
2 parents 529c74d + ac66cc1 commit 531fcf7

40 files changed

Lines changed: 1556 additions & 692 deletions

Doc/library/pdb.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,17 @@ can be overridden by the local file.
602602

603603
Execute the (one-line) *statement* in the context of the current stack frame.
604604
The exclamation point can be omitted unless the first word of the statement
605-
resembles a debugger command. To set a global variable, you can prefix the
606-
assignment command with a :keyword:`global` statement on the same line,
607-
e.g.::
605+
resembles a debugger command, e.g.:
606+
607+
.. code-block:: none
608+
609+
(Pdb) ! n=42
610+
(Pdb)
611+
612+
To set a global variable, you can prefix the assignment command with a
613+
:keyword:`global` statement on the same line, e.g.:
614+
615+
.. code-block:: none
608616
609617
(Pdb) global list_options; list_options = ['-l']
610618
(Pdb)

Doc/library/sqlite3.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,10 @@ Cursor objects
16941694
``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements;
16951695
is ``-1`` for other statements,
16961696
including :abbr:`CTE (Common Table Expression)` queries.
1697-
It is only updated by the :meth:`execute` and :meth:`executemany` methods.
1697+
It is only updated by the :meth:`execute` and :meth:`executemany` methods,
1698+
after the statement has run to completion.
1699+
This means that any resulting rows must be fetched in order for
1700+
:attr:`!rowcount` to be updated.
16981701

16991702
.. attribute:: row_factory
17001703

Include/internal/pycore_code.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ typedef struct {
5353

5454
typedef struct {
5555
uint16_t counter;
56-
uint16_t class_version[2];
57-
uint16_t self_type_version[2];
58-
uint16_t method[4];
5956
} _PySuperAttrCache;
6057

6158
#define INLINE_CACHE_ENTRIES_LOAD_SUPER_ATTR CACHE_ENTRIES(_PySuperAttrCache)
@@ -227,8 +224,8 @@ extern int _PyLineTable_PreviousAddressRange(PyCodeAddressRange *range);
227224

228225
/* Specialization functions */
229226

230-
extern void _Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *cls, PyObject *self,
231-
_Py_CODEUNIT *instr, PyObject *name, int load_method);
227+
extern void _Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *cls,
228+
_Py_CODEUNIT *instr, int load_method);
232229
extern void _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr,
233230
PyObject *name);
234231
extern void _Py_Specialize_StoreAttr(PyObject *owner, _Py_CODEUNIT *instr,

Include/internal/pycore_opcode.h

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

Include/internal/pycore_typeobject.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ PyAPI_DATA(PyTypeObject) _PyBufferWrapper_Type;
142142

143143
PyObject *
144144
_PySuper_Lookup(PyTypeObject *su_type, PyObject *su_obj, PyObject *name, int *meth_found);
145-
PyObject *
146-
_PySuper_LookupDescr(PyTypeObject *su_type, PyObject *su_obj, PyObject *name);
147145

148146
#ifdef __cplusplus
149147
}

Include/opcode.h

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

Lib/importlib/_bootstrap_external.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ def _write_atomic(path, data, mode=0o666):
443443
# Python 3.12b1 3527 (Add LOAD_SUPER_ATTR)
444444
# Python 3.12b1 3528 (Add LOAD_SUPER_ATTR_METHOD specialization)
445445
# Python 3.12b1 3529 (Inline list/dict/set comprehensions)
446-
# Python 3.12b1 3530 (Add PEP 695 changes)
446+
# Python 3.12b1 3530 (Shrink the LOAD_SUPER_ATTR caches)
447+
# Python 3.12b1 3531 (Add PEP 695 changes)
447448

448449
# Python 3.13 will start with 3550
449450

@@ -460,7 +461,7 @@ def _write_atomic(path, data, mode=0o666):
460461
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
461462
# in PC/launcher.c must also be updated.
462463

463-
MAGIC_NUMBER = (3530).to_bytes(2, 'little') + b'\r\n'
464+
MAGIC_NUMBER = (3531).to_bytes(2, 'little') + b'\r\n'
464465

465466
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
466467

Lib/opcode.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ def pseudo_op(name, op, real_ops):
386386
"FOR_ITER_GEN",
387387
],
388388
"LOAD_SUPER_ATTR": [
389+
"LOAD_SUPER_ATTR_ATTR",
389390
"LOAD_SUPER_ATTR_METHOD",
390391
],
391392
"LOAD_ATTR": [
@@ -463,9 +464,6 @@ def pseudo_op(name, op, real_ops):
463464
},
464465
"LOAD_SUPER_ATTR": {
465466
"counter": 1,
466-
"class_version": 2,
467-
"self_type_version": 2,
468-
"method": 4,
469467
},
470468
"LOAD_ATTR": {
471469
"counter": 1,

Lib/pdb.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def displayhook(self, obj):
440440
self.message(repr(obj))
441441

442442
def default(self, line):
443-
if line[:1] == '!': line = line[1:]
443+
if line[:1] == '!': line = line[1:].strip()
444444
locals = self.curframe_locals
445445
globals = self.curframe.f_globals
446446
try:
@@ -1642,9 +1642,12 @@ def help_exec(self):
16421642
16431643
Execute the (one-line) statement in the context of the current
16441644
stack frame. The exclamation point can be omitted unless the
1645-
first word of the statement resembles a debugger command. To
1646-
assign to a global variable you must always prefix the command
1647-
with a 'global' command, e.g.:
1645+
first word of the statement resembles a debugger command, e.g.:
1646+
(Pdb) ! n=42
1647+
(Pdb)
1648+
1649+
To assign to a global variable you must always prefix the command with
1650+
a 'global' command, e.g.:
16481651
(Pdb) global list_options; list_options = ['-l']
16491652
(Pdb)
16501653
"""

Lib/pydoc_data/topics.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5283,11 +5283,14 @@
52835283
'current\n'
52845284
' stack frame. The exclamation point can be omitted unless the '
52855285
'first\n'
5286-
' word of the statement resembles a debugger command. To set '
5287-
'a\n'
5288-
' global variable, you can prefix the assignment command with '
5289-
'a\n'
5290-
' "global" statement on the same line, e.g.:\n'
5286+
' word of the statement resembles a debugger command, e.g.:'
5287+
'\n'
5288+
' (Pdb) ! n=42\n'
5289+
' (Pdb)\n'
5290+
'\n'
5291+
' To set a global variable, you can prefix the assignment command '
5292+
' with \n'
5293+
' a "global" statement on the same line, e.g.:\n'
52915294
'\n'
52925295
" (Pdb) global list_options; list_options = ['-l']\n"
52935296
' (Pdb)\n'

0 commit comments

Comments
 (0)