{"action":"created","comment":{"url":"https://api.github.com/repos/dropbox/pyston/pulls/comments/50657558","id":50657558,"diff_hunk":"@@ -1,3 +1,19 @@\n # should_error\n+import re\n+\n class foo(slice):\n    pass\n+\n+class C(type(xrange(1))):","path":"test/tests/builtin_type_not_subclassable.py","position":7,"original_position":7,"commit_id":"86a14379a156b56b2fa30914b8522f77756c604f","original_commit_id":"86a14379a156b56b2fa30914b8522f77756c604f","user":{"login":"kmod","id":271916,"avatar_url":"https://avatars.githubusercontent.com/u/271916?v=3","gravatar_id":"","url":"https://api.github.com/users/kmod","html_url":"https://github.com/kmod","followers_url":"https://api.github.com/users/kmod/followers","following_url":"https://api.github.com/users/kmod/following{/other_user}","gists_url":"https://api.github.com/users/kmod/gists{/gist_id}","starred_url":"https://api.github.com/users/kmod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmod/subscriptions","organizations_url":"https://api.github.com/users/kmod/orgs","repos_url":"https://api.github.com/users/kmod/repos","events_url":"https://api.github.com/users/kmod/events{/privacy}","received_events_url":"https://api.github.com/users/kmod/received_events","type":"User","site_admin":false},"body":"We should try to avoid using `#should_error` now -- it's pretty much only for tests that are supposed to crash.  You could try doing something like.\r\n\r\n```python\r\ndef is_subclassable(base_cls):\r\n  try:\r\n    class C(base_cls):\r\n      pass\r\n  except TypeError:\r\n    return false\r\n  return true\r\n\r\nassert is_subclassable(int)\r\nassert not is_subclassable(slice)\r\nassert not is_subclassable(type(xrange(1)))\r\n```","created_at":"2016-01-25T06:35:53Z","updated_at":"2016-01-25T06:35:53Z","html_url":"https://github.com/dropbox/pyston/pull/1061#discussion_r50657558","pull_request_url":"https://api.github.com/repos/dropbox/pyston/pulls/1061","_links":{"self":{"href":"https://api.github.com/repos/dropbox/pyston/pulls/comments/50657558"},"html":{"href":"https://github.com/dropbox/pyston/pull/1061#discussion_r50657558"},"pull_request":{"href":"https://api.github.com/repos/dropbox/pyston/pulls/1061"}}},"pull_request":{"url":"https://api.github.com/repos/dropbox/pyston/pulls/1061","id":56482806,"html_url":"https://github.com/dropbox/pyston/pull/1061","diff_url":"https://github.com/dropbox/pyston/pull/1061.diff","patch_url":"https://github.com/dropbox/pyston/pull/1061.patch","issue_url":"https://api.github.com/repos/dropbox/pyston/issues/1061","number":1061,"state":"open","locked":false,"title":"Add list of not subclassable class","user":{"login":"corona10","id":5110323,"avatar_url":"https://avatars.githubusercontent.com/u/5110323?v=3","gravatar_id":"","url":"https://api.github.com/users/corona10","html_url":"https://github.com/corona10","followers_url":"https://api.github.com/users/corona10/followers","following_url":"https://api.github.com/users/corona10/following{/other_user}","gists_url":"https://api.github.com/users/corona10/gists{/gist_id}","starred_url":"https://api.github.com/users/corona10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corona10/subscriptions","organizations_url":"https://api.github.com/users/corona10/orgs","repos_url":"https://api.github.com/users/corona10/repos","events_url":"https://api.github.com/users/corona10/events{/privacy}","received_events_url":"https://api.github.com/users/corona10/received_events","type":"User","site_admin":false},"body":"As we descuss about [not subclassable class] at #1038\r\ni got  lists of 'should not be subclassalbe class' by `grep -L -e \"Py_TPFLAGS_BASETYPE\" Objects/  -R`\r\nand check tp_name if tp_name is not subclassable type.\r\nthan I off the `Py_TPFLAGS_BASETYPE`","created_at":"2016-01-19T15:41:27Z","updated_at":"2016-01-25T06:35:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b7e531534adb6379dc072c91d5a1cec77f071fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dropbox/pyston/pulls/1061/commits","review_comments_url":"https://api.github.com/repos/dropbox/pyston/pulls/1061/comments","review_comment_url":"https://api.github.com/repos/dropbox/pyston/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dropbox/pyston/issues/1061/comments","statuses_url":"https://api.github.com/repos/dropbox/pyston/statuses/86a14379a156b56b2fa30914b8522f77756c604f","head":{"label":"corona10:subclass","ref":"subclass","sha":"86a14379a156b56b2fa30914b8522f77756c604f","user":{"login":"corona10","id":5110323,"avatar_url":"https://avatars.githubusercontent.com/u/5110323?v=3","gravatar_id":"","url":"https://api.github.com/users/corona10","html_url":"https://github.com/corona10","followers_url":"https://api.github.com/users/corona10/followers","following_url":"https://api.github.com/users/corona10/following{/other_user}","gists_url":"https://api.github.com/users/corona10/gists{/gist_id}","starred_url":"https://api.github.com/users/corona10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corona10/subscriptions","organizations_url":"https://api.github.com/users/corona10/orgs","repos_url":"https://api.github.com/users/corona10/repos","events_url":"https://api.github.com/users/corona10/events{/privacy}","received_events_url":"https://api.github.com/users/corona10/received_events","type":"User","site_admin":false},"repo":{"id":39628753,"name":"pyston","full_name":"corona10/pyston","owner":{"login":"corona10","id":5110323,"avatar_url":"https://avatars.githubusercontent.com/u/5110323?v=3","gravatar_id":"","url":"https://api.github.com/users/corona10","html_url":"https://github.com/corona10","followers_url":"https://api.github.com/users/corona10/followers","following_url":"https://api.github.com/users/corona10/following{/other_user}","gists_url":"https://api.github.com/users/corona10/gists{/gist_id}","starred_url":"https://api.github.com/users/corona10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corona10/subscriptions","organizations_url":"https://api.github.com/users/corona10/orgs","repos_url":"https://api.github.com/users/corona10/repos","events_url":"https://api.github.com/users/corona10/events{/privacy}","received_events_url":"https://api.github.com/users/corona10/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/corona10/pyston","description":"An open-source Python implementation using JIT techniques. ","fork":true,"url":"https://api.github.com/repos/corona10/pyston","forks_url":"https://api.github.com/repos/corona10/pyston/forks","keys_url":"https://api.github.com/repos/corona10/pyston/keys{/key_id}","collaborators_url":"https://api.github.com/repos/corona10/pyston/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/corona10/pyston/teams","hooks_url":"https://api.github.com/repos/corona10/pyston/hooks","issue_events_url":"https://api.github.com/repos/corona10/pyston/issues/events{/number}","events_url":"https://api.github.com/repos/corona10/pyston/events","assignees_url":"https://api.github.com/repos/corona10/pyston/assignees{/user}","branches_url":"https://api.github.com/repos/corona10/pyston/branches{/branch}","tags_url":"https://api.github.com/repos/corona10/pyston/tags","blobs_url":"https://api.github.com/repos/corona10/pyston/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/corona10/pyston/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/corona10/pyston/git/refs{/sha}","trees_url":"https://api.github.com/repos/corona10/pyston/git/trees{/sha}","statuses_url":"https://api.github.com/repos/corona10/pyston/statuses/{sha}","languages_url":"https://api.github.com/repos/corona10/pyston/languages","stargazers_url":"https://api.github.com/repos/corona10/pyston/stargazers","contributors_url":"https://api.github.com/repos/corona10/pyston/contributors","subscribers_url":"https://api.github.com/repos/corona10/pyston/subscribers","subscription_url":"https://api.github.com/repos/corona10/pyston/subscription","commits_url":"https://api.github.com/repos/corona10/pyston/commits{/sha}","git_commits_url":"https://api.github.com/repos/corona10/pyston/git/commits{/sha}","comments_url":"https://api.github.com/repos/corona10/pyston/comments{/number}","issue_comment_url":"https://api.github.com/repos/corona10/pyston/issues/comments{/number}","contents_url":"https://api.github.com/repos/corona10/pyston/contents/{+path}","compare_url":"https://api.github.com/repos/corona10/pyston/compare/{base}...{head}","merges_url":"https://api.github.com/repos/corona10/pyston/merges","archive_url":"https://api.github.com/repos/corona10/pyston/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/corona10/pyston/downloads","issues_url":"https://api.github.com/repos/corona10/pyston/issues{/number}","pulls_url":"https://api.github.com/repos/corona10/pyston/pulls{/number}","milestones_url":"https://api.github.com/repos/corona10/pyston/milestones{/number}","notifications_url":"https://api.github.com/repos/corona10/pyston/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/corona10/pyston/labels{/name}","releases_url":"https://api.github.com/repos/corona10/pyston/releases{/id}","deployments_url":"https://api.github.com/repos/corona10/pyston/deployments","created_at":"2015-07-24T11:19:24Z","updated_at":"2016-01-13T08:32:42Z","pushed_at":"2016-01-25T05:44:17Z","git_url":"git://github.com/corona10/pyston.git","ssh_url":"git@github.com:corona10/pyston.git","clone_url":"https://github.com/corona10/pyston.git","svn_url":"https://github.com/corona10/pyston","homepage":"https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation/","size":30170,"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":"dropbox:master","ref":"master","sha":"a32e3a412e739ff2d419a69568528f9fc7860330","user":{"login":"dropbox","id":559357,"avatar_url":"https://avatars.githubusercontent.com/u/559357?v=3","gravatar_id":"","url":"https://api.github.com/users/dropbox","html_url":"https://github.com/dropbox","followers_url":"https://api.github.com/users/dropbox/followers","following_url":"https://api.github.com/users/dropbox/following{/other_user}","gists_url":"https://api.github.com/users/dropbox/gists{/gist_id}","starred_url":"https://api.github.com/users/dropbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dropbox/subscriptions","organizations_url":"https://api.github.com/users/dropbox/orgs","repos_url":"https://api.github.com/users/dropbox/repos","events_url":"https://api.github.com/users/dropbox/events{/privacy}","received_events_url":"https://api.github.com/users/dropbox/received_events","type":"Organization","site_admin":false},"repo":{"id":18320947,"name":"pyston","full_name":"dropbox/pyston","owner":{"login":"dropbox","id":559357,"avatar_url":"https://avatars.githubusercontent.com/u/559357?v=3","gravatar_id":"","url":"https://api.github.com/users/dropbox","html_url":"https://github.com/dropbox","followers_url":"https://api.github.com/users/dropbox/followers","following_url":"https://api.github.com/users/dropbox/following{/other_user}","gists_url":"https://api.github.com/users/dropbox/gists{/gist_id}","starred_url":"https://api.github.com/users/dropbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dropbox/subscriptions","organizations_url":"https://api.github.com/users/dropbox/orgs","repos_url":"https://api.github.com/users/dropbox/repos","events_url":"https://api.github.com/users/dropbox/events{/privacy}","received_events_url":"https://api.github.com/users/dropbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dropbox/pyston","description":"An open-source Python implementation using JIT techniques. ","fork":false,"url":"https://api.github.com/repos/dropbox/pyston","forks_url":"https://api.github.com/repos/dropbox/pyston/forks","keys_url":"https://api.github.com/repos/dropbox/pyston/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dropbox/pyston/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dropbox/pyston/teams","hooks_url":"https://api.github.com/repos/dropbox/pyston/hooks","issue_events_url":"https://api.github.com/repos/dropbox/pyston/issues/events{/number}","events_url":"https://api.github.com/repos/dropbox/pyston/events","assignees_url":"https://api.github.com/repos/dropbox/pyston/assignees{/user}","branches_url":"https://api.github.com/repos/dropbox/pyston/branches{/branch}","tags_url":"https://api.github.com/repos/dropbox/pyston/tags","blobs_url":"https://api.github.com/repos/dropbox/pyston/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dropbox/pyston/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dropbox/pyston/git/refs{/sha}","trees_url":"https://api.github.com/repos/dropbox/pyston/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dropbox/pyston/statuses/{sha}","languages_url":"https://api.github.com/repos/dropbox/pyston/languages","stargazers_url":"https://api.github.com/repos/dropbox/pyston/stargazers","contributors_url":"https://api.github.com/repos/dropbox/pyston/contributors","subscribers_url":"https://api.github.com/repos/dropbox/pyston/subscribers","subscription_url":"https://api.github.com/repos/dropbox/pyston/subscription","commits_url":"https://api.github.com/repos/dropbox/pyston/commits{/sha}","git_commits_url":"https://api.github.com/repos/dropbox/pyston/git/commits{/sha}","comments_url":"https://api.github.com/repos/dropbox/pyston/comments{/number}","issue_comment_url":"https://api.github.com/repos/dropbox/pyston/issues/comments{/number}","contents_url":"https://api.github.com/repos/dropbox/pyston/contents/{+path}","compare_url":"https://api.github.com/repos/dropbox/pyston/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dropbox/pyston/merges","archive_url":"https://api.github.com/repos/dropbox/pyston/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dropbox/pyston/downloads","issues_url":"https://api.github.com/repos/dropbox/pyston/issues{/number}","pulls_url":"https://api.github.com/repos/dropbox/pyston/pulls{/number}","milestones_url":"https://api.github.com/repos/dropbox/pyston/milestones{/number}","notifications_url":"https://api.github.com/repos/dropbox/pyston/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dropbox/pyston/labels{/name}","releases_url":"https://api.github.com/repos/dropbox/pyston/releases{/id}","deployments_url":"https://api.github.com/repos/dropbox/pyston/deployments","created_at":"2014-04-01T07:17:20Z","updated_at":"2016-01-23T14:31:42Z","pushed_at":"2016-01-25T05:44:17Z","git_url":"git://github.com/dropbox/pyston.git","ssh_url":"git@github.com:dropbox/pyston.git","clone_url":"https://github.com/dropbox/pyston.git","svn_url":"https://github.com/dropbox/pyston","homepage":"https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation/","size":32925,"stargazers_count":3465,"watchers_count":3465,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":240,"mirror_url":null,"open_issues_count":84,"forks":240,"open_issues":84,"watchers":3465,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dropbox/pyston/pulls/1061"},"html":{"href":"https://github.com/dropbox/pyston/pull/1061"},"issue":{"href":"https://api.github.com/repos/dropbox/pyston/issues/1061"},"comments":{"href":"https://api.github.com/repos/dropbox/pyston/issues/1061/comments"},"review_comments":{"href":"https://api.github.com/repos/dropbox/pyston/pulls/1061/comments"},"review_comment":{"href":"https://api.github.com/repos/dropbox/pyston/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dropbox/pyston/pulls/1061/commits"},"statuses":{"href":"https://api.github.com/repos/dropbox/pyston/statuses/86a14379a156b56b2fa30914b8522f77756c604f"}}}}