MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / remove_exception_from_frame

Function remove_exception_from_frame

_pydevd_bundle/pydevd_frame_utils.py:36–43  ·  view source on GitHub ↗
(frame)

Source from the content-addressed store, hash-verified

34
35
36def remove_exception_from_frame(frame):
37 if IS_PY313_0:
38 # In 3.13.0 frame.f_locals became a proxy for a dict, It does not
39 # have methods to allow items to be removed, only added. So just set the item to None.
40 # Should be fixed in 3.13.1 in PR: https://github.com/python/cpython/pull/125616
41 frame.f_locals["__exception__"] = None
42 else:
43 frame.f_locals.pop("__exception__", None)
44
45
46FILES_WITH_IMPORT_HOOKS = ["pydev_monkey_qt.py", "pydev_import_hook.py"]

Callers 2

handle_exceptionFunction · 0.90

Calls 1

popMethod · 0.80

Tested by

no test coverage detected