{"action":"closed","number":3217,"pull_request":{"url":"https://api.github.com/repos/biolab/orange3/pulls/3217","id":212334443,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMzM0NDQz","html_url":"https://github.com/biolab/orange3/pull/3217","diff_url":"https://github.com/biolab/orange3/pull/3217.diff","patch_url":"https://github.com/biolab/orange3/pull/3217.patch","issue_url":"https://api.github.com/repos/biolab/orange3/issues/3217","number":3217,"state":"closed","locked":false,"title":"[FIX] Variable: Prevent hashing of Values of DiscreteVariable.","user":{"login":"thocevar","id":919223,"node_id":"MDQ6VXNlcjkxOTIyMw==","avatar_url":"https://avatars3.githubusercontent.com/u/919223?v=4","gravatar_id":"","url":"https://api.github.com/users/thocevar","html_url":"https://github.com/thocevar","followers_url":"https://api.github.com/users/thocevar/followers","following_url":"https://api.github.com/users/thocevar/following{/other_user}","gists_url":"https://api.github.com/users/thocevar/gists{/gist_id}","starred_url":"https://api.github.com/users/thocevar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thocevar/subscriptions","organizations_url":"https://api.github.com/users/thocevar/orgs","repos_url":"https://api.github.com/users/thocevar/repos","events_url":"https://api.github.com/users/thocevar/events{/privacy}","received_events_url":"https://api.github.com/users/thocevar/received_events","type":"User","site_admin":false},"body":"##### Issue\r\nValues of StringVariable are hashed incorrectly (fixes #2912).\r\n\r\nValues of DiscreteVariable are impossible to hash as dictated by the `__eq__` function. For example:\r\n```\r\nfrom Orange.data.variable import *\r\nval = Value(DiscreteVariable(\"var\", [\"red\",\"green\",\"blue\"]), 1)\r\nprint(val == 1, hash(val) == hash(1))  # True True\r\nprint(val == \"green\", hash(val) == hash(\"green\"))  # True False\r\n```\r\n\r\n##### Description of changes\r\nAs we can not make `hash(1) == hash(\"green\")`, we prevent hashing of Values of DiscreteVariables with an exception. Users should hash directly ids or domain values instead.\r\n\r\nThis might break things that use dictionaries or sets of Values. However, the tests didn't discover any such cases.\r\n\r\n##### Includes\r\n- [X] Code changes\r\n- [X] Tests\r\n- [ ] Documentation\r\n","created_at":"2018-08-31T10:02:19Z","updated_at":"2018-08-31T11:39:02Z","closed_at":"2018-08-31T11:39:02Z","merged_at":"2018-08-31T11:39:01Z","merge_commit_sha":"7857c4be27105f2240917f6a33f6681dd58c3b9f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/biolab/orange3/pulls/3217/commits","review_comments_url":"https://api.github.com/repos/biolab/orange3/pulls/3217/comments","review_comment_url":"https://api.github.com/repos/biolab/orange3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biolab/orange3/issues/3217/comments","statuses_url":"https://api.github.com/repos/biolab/orange3/statuses/a2cb09f2f208e4f8756eec6cd428e2f56ca7acb9","head":{"label":"thocevar:valuehash","ref":"valuehash","sha":"a2cb09f2f208e4f8756eec6cd428e2f56ca7acb9","user":{"login":"thocevar","id":919223,"node_id":"MDQ6VXNlcjkxOTIyMw==","avatar_url":"https://avatars3.githubusercontent.com/u/919223?v=4","gravatar_id":"","url":"https://api.github.com/users/thocevar","html_url":"https://github.com/thocevar","followers_url":"https://api.github.com/users/thocevar/followers","following_url":"https://api.github.com/users/thocevar/following{/other_user}","gists_url":"https://api.github.com/users/thocevar/gists{/gist_id}","starred_url":"https://api.github.com/users/thocevar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thocevar/subscriptions","organizations_url":"https://api.github.com/users/thocevar/orgs","repos_url":"https://api.github.com/users/thocevar/repos","events_url":"https://api.github.com/users/thocevar/events{/privacy}","received_events_url":"https://api.github.com/users/thocevar/received_events","type":"User","site_admin":false},"repo":{"id":23949896,"node_id":"MDEwOlJlcG9zaXRvcnkyMzk0OTg5Ng==","name":"orange3","full_name":"thocevar/orange3","owner":{"login":"thocevar","id":919223,"node_id":"MDQ6VXNlcjkxOTIyMw==","avatar_url":"https://avatars3.githubusercontent.com/u/919223?v=4","gravatar_id":"","url":"https://api.github.com/users/thocevar","html_url":"https://github.com/thocevar","followers_url":"https://api.github.com/users/thocevar/followers","following_url":"https://api.github.com/users/thocevar/following{/other_user}","gists_url":"https://api.github.com/users/thocevar/gists{/gist_id}","starred_url":"https://api.github.com/users/thocevar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thocevar/subscriptions","organizations_url":"https://api.github.com/users/thocevar/orgs","repos_url":"https://api.github.com/users/thocevar/repos","events_url":"https://api.github.com/users/thocevar/events{/privacy}","received_events_url":"https://api.github.com/users/thocevar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thocevar/orange3","description":null,"fork":true,"url":"https://api.github.com/repos/thocevar/orange3","forks_url":"https://api.github.com/repos/thocevar/orange3/forks","keys_url":"https://api.github.com/repos/thocevar/orange3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thocevar/orange3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thocevar/orange3/teams","hooks_url":"https://api.github.com/repos/thocevar/orange3/hooks","issue_events_url":"https://api.github.com/repos/thocevar/orange3/issues/events{/number}","events_url":"https://api.github.com/repos/thocevar/orange3/events","assignees_url":"https://api.github.com/repos/thocevar/orange3/assignees{/user}","branches_url":"https://api.github.com/repos/thocevar/orange3/branches{/branch}","tags_url":"https://api.github.com/repos/thocevar/orange3/tags","blobs_url":"https://api.github.com/repos/thocevar/orange3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thocevar/orange3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thocevar/orange3/git/refs{/sha}","trees_url":"https://api.github.com/repos/thocevar/orange3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thocevar/orange3/statuses/{sha}","languages_url":"https://api.github.com/repos/thocevar/orange3/languages","stargazers_url":"https://api.github.com/repos/thocevar/orange3/stargazers","contributors_url":"https://api.github.com/repos/thocevar/orange3/contributors","subscribers_url":"https://api.github.com/repos/thocevar/orange3/subscribers","subscription_url":"https://api.github.com/repos/thocevar/orange3/subscription","commits_url":"https://api.github.com/repos/thocevar/orange3/commits{/sha}","git_commits_url":"https://api.github.com/repos/thocevar/orange3/git/commits{/sha}","comments_url":"https://api.github.com/repos/thocevar/orange3/comments{/number}","issue_comment_url":"https://api.github.com/repos/thocevar/orange3/issues/comments{/number}","contents_url":"https://api.github.com/repos/thocevar/orange3/contents/{+path}","compare_url":"https://api.github.com/repos/thocevar/orange3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thocevar/orange3/merges","archive_url":"https://api.github.com/repos/thocevar/orange3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thocevar/orange3/downloads","issues_url":"https://api.github.com/repos/thocevar/orange3/issues{/number}","pulls_url":"https://api.github.com/repos/thocevar/orange3/pulls{/number}","milestones_url":"https://api.github.com/repos/thocevar/orange3/milestones{/number}","notifications_url":"https://api.github.com/repos/thocevar/orange3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thocevar/orange3/labels{/name}","releases_url":"https://api.github.com/repos/thocevar/orange3/releases{/id}","deployments_url":"https://api.github.com/repos/thocevar/orange3/deployments","created_at":"2014-09-12T06:45:54Z","updated_at":"2018-07-31T08:21:28Z","pushed_at":"2018-08-31T10:30:08Z","git_url":"git://github.com/thocevar/orange3.git","ssh_url":"git@github.com:thocevar/orange3.git","clone_url":"https://github.com/thocevar/orange3.git","svn_url":"https://github.com/thocevar/orange3","homepage":null,"size":69353,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biolab:master","ref":"master","sha":"33d7012b09321ea69fb42f33527ddf3419e0d352","user":{"login":"biolab","id":555189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1NTE4OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/555189?v=4","gravatar_id":"","url":"https://api.github.com/users/biolab","html_url":"https://github.com/biolab","followers_url":"https://api.github.com/users/biolab/followers","following_url":"https://api.github.com/users/biolab/following{/other_user}","gists_url":"https://api.github.com/users/biolab/gists{/gist_id}","starred_url":"https://api.github.com/users/biolab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biolab/subscriptions","organizations_url":"https://api.github.com/users/biolab/orgs","repos_url":"https://api.github.com/users/biolab/repos","events_url":"https://api.github.com/users/biolab/events{/privacy}","received_events_url":"https://api.github.com/users/biolab/received_events","type":"Organization","site_admin":false},"repo":{"id":8357227,"node_id":"MDEwOlJlcG9zaXRvcnk4MzU3MjI3","name":"orange3","full_name":"biolab/orange3","owner":{"login":"biolab","id":555189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1NTE4OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/555189?v=4","gravatar_id":"","url":"https://api.github.com/users/biolab","html_url":"https://github.com/biolab","followers_url":"https://api.github.com/users/biolab/followers","following_url":"https://api.github.com/users/biolab/following{/other_user}","gists_url":"https://api.github.com/users/biolab/gists{/gist_id}","starred_url":"https://api.github.com/users/biolab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biolab/subscriptions","organizations_url":"https://api.github.com/users/biolab/orgs","repos_url":"https://api.github.com/users/biolab/repos","events_url":"https://api.github.com/users/biolab/events{/privacy}","received_events_url":"https://api.github.com/users/biolab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biolab/orange3","description":"🍊 :bar_chart: :bulb: Orange: Interactive data analysis https://orange.biolab.si","fork":false,"url":"https://api.github.com/repos/biolab/orange3","forks_url":"https://api.github.com/repos/biolab/orange3/forks","keys_url":"https://api.github.com/repos/biolab/orange3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biolab/orange3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biolab/orange3/teams","hooks_url":"https://api.github.com/repos/biolab/orange3/hooks","issue_events_url":"https://api.github.com/repos/biolab/orange3/issues/events{/number}","events_url":"https://api.github.com/repos/biolab/orange3/events","assignees_url":"https://api.github.com/repos/biolab/orange3/assignees{/user}","branches_url":"https://api.github.com/repos/biolab/orange3/branches{/branch}","tags_url":"https://api.github.com/repos/biolab/orange3/tags","blobs_url":"https://api.github.com/repos/biolab/orange3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biolab/orange3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biolab/orange3/git/refs{/sha}","trees_url":"https://api.github.com/repos/biolab/orange3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biolab/orange3/statuses/{sha}","languages_url":"https://api.github.com/repos/biolab/orange3/languages","stargazers_url":"https://api.github.com/repos/biolab/orange3/stargazers","contributors_url":"https://api.github.com/repos/biolab/orange3/contributors","subscribers_url":"https://api.github.com/repos/biolab/orange3/subscribers","subscription_url":"https://api.github.com/repos/biolab/orange3/subscription","commits_url":"https://api.github.com/repos/biolab/orange3/commits{/sha}","git_commits_url":"https://api.github.com/repos/biolab/orange3/git/commits{/sha}","comments_url":"https://api.github.com/repos/biolab/orange3/comments{/number}","issue_comment_url":"https://api.github.com/repos/biolab/orange3/issues/comments{/number}","contents_url":"https://api.github.com/repos/biolab/orange3/contents/{+path}","compare_url":"https://api.github.com/repos/biolab/orange3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biolab/orange3/merges","archive_url":"https://api.github.com/repos/biolab/orange3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biolab/orange3/downloads","issues_url":"https://api.github.com/repos/biolab/orange3/issues{/number}","pulls_url":"https://api.github.com/repos/biolab/orange3/pulls{/number}","milestones_url":"https://api.github.com/repos/biolab/orange3/milestones{/number}","notifications_url":"https://api.github.com/repos/biolab/orange3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biolab/orange3/labels{/name}","releases_url":"https://api.github.com/repos/biolab/orange3/releases{/id}","deployments_url":"https://api.github.com/repos/biolab/orange3/deployments","created_at":"2013-02-22T12:52:56Z","updated_at":"2018-08-31T09:58:58Z","pushed_at":"2018-08-31T11:39:01Z","git_url":"git://github.com/biolab/orange3.git","ssh_url":"git@github.com:biolab/orange3.git","clone_url":"https://github.com/biolab/orange3.git","svn_url":"https://github.com/biolab/orange3","homepage":"","size":69323,"stargazers_count":1433,"watchers_count":1433,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":427,"mirror_url":null,"archived":false,"open_issues_count":212,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":427,"open_issues":212,"watchers":1433,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biolab/orange3/pulls/3217"},"html":{"href":"https://github.com/biolab/orange3/pull/3217"},"issue":{"href":"https://api.github.com/repos/biolab/orange3/issues/3217"},"comments":{"href":"https://api.github.com/repos/biolab/orange3/issues/3217/comments"},"review_comments":{"href":"https://api.github.com/repos/biolab/orange3/pulls/3217/comments"},"review_comment":{"href":"https://api.github.com/repos/biolab/orange3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biolab/orange3/pulls/3217/commits"},"statuses":{"href":"https://api.github.com/repos/biolab/orange3/statuses/a2cb09f2f208e4f8756eec6cd428e2f56ca7acb9"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"astaric","id":588601,"node_id":"MDQ6VXNlcjU4ODYwMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/588601?v=4","gravatar_id":"","url":"https://api.github.com/users/astaric","html_url":"https://github.com/astaric","followers_url":"https://api.github.com/users/astaric/followers","following_url":"https://api.github.com/users/astaric/following{/other_user}","gists_url":"https://api.github.com/users/astaric/gists{/gist_id}","starred_url":"https://api.github.com/users/astaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astaric/subscriptions","organizations_url":"https://api.github.com/users/astaric/orgs","repos_url":"https://api.github.com/users/astaric/repos","events_url":"https://api.github.com/users/astaric/events{/privacy}","received_events_url":"https://api.github.com/users/astaric/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":21,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"astaric"}}