gh-136980: Remove unused C tracing code in bdb#136981
gh-136980: Remove unused C tracing code in bdb#136981gaogaotiantian merged 5 commits intopython:mainpython/cpython:mainfrom
Conversation
The `c_call`, `c_return`, and `c_exception` events have historically (since c69ebe8) been dispatched to `c_profilefunc` and never `c_tracefunc`. This commit removes the dead code related to `c_tracefunc` dispatching.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
There was a problem hiding this comment.
I think overall this should be a safe change. trace_dispatchis the lowest API and there's no (proper) way a subclass can change how it is triggered. (Just thinking about potential backwards compatibility issues).
You do need a news entry here because it's still technically a behavior change.
Doc/library/bdb.rst
Outdated
|
|
||
| For the Python events, specialized functions (see below) are called. For | ||
| the C events, no action is taken. | ||
| For the Python events, specialized functions (see below) are called. |
There was a problem hiding this comment.
I guess Python does not make sense here anymore - it's all the events.
Lib/bdb.py
Outdated
| 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_*() |
There was a problem hiding this comment.
Same here, we don't need to distinguish Python events anymore.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Thank you for fixing this. Congrats to your first PR! |
Since bdb was created, it uses
sys.settracefor tracing.The
c_call,c_return, andc_exceptionevents have historically (since c69ebe8) been dispatched toc_profilefuncand neverc_tracefunc. This commit removes the dead code related toc_tracefuncdispatching.Refers to c69ebe8#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deR3426-R3461
📚 Documentation preview 📚: https://cpython-previews--136981.org.readthedocs.build/