Skip to content

gh-136980: Remove unused C tracing code in bdb #136981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Doc/library/bdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,8 @@ The :mod:`bdb` module also defines two classes:
entered.
* ``"return"``: A function or other code block is about to return.
* ``"exception"``: An exception has occurred.
* ``"c_call"``: A C function is about to be called.
* ``"c_return"``: A C function has returned.
* ``"c_exception"``: A C function has raised an exception.

For the Python events, specialized functions (see below) are called. For
the C events, no action is taken.
For all the events, specialized functions (see below) are called.

The *arg* parameter depends on the previous event.

Expand Down
13 changes: 2 additions & 11 deletions Lib/bdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,9 @@ def trace_dispatch(self, frame, event, arg):
is entered.
return: A function or other code block is about to return.
exception: An exception has occurred.
c_call: A C function is about to be called.
c_return: A C function has returned.
c_exception: A C function has raised an exception.

For the Python events, specialized functions (see the dispatch_*()
methods) are called. For the C events, no action is taken.
For all the events, specialized functions (see the dispatch_*()
methods) are called.

The arg parameter depends on the previous event.
"""
Expand All @@ -288,12 +285,6 @@ def trace_dispatch(self, frame, event, arg):
return self.dispatch_return(frame, arg)
if event == 'exception':
return self.dispatch_exception(frame, arg)
if event == 'c_call':
return self.trace_dispatch
if event == 'c_exception':
return self.trace_dispatch
if event == 'c_return':
return self.trace_dispatch
if event == 'opcode':
return self.dispatch_opcode(frame, arg)
print('bdb.Bdb.dispatch: unknown debugging event:', repr(event))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused C tracing code in bdb for event type ``c_call``, ``c_return`` and ``c_exception``
Loading
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