Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python dictionary watchers no longer trigger when an object's attributes change #125608

Closed
Labels
3.13bugs and security fixes3.14bugs and security fixestype-bugAn unexpected behavior, bug, or error
@colesbury

Description

@colesbury

Bug report

Here's an example function usingtest_capi/test_watchers.py that passes in 3.12, but fails in 3.13 and 3.14:

deftest_watch_obj_dict(self):o=MyClass()withself.watcher()aswid:self.watch(wid,o.__dict__)o.foo="bar"self.assert_events(["new:foo:bar"])# fails in 3.13+

The dictionary watcher doesn't fire in 3.13+ even though theo.__dict__ changes wheno.foo is set to"bar". The problem is specific to inline values -- our code paths for inline values do not trigger dictionary watcher events. If the object does not use inline values, then the watcher events fire as expected.

This is a problem forPyTorch Dyanmo because it uses dictionary watchers for compiler guards.

cc@williamwen42@markshannon

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp