{"action":"opened","number":1206,"pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/1206","id":34325018,"html_url":"https://github.com/micropython/micropython/pull/1206","diff_url":"https://github.com/micropython/micropython/pull/1206.diff","patch_url":"https://github.com/micropython/micropython/pull/1206.patch","issue_url":"https://api.github.com/repos/micropython/micropython/issues/1206","number":1206,"state":"open","locked":false,"title":"stmhal: Automatically enable IRQs on the USB REPL.","user":{"login":"dhylands","id":127500,"avatar_url":"https://avatars.githubusercontent.com/u/127500?v=3","gravatar_id":"","url":"https://api.github.com/users/dhylands","html_url":"https://github.com/dhylands","followers_url":"https://api.github.com/users/dhylands/followers","following_url":"https://api.github.com/users/dhylands/following{/other_user}","gists_url":"https://api.github.com/users/dhylands/gists{/gist_id}","starred_url":"https://api.github.com/users/dhylands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhylands/subscriptions","organizations_url":"https://api.github.com/users/dhylands/orgs","repos_url":"https://api.github.com/users/dhylands/repos","events_url":"https://api.github.com/users/dhylands/events{/privacy}","received_events_url":"https://api.github.com/users/dhylands/received_events","type":"User","site_admin":false},"body":"This allows errors to be seen and prevents hanging\r\nthe board from doing: pyb.disable_irq()\r\n\r\nFixes #1204 \r\n\r\nPrevisouly, if you typed:\r\n```python\r\n>>> pyb.disable_irq(); raise ValueError(\"whoops\")\r\n```\r\nthen that's all you'd see. You'd never get a REPL prompt back. With this PR, you'll now see the following:\r\n```python\r\n>>> x = pyb.disable_irq(); raise ValueError(\"whoops\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nValueError: whoops\r\nEnabling IRQs so you can read this\r\n>>>\r\n```","created_at":"2015-04-29T00:30:42Z","updated_at":"2015-04-29T00:30:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/micropython/micropython/pulls/1206/commits","review_comments_url":"https://api.github.com/repos/micropython/micropython/pulls/1206/comments","review_comment_url":"https://api.github.com/repos/micropython/micropython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/1206/comments","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/9a8ed26c82372ec292c477d6418cd504b51c628f","head":{"label":"dhylands:enable-repl-irq","ref":"enable-repl-irq","sha":"9a8ed26c82372ec292c477d6418cd504b51c628f","user":{"login":"dhylands","id":127500,"avatar_url":"https://avatars.githubusercontent.com/u/127500?v=3","gravatar_id":"","url":"https://api.github.com/users/dhylands","html_url":"https://github.com/dhylands","followers_url":"https://api.github.com/users/dhylands/followers","following_url":"https://api.github.com/users/dhylands/following{/other_user}","gists_url":"https://api.github.com/users/dhylands/gists{/gist_id}","starred_url":"https://api.github.com/users/dhylands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhylands/subscriptions","organizations_url":"https://api.github.com/users/dhylands/orgs","repos_url":"https://api.github.com/users/dhylands/repos","events_url":"https://api.github.com/users/dhylands/events{/privacy}","received_events_url":"https://api.github.com/users/dhylands/received_events","type":"User","site_admin":false},"repo":{"id":15645703,"name":"micropython","full_name":"dhylands/micropython","owner":{"login":"dhylands","id":127500,"avatar_url":"https://avatars.githubusercontent.com/u/127500?v=3","gravatar_id":"","url":"https://api.github.com/users/dhylands","html_url":"https://github.com/dhylands","followers_url":"https://api.github.com/users/dhylands/followers","following_url":"https://api.github.com/users/dhylands/following{/other_user}","gists_url":"https://api.github.com/users/dhylands/gists{/gist_id}","starred_url":"https://api.github.com/users/dhylands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhylands/subscriptions","organizations_url":"https://api.github.com/users/dhylands/orgs","repos_url":"https://api.github.com/users/dhylands/repos","events_url":"https://api.github.com/users/dhylands/events{/privacy}","received_events_url":"https://api.github.com/users/dhylands/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhylands/micropython","description":"The Micro Python project","fork":true,"url":"https://api.github.com/repos/dhylands/micropython","forks_url":"https://api.github.com/repos/dhylands/micropython/forks","keys_url":"https://api.github.com/repos/dhylands/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhylands/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhylands/micropython/teams","hooks_url":"https://api.github.com/repos/dhylands/micropython/hooks","issue_events_url":"https://api.github.com/repos/dhylands/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/dhylands/micropython/events","assignees_url":"https://api.github.com/repos/dhylands/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/dhylands/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/dhylands/micropython/tags","blobs_url":"https://api.github.com/repos/dhylands/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhylands/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhylands/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhylands/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhylands/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/dhylands/micropython/languages","stargazers_url":"https://api.github.com/repos/dhylands/micropython/stargazers","contributors_url":"https://api.github.com/repos/dhylands/micropython/contributors","subscribers_url":"https://api.github.com/repos/dhylands/micropython/subscribers","subscription_url":"https://api.github.com/repos/dhylands/micropython/subscription","commits_url":"https://api.github.com/repos/dhylands/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhylands/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhylands/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhylands/micropython/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhylands/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/dhylands/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhylands/micropython/merges","archive_url":"https://api.github.com/repos/dhylands/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhylands/micropython/downloads","issues_url":"https://api.github.com/repos/dhylands/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/dhylands/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/dhylands/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/dhylands/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhylands/micropython/labels{/name}","releases_url":"https://api.github.com/repos/dhylands/micropython/releases{/id}","created_at":"2014-01-05T04:53:16Z","updated_at":"2014-10-21T23:09:28Z","pushed_at":"2015-04-29T00:28:18Z","git_url":"git://github.com/dhylands/micropython.git","ssh_url":"git@github.com:dhylands/micropython.git","clone_url":"https://github.com/dhylands/micropython.git","svn_url":"https://github.com/dhylands/micropython","homepage":null,"size":19395,"stargazers_count":4,"watchers_count":4,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":4,"default_branch":"master"}},"base":{"label":"micropython:master","ref":"master","sha":"f27aa27a0c91dac8f3abe300c5de2c01342fd20d","user":{"login":"micropython","id":6298560,"avatar_url":"https://avatars.githubusercontent.com/u/6298560?v=3","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"repo":{"id":15337142,"name":"micropython","full_name":"micropython/micropython","owner":{"login":"micropython","id":6298560,"avatar_url":"https://avatars.githubusercontent.com/u/6298560?v=3","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micropython/micropython","description":"The Micro Python project","fork":false,"url":"https://api.github.com/repos/micropython/micropython","forks_url":"https://api.github.com/repos/micropython/micropython/forks","keys_url":"https://api.github.com/repos/micropython/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micropython/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micropython/micropython/teams","hooks_url":"https://api.github.com/repos/micropython/micropython/hooks","issue_events_url":"https://api.github.com/repos/micropython/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/micropython/micropython/events","assignees_url":"https://api.github.com/repos/micropython/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/micropython/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/micropython/micropython/tags","blobs_url":"https://api.github.com/repos/micropython/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micropython/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micropython/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/micropython/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/micropython/micropython/languages","stargazers_url":"https://api.github.com/repos/micropython/micropython/stargazers","contributors_url":"https://api.github.com/repos/micropython/micropython/contributors","subscribers_url":"https://api.github.com/repos/micropython/micropython/subscribers","subscription_url":"https://api.github.com/repos/micropython/micropython/subscription","commits_url":"https://api.github.com/repos/micropython/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/micropython/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/micropython/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/micropython/micropython/issues/comments{/number}","contents_url":"https://api.github.com/repos/micropython/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/micropython/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micropython/micropython/merges","archive_url":"https://api.github.com/repos/micropython/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micropython/micropython/downloads","issues_url":"https://api.github.com/repos/micropython/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/micropython/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/micropython/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/micropython/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micropython/micropython/labels{/name}","releases_url":"https://api.github.com/repos/micropython/micropython/releases{/id}","created_at":"2013-12-20T11:47:07Z","updated_at":"2015-04-29T00:02:36Z","pushed_at":"2015-04-29T00:02:36Z","git_url":"git://github.com/micropython/micropython.git","ssh_url":"git@github.com:micropython/micropython.git","clone_url":"https://github.com/micropython/micropython.git","svn_url":"https://github.com/micropython/micropython","homepage":null,"size":44527,"stargazers_count":1720,"watchers_count":1720,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":319,"mirror_url":null,"open_issues_count":107,"forks":319,"open_issues":107,"watchers":1720,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython/pulls/1206"},"html":{"href":"https://github.com/micropython/micropython/pull/1206"},"issue":{"href":"https://api.github.com/repos/micropython/micropython/issues/1206"},"comments":{"href":"https://api.github.com/repos/micropython/micropython/issues/1206/comments"},"review_comments":{"href":"https://api.github.com/repos/micropython/micropython/pulls/1206/comments"},"review_comment":{"href":"https://api.github.com/repos/micropython/micropython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/micropython/micropython/pulls/1206/commits"},"statuses":{"href":"https://api.github.com/repos/micropython/micropython/statuses/9a8ed26c82372ec292c477d6418cd504b51c628f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":12,"deletions":0,"changed_files":1}}