{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/39940920","id":39940920,"diff_hunk":"@@ -32,6 +20,22 @@\n from django.utils.translation import ugettext_lazy as _\n from django.utils.version import get_docs_version\n \n+from . import (\n+    AutoField, Field, IntegerField, PositiveIntegerField,\n+    PositiveSmallIntegerField,\n+)\n+from .related_descriptors import (\n+    ForwardManyToManyDescriptor, ForwardManyToOneDescriptor,","path":"django/db/models/fields/related.py","position":36,"original_position":36,"commit_id":"fe0b68655d8096f5557ab866768207186c539654","original_commit_id":"fe0b68655d8096f5557ab866768207186c539654","user":{"login":"loic","id":36160,"avatar_url":"https://avatars.githubusercontent.com/u/36160?v=3","gravatar_id":"","url":"https://api.github.com/users/loic","html_url":"https://github.com/loic","followers_url":"https://api.github.com/users/loic/followers","following_url":"https://api.github.com/users/loic/following{/other_user}","gists_url":"https://api.github.com/users/loic/gists{/gist_id}","starred_url":"https://api.github.com/users/loic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loic/subscriptions","organizations_url":"https://api.github.com/users/loic/orgs","repos_url":"https://api.github.com/users/loic/repos","events_url":"https://api.github.com/users/loic/events{/privacy}","received_events_url":"https://api.github.com/users/loic/received_events","type":"User","site_admin":false},"body":"The M2M descriptor is used both for the forward and reverse relation. We should probably drop the `Forward` part.","created_at":"2015-09-21T04:14:08Z","updated_at":"2015-09-21T04:14:08Z","html_url":"https://github.com/django/django/pull/5318#discussion_r39940920","pull_request_url":"https://api.github.com/repos/django/django/pulls/5318","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/39940920"},"html":{"href":"https://github.com/django/django/pull/5318#discussion_r39940920"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/5318"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/5318","id":45484137,"html_url":"https://github.com/django/django/pull/5318","diff_url":"https://github.com/django/django/pull/5318.diff","patch_url":"https://github.com/django/django/pull/5318.patch","issue_url":"https://api.github.com/repos/django/django/issues/5318","number":5318,"state":"open","locked":false,"title":"Fixed #22341 -- Split django.db.models.fields.related","user":{"login":"aaugustin","id":788910,"avatar_url":"https://avatars.githubusercontent.com/u/788910?v=3","gravatar_id":"","url":"https://api.github.com/users/aaugustin","html_url":"https://github.com/aaugustin","followers_url":"https://api.github.com/users/aaugustin/followers","following_url":"https://api.github.com/users/aaugustin/following{/other_user}","gists_url":"https://api.github.com/users/aaugustin/gists{/gist_id}","starred_url":"https://api.github.com/users/aaugustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaugustin/subscriptions","organizations_url":"https://api.github.com/users/aaugustin/orgs","repos_url":"https://api.github.com/users/aaugustin/repos","events_url":"https://api.github.com/users/aaugustin/events{/privacy}","received_events_url":"https://api.github.com/users/aaugustin/received_events","type":"User","site_admin":false},"body":"I took this opportunity to:\r\n\r\n- add lots of comments about the implementation of descriptors: they used to be one of the more impenetrable parts of the ORM\r\n- rename them because the class names made me want to ragequit software development (especially the forward accessor for FKs called `ReverseSingleRelatedObjectDescriptor`)","created_at":"2015-09-19T20:54:47Z","updated_at":"2015-09-21T04:14:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26444542d2bdf75cfe89b4737b427390766ecc87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/5318/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/5318/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/5318/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/fe0b68655d8096f5557ab866768207186c539654","head":{"label":"aaugustin:document-related-field-implementation","ref":"document-related-field-implementation","sha":"fe0b68655d8096f5557ab866768207186c539654","user":{"login":"aaugustin","id":788910,"avatar_url":"https://avatars.githubusercontent.com/u/788910?v=3","gravatar_id":"","url":"https://api.github.com/users/aaugustin","html_url":"https://github.com/aaugustin","followers_url":"https://api.github.com/users/aaugustin/followers","following_url":"https://api.github.com/users/aaugustin/following{/other_user}","gists_url":"https://api.github.com/users/aaugustin/gists{/gist_id}","starred_url":"https://api.github.com/users/aaugustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaugustin/subscriptions","organizations_url":"https://api.github.com/users/aaugustin/orgs","repos_url":"https://api.github.com/users/aaugustin/repos","events_url":"https://api.github.com/users/aaugustin/events{/privacy}","received_events_url":"https://api.github.com/users/aaugustin/received_events","type":"User","site_admin":false},"repo":{"id":5128238,"name":"django","full_name":"aaugustin/django","owner":{"login":"aaugustin","id":788910,"avatar_url":"https://avatars.githubusercontent.com/u/788910?v=3","gravatar_id":"","url":"https://api.github.com/users/aaugustin","html_url":"https://github.com/aaugustin","followers_url":"https://api.github.com/users/aaugustin/followers","following_url":"https://api.github.com/users/aaugustin/following{/other_user}","gists_url":"https://api.github.com/users/aaugustin/gists{/gist_id}","starred_url":"https://api.github.com/users/aaugustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaugustin/subscriptions","organizations_url":"https://api.github.com/users/aaugustin/orgs","repos_url":"https://api.github.com/users/aaugustin/repos","events_url":"https://api.github.com/users/aaugustin/events{/privacy}","received_events_url":"https://api.github.com/users/aaugustin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaugustin/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/aaugustin/django","forks_url":"https://api.github.com/repos/aaugustin/django/forks","keys_url":"https://api.github.com/repos/aaugustin/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaugustin/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaugustin/django/teams","hooks_url":"https://api.github.com/repos/aaugustin/django/hooks","issue_events_url":"https://api.github.com/repos/aaugustin/django/issues/events{/number}","events_url":"https://api.github.com/repos/aaugustin/django/events","assignees_url":"https://api.github.com/repos/aaugustin/django/assignees{/user}","branches_url":"https://api.github.com/repos/aaugustin/django/branches{/branch}","tags_url":"https://api.github.com/repos/aaugustin/django/tags","blobs_url":"https://api.github.com/repos/aaugustin/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaugustin/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaugustin/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaugustin/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaugustin/django/statuses/{sha}","languages_url":"https://api.github.com/repos/aaugustin/django/languages","stargazers_url":"https://api.github.com/repos/aaugustin/django/stargazers","contributors_url":"https://api.github.com/repos/aaugustin/django/contributors","subscribers_url":"https://api.github.com/repos/aaugustin/django/subscribers","subscription_url":"https://api.github.com/repos/aaugustin/django/subscription","commits_url":"https://api.github.com/repos/aaugustin/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaugustin/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaugustin/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaugustin/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaugustin/django/contents/{+path}","compare_url":"https://api.github.com/repos/aaugustin/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaugustin/django/merges","archive_url":"https://api.github.com/repos/aaugustin/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaugustin/django/downloads","issues_url":"https://api.github.com/repos/aaugustin/django/issues{/number}","pulls_url":"https://api.github.com/repos/aaugustin/django/pulls{/number}","milestones_url":"https://api.github.com/repos/aaugustin/django/milestones{/number}","notifications_url":"https://api.github.com/repos/aaugustin/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaugustin/django/labels{/name}","releases_url":"https://api.github.com/repos/aaugustin/django/releases{/id}","created_at":"2012-07-20T20:52:27Z","updated_at":"2015-02-06T11:34:26Z","pushed_at":"2015-09-20T19:56:55Z","git_url":"git://github.com/aaugustin/django.git","ssh_url":"git@github.com:aaugustin/django.git","clone_url":"https://github.com/aaugustin/django.git","svn_url":"https://github.com/aaugustin/django","homepage":"http://www.djangoproject.com/","size":131233,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"8dc3ba5cebcf19a4013542e7c2f5faea73a02724","user":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","created_at":"2012-04-28T02:47:18Z","updated_at":"2015-09-21T02:17:49Z","pushed_at":"2015-09-21T03:37:11Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":313290,"stargazers_count":16022,"watchers_count":16022,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6450,"mirror_url":null,"open_issues_count":65,"forks":6450,"open_issues":65,"watchers":16022,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/5318"},"html":{"href":"https://github.com/django/django/pull/5318"},"issue":{"href":"https://api.github.com/repos/django/django/issues/5318"},"comments":{"href":"https://api.github.com/repos/django/django/issues/5318/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/5318/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/5318/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/fe0b68655d8096f5557ab866768207186c539654"}}}}