{"action":"created","comment":{"url":"https://api.github.com/repos/nosedjango/nosedjango/pulls/comments/45379910","id":45379910,"diff_hunk":"@@ -72,28 +79,68 @@ def __init__(self):\n         self._num_flush_calls = 0\n         self._num_syncdb_calls = 0\n \n-    def disable_transaction_support(self, transaction):\n-        self.orig_commit = transaction.commit\n-        self.orig_rollback = transaction.rollback\n-        self.orig_savepoint_commit = transaction.savepoint_commit\n-        self.orig_savepoint_rollback = transaction.savepoint_rollback\n-        self.orig_enter = transaction.enter_transaction_management\n-        self.orig_leave = transaction.leave_transaction_management\n-\n-        transaction.commit = _dummy\n-        transaction.rollback = _dummy\n-        transaction.savepoint_commit = _dummy\n-        transaction.savepoint_rollback = _dummy\n-        transaction.enter_transaction_management = _dummy\n-        transaction.leave_transaction_management = _dummy\n-\n-    def restore_transaction_support(self, transaction):\n-        transaction.commit = self.orig_commit\n-        transaction.rollback = self.orig_rollback\n-        transaction.savepoint_commit = self.orig_savepoint_commit\n-        transaction.savepoint_rollback = self.orig_savepoint_rollback\n-        transaction.enter_transaction_management = self.orig_enter\n-        transaction.leave_transaction_management = self.orig_leave\n+    def __del__(self):\n+        self.restore_transaction_support()\n+\n+    @property\n+    def transaction(self):\n+        from django.db import transaction\n+        if self.django_version < 7:\n+            transaction.set_autocommit = _dummy\n+            transaction.get_autocommit = _dummy\n+        elif self.django_version > 7:\n+            transaction.enter_transaction_management = _dummy\n+            transaction.leave_transaction_management = _dummy\n+            transaction.managed = _dummy","path":"nosedjango/nosedjango.py","position":59,"original_position":59,"commit_id":"bf9c9a3b1950dbc6ae3e10de939a9abc8816cf45","original_commit_id":"bf9c9a3b1950dbc6ae3e10de939a9abc8816cf45","user":{"login":"jlward","id":298906,"avatar_url":"https://avatars.githubusercontent.com/u/298906?v=3","gravatar_id":"","url":"https://api.github.com/users/jlward","html_url":"https://github.com/jlward","followers_url":"https://api.github.com/users/jlward/followers","following_url":"https://api.github.com/users/jlward/following{/other_user}","gists_url":"https://api.github.com/users/jlward/gists{/gist_id}","starred_url":"https://api.github.com/users/jlward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlward/subscriptions","organizations_url":"https://api.github.com/users/jlward/orgs","repos_url":"https://api.github.com/users/jlward/repos","events_url":"https://api.github.com/users/jlward/events{/privacy}","received_events_url":"https://api.github.com/users/jlward/received_events","type":"User","site_admin":false},"body":"Pretty much","created_at":"2015-11-19T18:29:36Z","updated_at":"2015-11-19T18:29:36Z","html_url":"https://github.com/nosedjango/nosedjango/pull/40#discussion_r45379910","pull_request_url":"https://api.github.com/repos/nosedjango/nosedjango/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/nosedjango/nosedjango/pulls/comments/45379910"},"html":{"href":"https://github.com/nosedjango/nosedjango/pull/40#discussion_r45379910"},"pull_request":{"href":"https://api.github.com/repos/nosedjango/nosedjango/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/nosedjango/nosedjango/pulls/40","id":50441392,"html_url":"https://github.com/nosedjango/nosedjango/pull/40","diff_url":"https://github.com/nosedjango/nosedjango/pull/40.diff","patch_url":"https://github.com/nosedjango/nosedjango/pull/40.patch","issue_url":"https://api.github.com/repos/nosedjango/nosedjango/issues/40","number":40,"state":"open","locked":false,"title":"Add support for django 1.8","user":{"login":"jlward","id":298906,"avatar_url":"https://avatars.githubusercontent.com/u/298906?v=3","gravatar_id":"","url":"https://api.github.com/users/jlward","html_url":"https://github.com/jlward","followers_url":"https://api.github.com/users/jlward/followers","following_url":"https://api.github.com/users/jlward/following{/other_user}","gists_url":"https://api.github.com/users/jlward/gists{/gist_id}","starred_url":"https://api.github.com/users/jlward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlward/subscriptions","organizations_url":"https://api.github.com/users/jlward/orgs","repos_url":"https://api.github.com/users/jlward/repos","events_url":"https://api.github.com/users/jlward/events{/privacy}","received_events_url":"https://api.github.com/users/jlward/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-11T21:50:47Z","updated_at":"2015-11-19T18:29:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1bf668e69512b9e5675586a5c8102d77533575d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nosedjango/nosedjango/pulls/40/commits","review_comments_url":"https://api.github.com/repos/nosedjango/nosedjango/pulls/40/comments","review_comment_url":"https://api.github.com/repos/nosedjango/nosedjango/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nosedjango/nosedjango/issues/40/comments","statuses_url":"https://api.github.com/repos/nosedjango/nosedjango/statuses/bf9c9a3b1950dbc6ae3e10de939a9abc8816cf45","head":{"label":"nosedjango:issue_40","ref":"issue_40","sha":"bf9c9a3b1950dbc6ae3e10de939a9abc8816cf45","user":{"login":"nosedjango","id":1144239,"avatar_url":"https://avatars.githubusercontent.com/u/1144239?v=3","gravatar_id":"","url":"https://api.github.com/users/nosedjango","html_url":"https://github.com/nosedjango","followers_url":"https://api.github.com/users/nosedjango/followers","following_url":"https://api.github.com/users/nosedjango/following{/other_user}","gists_url":"https://api.github.com/users/nosedjango/gists{/gist_id}","starred_url":"https://api.github.com/users/nosedjango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nosedjango/subscriptions","organizations_url":"https://api.github.com/users/nosedjango/orgs","repos_url":"https://api.github.com/users/nosedjango/repos","events_url":"https://api.github.com/users/nosedjango/events{/privacy}","received_events_url":"https://api.github.com/users/nosedjango/received_events","type":"Organization","site_admin":false},"repo":{"id":183502,"name":"nosedjango","full_name":"nosedjango/nosedjango","owner":{"login":"nosedjango","id":1144239,"avatar_url":"https://avatars.githubusercontent.com/u/1144239?v=3","gravatar_id":"","url":"https://api.github.com/users/nosedjango","html_url":"https://github.com/nosedjango","followers_url":"https://api.github.com/users/nosedjango/followers","following_url":"https://api.github.com/users/nosedjango/following{/other_user}","gists_url":"https://api.github.com/users/nosedjango/gists{/gist_id}","starred_url":"https://api.github.com/users/nosedjango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nosedjango/subscriptions","organizations_url":"https://api.github.com/users/nosedjango/orgs","repos_url":"https://api.github.com/users/nosedjango/repos","events_url":"https://api.github.com/users/nosedjango/events{/privacy}","received_events_url":"https://api.github.com/users/nosedjango/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nosedjango/nosedjango","description":"Nosedjango brings the goodness of Nose and its plugin ecosystem to the world of Django testing.","fork":false,"url":"https://api.github.com/repos/nosedjango/nosedjango","forks_url":"https://api.github.com/repos/nosedjango/nosedjango/forks","keys_url":"https://api.github.com/repos/nosedjango/nosedjango/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nosedjango/nosedjango/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nosedjango/nosedjango/teams","hooks_url":"https://api.github.com/repos/nosedjango/nosedjango/hooks","issue_events_url":"https://api.github.com/repos/nosedjango/nosedjango/issues/events{/number}","events_url":"https://api.github.com/repos/nosedjango/nosedjango/events","assignees_url":"https://api.github.com/repos/nosedjango/nosedjango/assignees{/user}","branches_url":"https://api.github.com/repos/nosedjango/nosedjango/branches{/branch}","tags_url":"https://api.github.com/repos/nosedjango/nosedjango/tags","blobs_url":"https://api.github.com/repos/nosedjango/nosedjango/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nosedjango/nosedjango/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nosedjango/nosedjango/git/refs{/sha}","trees_url":"https://api.github.com/repos/nosedjango/nosedjango/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nosedjango/nosedjango/statuses/{sha}","languages_url":"https://api.github.com/repos/nosedjango/nosedjango/languages","stargazers_url":"https://api.github.com/repos/nosedjango/nosedjango/stargazers","contributors_url":"https://api.github.com/repos/nosedjango/nosedjango/contributors","subscribers_url":"https://api.github.com/repos/nosedjango/nosedjango/subscribers","subscription_url":"https://api.github.com/repos/nosedjango/nosedjango/subscription","commits_url":"https://api.github.com/repos/nosedjango/nosedjango/commits{/sha}","git_commits_url":"https://api.github.com/repos/nosedjango/nosedjango/git/commits{/sha}","comments_url":"https://api.github.com/repos/nosedjango/nosedjango/comments{/number}","issue_comment_url":"https://api.github.com/repos/nosedjango/nosedjango/issues/comments{/number}","contents_url":"https://api.github.com/repos/nosedjango/nosedjango/contents/{+path}","compare_url":"https://api.github.com/repos/nosedjango/nosedjango/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nosedjango/nosedjango/merges","archive_url":"https://api.github.com/repos/nosedjango/nosedjango/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nosedjango/nosedjango/downloads","issues_url":"https://api.github.com/repos/nosedjango/nosedjango/issues{/number}","pulls_url":"https://api.github.com/repos/nosedjango/nosedjango/pulls{/number}","milestones_url":"https://api.github.com/repos/nosedjango/nosedjango/milestones{/number}","notifications_url":"https://api.github.com/repos/nosedjango/nosedjango/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nosedjango/nosedjango/labels{/name}","releases_url":"https://api.github.com/repos/nosedjango/nosedjango/releases{/id}","created_at":"2009-04-23T11:52:27Z","updated_at":"2015-08-13T12:01:35Z","pushed_at":"2015-11-19T17:03:06Z","git_url":"git://github.com/nosedjango/nosedjango.git","ssh_url":"git@github.com:nosedjango/nosedjango.git","clone_url":"https://github.com/nosedjango/nosedjango.git","svn_url":"https://github.com/nosedjango/nosedjango","homepage":"","size":299,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":10,"forks":15,"open_issues":10,"watchers":48,"default_branch":"master"}},"base":{"label":"nosedjango:master","ref":"master","sha":"0a543e87957662aa2b97fb508d3a7be43a4d0448","user":{"login":"nosedjango","id":1144239,"avatar_url":"https://avatars.githubusercontent.com/u/1144239?v=3","gravatar_id":"","url":"https://api.github.com/users/nosedjango","html_url":"https://github.com/nosedjango","followers_url":"https://api.github.com/users/nosedjango/followers","following_url":"https://api.github.com/users/nosedjango/following{/other_user}","gists_url":"https://api.github.com/users/nosedjango/gists{/gist_id}","starred_url":"https://api.github.com/users/nosedjango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nosedjango/subscriptions","organizations_url":"https://api.github.com/users/nosedjango/orgs","repos_url":"https://api.github.com/users/nosedjango/repos","events_url":"https://api.github.com/users/nosedjango/events{/privacy}","received_events_url":"https://api.github.com/users/nosedjango/received_events","type":"Organization","site_admin":false},"repo":{"id":183502,"name":"nosedjango","full_name":"nosedjango/nosedjango","owner":{"login":"nosedjango","id":1144239,"avatar_url":"https://avatars.githubusercontent.com/u/1144239?v=3","gravatar_id":"","url":"https://api.github.com/users/nosedjango","html_url":"https://github.com/nosedjango","followers_url":"https://api.github.com/users/nosedjango/followers","following_url":"https://api.github.com/users/nosedjango/following{/other_user}","gists_url":"https://api.github.com/users/nosedjango/gists{/gist_id}","starred_url":"https://api.github.com/users/nosedjango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nosedjango/subscriptions","organizations_url":"https://api.github.com/users/nosedjango/orgs","repos_url":"https://api.github.com/users/nosedjango/repos","events_url":"https://api.github.com/users/nosedjango/events{/privacy}","received_events_url":"https://api.github.com/users/nosedjango/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nosedjango/nosedjango","description":"Nosedjango brings the goodness of Nose and its plugin ecosystem to the world of Django testing.","fork":false,"url":"https://api.github.com/repos/nosedjango/nosedjango","forks_url":"https://api.github.com/repos/nosedjango/nosedjango/forks","keys_url":"https://api.github.com/repos/nosedjango/nosedjango/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nosedjango/nosedjango/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nosedjango/nosedjango/teams","hooks_url":"https://api.github.com/repos/nosedjango/nosedjango/hooks","issue_events_url":"https://api.github.com/repos/nosedjango/nosedjango/issues/events{/number}","events_url":"https://api.github.com/repos/nosedjango/nosedjango/events","assignees_url":"https://api.github.com/repos/nosedjango/nosedjango/assignees{/user}","branches_url":"https://api.github.com/repos/nosedjango/nosedjango/branches{/branch}","tags_url":"https://api.github.com/repos/nosedjango/nosedjango/tags","blobs_url":"https://api.github.com/repos/nosedjango/nosedjango/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nosedjango/nosedjango/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nosedjango/nosedjango/git/refs{/sha}","trees_url":"https://api.github.com/repos/nosedjango/nosedjango/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nosedjango/nosedjango/statuses/{sha}","languages_url":"https://api.github.com/repos/nosedjango/nosedjango/languages","stargazers_url":"https://api.github.com/repos/nosedjango/nosedjango/stargazers","contributors_url":"https://api.github.com/repos/nosedjango/nosedjango/contributors","subscribers_url":"https://api.github.com/repos/nosedjango/nosedjango/subscribers","subscription_url":"https://api.github.com/repos/nosedjango/nosedjango/subscription","commits_url":"https://api.github.com/repos/nosedjango/nosedjango/commits{/sha}","git_commits_url":"https://api.github.com/repos/nosedjango/nosedjango/git/commits{/sha}","comments_url":"https://api.github.com/repos/nosedjango/nosedjango/comments{/number}","issue_comment_url":"https://api.github.com/repos/nosedjango/nosedjango/issues/comments{/number}","contents_url":"https://api.github.com/repos/nosedjango/nosedjango/contents/{+path}","compare_url":"https://api.github.com/repos/nosedjango/nosedjango/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nosedjango/nosedjango/merges","archive_url":"https://api.github.com/repos/nosedjango/nosedjango/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nosedjango/nosedjango/downloads","issues_url":"https://api.github.com/repos/nosedjango/nosedjango/issues{/number}","pulls_url":"https://api.github.com/repos/nosedjango/nosedjango/pulls{/number}","milestones_url":"https://api.github.com/repos/nosedjango/nosedjango/milestones{/number}","notifications_url":"https://api.github.com/repos/nosedjango/nosedjango/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nosedjango/nosedjango/labels{/name}","releases_url":"https://api.github.com/repos/nosedjango/nosedjango/releases{/id}","created_at":"2009-04-23T11:52:27Z","updated_at":"2015-08-13T12:01:35Z","pushed_at":"2015-11-19T17:03:06Z","git_url":"git://github.com/nosedjango/nosedjango.git","ssh_url":"git@github.com:nosedjango/nosedjango.git","clone_url":"https://github.com/nosedjango/nosedjango.git","svn_url":"https://github.com/nosedjango/nosedjango","homepage":"","size":299,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":10,"forks":15,"open_issues":10,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nosedjango/nosedjango/pulls/40"},"html":{"href":"https://github.com/nosedjango/nosedjango/pull/40"},"issue":{"href":"https://api.github.com/repos/nosedjango/nosedjango/issues/40"},"comments":{"href":"https://api.github.com/repos/nosedjango/nosedjango/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/nosedjango/nosedjango/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/nosedjango/nosedjango/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nosedjango/nosedjango/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/nosedjango/nosedjango/statuses/bf9c9a3b1950dbc6ae3e10de939a9abc8816cf45"}}}}