{"action":"created","comment":{"url":"https://api.github.com/repos/pypa/pip/pulls/comments/72714596","id":72714596,"diff_hunk":"@@ -842,18 +856,37 @@ def clean_link(self, url):\n \n class Link(object):\n \n-    def __init__(self, url, comes_from=None):\n+    def __init__(self, url, comes_from=None, requires_python=None):\n+        \"\"\"\n+        Object representing a parsed link from https://pypi.python.org/simple/*\n+\n+        url:\n+            url of the resource pointed to (href of the link)\n+        comes_from:\n+            <Not sure>\n+        requires_python:\n+            String containing the `Requires-Python` metadata field, specified\n+            in PEP 345.\n+        \"\"\"\n \n         # url can be a UNC windows share\n         if url.startswith('\\\\\\\\'):\n             url = path_to_url(url)\n \n         self.url = url\n         self.comes_from = comes_from\n+        if not requires_python:\n+            self.requires_python = None\n+        else:\n+            self.requires_python = requires_python","path":"pip/index.py","position":null,"original_position":72,"commit_id":"d4e22ea097e7e90c2e6f88a6412bbe924d5353dd","original_commit_id":"1d10fca6fc5d5b15fd0aca8b593c48c876b370c8","user":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"body":"it fits. ","created_at":"2016-07-28T22:26:45Z","updated_at":"2016-07-28T22:26:45Z","html_url":"https://github.com/pypa/pip/pull/3877#discussion_r72714596","pull_request_url":"https://api.github.com/repos/pypa/pip/pulls/3877","_links":{"self":{"href":"https://api.github.com/repos/pypa/pip/pulls/comments/72714596"},"html":{"href":"https://github.com/pypa/pip/pull/3877#discussion_r72714596"},"pull_request":{"href":"https://api.github.com/repos/pypa/pip/pulls/3877"}}},"pull_request":{"url":"https://api.github.com/repos/pypa/pip/pulls/3877","id":78944450,"html_url":"https://github.com/pypa/pip/pull/3877","diff_url":"https://github.com/pypa/pip/pull/3877.diff","patch_url":"https://github.com/pypa/pip/pull/3877.patch","issue_url":"https://api.github.com/repos/pypa/pip/issues/3877","number":3877,"state":"open","locked":false,"title":"Implement pep 503 data-requires-python","user":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"body":"Allows pip to understand the `data-requires-python` metadata\r\ninformation that can be set on a simple repository. This allows pip to\r\nignore any release or file that would not be compatible with the current\r\nPython version even before trying to download and install this version.\r\n\r\nRelevant extract of pep 503 at the time of this writing.\r\n\r\n    A repository MAY include a data-requires-python attribute on a file\r\n    link. This exposes the Requires-Python metadata field, specified in PEP\r\n    345 , for the corresponding release. Where this is present, installer\r\n    tools SHOULD ignore the download when installing to a Python version\r\n    that doesn't satisfy the requirement. For example:\r\n\r\n    <a href=\"...\" data-requires-python=\"&gt;=3\">...</a>\r\n    In the attribute value, < and > have to be HTML encoded as &lt; and &gt;\r\n    , respectively.\r\n\r\nThis can mostly be used to, for example, mark a new sdist of a new\r\npackage version as requires-python >3.4, and not  fail to install or\r\nupgrade on users systems.\r\n\r\nThis will require extra patches to PyPI-legacy and warehouse to be\r\nusable. Though releasing a version of pip that understand this feature\r\nis necessary to have wide adoption at the time when these metadata get\r\nactually published.\r\n\r\n\r\n---- \r\n\r\nThis will partially replace https://github.com/pypa/pip/pull/3847 (from @takluyver ) once pypi-legacy and warehouse support exposing this metadata as well. I suppose this will be of interest for @astrofrog. \r\n\r\n@michaelpacer and I are trying to get a the data-requires-python into pypi-legacy, though we have issue to run it locally.  So we tested with a \"Fake\" local PyPI that just exposes static webpages that we editted by hand to include 'date-requires-python'.","created_at":"2016-07-26T23:44:41Z","updated_at":"2016-07-28T22:26:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13f6820efc9428b2b7abc9829b99f070c8d1cc16","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pypa/pip/milestones/21","html_url":"https://github.com/pypa/pip/milestones/8.2","labels_url":"https://api.github.com/repos/pypa/pip/milestones/21/labels","id":1623814,"number":21,"title":"8.2","description":"","creator":{"login":"dstufft","id":145979,"avatar_url":"https://avatars.githubusercontent.com/u/145979?v=3","gravatar_id":"","url":"https://api.github.com/users/dstufft","html_url":"https://github.com/dstufft","followers_url":"https://api.github.com/users/dstufft/followers","following_url":"https://api.github.com/users/dstufft/following{/other_user}","gists_url":"https://api.github.com/users/dstufft/gists{/gist_id}","starred_url":"https://api.github.com/users/dstufft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstufft/subscriptions","organizations_url":"https://api.github.com/users/dstufft/orgs","repos_url":"https://api.github.com/users/dstufft/repos","events_url":"https://api.github.com/users/dstufft/events{/privacy}","received_events_url":"https://api.github.com/users/dstufft/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":10,"state":"open","created_at":"2016-03-05T17:04:10Z","updated_at":"2016-07-27T08:47:48Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/pypa/pip/pulls/3877/commits","review_comments_url":"https://api.github.com/repos/pypa/pip/pulls/3877/comments","review_comment_url":"https://api.github.com/repos/pypa/pip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pypa/pip/issues/3877/comments","statuses_url":"https://api.github.com/repos/pypa/pip/statuses/d4e22ea097e7e90c2e6f88a6412bbe924d5353dd","head":{"label":"Carreau:implement-pep-503-data-requires","ref":"implement-pep-503-data-requires","sha":"d4e22ea097e7e90c2e6f88a6412bbe924d5353dd","user":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"repo":{"id":27437879,"name":"pip","full_name":"Carreau/pip","owner":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=3","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Carreau/pip","description":"The PyPA recommended tool for installing Python packages","fork":true,"url":"https://api.github.com/repos/Carreau/pip","forks_url":"https://api.github.com/repos/Carreau/pip/forks","keys_url":"https://api.github.com/repos/Carreau/pip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Carreau/pip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Carreau/pip/teams","hooks_url":"https://api.github.com/repos/Carreau/pip/hooks","issue_events_url":"https://api.github.com/repos/Carreau/pip/issues/events{/number}","events_url":"https://api.github.com/repos/Carreau/pip/events","assignees_url":"https://api.github.com/repos/Carreau/pip/assignees{/user}","branches_url":"https://api.github.com/repos/Carreau/pip/branches{/branch}","tags_url":"https://api.github.com/repos/Carreau/pip/tags","blobs_url":"https://api.github.com/repos/Carreau/pip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Carreau/pip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Carreau/pip/git/refs{/sha}","trees_url":"https://api.github.com/repos/Carreau/pip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Carreau/pip/statuses/{sha}","languages_url":"https://api.github.com/repos/Carreau/pip/languages","stargazers_url":"https://api.github.com/repos/Carreau/pip/stargazers","contributors_url":"https://api.github.com/repos/Carreau/pip/contributors","subscribers_url":"https://api.github.com/repos/Carreau/pip/subscribers","subscription_url":"https://api.github.com/repos/Carreau/pip/subscription","commits_url":"https://api.github.com/repos/Carreau/pip/commits{/sha}","git_commits_url":"https://api.github.com/repos/Carreau/pip/git/commits{/sha}","comments_url":"https://api.github.com/repos/Carreau/pip/comments{/number}","issue_comment_url":"https://api.github.com/repos/Carreau/pip/issues/comments{/number}","contents_url":"https://api.github.com/repos/Carreau/pip/contents/{+path}","compare_url":"https://api.github.com/repos/Carreau/pip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Carreau/pip/merges","archive_url":"https://api.github.com/repos/Carreau/pip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Carreau/pip/downloads","issues_url":"https://api.github.com/repos/Carreau/pip/issues{/number}","pulls_url":"https://api.github.com/repos/Carreau/pip/pulls{/number}","milestones_url":"https://api.github.com/repos/Carreau/pip/milestones{/number}","notifications_url":"https://api.github.com/repos/Carreau/pip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Carreau/pip/labels{/name}","releases_url":"https://api.github.com/repos/Carreau/pip/releases{/id}","deployments_url":"https://api.github.com/repos/Carreau/pip/deployments","created_at":"2014-12-02T15:09:41Z","updated_at":"2014-12-12T13:17:38Z","pushed_at":"2016-07-28T22:25:00Z","git_url":"git://github.com/Carreau/pip.git","ssh_url":"git@github.com:Carreau/pip.git","clone_url":"https://github.com/Carreau/pip.git","svn_url":"https://github.com/Carreau/pip","homepage":"https://pip.pypa.io/","size":43748,"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":"develop"}},"base":{"label":"pypa:master","ref":"master","sha":"c7e5f52c96b885c6583eeb6da07d32245eba541e","user":{"login":"pypa","id":647025,"avatar_url":"https://avatars.githubusercontent.com/u/647025?v=3","gravatar_id":"","url":"https://api.github.com/users/pypa","html_url":"https://github.com/pypa","followers_url":"https://api.github.com/users/pypa/followers","following_url":"https://api.github.com/users/pypa/following{/other_user}","gists_url":"https://api.github.com/users/pypa/gists{/gist_id}","starred_url":"https://api.github.com/users/pypa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypa/subscriptions","organizations_url":"https://api.github.com/users/pypa/orgs","repos_url":"https://api.github.com/users/pypa/repos","events_url":"https://api.github.com/users/pypa/events{/privacy}","received_events_url":"https://api.github.com/users/pypa/received_events","type":"Organization","site_admin":false},"repo":{"id":1446467,"name":"pip","full_name":"pypa/pip","owner":{"login":"pypa","id":647025,"avatar_url":"https://avatars.githubusercontent.com/u/647025?v=3","gravatar_id":"","url":"https://api.github.com/users/pypa","html_url":"https://github.com/pypa","followers_url":"https://api.github.com/users/pypa/followers","following_url":"https://api.github.com/users/pypa/following{/other_user}","gists_url":"https://api.github.com/users/pypa/gists{/gist_id}","starred_url":"https://api.github.com/users/pypa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypa/subscriptions","organizations_url":"https://api.github.com/users/pypa/orgs","repos_url":"https://api.github.com/users/pypa/repos","events_url":"https://api.github.com/users/pypa/events{/privacy}","received_events_url":"https://api.github.com/users/pypa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pypa/pip","description":"The PyPA recommended tool for installing Python packages","fork":false,"url":"https://api.github.com/repos/pypa/pip","forks_url":"https://api.github.com/repos/pypa/pip/forks","keys_url":"https://api.github.com/repos/pypa/pip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pypa/pip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pypa/pip/teams","hooks_url":"https://api.github.com/repos/pypa/pip/hooks","issue_events_url":"https://api.github.com/repos/pypa/pip/issues/events{/number}","events_url":"https://api.github.com/repos/pypa/pip/events","assignees_url":"https://api.github.com/repos/pypa/pip/assignees{/user}","branches_url":"https://api.github.com/repos/pypa/pip/branches{/branch}","tags_url":"https://api.github.com/repos/pypa/pip/tags","blobs_url":"https://api.github.com/repos/pypa/pip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pypa/pip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pypa/pip/git/refs{/sha}","trees_url":"https://api.github.com/repos/pypa/pip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pypa/pip/statuses/{sha}","languages_url":"https://api.github.com/repos/pypa/pip/languages","stargazers_url":"https://api.github.com/repos/pypa/pip/stargazers","contributors_url":"https://api.github.com/repos/pypa/pip/contributors","subscribers_url":"https://api.github.com/repos/pypa/pip/subscribers","subscription_url":"https://api.github.com/repos/pypa/pip/subscription","commits_url":"https://api.github.com/repos/pypa/pip/commits{/sha}","git_commits_url":"https://api.github.com/repos/pypa/pip/git/commits{/sha}","comments_url":"https://api.github.com/repos/pypa/pip/comments{/number}","issue_comment_url":"https://api.github.com/repos/pypa/pip/issues/comments{/number}","contents_url":"https://api.github.com/repos/pypa/pip/contents/{+path}","compare_url":"https://api.github.com/repos/pypa/pip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pypa/pip/merges","archive_url":"https://api.github.com/repos/pypa/pip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pypa/pip/downloads","issues_url":"https://api.github.com/repos/pypa/pip/issues{/number}","pulls_url":"https://api.github.com/repos/pypa/pip/pulls{/number}","milestones_url":"https://api.github.com/repos/pypa/pip/milestones{/number}","notifications_url":"https://api.github.com/repos/pypa/pip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pypa/pip/labels{/name}","releases_url":"https://api.github.com/repos/pypa/pip/releases{/id}","deployments_url":"https://api.github.com/repos/pypa/pip/deployments","created_at":"2011-03-06T14:30:46Z","updated_at":"2016-07-28T06:31:44Z","pushed_at":"2016-07-28T22:25:01Z","git_url":"git://github.com/pypa/pip.git","ssh_url":"git@github.com:pypa/pip.git","clone_url":"https://github.com/pypa/pip.git","svn_url":"https://github.com/pypa/pip","homepage":"https://pip.pypa.io/","size":55485,"stargazers_count":2968,"watchers_count":2968,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1116,"mirror_url":null,"open_issues_count":699,"forks":1116,"open_issues":699,"watchers":2968,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pypa/pip/pulls/3877"},"html":{"href":"https://github.com/pypa/pip/pull/3877"},"issue":{"href":"https://api.github.com/repos/pypa/pip/issues/3877"},"comments":{"href":"https://api.github.com/repos/pypa/pip/issues/3877/comments"},"review_comments":{"href":"https://api.github.com/repos/pypa/pip/pulls/3877/comments"},"review_comment":{"href":"https://api.github.com/repos/pypa/pip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pypa/pip/pulls/3877/commits"},"statuses":{"href":"https://api.github.com/repos/pypa/pip/statuses/d4e22ea097e7e90c2e6f88a6412bbe924d5353dd"}}}}
{"actor":{"display_login":"Carreau"}}