{"action":"created","comment":{"url":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/comments/27545155","id":27545155,"diff_hunk":"@@ -39,9 +39,9 @@ def test_mixing():\n     ...              O2.inheritedAttribute('x')(a[0]))\n \n     >>> class C(Base):\n-    ...   def __class_init__(self):\n+    ...   def __class_init__(cls):","path":"src/ExtensionClass/tests.py","position":5,"original_position":5,"commit_id":"762af92148cffa8f7de86574d638f6c7494bbd22","original_commit_id":"762af92148cffa8f7de86574d638f6c7494bbd22","user":{"login":"davisagli","id":49014,"avatar_url":"https://avatars.githubusercontent.com/u/49014?v=3","gravatar_id":"","url":"https://api.github.com/users/davisagli","html_url":"https://github.com/davisagli","followers_url":"https://api.github.com/users/davisagli/followers","following_url":"https://api.github.com/users/davisagli/following{/other_user}","gists_url":"https://api.github.com/users/davisagli/gists{/gist_id}","starred_url":"https://api.github.com/users/davisagli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davisagli/subscriptions","organizations_url":"https://api.github.com/users/davisagli/orgs","repos_url":"https://api.github.com/users/davisagli/repos","events_url":"https://api.github.com/users/davisagli/events{/privacy}","received_events_url":"https://api.github.com/users/davisagli/received_events","type":"User","site_admin":false},"body":"It is similar to a classmethod, as it gets passed the class itself rather than an instance when the metaclass creates a new subclass. And before this changeset the metaclass constructor was turning it into a classmethod. But that didn't work the same as the C in the case I added a test for here, where __class_init__ is patched in to a base class after its construction (or in the case where it's inherited from a non-ExtensionClass base).","created_at":"2015-04-01T05:03:16Z","updated_at":"2015-04-01T05:03:16Z","html_url":"https://github.com/zopefoundation/ExtensionClass/pull/5#discussion_r27545155","pull_request_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/comments/27545155"},"html":{"href":"https://github.com/zopefoundation/ExtensionClass/pull/5#discussion_r27545155"},"pull_request":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/5","id":32382038,"html_url":"https://github.com/zopefoundation/ExtensionClass/pull/5","diff_url":"https://github.com/zopefoundation/ExtensionClass/pull/5.diff","patch_url":"https://github.com/zopefoundation/ExtensionClass/pull/5.patch","issue_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues/5","number":5,"state":"open","locked":false,"title":"fix calling `__class_init__` hook by the Python implementation","user":{"login":"davisagli","id":49014,"avatar_url":"https://avatars.githubusercontent.com/u/49014?v=3","gravatar_id":"","url":"https://api.github.com/users/davisagli","html_url":"https://github.com/davisagli","followers_url":"https://api.github.com/users/davisagli/followers","following_url":"https://api.github.com/users/davisagli/following{/other_user}","gists_url":"https://api.github.com/users/davisagli/gists{/gist_id}","starred_url":"https://api.github.com/users/davisagli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davisagli/subscriptions","organizations_url":"https://api.github.com/users/davisagli/orgs","repos_url":"https://api.github.com/users/davisagli/repos","events_url":"https://api.github.com/users/davisagli/events{/privacy}","received_events_url":"https://api.github.com/users/davisagli/received_events","type":"User","site_admin":false},"body":"Always call `__class_init__` as an unbound function, like the C implementation does,\r\nso it works even when `__class_init__` is patched in after class creation like\r\nZope does to `Persistent`.\r\n\r\nThe extra check for `__func__` is because getting a function attribute in Python 3\r\ndoes not turn it into a method.","created_at":"2015-04-01T01:26:43Z","updated_at":"2015-04-01T05:03:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ef029281a59cb2bf57db0aa81687ff4ba704748","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/5/commits","review_comments_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/5/comments","review_comment_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues/5/comments","statuses_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/statuses/762af92148cffa8f7de86574d638f6c7494bbd22","head":{"label":"zopefoundation:fix-__class_init__","ref":"fix-__class_init__","sha":"762af92148cffa8f7de86574d638f6c7494bbd22","user":{"login":"zopefoundation","id":1163184,"avatar_url":"https://avatars.githubusercontent.com/u/1163184?v=3","gravatar_id":"","url":"https://api.github.com/users/zopefoundation","html_url":"https://github.com/zopefoundation","followers_url":"https://api.github.com/users/zopefoundation/followers","following_url":"https://api.github.com/users/zopefoundation/following{/other_user}","gists_url":"https://api.github.com/users/zopefoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/zopefoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zopefoundation/subscriptions","organizations_url":"https://api.github.com/users/zopefoundation/orgs","repos_url":"https://api.github.com/users/zopefoundation/repos","events_url":"https://api.github.com/users/zopefoundation/events{/privacy}","received_events_url":"https://api.github.com/users/zopefoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":8411798,"name":"ExtensionClass","full_name":"zopefoundation/ExtensionClass","owner":{"login":"zopefoundation","id":1163184,"avatar_url":"https://avatars.githubusercontent.com/u/1163184?v=3","gravatar_id":"","url":"https://api.github.com/users/zopefoundation","html_url":"https://github.com/zopefoundation","followers_url":"https://api.github.com/users/zopefoundation/followers","following_url":"https://api.github.com/users/zopefoundation/following{/other_user}","gists_url":"https://api.github.com/users/zopefoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/zopefoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zopefoundation/subscriptions","organizations_url":"https://api.github.com/users/zopefoundation/orgs","repos_url":"https://api.github.com/users/zopefoundation/repos","events_url":"https://api.github.com/users/zopefoundation/events{/privacy}","received_events_url":"https://api.github.com/users/zopefoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zopefoundation/ExtensionClass","description":"Metaclass for subclassable extension types","fork":false,"url":"https://api.github.com/repos/zopefoundation/ExtensionClass","forks_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/forks","keys_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/teams","hooks_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/hooks","issue_events_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues/events{/number}","events_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/events","assignees_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/assignees{/user}","branches_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/branches{/branch}","tags_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/tags","blobs_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/refs{/sha}","trees_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/statuses/{sha}","languages_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/languages","stargazers_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/stargazers","contributors_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/contributors","subscribers_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/subscribers","subscription_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/subscription","commits_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/commits{/sha}","git_commits_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/commits{/sha}","comments_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/comments{/number}","issue_comment_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues/comments{/number}","contents_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/contents/{+path}","compare_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/merges","archive_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/downloads","issues_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues{/number}","pulls_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls{/number}","milestones_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/milestones{/number}","notifications_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/labels{/name}","releases_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/releases{/id}","created_at":"2013-02-25T15:27:27Z","updated_at":"2015-03-20T18:41:39Z","pushed_at":"2015-04-01T01:26:43Z","git_url":"git://github.com/zopefoundation/ExtensionClass.git","ssh_url":"git@github.com:zopefoundation/ExtensionClass.git","clone_url":"https://github.com/zopefoundation/ExtensionClass.git","svn_url":"https://github.com/zopefoundation/ExtensionClass","homepage":"","size":531,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"zopefoundation:master","ref":"master","sha":"b096a3a6afdeb760535aef365f9927cd46a3e603","user":{"login":"zopefoundation","id":1163184,"avatar_url":"https://avatars.githubusercontent.com/u/1163184?v=3","gravatar_id":"","url":"https://api.github.com/users/zopefoundation","html_url":"https://github.com/zopefoundation","followers_url":"https://api.github.com/users/zopefoundation/followers","following_url":"https://api.github.com/users/zopefoundation/following{/other_user}","gists_url":"https://api.github.com/users/zopefoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/zopefoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zopefoundation/subscriptions","organizations_url":"https://api.github.com/users/zopefoundation/orgs","repos_url":"https://api.github.com/users/zopefoundation/repos","events_url":"https://api.github.com/users/zopefoundation/events{/privacy}","received_events_url":"https://api.github.com/users/zopefoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":8411798,"name":"ExtensionClass","full_name":"zopefoundation/ExtensionClass","owner":{"login":"zopefoundation","id":1163184,"avatar_url":"https://avatars.githubusercontent.com/u/1163184?v=3","gravatar_id":"","url":"https://api.github.com/users/zopefoundation","html_url":"https://github.com/zopefoundation","followers_url":"https://api.github.com/users/zopefoundation/followers","following_url":"https://api.github.com/users/zopefoundation/following{/other_user}","gists_url":"https://api.github.com/users/zopefoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/zopefoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zopefoundation/subscriptions","organizations_url":"https://api.github.com/users/zopefoundation/orgs","repos_url":"https://api.github.com/users/zopefoundation/repos","events_url":"https://api.github.com/users/zopefoundation/events{/privacy}","received_events_url":"https://api.github.com/users/zopefoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zopefoundation/ExtensionClass","description":"Metaclass for subclassable extension types","fork":false,"url":"https://api.github.com/repos/zopefoundation/ExtensionClass","forks_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/forks","keys_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/teams","hooks_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/hooks","issue_events_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues/events{/number}","events_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/events","assignees_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/assignees{/user}","branches_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/branches{/branch}","tags_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/tags","blobs_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/refs{/sha}","trees_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/statuses/{sha}","languages_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/languages","stargazers_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/stargazers","contributors_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/contributors","subscribers_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/subscribers","subscription_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/subscription","commits_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/commits{/sha}","git_commits_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/git/commits{/sha}","comments_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/comments{/number}","issue_comment_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues/comments{/number}","contents_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/contents/{+path}","compare_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/merges","archive_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/downloads","issues_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues{/number}","pulls_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls{/number}","milestones_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/milestones{/number}","notifications_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/labels{/name}","releases_url":"https://api.github.com/repos/zopefoundation/ExtensionClass/releases{/id}","created_at":"2013-02-25T15:27:27Z","updated_at":"2015-03-20T18:41:39Z","pushed_at":"2015-04-01T01:26:43Z","git_url":"git://github.com/zopefoundation/ExtensionClass.git","ssh_url":"git@github.com:zopefoundation/ExtensionClass.git","clone_url":"https://github.com/zopefoundation/ExtensionClass.git","svn_url":"https://github.com/zopefoundation/ExtensionClass","homepage":"","size":531,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/5"},"html":{"href":"https://github.com/zopefoundation/ExtensionClass/pull/5"},"issue":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues/5"},"comments":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/zopefoundation/ExtensionClass/statuses/762af92148cffa8f7de86574d638f6c7494bbd22"}}}}