frame_settrace_opcodes() passes the value to PyBool_Check() without checking it for NULL, and the setter is called with NULL when the attribute is deleted. del frame.f_trace_lines is safe, because it is a PyMemberDef entry.
In 3.14 and newer the accessor is generated by Argument Clinic, whose @setter rejects the deletion with AttributeError, so only 3.13 is affected.
Activity
[3.13] gh-156189: Fix a crash when deleting frame.f_trace_opcodes (GH…