{"action":"created","comment":{"url":"https://api.github.com/repos/conda/conda/pulls/comments/66627331","id":66627331,"diff_hunk":"@@ -1,17 +1,21 @@\n # -*- coding: utf-8 -*-\n from __future__ import absolute_import, division, print_function\n \n-import pytest\n from contextlib import contextmanager\n from glob import glob\n from logging import getLogger, Handler\n from os.path import exists, isdir, join, relpath\n from shlex import split\n from shutil import rmtree\n+import subprocess\n+import sys\n from tempfile import gettempdir\n from unittest import TestCase\n from uuid import uuid4\n \n+from menuinst.win32 import dirs as win_locations","path":"tests/test_create.py","position":17,"original_position":17,"commit_id":"b547b08a77b9ce079f1968e3d68e5ffc3fafaa88","original_commit_id":"b547b08a77b9ce079f1968e3d68e5ffc3fafaa88","user":{"login":"kalefranz","id":1418419,"avatar_url":"https://avatars.githubusercontent.com/u/1418419?v=3","gravatar_id":"","url":"https://api.github.com/users/kalefranz","html_url":"https://github.com/kalefranz","followers_url":"https://api.github.com/users/kalefranz/followers","following_url":"https://api.github.com/users/kalefranz/following{/other_user}","gists_url":"https://api.github.com/users/kalefranz/gists{/gist_id}","starred_url":"https://api.github.com/users/kalefranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalefranz/subscriptions","organizations_url":"https://api.github.com/users/kalefranz/orgs","repos_url":"https://api.github.com/users/kalefranz/repos","events_url":"https://api.github.com/users/kalefranz/events{/privacy}","received_events_url":"https://api.github.com/users/kalefranz/received_events","type":"User","site_admin":false},"body":"Oh, the import is in test code.  Yeah, in-line it, and then use pytest skipif.\r\n\r\nGenerally, in-line imports should be used only in very special cases in non-test code.  In test code, use all the in-line imports you want.","created_at":"2016-06-10T14:55:56Z","updated_at":"2016-06-10T14:55:56Z","html_url":"https://github.com/conda/conda/pull/2623#discussion_r66627331","pull_request_url":"https://api.github.com/repos/conda/conda/pulls/2623","_links":{"self":{"href":"https://api.github.com/repos/conda/conda/pulls/comments/66627331"},"html":{"href":"https://github.com/conda/conda/pull/2623#discussion_r66627331"},"pull_request":{"href":"https://api.github.com/repos/conda/conda/pulls/2623"}}},"pull_request":{"url":"https://api.github.com/repos/conda/conda/pulls/2623","id":73103671,"html_url":"https://github.com/conda/conda/pull/2623","diff_url":"https://github.com/conda/conda/pull/2623.diff","patch_url":"https://github.com/conda/conda/pull/2623.patch","issue_url":"https://api.github.com/repos/conda/conda/issues/2623","number":2623,"state":"open","locked":false,"title":"add --shortcuts option that installs shortcuts.  Disables shortcuts b…","user":{"login":"msarahan","id":38393,"avatar_url":"https://avatars.githubusercontent.com/u/38393?v=3","gravatar_id":"","url":"https://api.github.com/users/msarahan","html_url":"https://github.com/msarahan","followers_url":"https://api.github.com/users/msarahan/followers","following_url":"https://api.github.com/users/msarahan/following{/other_user}","gists_url":"https://api.github.com/users/msarahan/gists{/gist_id}","starred_url":"https://api.github.com/users/msarahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msarahan/subscriptions","organizations_url":"https://api.github.com/users/msarahan/orgs","repos_url":"https://api.github.com/users/msarahan/repos","events_url":"https://api.github.com/users/msarahan/events{/privacy}","received_events_url":"https://api.github.com/users/msarahan/received_events","type":"User","site_admin":false},"body":"Purpose here is to provide a --shortcut argument to conda create and conda install that enables shortcut installation.  This replaces the current default of always installing shortcuts, which causes problems on Windows when a system-wide install is given to users - though they may have write permissions to the root conda environment, they can't do the elevation to install shortcuts as all users.\r\n\r\nNeeds tests.  I'm thinking it should be a test that runs a dummy creation/install with:\r\n    - install console_shortcut package, known to have a shortcut\r\n    - environment starting with _ should have output text about prefix starting with '_', so no shortcuts installed.  This is sufficient to know that the correct code path is exercised.\r\n    - environment not starting with _ should not raise any exceptions.  Do we want to clean up any shortcut files that this would create?\r\n\r\nI have not altered removal logic, with the thought that removal can safely always happen - this needs a test, too: install console_shortcut to a prefix without --shortcuts, (shortcuts should not be created), then remove the package with conda remove - any barfs?\r\n\r\nWhere should these tests go, Kale?   Do you see any way to do these in-process?\r\n\r\n@kalefranz @joelhullcio ","created_at":"2016-06-08T19:14:17Z","updated_at":"2016-06-10T14:55:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35232b6e4faa686ffffd7007ea028b03dfc97aa3","assignee":null,"milestone":{"url":"https://api.github.com/repos/conda/conda/milestones/2","html_url":"https://github.com/conda/conda/milestones/4.1","labels_url":"https://api.github.com/repos/conda/conda/milestones/2/labels","id":1716159,"number":2,"title":"4.1","description":"","creator":{"login":"kalefranz","id":1418419,"avatar_url":"https://avatars.githubusercontent.com/u/1418419?v=3","gravatar_id":"","url":"https://api.github.com/users/kalefranz","html_url":"https://github.com/kalefranz","followers_url":"https://api.github.com/users/kalefranz/followers","following_url":"https://api.github.com/users/kalefranz/following{/other_user}","gists_url":"https://api.github.com/users/kalefranz/gists{/gist_id}","starred_url":"https://api.github.com/users/kalefranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalefranz/subscriptions","organizations_url":"https://api.github.com/users/kalefranz/orgs","repos_url":"https://api.github.com/users/kalefranz/repos","events_url":"https://api.github.com/users/kalefranz/events{/privacy}","received_events_url":"https://api.github.com/users/kalefranz/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":62,"state":"open","created_at":"2016-04-19T03:25:44Z","updated_at":"2016-06-10T03:00:53Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/conda/conda/pulls/2623/commits","review_comments_url":"https://api.github.com/repos/conda/conda/pulls/2623/comments","review_comment_url":"https://api.github.com/repos/conda/conda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/conda/conda/issues/2623/comments","statuses_url":"https://api.github.com/repos/conda/conda/statuses/b547b08a77b9ce079f1968e3d68e5ffc3fafaa88","head":{"label":"msarahan:optional_shortcuts","ref":"optional_shortcuts","sha":"b547b08a77b9ce079f1968e3d68e5ffc3fafaa88","user":{"login":"msarahan","id":38393,"avatar_url":"https://avatars.githubusercontent.com/u/38393?v=3","gravatar_id":"","url":"https://api.github.com/users/msarahan","html_url":"https://github.com/msarahan","followers_url":"https://api.github.com/users/msarahan/followers","following_url":"https://api.github.com/users/msarahan/following{/other_user}","gists_url":"https://api.github.com/users/msarahan/gists{/gist_id}","starred_url":"https://api.github.com/users/msarahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msarahan/subscriptions","organizations_url":"https://api.github.com/users/msarahan/orgs","repos_url":"https://api.github.com/users/msarahan/repos","events_url":"https://api.github.com/users/msarahan/events{/privacy}","received_events_url":"https://api.github.com/users/msarahan/received_events","type":"User","site_admin":false},"repo":{"id":44129453,"name":"conda","full_name":"msarahan/conda","owner":{"login":"msarahan","id":38393,"avatar_url":"https://avatars.githubusercontent.com/u/38393?v=3","gravatar_id":"","url":"https://api.github.com/users/msarahan","html_url":"https://github.com/msarahan","followers_url":"https://api.github.com/users/msarahan/followers","following_url":"https://api.github.com/users/msarahan/following{/other_user}","gists_url":"https://api.github.com/users/msarahan/gists{/gist_id}","starred_url":"https://api.github.com/users/msarahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msarahan/subscriptions","organizations_url":"https://api.github.com/users/msarahan/orgs","repos_url":"https://api.github.com/users/msarahan/repos","events_url":"https://api.github.com/users/msarahan/events{/privacy}","received_events_url":"https://api.github.com/users/msarahan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/msarahan/conda","description":"Cross-platform, Python-agnostic binary package manager","fork":true,"url":"https://api.github.com/repos/msarahan/conda","forks_url":"https://api.github.com/repos/msarahan/conda/forks","keys_url":"https://api.github.com/repos/msarahan/conda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/msarahan/conda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/msarahan/conda/teams","hooks_url":"https://api.github.com/repos/msarahan/conda/hooks","issue_events_url":"https://api.github.com/repos/msarahan/conda/issues/events{/number}","events_url":"https://api.github.com/repos/msarahan/conda/events","assignees_url":"https://api.github.com/repos/msarahan/conda/assignees{/user}","branches_url":"https://api.github.com/repos/msarahan/conda/branches{/branch}","tags_url":"https://api.github.com/repos/msarahan/conda/tags","blobs_url":"https://api.github.com/repos/msarahan/conda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/msarahan/conda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/msarahan/conda/git/refs{/sha}","trees_url":"https://api.github.com/repos/msarahan/conda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/msarahan/conda/statuses/{sha}","languages_url":"https://api.github.com/repos/msarahan/conda/languages","stargazers_url":"https://api.github.com/repos/msarahan/conda/stargazers","contributors_url":"https://api.github.com/repos/msarahan/conda/contributors","subscribers_url":"https://api.github.com/repos/msarahan/conda/subscribers","subscription_url":"https://api.github.com/repos/msarahan/conda/subscription","commits_url":"https://api.github.com/repos/msarahan/conda/commits{/sha}","git_commits_url":"https://api.github.com/repos/msarahan/conda/git/commits{/sha}","comments_url":"https://api.github.com/repos/msarahan/conda/comments{/number}","issue_comment_url":"https://api.github.com/repos/msarahan/conda/issues/comments{/number}","contents_url":"https://api.github.com/repos/msarahan/conda/contents/{+path}","compare_url":"https://api.github.com/repos/msarahan/conda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/msarahan/conda/merges","archive_url":"https://api.github.com/repos/msarahan/conda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/msarahan/conda/downloads","issues_url":"https://api.github.com/repos/msarahan/conda/issues{/number}","pulls_url":"https://api.github.com/repos/msarahan/conda/pulls{/number}","milestones_url":"https://api.github.com/repos/msarahan/conda/milestones{/number}","notifications_url":"https://api.github.com/repos/msarahan/conda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/msarahan/conda/labels{/name}","releases_url":"https://api.github.com/repos/msarahan/conda/releases{/id}","deployments_url":"https://api.github.com/repos/msarahan/conda/deployments","created_at":"2015-10-12T19:30:45Z","updated_at":"2015-10-12T19:30:47Z","pushed_at":"2016-06-09T22:05:23Z","git_url":"git://github.com/msarahan/conda.git","ssh_url":"git@github.com:msarahan/conda.git","clone_url":"https://github.com/msarahan/conda.git","svn_url":"https://github.com/msarahan/conda","homepage":"conda.pydata.org","size":7395,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"conda:master","ref":"master","sha":"bd5428eb54b0314bd3997805f3e92a16c4ef909f","user":{"login":"conda","id":6392739,"avatar_url":"https://avatars.githubusercontent.com/u/6392739?v=3","gravatar_id":"","url":"https://api.github.com/users/conda","html_url":"https://github.com/conda","followers_url":"https://api.github.com/users/conda/followers","following_url":"https://api.github.com/users/conda/following{/other_user}","gists_url":"https://api.github.com/users/conda/gists{/gist_id}","starred_url":"https://api.github.com/users/conda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conda/subscriptions","organizations_url":"https://api.github.com/users/conda/orgs","repos_url":"https://api.github.com/users/conda/repos","events_url":"https://api.github.com/users/conda/events{/privacy}","received_events_url":"https://api.github.com/users/conda/received_events","type":"Organization","site_admin":false},"repo":{"id":6235174,"name":"conda","full_name":"conda/conda","owner":{"login":"conda","id":6392739,"avatar_url":"https://avatars.githubusercontent.com/u/6392739?v=3","gravatar_id":"","url":"https://api.github.com/users/conda","html_url":"https://github.com/conda","followers_url":"https://api.github.com/users/conda/followers","following_url":"https://api.github.com/users/conda/following{/other_user}","gists_url":"https://api.github.com/users/conda/gists{/gist_id}","starred_url":"https://api.github.com/users/conda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conda/subscriptions","organizations_url":"https://api.github.com/users/conda/orgs","repos_url":"https://api.github.com/users/conda/repos","events_url":"https://api.github.com/users/conda/events{/privacy}","received_events_url":"https://api.github.com/users/conda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/conda/conda","description":"OS-agnostic, system-level binary package manager and ecosystem","fork":false,"url":"https://api.github.com/repos/conda/conda","forks_url":"https://api.github.com/repos/conda/conda/forks","keys_url":"https://api.github.com/repos/conda/conda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/conda/conda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/conda/conda/teams","hooks_url":"https://api.github.com/repos/conda/conda/hooks","issue_events_url":"https://api.github.com/repos/conda/conda/issues/events{/number}","events_url":"https://api.github.com/repos/conda/conda/events","assignees_url":"https://api.github.com/repos/conda/conda/assignees{/user}","branches_url":"https://api.github.com/repos/conda/conda/branches{/branch}","tags_url":"https://api.github.com/repos/conda/conda/tags","blobs_url":"https://api.github.com/repos/conda/conda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/conda/conda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/conda/conda/git/refs{/sha}","trees_url":"https://api.github.com/repos/conda/conda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/conda/conda/statuses/{sha}","languages_url":"https://api.github.com/repos/conda/conda/languages","stargazers_url":"https://api.github.com/repos/conda/conda/stargazers","contributors_url":"https://api.github.com/repos/conda/conda/contributors","subscribers_url":"https://api.github.com/repos/conda/conda/subscribers","subscription_url":"https://api.github.com/repos/conda/conda/subscription","commits_url":"https://api.github.com/repos/conda/conda/commits{/sha}","git_commits_url":"https://api.github.com/repos/conda/conda/git/commits{/sha}","comments_url":"https://api.github.com/repos/conda/conda/comments{/number}","issue_comment_url":"https://api.github.com/repos/conda/conda/issues/comments{/number}","contents_url":"https://api.github.com/repos/conda/conda/contents/{+path}","compare_url":"https://api.github.com/repos/conda/conda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/conda/conda/merges","archive_url":"https://api.github.com/repos/conda/conda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/conda/conda/downloads","issues_url":"https://api.github.com/repos/conda/conda/issues{/number}","pulls_url":"https://api.github.com/repos/conda/conda/pulls{/number}","milestones_url":"https://api.github.com/repos/conda/conda/milestones{/number}","notifications_url":"https://api.github.com/repos/conda/conda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/conda/conda/labels{/name}","releases_url":"https://api.github.com/repos/conda/conda/releases{/id}","deployments_url":"https://api.github.com/repos/conda/conda/deployments","created_at":"2012-10-15T22:08:03Z","updated_at":"2016-06-10T13:23:42Z","pushed_at":"2016-06-10T14:39:51Z","git_url":"git://github.com/conda/conda.git","ssh_url":"git@github.com:conda/conda.git","clone_url":"https://github.com/conda/conda.git","svn_url":"https://github.com/conda/conda","homepage":"conda.pydata.org","size":12758,"stargazers_count":750,"watchers_count":750,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":259,"mirror_url":null,"open_issues_count":877,"forks":259,"open_issues":877,"watchers":750,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/conda/conda/pulls/2623"},"html":{"href":"https://github.com/conda/conda/pull/2623"},"issue":{"href":"https://api.github.com/repos/conda/conda/issues/2623"},"comments":{"href":"https://api.github.com/repos/conda/conda/issues/2623/comments"},"review_comments":{"href":"https://api.github.com/repos/conda/conda/pulls/2623/comments"},"review_comment":{"href":"https://api.github.com/repos/conda/conda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/conda/conda/pulls/2623/commits"},"statuses":{"href":"https://api.github.com/repos/conda/conda/statuses/b547b08a77b9ce079f1968e3d68e5ffc3fafaa88"}}}}
{"actor":{"display_login":"kalefranz"}}