{"action":"created","issue":{"url":"https://api.github.com/repos/enthought/traits/issues/410","repository_url":"https://api.github.com/repos/enthought/traits","labels_url":"https://api.github.com/repos/enthought/traits/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/enthought/traits/issues/410/comments","events_url":"https://api.github.com/repos/enthought/traits/issues/410/events","html_url":"https://github.com/enthought/traits/pull/410","id":372822300,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0OTA2MzYw","number":410,"title":"Free HasTraits subclasses from hashing/comparing by identity","user":{"login":"rkern","id":46135,"node_id":"MDQ6VXNlcjQ2MTM1","avatar_url":"https://avatars3.githubusercontent.com/u/46135?v=4","gravatar_id":"","url":"https://api.github.com/users/rkern","html_url":"https://github.com/rkern","followers_url":"https://api.github.com/users/rkern/followers","following_url":"https://api.github.com/users/rkern/following{/other_user}","gists_url":"https://api.github.com/users/rkern/gists{/gist_id}","starred_url":"https://api.github.com/users/rkern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkern/subscriptions","organizations_url":"https://api.github.com/users/rkern/orgs","repos_url":"https://api.github.com/users/rkern/repos","events_url":"https://api.github.com/users/rkern/events{/privacy}","received_events_url":"https://api.github.com/users/rkern/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-23T06:05:53Z","updated_at":"2018-10-23T08:15:28Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/enthought/traits/pulls/410","html_url":"https://github.com/enthought/traits/pull/410","diff_url":"https://github.com/enthought/traits/pull/410.diff","patch_url":"https://github.com/enthought/traits/pull/410.patch"},"body":"The Traits listener machinery uses weak-key dicts to track some of the bookkeeping for attaching and unattaching dynamic listeners. The intention of the code assumed that `HasTraits` instances kept the Python 2 default `__hash__` and `__eq__` semantics, which are based on identity, not value. Python 3 has changed those defaults, and there are some places where we do modify `__eq__` to do value comparisons (e.g. `codetools.contexts`).\r\n\r\nHere, I introduce a new `WeakIDKeyDict` that mostly works like a `weakref.WeakKeyDictionary`, but the key objects are hashed and compared only by their identity and entirely ignore the `__hash__` and `__eq__` implementations on the keys.\r\n\r\nThis also replaces a usage of `WeakKeyDictionary` in the adaptation framework, which has similar issues, though that part of the framework is deprecated in any case."},"comment":{"url":"https://api.github.com/repos/enthought/traits/issues/comments/432143732","html_url":"https://github.com/enthought/traits/pull/410#issuecomment-432143732","issue_url":"https://api.github.com/repos/enthought/traits/issues/410","id":432143732,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjE0MzczMg==","user":{"login":"mdickinson","id":662003,"node_id":"MDQ6VXNlcjY2MjAwMw==","avatar_url":"https://avatars3.githubusercontent.com/u/662003?v=4","gravatar_id":"","url":"https://api.github.com/users/mdickinson","html_url":"https://github.com/mdickinson","followers_url":"https://api.github.com/users/mdickinson/followers","following_url":"https://api.github.com/users/mdickinson/following{/other_user}","gists_url":"https://api.github.com/users/mdickinson/gists{/gist_id}","starred_url":"https://api.github.com/users/mdickinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdickinson/subscriptions","organizations_url":"https://api.github.com/users/mdickinson/orgs","repos_url":"https://api.github.com/users/mdickinson/repos","events_url":"https://api.github.com/users/mdickinson/events{/privacy}","received_events_url":"https://api.github.com/users/mdickinson/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T08:15:28Z","updated_at":"2018-10-23T08:15:28Z","author_association":"MEMBER","body":"> just document the intended use.\r\n\r\nSounds fine to me."}}
{"actor":{"display_login":"mdickinson"}}