{"action":"created","comment":{"url":"https://api.github.com/repos/xonsh/xonsh/pulls/comments/75652001","id":75652001,"diff_hunk":"@@ -0,0 +1,101 @@\n+\"\"\"\n+Events for xonsh.\n+\n+In all likelihood, you want builtins.__xonsh_events__\n+\n+The best way to \"declare\" an event is something like::\n+\n+    __xonsh_events__.on_spam.doc(\"Comes with eggs\")\n+\"\"\"\n+\n+\n+class Event(set):","path":"xonsh/events.py","position":12,"original_position":12,"commit_id":"13d1dcdaad41fd7c2d1ea2b4ec391804d80eb88e","original_commit_id":"13d1dcdaad41fd7c2d1ea2b4ec391804d80eb88e","user":{"login":"laerus","id":6930157,"avatar_url":"https://avatars.githubusercontent.com/u/6930157?v=3","gravatar_id":"","url":"https://api.github.com/users/laerus","html_url":"https://github.com/laerus","followers_url":"https://api.github.com/users/laerus/followers","following_url":"https://api.github.com/users/laerus/following{/other_user}","gists_url":"https://api.github.com/users/laerus/gists{/gist_id}","starred_url":"https://api.github.com/users/laerus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laerus/subscriptions","organizations_url":"https://api.github.com/users/laerus/orgs","repos_url":"https://api.github.com/users/laerus/repos","events_url":"https://api.github.com/users/laerus/events{/privacy}","received_events_url":"https://api.github.com/users/laerus/received_events","type":"User","site_admin":false},"body":"better to inherit from `collections.abc.Set` \r\nalthough i'm pro ordered collection aswell","created_at":"2016-08-22T10:14:18Z","updated_at":"2016-08-22T10:14:18Z","html_url":"https://github.com/xonsh/xonsh/pull/1501#discussion_r75652001","pull_request_url":"https://api.github.com/repos/xonsh/xonsh/pulls/1501","_links":{"self":{"href":"https://api.github.com/repos/xonsh/xonsh/pulls/comments/75652001"},"html":{"href":"https://github.com/xonsh/xonsh/pull/1501#discussion_r75652001"},"pull_request":{"href":"https://api.github.com/repos/xonsh/xonsh/pulls/1501"}}},"pull_request":{"url":"https://api.github.com/repos/xonsh/xonsh/pulls/1501","id":79137092,"html_url":"https://github.com/xonsh/xonsh/pull/1501","diff_url":"https://github.com/xonsh/xonsh/pull/1501.diff","patch_url":"https://github.com/xonsh/xonsh/pull/1501.patch","issue_url":"https://api.github.com/repos/xonsh/xonsh/issues/1501","number":1501,"state":"open","locked":false,"title":"Request for Comments: Events","user":{"login":"astronouth7303","id":401438,"avatar_url":"https://avatars.githubusercontent.com/u/401438?v=3","gravatar_id":"","url":"https://api.github.com/users/astronouth7303","html_url":"https://github.com/astronouth7303","followers_url":"https://api.github.com/users/astronouth7303/followers","following_url":"https://api.github.com/users/astronouth7303/following{/other_user}","gists_url":"https://api.github.com/users/astronouth7303/gists{/gist_id}","starred_url":"https://api.github.com/users/astronouth7303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astronouth7303/subscriptions","organizations_url":"https://api.github.com/users/astronouth7303/orgs","repos_url":"https://api.github.com/users/astronouth7303/repos","events_url":"https://api.github.com/users/astronouth7303/events{/privacy}","received_events_url":"https://api.github.com/users/astronouth7303/received_events","type":"User","site_admin":false},"body":"Fixes #1489.\r\n\r\nThis is my stab at an event bus, after talking to @scopatz.\r\n\r\nPlease! Comments, questions, etc! I'm open to any ideas, or even scrapping this entire model of events.\r\n\r\nBasic usage, as it stands:\r\n\r\n```python\r\n@__xonsh_events__.on_precommand\r\ndef myhandler(cmd):\r\n    print(\"About to run command:\", cmd)\r\n```\r\n\r\nThis covers stand-alone functions, static methods, and maybe class methods? Instance methods certainly do not work.\r\n\r\nI believe the docstrings cover most of the usage, even if they currently ignore rst and numpy.","created_at":"2016-07-28T04:53:07Z","updated_at":"2016-08-22T10:14:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd459af071ac19471995ec8aefff88adb824dc31","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xonsh/xonsh/pulls/1501/commits","review_comments_url":"https://api.github.com/repos/xonsh/xonsh/pulls/1501/comments","review_comment_url":"https://api.github.com/repos/xonsh/xonsh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xonsh/xonsh/issues/1501/comments","statuses_url":"https://api.github.com/repos/xonsh/xonsh/statuses/13d1dcdaad41fd7c2d1ea2b4ec391804d80eb88e","head":{"label":"astronouth7303:events","ref":"events","sha":"13d1dcdaad41fd7c2d1ea2b4ec391804d80eb88e","user":{"login":"astronouth7303","id":401438,"avatar_url":"https://avatars.githubusercontent.com/u/401438?v=3","gravatar_id":"","url":"https://api.github.com/users/astronouth7303","html_url":"https://github.com/astronouth7303","followers_url":"https://api.github.com/users/astronouth7303/followers","following_url":"https://api.github.com/users/astronouth7303/following{/other_user}","gists_url":"https://api.github.com/users/astronouth7303/gists{/gist_id}","starred_url":"https://api.github.com/users/astronouth7303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astronouth7303/subscriptions","organizations_url":"https://api.github.com/users/astronouth7303/orgs","repos_url":"https://api.github.com/users/astronouth7303/repos","events_url":"https://api.github.com/users/astronouth7303/events{/privacy}","received_events_url":"https://api.github.com/users/astronouth7303/received_events","type":"User","site_admin":false},"repo":{"id":63803011,"name":"xonsh","full_name":"astronouth7303/xonsh","owner":{"login":"astronouth7303","id":401438,"avatar_url":"https://avatars.githubusercontent.com/u/401438?v=3","gravatar_id":"","url":"https://api.github.com/users/astronouth7303","html_url":"https://github.com/astronouth7303","followers_url":"https://api.github.com/users/astronouth7303/followers","following_url":"https://api.github.com/users/astronouth7303/following{/other_user}","gists_url":"https://api.github.com/users/astronouth7303/gists{/gist_id}","starred_url":"https://api.github.com/users/astronouth7303/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astronouth7303/subscriptions","organizations_url":"https://api.github.com/users/astronouth7303/orgs","repos_url":"https://api.github.com/users/astronouth7303/repos","events_url":"https://api.github.com/users/astronouth7303/events{/privacy}","received_events_url":"https://api.github.com/users/astronouth7303/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/astronouth7303/xonsh","description":"xonsh is a Python-ish, BASHwards-facing shell.","fork":true,"url":"https://api.github.com/repos/astronouth7303/xonsh","forks_url":"https://api.github.com/repos/astronouth7303/xonsh/forks","keys_url":"https://api.github.com/repos/astronouth7303/xonsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astronouth7303/xonsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astronouth7303/xonsh/teams","hooks_url":"https://api.github.com/repos/astronouth7303/xonsh/hooks","issue_events_url":"https://api.github.com/repos/astronouth7303/xonsh/issues/events{/number}","events_url":"https://api.github.com/repos/astronouth7303/xonsh/events","assignees_url":"https://api.github.com/repos/astronouth7303/xonsh/assignees{/user}","branches_url":"https://api.github.com/repos/astronouth7303/xonsh/branches{/branch}","tags_url":"https://api.github.com/repos/astronouth7303/xonsh/tags","blobs_url":"https://api.github.com/repos/astronouth7303/xonsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astronouth7303/xonsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astronouth7303/xonsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/astronouth7303/xonsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astronouth7303/xonsh/statuses/{sha}","languages_url":"https://api.github.com/repos/astronouth7303/xonsh/languages","stargazers_url":"https://api.github.com/repos/astronouth7303/xonsh/stargazers","contributors_url":"https://api.github.com/repos/astronouth7303/xonsh/contributors","subscribers_url":"https://api.github.com/repos/astronouth7303/xonsh/subscribers","subscription_url":"https://api.github.com/repos/astronouth7303/xonsh/subscription","commits_url":"https://api.github.com/repos/astronouth7303/xonsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/astronouth7303/xonsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/astronouth7303/xonsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/astronouth7303/xonsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/astronouth7303/xonsh/contents/{+path}","compare_url":"https://api.github.com/repos/astronouth7303/xonsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astronouth7303/xonsh/merges","archive_url":"https://api.github.com/repos/astronouth7303/xonsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astronouth7303/xonsh/downloads","issues_url":"https://api.github.com/repos/astronouth7303/xonsh/issues{/number}","pulls_url":"https://api.github.com/repos/astronouth7303/xonsh/pulls{/number}","milestones_url":"https://api.github.com/repos/astronouth7303/xonsh/milestones{/number}","notifications_url":"https://api.github.com/repos/astronouth7303/xonsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astronouth7303/xonsh/labels{/name}","releases_url":"https://api.github.com/repos/astronouth7303/xonsh/releases{/id}","deployments_url":"https://api.github.com/repos/astronouth7303/xonsh/deployments","created_at":"2016-07-20T18:00:58Z","updated_at":"2016-07-20T18:00:59Z","pushed_at":"2016-08-17T04:09:23Z","git_url":"git://github.com/astronouth7303/xonsh.git","ssh_url":"git@github.com:astronouth7303/xonsh.git","clone_url":"https://github.com/astronouth7303/xonsh.git","svn_url":"https://github.com/astronouth7303/xonsh","homepage":"http://xon.sh","size":6862,"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":"xonsh:master","ref":"master","sha":"155960a17fefe2a3398e8a57cd45d6def8ba40dd","user":{"login":"xonsh","id":17418188,"avatar_url":"https://avatars.githubusercontent.com/u/17418188?v=3","gravatar_id":"","url":"https://api.github.com/users/xonsh","html_url":"https://github.com/xonsh","followers_url":"https://api.github.com/users/xonsh/followers","following_url":"https://api.github.com/users/xonsh/following{/other_user}","gists_url":"https://api.github.com/users/xonsh/gists{/gist_id}","starred_url":"https://api.github.com/users/xonsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xonsh/subscriptions","organizations_url":"https://api.github.com/users/xonsh/orgs","repos_url":"https://api.github.com/users/xonsh/repos","events_url":"https://api.github.com/users/xonsh/events{/privacy}","received_events_url":"https://api.github.com/users/xonsh/received_events","type":"Organization","site_admin":false},"repo":{"id":29620400,"name":"xonsh","full_name":"xonsh/xonsh","owner":{"login":"xonsh","id":17418188,"avatar_url":"https://avatars.githubusercontent.com/u/17418188?v=3","gravatar_id":"","url":"https://api.github.com/users/xonsh","html_url":"https://github.com/xonsh","followers_url":"https://api.github.com/users/xonsh/followers","following_url":"https://api.github.com/users/xonsh/following{/other_user}","gists_url":"https://api.github.com/users/xonsh/gists{/gist_id}","starred_url":"https://api.github.com/users/xonsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xonsh/subscriptions","organizations_url":"https://api.github.com/users/xonsh/orgs","repos_url":"https://api.github.com/users/xonsh/repos","events_url":"https://api.github.com/users/xonsh/events{/privacy}","received_events_url":"https://api.github.com/users/xonsh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xonsh/xonsh","description":"xonsh is a Python-ish, BASHwards-facing shell.","fork":false,"url":"https://api.github.com/repos/xonsh/xonsh","forks_url":"https://api.github.com/repos/xonsh/xonsh/forks","keys_url":"https://api.github.com/repos/xonsh/xonsh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xonsh/xonsh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xonsh/xonsh/teams","hooks_url":"https://api.github.com/repos/xonsh/xonsh/hooks","issue_events_url":"https://api.github.com/repos/xonsh/xonsh/issues/events{/number}","events_url":"https://api.github.com/repos/xonsh/xonsh/events","assignees_url":"https://api.github.com/repos/xonsh/xonsh/assignees{/user}","branches_url":"https://api.github.com/repos/xonsh/xonsh/branches{/branch}","tags_url":"https://api.github.com/repos/xonsh/xonsh/tags","blobs_url":"https://api.github.com/repos/xonsh/xonsh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xonsh/xonsh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xonsh/xonsh/git/refs{/sha}","trees_url":"https://api.github.com/repos/xonsh/xonsh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xonsh/xonsh/statuses/{sha}","languages_url":"https://api.github.com/repos/xonsh/xonsh/languages","stargazers_url":"https://api.github.com/repos/xonsh/xonsh/stargazers","contributors_url":"https://api.github.com/repos/xonsh/xonsh/contributors","subscribers_url":"https://api.github.com/repos/xonsh/xonsh/subscribers","subscription_url":"https://api.github.com/repos/xonsh/xonsh/subscription","commits_url":"https://api.github.com/repos/xonsh/xonsh/commits{/sha}","git_commits_url":"https://api.github.com/repos/xonsh/xonsh/git/commits{/sha}","comments_url":"https://api.github.com/repos/xonsh/xonsh/comments{/number}","issue_comment_url":"https://api.github.com/repos/xonsh/xonsh/issues/comments{/number}","contents_url":"https://api.github.com/repos/xonsh/xonsh/contents/{+path}","compare_url":"https://api.github.com/repos/xonsh/xonsh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xonsh/xonsh/merges","archive_url":"https://api.github.com/repos/xonsh/xonsh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xonsh/xonsh/downloads","issues_url":"https://api.github.com/repos/xonsh/xonsh/issues{/number}","pulls_url":"https://api.github.com/repos/xonsh/xonsh/pulls{/number}","milestones_url":"https://api.github.com/repos/xonsh/xonsh/milestones{/number}","notifications_url":"https://api.github.com/repos/xonsh/xonsh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xonsh/xonsh/labels{/name}","releases_url":"https://api.github.com/repos/xonsh/xonsh/releases{/id}","deployments_url":"https://api.github.com/repos/xonsh/xonsh/deployments","created_at":"2015-01-21T22:05:27Z","updated_at":"2016-08-22T08:42:47Z","pushed_at":"2016-08-22T02:00:56Z","git_url":"git://github.com/xonsh/xonsh.git","ssh_url":"git@github.com:xonsh/xonsh.git","clone_url":"https://github.com/xonsh/xonsh.git","svn_url":"https://github.com/xonsh/xonsh","homepage":"http://xon.sh","size":8054,"stargazers_count":1654,"watchers_count":1654,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":174,"mirror_url":null,"open_issues_count":238,"forks":174,"open_issues":238,"watchers":1654,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xonsh/xonsh/pulls/1501"},"html":{"href":"https://github.com/xonsh/xonsh/pull/1501"},"issue":{"href":"https://api.github.com/repos/xonsh/xonsh/issues/1501"},"comments":{"href":"https://api.github.com/repos/xonsh/xonsh/issues/1501/comments"},"review_comments":{"href":"https://api.github.com/repos/xonsh/xonsh/pulls/1501/comments"},"review_comment":{"href":"https://api.github.com/repos/xonsh/xonsh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xonsh/xonsh/pulls/1501/commits"},"statuses":{"href":"https://api.github.com/repos/xonsh/xonsh/statuses/13d1dcdaad41fd7c2d1ea2b4ec391804d80eb88e"}}}}
{"actor":{"display_login":"laerus"}}