{"action":"closed","number":1373,"pull_request":{"url":"https://api.github.com/repos/psychopy/psychopy/pulls/1373","id":111154340,"html_url":"https://github.com/psychopy/psychopy/pull/1373","diff_url":"https://github.com/psychopy/psychopy/pull/1373.diff","patch_url":"https://github.com/psychopy/psychopy/pull/1373.patch","issue_url":"https://api.github.com/repos/psychopy/psychopy/issues/1373","number":1373,"state":"closed","locked":false,"title":"BF: Invalid modifiers were passed to event._onPygletKey()","user":{"login":"hoechenberger","id":2046265,"avatar_url":"https://avatars2.githubusercontent.com/u/2046265?v=3","gravatar_id":"","url":"https://api.github.com/users/hoechenberger","html_url":"https://github.com/hoechenberger","followers_url":"https://api.github.com/users/hoechenberger/followers","following_url":"https://api.github.com/users/hoechenberger/following{/other_user}","gists_url":"https://api.github.com/users/hoechenberger/gists{/gist_id}","starred_url":"https://api.github.com/users/hoechenberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoechenberger/subscriptions","organizations_url":"https://api.github.com/users/hoechenberger/orgs","repos_url":"https://api.github.com/users/hoechenberger/repos","events_url":"https://api.github.com/users/hoechenberger/events{/privacy}","received_events_url":"https://api.github.com/users/hoechenberger/received_events","type":"User","site_admin":false},"body":"When invoking the `event._onPygletKey()` callback function while no modifier key was pressed, pyglet sets the `modifiers` parameter to 0. In fact, this parameter is always an integer, created by OR'ing\r\ndifferent modifier key states. The actual names of the modifier keys can be retrieved by passing this integer to `pyglet.window.key.modifiers_string()`.\r\n\r\nHowever, at many places where `_onPygletKey()` was used to create \"emulated\" key presses, `modifiers=None` was passed. Nobody noticed so far because apparently the modifiers were not further processed in these cases (since, obviously, they were expected to be insignificant / not present). But passing non-integer modifiers is buggy behavior and actually caused issues for me when trying to implement modifier handling for the global event keys (tests incorrectly calling `_onPygletKey(..., modifiers=None)` would not pass anymore).\r\n\r\nThis PR\r\n- replaces all incorrect invocations of `_onPygletKey()` and \r\n- changes the function to raise an exception if non-integer modifiers are supplied.\r\n","created_at":"2017-03-16T20:07:09Z","updated_at":"2017-03-23T10:20:46Z","closed_at":"2017-03-23T10:20:46Z","merged_at":"2017-03-23T10:20:46Z","merge_commit_sha":"0fbd5096357f69d048f936e5dccd86babfd7798a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/psychopy/psychopy/pulls/1373/commits","review_comments_url":"https://api.github.com/repos/psychopy/psychopy/pulls/1373/comments","review_comment_url":"https://api.github.com/repos/psychopy/psychopy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/psychopy/psychopy/issues/1373/comments","statuses_url":"https://api.github.com/repos/psychopy/psychopy/statuses/dc3725e4feb4c011afb6c81eed5566ec3bc813b0","head":{"label":"hoechenberger:modifiers","ref":"modifiers","sha":"dc3725e4feb4c011afb6c81eed5566ec3bc813b0","user":{"login":"hoechenberger","id":2046265,"avatar_url":"https://avatars2.githubusercontent.com/u/2046265?v=3","gravatar_id":"","url":"https://api.github.com/users/hoechenberger","html_url":"https://github.com/hoechenberger","followers_url":"https://api.github.com/users/hoechenberger/followers","following_url":"https://api.github.com/users/hoechenberger/following{/other_user}","gists_url":"https://api.github.com/users/hoechenberger/gists{/gist_id}","starred_url":"https://api.github.com/users/hoechenberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoechenberger/subscriptions","organizations_url":"https://api.github.com/users/hoechenberger/orgs","repos_url":"https://api.github.com/users/hoechenberger/repos","events_url":"https://api.github.com/users/hoechenberger/events{/privacy}","received_events_url":"https://api.github.com/users/hoechenberger/received_events","type":"User","site_admin":false},"repo":{"id":19104637,"name":"psychopy","full_name":"hoechenberger/psychopy","owner":{"login":"hoechenberger","id":2046265,"avatar_url":"https://avatars2.githubusercontent.com/u/2046265?v=3","gravatar_id":"","url":"https://api.github.com/users/hoechenberger","html_url":"https://github.com/hoechenberger","followers_url":"https://api.github.com/users/hoechenberger/followers","following_url":"https://api.github.com/users/hoechenberger/following{/other_user}","gists_url":"https://api.github.com/users/hoechenberger/gists{/gist_id}","starred_url":"https://api.github.com/users/hoechenberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoechenberger/subscriptions","organizations_url":"https://api.github.com/users/hoechenberger/orgs","repos_url":"https://api.github.com/users/hoechenberger/repos","events_url":"https://api.github.com/users/hoechenberger/events{/privacy}","received_events_url":"https://api.github.com/users/hoechenberger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hoechenberger/psychopy","description":"For running psychology and neuroscience experiments","fork":true,"url":"https://api.github.com/repos/hoechenberger/psychopy","forks_url":"https://api.github.com/repos/hoechenberger/psychopy/forks","keys_url":"https://api.github.com/repos/hoechenberger/psychopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hoechenberger/psychopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hoechenberger/psychopy/teams","hooks_url":"https://api.github.com/repos/hoechenberger/psychopy/hooks","issue_events_url":"https://api.github.com/repos/hoechenberger/psychopy/issues/events{/number}","events_url":"https://api.github.com/repos/hoechenberger/psychopy/events","assignees_url":"https://api.github.com/repos/hoechenberger/psychopy/assignees{/user}","branches_url":"https://api.github.com/repos/hoechenberger/psychopy/branches{/branch}","tags_url":"https://api.github.com/repos/hoechenberger/psychopy/tags","blobs_url":"https://api.github.com/repos/hoechenberger/psychopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hoechenberger/psychopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hoechenberger/psychopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/hoechenberger/psychopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hoechenberger/psychopy/statuses/{sha}","languages_url":"https://api.github.com/repos/hoechenberger/psychopy/languages","stargazers_url":"https://api.github.com/repos/hoechenberger/psychopy/stargazers","contributors_url":"https://api.github.com/repos/hoechenberger/psychopy/contributors","subscribers_url":"https://api.github.com/repos/hoechenberger/psychopy/subscribers","subscription_url":"https://api.github.com/repos/hoechenberger/psychopy/subscription","commits_url":"https://api.github.com/repos/hoechenberger/psychopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/hoechenberger/psychopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/hoechenberger/psychopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/hoechenberger/psychopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/hoechenberger/psychopy/contents/{+path}","compare_url":"https://api.github.com/repos/hoechenberger/psychopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hoechenberger/psychopy/merges","archive_url":"https://api.github.com/repos/hoechenberger/psychopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hoechenberger/psychopy/downloads","issues_url":"https://api.github.com/repos/hoechenberger/psychopy/issues{/number}","pulls_url":"https://api.github.com/repos/hoechenberger/psychopy/pulls{/number}","milestones_url":"https://api.github.com/repos/hoechenberger/psychopy/milestones{/number}","notifications_url":"https://api.github.com/repos/hoechenberger/psychopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hoechenberger/psychopy/labels{/name}","releases_url":"https://api.github.com/repos/hoechenberger/psychopy/releases{/id}","deployments_url":"https://api.github.com/repos/hoechenberger/psychopy/deployments","created_at":"2014-04-24T10:29:42Z","updated_at":"2016-05-01T10:08:37Z","pushed_at":"2017-03-18T21:30:26Z","git_url":"git://github.com/hoechenberger/psychopy.git","ssh_url":"git@github.com:hoechenberger/psychopy.git","clone_url":"https://github.com/hoechenberger/psychopy.git","svn_url":"https://github.com/hoechenberger/psychopy","homepage":"http://www.psychopy.org","size":71504,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"psychopy:master","ref":"master","sha":"7adf8166c829358b3d6b03e70284f4736ce28e50","user":{"login":"psychopy","id":381042,"avatar_url":"https://avatars3.githubusercontent.com/u/381042?v=3","gravatar_id":"","url":"https://api.github.com/users/psychopy","html_url":"https://github.com/psychopy","followers_url":"https://api.github.com/users/psychopy/followers","following_url":"https://api.github.com/users/psychopy/following{/other_user}","gists_url":"https://api.github.com/users/psychopy/gists{/gist_id}","starred_url":"https://api.github.com/users/psychopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psychopy/subscriptions","organizations_url":"https://api.github.com/users/psychopy/orgs","repos_url":"https://api.github.com/users/psychopy/repos","events_url":"https://api.github.com/users/psychopy/events{/privacy}","received_events_url":"https://api.github.com/users/psychopy/received_events","type":"Organization","site_admin":false},"repo":{"id":879116,"name":"psychopy","full_name":"psychopy/psychopy","owner":{"login":"psychopy","id":381042,"avatar_url":"https://avatars3.githubusercontent.com/u/381042?v=3","gravatar_id":"","url":"https://api.github.com/users/psychopy","html_url":"https://github.com/psychopy","followers_url":"https://api.github.com/users/psychopy/followers","following_url":"https://api.github.com/users/psychopy/following{/other_user}","gists_url":"https://api.github.com/users/psychopy/gists{/gist_id}","starred_url":"https://api.github.com/users/psychopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psychopy/subscriptions","organizations_url":"https://api.github.com/users/psychopy/orgs","repos_url":"https://api.github.com/users/psychopy/repos","events_url":"https://api.github.com/users/psychopy/events{/privacy}","received_events_url":"https://api.github.com/users/psychopy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/psychopy/psychopy","description":"For running psychology and neuroscience experiments","fork":false,"url":"https://api.github.com/repos/psychopy/psychopy","forks_url":"https://api.github.com/repos/psychopy/psychopy/forks","keys_url":"https://api.github.com/repos/psychopy/psychopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/psychopy/psychopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/psychopy/psychopy/teams","hooks_url":"https://api.github.com/repos/psychopy/psychopy/hooks","issue_events_url":"https://api.github.com/repos/psychopy/psychopy/issues/events{/number}","events_url":"https://api.github.com/repos/psychopy/psychopy/events","assignees_url":"https://api.github.com/repos/psychopy/psychopy/assignees{/user}","branches_url":"https://api.github.com/repos/psychopy/psychopy/branches{/branch}","tags_url":"https://api.github.com/repos/psychopy/psychopy/tags","blobs_url":"https://api.github.com/repos/psychopy/psychopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/psychopy/psychopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/psychopy/psychopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/psychopy/psychopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/psychopy/psychopy/statuses/{sha}","languages_url":"https://api.github.com/repos/psychopy/psychopy/languages","stargazers_url":"https://api.github.com/repos/psychopy/psychopy/stargazers","contributors_url":"https://api.github.com/repos/psychopy/psychopy/contributors","subscribers_url":"https://api.github.com/repos/psychopy/psychopy/subscribers","subscription_url":"https://api.github.com/repos/psychopy/psychopy/subscription","commits_url":"https://api.github.com/repos/psychopy/psychopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/psychopy/psychopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/psychopy/psychopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/psychopy/psychopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/psychopy/psychopy/contents/{+path}","compare_url":"https://api.github.com/repos/psychopy/psychopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/psychopy/psychopy/merges","archive_url":"https://api.github.com/repos/psychopy/psychopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/psychopy/psychopy/downloads","issues_url":"https://api.github.com/repos/psychopy/psychopy/issues{/number}","pulls_url":"https://api.github.com/repos/psychopy/psychopy/pulls{/number}","milestones_url":"https://api.github.com/repos/psychopy/psychopy/milestones{/number}","notifications_url":"https://api.github.com/repos/psychopy/psychopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/psychopy/psychopy/labels{/name}","releases_url":"https://api.github.com/repos/psychopy/psychopy/releases{/id}","deployments_url":"https://api.github.com/repos/psychopy/psychopy/deployments","created_at":"2010-09-01T17:00:04Z","updated_at":"2017-03-19T20:07:52Z","pushed_at":"2017-03-23T10:20:46Z","git_url":"git://github.com/psychopy/psychopy.git","ssh_url":"git@github.com:psychopy/psychopy.git","clone_url":"https://github.com/psychopy/psychopy.git","svn_url":"https://github.com/psychopy/psychopy","homepage":"http://www.psychopy.org","size":134878,"stargazers_count":324,"watchers_count":324,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":270,"mirror_url":null,"open_issues_count":134,"forks":270,"open_issues":134,"watchers":324,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/psychopy/psychopy/pulls/1373"},"html":{"href":"https://github.com/psychopy/psychopy/pull/1373"},"issue":{"href":"https://api.github.com/repos/psychopy/psychopy/issues/1373"},"comments":{"href":"https://api.github.com/repos/psychopy/psychopy/issues/1373/comments"},"review_comments":{"href":"https://api.github.com/repos/psychopy/psychopy/pulls/1373/comments"},"review_comment":{"href":"https://api.github.com/repos/psychopy/psychopy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/psychopy/psychopy/pulls/1373/commits"},"statuses":{"href":"https://api.github.com/repos/psychopy/psychopy/statuses/dc3725e4feb4c011afb6c81eed5566ec3bc813b0"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"peircej","id":380582,"avatar_url":"https://avatars1.githubusercontent.com/u/380582?v=3","gravatar_id":"","url":"https://api.github.com/users/peircej","html_url":"https://github.com/peircej","followers_url":"https://api.github.com/users/peircej/followers","following_url":"https://api.github.com/users/peircej/following{/other_user}","gists_url":"https://api.github.com/users/peircej/gists{/gist_id}","starred_url":"https://api.github.com/users/peircej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peircej/subscriptions","organizations_url":"https://api.github.com/users/peircej/orgs","repos_url":"https://api.github.com/users/peircej/repos","events_url":"https://api.github.com/users/peircej/events{/privacy}","received_events_url":"https://api.github.com/users/peircej/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":41,"deletions":21,"changed_files":6}}
{"actor":{"display_login":"peircej"}}