Skip to content

Commit 293d162

Browse files
committed
Update on "[dynamo] handle 3.13.0 __dict__ watcher bug"
python/cpython#116115 introduced a bug (python/cpython#125608) where changing the attributes of an object may not fire the dict watchers registered to the object's `__dict__`. It has been fixed by python/cpython#125611 but will only be in 3.13.1+. This PR disables the dict watcher guard shortcut for `__dict__`s on 3.13.0 and warns the user to try using 3.13.1+ instead. We also added a simple test to check for this functionality in the future. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
2 parents 96c3a90 + 3ebb7e4 commit 293d162

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎torch/csrc/dynamo/debug_macros.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ inline _PyFrameEvalFunction _debug_set_eval_frame(
8282
// (pdb) p args[1].some_attr
8383
// # etc.
8484
//
85-
// Implementation: set eval frame callback to default, call torch._dynamo.utils._breakpoint_for_c_dynamo,
86-
// reset eval frame callback.
85+
// Implementation: set eval frame callback to default, call
86+
// torch._dynamo.utils._breakpoint_for_c_dynamo, reset eval frame callback.
8787
#define INSPECT(...) \
8888
{ \
8989
PyThreadState* cur_tstate = PyThreadState_Get(); \

0 commit comments

Comments
 (0)