Skip to content

Commit b8d6799

Browse files
committed
Merge branch 'main' into instrument-all-possible-lines
2 parents e76f241 + 19ee53d commit b8d6799

Some content is hidden

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

48 files changed

+1063
-742
lines changed

Doc/howto/clinic.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,9 @@ All Argument Clinic converters accept the following arguments:
775775
because :pep:`8` mandates that the Python library may not use
776776
annotations.
777777

778+
``unused``
779+
Wrap the argument with :c:macro:`Py_UNUSED` in the impl function signature.
780+
778781
In addition, some converters accept additional arguments. Here is a list
779782
of these arguments, along with their meanings:
780783

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)

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: 12 additions & 12 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/collections/abc.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
from _collections_abc import *
22
from _collections_abc import __all__
33
from _collections_abc import _CallableGenericAlias
4+
5+
_deprecated_ByteString = globals().pop("ByteString")
6+
7+
def __getattr__(attr):
8+
if attr == "ByteString":
9+
import warnings
10+
warnings._deprecated("collections.abc.ByteString", remove=(3, 14))
11+
return _deprecated_ByteString
12+
raise AttributeError(f"module 'collections.abc' has no attribute {attr!r}")

Lib/importlib/_bootstrap_external.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ 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 (Shrink the LOAD_SUPER_ATTR caches)
446447

447448
# Python 3.13 will start with 3550
448449

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

462-
MAGIC_NUMBER = (3529).to_bytes(2, 'little') + b'\r\n'
463+
MAGIC_NUMBER = (3530).to_bytes(2, 'little') + b'\r\n'
463464

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

Lib/opcode.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ def pseudo_op(name, op, real_ops):
373373
"FOR_ITER_GEN",
374374
],
375375
"LOAD_SUPER_ATTR": [
376+
"LOAD_SUPER_ATTR_ATTR",
376377
"LOAD_SUPER_ATTR_METHOD",
377378
],
378379
"LOAD_ATTR": [
@@ -450,9 +451,6 @@ def pseudo_op(name, op, real_ops):
450451
},
451452
"LOAD_SUPER_ATTR": {
452453
"counter": 1,
453-
"class_version": 2,
454-
"self_type_version": 2,
455-
"method": 4,
456454
},
457455
"LOAD_ATTR": {
458456
"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
"""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy