{"action":"created","comment":{"url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/comments/63484597","id":63484597,"diff_hunk":"@@ -101,6 +107,36 @@ def _unload_instance(self):\n             'have its own implementation of an _unload_instance method.')\n \n \n+class WeakAutoUnload(AutoUnload):\n+    \"\"\"Subclass of AutoUnload used to unload specific instances when all\n+    references to the instance are deleted.\n+    \"\"\"\n+\n+    def new(cls, *args, **kwargs):\n+        self = super().__new__(cls)\n+        self.___unloaded = False","path":"addons/source-python/packages/source-python/core/__init__.py","position":39,"original_position":39,"commit_id":"077d7f1c6b38fc08a145460a7816c8cdb0668ff6","original_commit_id":"077d7f1c6b38fc08a145460a7816c8cdb0668ff6","user":{"login":"jsza","id":4459590,"avatar_url":"https://avatars.githubusercontent.com/u/4459590?v=3","gravatar_id":"","url":"https://api.github.com/users/jsza","html_url":"https://github.com/jsza","followers_url":"https://api.github.com/users/jsza/followers","following_url":"https://api.github.com/users/jsza/following{/other_user}","gists_url":"https://api.github.com/users/jsza/gists{/gist_id}","starred_url":"https://api.github.com/users/jsza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsza/subscriptions","organizations_url":"https://api.github.com/users/jsza/orgs","repos_url":"https://api.github.com/users/jsza/repos","events_url":"https://api.github.com/users/jsza/events{/privacy}","received_events_url":"https://api.github.com/users/jsza/received_events","type":"User","site_admin":false},"body":"Yeah, thanks, it seems this should have been 2 underscores as per https://www.python.org/dev/peps/pep-0008/ (to avoid naming collisions for subclasses).","created_at":"2016-05-17T08:44:54Z","updated_at":"2016-05-17T08:44:54Z","html_url":"https://github.com/Source-Python-Dev-Team/Source.Python/pull/126#discussion_r63484597","pull_request_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/comments/63484597"},"html":{"href":"https://github.com/Source-Python-Dev-Team/Source.Python/pull/126#discussion_r63484597"},"pull_request":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/126","id":70310764,"html_url":"https://github.com/Source-Python-Dev-Team/Source.Python/pull/126","diff_url":"https://github.com/Source-Python-Dev-Team/Source.Python/pull/126.diff","patch_url":"https://github.com/Source-Python-Dev-Team/Source.Python/pull/126.patch","issue_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/126","number":126,"state":"open","locked":false,"title":"Add weakref-based AutoUnload class to allow instances to be garbage collected","user":{"login":"jsza","id":4459590,"avatar_url":"https://avatars.githubusercontent.com/u/4459590?v=3","gravatar_id":"","url":"https://api.github.com/users/jsza","html_url":"https://github.com/jsza","followers_url":"https://api.github.com/users/jsza/followers","following_url":"https://api.github.com/users/jsza/following{/other_user}","gists_url":"https://api.github.com/users/jsza/gists{/gist_id}","starred_url":"https://api.github.com/users/jsza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsza/subscriptions","organizations_url":"https://api.github.com/users/jsza/orgs","repos_url":"https://api.github.com/users/jsza/repos","events_url":"https://api.github.com/users/jsza/events{/privacy}","received_events_url":"https://api.github.com/users/jsza/received_events","type":"User","site_admin":false},"body":"Fixes #125 ","created_at":"2016-05-17T07:27:14Z","updated_at":"2016-05-17T08:44:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fcbe79cb308fd2e2d585d5f59d005173d539ece2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/126/commits","review_comments_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/126/comments","review_comment_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/126/comments","statuses_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/statuses/077d7f1c6b38fc08a145460a7816c8cdb0668ff6","head":{"label":"jsza:auto-unload-delays","ref":"auto-unload-delays","sha":"077d7f1c6b38fc08a145460a7816c8cdb0668ff6","user":{"login":"jsza","id":4459590,"avatar_url":"https://avatars.githubusercontent.com/u/4459590?v=3","gravatar_id":"","url":"https://api.github.com/users/jsza","html_url":"https://github.com/jsza","followers_url":"https://api.github.com/users/jsza/followers","following_url":"https://api.github.com/users/jsza/following{/other_user}","gists_url":"https://api.github.com/users/jsza/gists{/gist_id}","starred_url":"https://api.github.com/users/jsza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsza/subscriptions","organizations_url":"https://api.github.com/users/jsza/orgs","repos_url":"https://api.github.com/users/jsza/repos","events_url":"https://api.github.com/users/jsza/events{/privacy}","received_events_url":"https://api.github.com/users/jsza/received_events","type":"User","site_admin":false},"repo":{"id":24173806,"name":"Source.Python","full_name":"jsza/Source.Python","owner":{"login":"jsza","id":4459590,"avatar_url":"https://avatars.githubusercontent.com/u/4459590?v=3","gravatar_id":"","url":"https://api.github.com/users/jsza","html_url":"https://github.com/jsza","followers_url":"https://api.github.com/users/jsza/followers","following_url":"https://api.github.com/users/jsza/following{/other_user}","gists_url":"https://api.github.com/users/jsza/gists{/gist_id}","starred_url":"https://api.github.com/users/jsza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsza/subscriptions","organizations_url":"https://api.github.com/users/jsza/orgs","repos_url":"https://api.github.com/users/jsza/repos","events_url":"https://api.github.com/users/jsza/events{/privacy}","received_events_url":"https://api.github.com/users/jsza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsza/Source.Python","description":"This plugin aims to use boost::python and create an easily accessible wrapper around the Source Engine API for scripter use.","fork":true,"url":"https://api.github.com/repos/jsza/Source.Python","forks_url":"https://api.github.com/repos/jsza/Source.Python/forks","keys_url":"https://api.github.com/repos/jsza/Source.Python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsza/Source.Python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsza/Source.Python/teams","hooks_url":"https://api.github.com/repos/jsza/Source.Python/hooks","issue_events_url":"https://api.github.com/repos/jsza/Source.Python/issues/events{/number}","events_url":"https://api.github.com/repos/jsza/Source.Python/events","assignees_url":"https://api.github.com/repos/jsza/Source.Python/assignees{/user}","branches_url":"https://api.github.com/repos/jsza/Source.Python/branches{/branch}","tags_url":"https://api.github.com/repos/jsza/Source.Python/tags","blobs_url":"https://api.github.com/repos/jsza/Source.Python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsza/Source.Python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsza/Source.Python/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsza/Source.Python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsza/Source.Python/statuses/{sha}","languages_url":"https://api.github.com/repos/jsza/Source.Python/languages","stargazers_url":"https://api.github.com/repos/jsza/Source.Python/stargazers","contributors_url":"https://api.github.com/repos/jsza/Source.Python/contributors","subscribers_url":"https://api.github.com/repos/jsza/Source.Python/subscribers","subscription_url":"https://api.github.com/repos/jsza/Source.Python/subscription","commits_url":"https://api.github.com/repos/jsza/Source.Python/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsza/Source.Python/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsza/Source.Python/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsza/Source.Python/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsza/Source.Python/contents/{+path}","compare_url":"https://api.github.com/repos/jsza/Source.Python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsza/Source.Python/merges","archive_url":"https://api.github.com/repos/jsza/Source.Python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsza/Source.Python/downloads","issues_url":"https://api.github.com/repos/jsza/Source.Python/issues{/number}","pulls_url":"https://api.github.com/repos/jsza/Source.Python/pulls{/number}","milestones_url":"https://api.github.com/repos/jsza/Source.Python/milestones{/number}","notifications_url":"https://api.github.com/repos/jsza/Source.Python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsza/Source.Python/labels{/name}","releases_url":"https://api.github.com/repos/jsza/Source.Python/releases{/id}","deployments_url":"https://api.github.com/repos/jsza/Source.Python/deployments","created_at":"2014-09-18T04:22:45Z","updated_at":"2016-05-17T06:57:18Z","pushed_at":"2016-05-17T07:25:32Z","git_url":"git://github.com/jsza/Source.Python.git","ssh_url":"git@github.com:jsza/Source.Python.git","clone_url":"https://github.com/jsza/Source.Python.git","svn_url":"https://github.com/jsza/Source.Python","homepage":"http://www.sourcepython.com/forum.php","size":317826,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"Source-Python-Dev-Team:master","ref":"master","sha":"16c9993f578fe011330df2dd8afb69d7226cf298","user":{"login":"Source-Python-Dev-Team","id":5440368,"avatar_url":"https://avatars.githubusercontent.com/u/5440368?v=3","gravatar_id":"","url":"https://api.github.com/users/Source-Python-Dev-Team","html_url":"https://github.com/Source-Python-Dev-Team","followers_url":"https://api.github.com/users/Source-Python-Dev-Team/followers","following_url":"https://api.github.com/users/Source-Python-Dev-Team/following{/other_user}","gists_url":"https://api.github.com/users/Source-Python-Dev-Team/gists{/gist_id}","starred_url":"https://api.github.com/users/Source-Python-Dev-Team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Source-Python-Dev-Team/subscriptions","organizations_url":"https://api.github.com/users/Source-Python-Dev-Team/orgs","repos_url":"https://api.github.com/users/Source-Python-Dev-Team/repos","events_url":"https://api.github.com/users/Source-Python-Dev-Team/events{/privacy}","received_events_url":"https://api.github.com/users/Source-Python-Dev-Team/received_events","type":"Organization","site_admin":false},"repo":{"id":12771934,"name":"Source.Python","full_name":"Source-Python-Dev-Team/Source.Python","owner":{"login":"Source-Python-Dev-Team","id":5440368,"avatar_url":"https://avatars.githubusercontent.com/u/5440368?v=3","gravatar_id":"","url":"https://api.github.com/users/Source-Python-Dev-Team","html_url":"https://github.com/Source-Python-Dev-Team","followers_url":"https://api.github.com/users/Source-Python-Dev-Team/followers","following_url":"https://api.github.com/users/Source-Python-Dev-Team/following{/other_user}","gists_url":"https://api.github.com/users/Source-Python-Dev-Team/gists{/gist_id}","starred_url":"https://api.github.com/users/Source-Python-Dev-Team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Source-Python-Dev-Team/subscriptions","organizations_url":"https://api.github.com/users/Source-Python-Dev-Team/orgs","repos_url":"https://api.github.com/users/Source-Python-Dev-Team/repos","events_url":"https://api.github.com/users/Source-Python-Dev-Team/events{/privacy}","received_events_url":"https://api.github.com/users/Source-Python-Dev-Team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Source-Python-Dev-Team/Source.Python","description":"This plugin aims to use boost::python and create an easily accessible wrapper around the Source Engine API for scripter use.","fork":false,"url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python","forks_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/forks","keys_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/teams","hooks_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/hooks","issue_events_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/events{/number}","events_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/events","assignees_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/assignees{/user}","branches_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/branches{/branch}","tags_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/tags","blobs_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/git/refs{/sha}","trees_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/statuses/{sha}","languages_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/languages","stargazers_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/stargazers","contributors_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/contributors","subscribers_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/subscribers","subscription_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/subscription","commits_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/commits{/sha}","git_commits_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/git/commits{/sha}","comments_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/comments{/number}","issue_comment_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/comments{/number}","contents_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/contents/{+path}","compare_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/merges","archive_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/downloads","issues_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues{/number}","pulls_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls{/number}","milestones_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/milestones{/number}","notifications_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/labels{/name}","releases_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/releases{/id}","deployments_url":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/deployments","created_at":"2013-09-12T01:13:58Z","updated_at":"2016-05-10T06:42:41Z","pushed_at":"2016-05-17T07:27:14Z","git_url":"git://github.com/Source-Python-Dev-Team/Source.Python.git","ssh_url":"git@github.com:Source-Python-Dev-Team/Source.Python.git","clone_url":"https://github.com/Source-Python-Dev-Team/Source.Python.git","svn_url":"https://github.com/Source-Python-Dev-Team/Source.Python","homepage":"http://forums.sourcepython.com","size":329679,"stargazers_count":41,"watchers_count":41,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":15,"forks":16,"open_issues":15,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/126"},"html":{"href":"https://github.com/Source-Python-Dev-Team/Source.Python/pull/126"},"issue":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/126"},"comments":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/Source-Python-Dev-Team/Source.Python/statuses/077d7f1c6b38fc08a145460a7816c8cdb0668ff6"}}}}