{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/90770401","pull_request_review_id":11288454,"id":90770401,"diff_hunk":"@@ -143,6 +146,20 @@ def _activate_virtualenv(topdir):\n         os.path.join(\"tests\", \"wpt\", \"harness\", \"requirements_servo.txt\"),\n     ]\n \n+    if need_pip_upgrade:\n+        # Upgrade pip when virtualenv is created to fix the issue\n+        # https://github.com/servo/servo/issues/11074\n+        pip = _get_exec_path(PIP_NAMES, is_valid_path=check_exec_path)\n+        if not pip:\n+            sys.exit(\"Python pip is either not installed or not found in virtualenv.\")","path":"python/mach_bootstrap.py","position":26,"original_position":26,"commit_id":"044b5ff26b4998f18a104140c2dc1d39541509be","original_commit_id":"044b5ff26b4998f18a104140c2dc1d39541509be","user":{"login":"PeterZhizhin","id":5682184,"avatar_url":"https://avatars.githubusercontent.com/u/5682184?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterZhizhin","html_url":"https://github.com/PeterZhizhin","followers_url":"https://api.github.com/users/PeterZhizhin/followers","following_url":"https://api.github.com/users/PeterZhizhin/following{/other_user}","gists_url":"https://api.github.com/users/PeterZhizhin/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterZhizhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterZhizhin/subscriptions","organizations_url":"https://api.github.com/users/PeterZhizhin/orgs","repos_url":"https://api.github.com/users/PeterZhizhin/repos","events_url":"https://api.github.com/users/PeterZhizhin/events{/privacy}","received_events_url":"https://api.github.com/users/PeterZhizhin/received_events","type":"User","site_admin":false},"body":"At this point we have pip inside virtualenv. But the problem could be that it's version is too old.\r\nTo solve the issue, we update it.","created_at":"2016-12-04T04:25:48Z","updated_at":"2016-12-04T04:25:48Z","html_url":"https://github.com/servo/servo/pull/14452#discussion_r90770401","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/14452","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/90770401"},"html":{"href":"https://github.com/servo/servo/pull/14452#discussion_r90770401"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/14452"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/14452","id":96404661,"html_url":"https://github.com/servo/servo/pull/14452","diff_url":"https://github.com/servo/servo/pull/14452.diff","patch_url":"https://github.com/servo/servo/pull/14452.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/14452","number":14452,"state":"open","locked":false,"title":"Commit that fixes the issue #11074 by upgrading pip whenever virtuale…","user":{"login":"PeterZhizhin","id":5682184,"avatar_url":"https://avatars.githubusercontent.com/u/5682184?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterZhizhin","html_url":"https://github.com/PeterZhizhin","followers_url":"https://api.github.com/users/PeterZhizhin/followers","following_url":"https://api.github.com/users/PeterZhizhin/following{/other_user}","gists_url":"https://api.github.com/users/PeterZhizhin/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterZhizhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterZhizhin/subscriptions","organizations_url":"https://api.github.com/users/PeterZhizhin/orgs","repos_url":"https://api.github.com/users/PeterZhizhin/repos","events_url":"https://api.github.com/users/PeterZhizhin/events{/privacy}","received_events_url":"https://api.github.com/users/PeterZhizhin/received_events","type":"User","site_admin":false},"body":"<!-- Please describe your changes on the following line: -->\r\nI have kind of resolved the issue #11074 by adding bool variable which is set to `True` if we had created the virtualenv and `False` otherwise.\r\n\r\nThen it updates pip by executing `pip install --upgrade pip` in the same way as packages are updated. I am a little bit worried that I have almost duplicated the installation routine from the `for` loop but I am not sure whether I should add a function or not.\r\n\r\nI think it is the best way of doing this because it does not need any Internet access for regular work (only for the first time you execute mach) as @larsbergstrom worried [here](https://github.com/servo/servo/pull/11149). It also doesn't add any extra latency on a no-op build.\r\n\r\nI have checked the solution inside a docker container based on debian wheezy. Before the patch `./mach` failed to run because it wasn't able to install some packages. Now it runs successfully.\r\n\r\n---\r\n<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->\r\n- [X] `./mach build -d` does not report any errors\r\n- [X] `./mach test-tidy` does not report any errors\r\n- [X] These changes fix #11074 (github issue number if applicable).\r\n\r\n<!-- Either: -->\r\n- [ ] There are tests for these changes OR\r\n- [X] These changes do not require tests because it changes only mach_bootstrap.py\r\n\r\n<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/14452)\n<!-- Reviewable:end -->\n","created_at":"2016-12-03T17:40:22Z","updated_at":"2016-12-04T04:25:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb2308c27424d9f91128a25c26884424615e959e","assignee":{"login":"frewsxcv","id":416575,"avatar_url":"https://avatars.githubusercontent.com/u/416575?v=3","gravatar_id":"","url":"https://api.github.com/users/frewsxcv","html_url":"https://github.com/frewsxcv","followers_url":"https://api.github.com/users/frewsxcv/followers","following_url":"https://api.github.com/users/frewsxcv/following{/other_user}","gists_url":"https://api.github.com/users/frewsxcv/gists{/gist_id}","starred_url":"https://api.github.com/users/frewsxcv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frewsxcv/subscriptions","organizations_url":"https://api.github.com/users/frewsxcv/orgs","repos_url":"https://api.github.com/users/frewsxcv/repos","events_url":"https://api.github.com/users/frewsxcv/events{/privacy}","received_events_url":"https://api.github.com/users/frewsxcv/received_events","type":"User","site_admin":false},"assignees":[{"login":"frewsxcv","id":416575,"avatar_url":"https://avatars.githubusercontent.com/u/416575?v=3","gravatar_id":"","url":"https://api.github.com/users/frewsxcv","html_url":"https://github.com/frewsxcv","followers_url":"https://api.github.com/users/frewsxcv/followers","following_url":"https://api.github.com/users/frewsxcv/following{/other_user}","gists_url":"https://api.github.com/users/frewsxcv/gists{/gist_id}","starred_url":"https://api.github.com/users/frewsxcv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frewsxcv/subscriptions","organizations_url":"https://api.github.com/users/frewsxcv/orgs","repos_url":"https://api.github.com/users/frewsxcv/repos","events_url":"https://api.github.com/users/frewsxcv/events{/privacy}","received_events_url":"https://api.github.com/users/frewsxcv/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/14452/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/14452/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/14452/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/044b5ff26b4998f18a104140c2dc1d39541509be","head":{"label":"PeterZhizhin:upgrade-pip-with-new-virtualenv","ref":"upgrade-pip-with-new-virtualenv","sha":"044b5ff26b4998f18a104140c2dc1d39541509be","user":{"login":"PeterZhizhin","id":5682184,"avatar_url":"https://avatars.githubusercontent.com/u/5682184?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterZhizhin","html_url":"https://github.com/PeterZhizhin","followers_url":"https://api.github.com/users/PeterZhizhin/followers","following_url":"https://api.github.com/users/PeterZhizhin/following{/other_user}","gists_url":"https://api.github.com/users/PeterZhizhin/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterZhizhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterZhizhin/subscriptions","organizations_url":"https://api.github.com/users/PeterZhizhin/orgs","repos_url":"https://api.github.com/users/PeterZhizhin/repos","events_url":"https://api.github.com/users/PeterZhizhin/events{/privacy}","received_events_url":"https://api.github.com/users/PeterZhizhin/received_events","type":"User","site_admin":false},"repo":{"id":75486399,"name":"servo","full_name":"PeterZhizhin/servo","owner":{"login":"PeterZhizhin","id":5682184,"avatar_url":"https://avatars.githubusercontent.com/u/5682184?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterZhizhin","html_url":"https://github.com/PeterZhizhin","followers_url":"https://api.github.com/users/PeterZhizhin/followers","following_url":"https://api.github.com/users/PeterZhizhin/following{/other_user}","gists_url":"https://api.github.com/users/PeterZhizhin/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterZhizhin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterZhizhin/subscriptions","organizations_url":"https://api.github.com/users/PeterZhizhin/orgs","repos_url":"https://api.github.com/users/PeterZhizhin/repos","events_url":"https://api.github.com/users/PeterZhizhin/events{/privacy}","received_events_url":"https://api.github.com/users/PeterZhizhin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PeterZhizhin/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/PeterZhizhin/servo","forks_url":"https://api.github.com/repos/PeterZhizhin/servo/forks","keys_url":"https://api.github.com/repos/PeterZhizhin/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PeterZhizhin/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PeterZhizhin/servo/teams","hooks_url":"https://api.github.com/repos/PeterZhizhin/servo/hooks","issue_events_url":"https://api.github.com/repos/PeterZhizhin/servo/issues/events{/number}","events_url":"https://api.github.com/repos/PeterZhizhin/servo/events","assignees_url":"https://api.github.com/repos/PeterZhizhin/servo/assignees{/user}","branches_url":"https://api.github.com/repos/PeterZhizhin/servo/branches{/branch}","tags_url":"https://api.github.com/repos/PeterZhizhin/servo/tags","blobs_url":"https://api.github.com/repos/PeterZhizhin/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PeterZhizhin/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PeterZhizhin/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/PeterZhizhin/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PeterZhizhin/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/PeterZhizhin/servo/languages","stargazers_url":"https://api.github.com/repos/PeterZhizhin/servo/stargazers","contributors_url":"https://api.github.com/repos/PeterZhizhin/servo/contributors","subscribers_url":"https://api.github.com/repos/PeterZhizhin/servo/subscribers","subscription_url":"https://api.github.com/repos/PeterZhizhin/servo/subscription","commits_url":"https://api.github.com/repos/PeterZhizhin/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/PeterZhizhin/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/PeterZhizhin/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/PeterZhizhin/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/PeterZhizhin/servo/contents/{+path}","compare_url":"https://api.github.com/repos/PeterZhizhin/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PeterZhizhin/servo/merges","archive_url":"https://api.github.com/repos/PeterZhizhin/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PeterZhizhin/servo/downloads","issues_url":"https://api.github.com/repos/PeterZhizhin/servo/issues{/number}","pulls_url":"https://api.github.com/repos/PeterZhizhin/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/PeterZhizhin/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/PeterZhizhin/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PeterZhizhin/servo/labels{/name}","releases_url":"https://api.github.com/repos/PeterZhizhin/servo/releases{/id}","deployments_url":"https://api.github.com/repos/PeterZhizhin/servo/deployments","created_at":"2016-12-03T16:46:03Z","updated_at":"2016-12-03T07:48:29Z","pushed_at":"2016-12-03T17:13:03Z","git_url":"git://github.com/PeterZhizhin/servo.git","ssh_url":"git@github.com:PeterZhizhin/servo.git","clone_url":"https://github.com/PeterZhizhin/servo.git","svn_url":"https://github.com/PeterZhizhin/servo","homepage":"https://servo.org/","size":221447,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"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":"servo:master","ref":"master","sha":"bd5eef58a21d54f256fed0734afe8cdce4ebb226","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":3390243,"name":"servo","full_name":"servo/servo","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars.githubusercontent.com/u/2566135?v=3","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/servo","description":"The Servo Browser Engine","fork":false,"url":"https://api.github.com/repos/servo/servo","forks_url":"https://api.github.com/repos/servo/servo/forks","keys_url":"https://api.github.com/repos/servo/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/servo/teams","hooks_url":"https://api.github.com/repos/servo/servo/hooks","issue_events_url":"https://api.github.com/repos/servo/servo/issues/events{/number}","events_url":"https://api.github.com/repos/servo/servo/events","assignees_url":"https://api.github.com/repos/servo/servo/assignees{/user}","branches_url":"https://api.github.com/repos/servo/servo/branches{/branch}","tags_url":"https://api.github.com/repos/servo/servo/tags","blobs_url":"https://api.github.com/repos/servo/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/servo/languages","stargazers_url":"https://api.github.com/repos/servo/servo/stargazers","contributors_url":"https://api.github.com/repos/servo/servo/contributors","subscribers_url":"https://api.github.com/repos/servo/servo/subscribers","subscription_url":"https://api.github.com/repos/servo/servo/subscription","commits_url":"https://api.github.com/repos/servo/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/servo/contents/{+path}","compare_url":"https://api.github.com/repos/servo/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/servo/merges","archive_url":"https://api.github.com/repos/servo/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/servo/downloads","issues_url":"https://api.github.com/repos/servo/servo/issues{/number}","pulls_url":"https://api.github.com/repos/servo/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/servo/labels{/name}","releases_url":"https://api.github.com/repos/servo/servo/releases{/id}","deployments_url":"https://api.github.com/repos/servo/servo/deployments","created_at":"2012-02-08T19:07:25Z","updated_at":"2016-12-03T07:48:29Z","pushed_at":"2016-12-03T23:16:39Z","git_url":"git://github.com/servo/servo.git","ssh_url":"git@github.com:servo/servo.git","clone_url":"https://github.com/servo/servo.git","svn_url":"https://github.com/servo/servo","homepage":"https://servo.org/","size":316702,"stargazers_count":8360,"watchers_count":8360,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1379,"mirror_url":null,"open_issues_count":1921,"forks":1379,"open_issues":1921,"watchers":8360,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/14452"},"html":{"href":"https://github.com/servo/servo/pull/14452"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/14452"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/14452/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/14452/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/14452/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/044b5ff26b4998f18a104140c2dc1d39541509be"}}}}
{"actor":{"display_login":"PeterZhizhin"}}