Skip to content

Commit dc27218

Browse files
authored
gh-136980: Remove unused C tracing code in bdb (#136981)
1 parent ec7fad7 commit dc27218

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

Doc/library/bdb.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,8 @@ The :mod:`bdb` module also defines two classes:
192192
entered.
193193
* ``"return"``: A function or other code block is about to return.
194194
* ``"exception"``: An exception has occurred.
195-
* ``"c_call"``: A C function is about to be called.
196-
* ``"c_return"``: A C function has returned.
197-
* ``"c_exception"``: A C function has raised an exception.
198195

199-
For the Python events, specialized functions (see below) are called. For
200-
the C events, no action is taken.
196+
For all the events, specialized functions (see below) are called.
201197

202198
The *arg* parameter depends on the previous event.
203199

Lib/bdb.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,9 @@ def trace_dispatch(self, frame, event, arg):
267267
is entered.
268268
return: A function or other code block is about to return.
269269
exception: An exception has occurred.
270-
c_call: A C function is about to be called.
271-
c_return: A C function has returned.
272-
c_exception: A C function has raised an exception.
273270
274-
For the Python events, specialized functions (see the dispatch_*()
275-
methods) are called. For the C events, no action is taken.
271+
For all the events, specialized functions (see the dispatch_*()
272+
methods) are called.
276273
277274
The arg parameter depends on the previous event.
278275
"""
@@ -288,12 +285,6 @@ def trace_dispatch(self, frame, event, arg):
288285
return self.dispatch_return(frame, arg)
289286
if event == 'exception':
290287
return self.dispatch_exception(frame, arg)
291-
if event == 'c_call':
292-
return self.trace_dispatch
293-
if event == 'c_exception':
294-
return self.trace_dispatch
295-
if event == 'c_return':
296-
return self.trace_dispatch
297288
if event == 'opcode':
298289
return self.dispatch_opcode(frame, arg)
299290
print('bdb.Bdb.dispatch: unknown debugging event:', repr(event))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove unused C tracing code in bdb for event type ``c_call``, ``c_return`` and ``c_exception``

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