{"action":"created","issue":{"url":"https://api.github.com/repos/conda/conda/issues/2964","repository_url":"https://api.github.com/repos/conda/conda","labels_url":"https://api.github.com/repos/conda/conda/issues/2964/labels{/name}","comments_url":"https://api.github.com/repos/conda/conda/issues/2964/comments","events_url":"https://api.github.com/repos/conda/conda/issues/2964/events","html_url":"https://github.com/conda/conda/pull/2964","id":163483411,"number":2964,"title":"Fix channel_alias issues; improve offline enforcement","user":{"login":"mcg1969","id":2797735,"avatar_url":"https://avatars.githubusercontent.com/u/2797735?v=3","gravatar_id":"","url":"https://api.github.com/users/mcg1969","html_url":"https://github.com/mcg1969","followers_url":"https://api.github.com/users/mcg1969/followers","following_url":"https://api.github.com/users/mcg1969/following{/other_user}","gists_url":"https://api.github.com/users/mcg1969/gists{/gist_id}","starred_url":"https://api.github.com/users/mcg1969/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcg1969/subscriptions","organizations_url":"https://api.github.com/users/mcg1969/orgs","repos_url":"https://api.github.com/users/mcg1969/repos","events_url":"https://api.github.com/users/mcg1969/events{/privacy}","received_events_url":"https://api.github.com/users/mcg1969/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"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":8,"closed_issues":161,"state":"open","created_at":"2016-04-19T03:25:44Z","updated_at":"2016-07-01T23:13:15Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-07-01T22:20:29Z","updated_at":"2016-07-04T04:42:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/conda/conda/pulls/2964","html_url":"https://github.com/conda/conda/pull/2964","diff_url":"https://github.com/conda/conda/pull/2964.diff","patch_url":"https://github.com/conda/conda/pull/2964.patch"},"body":"Here's the strategy for fixing #2939 without re-breaking #2556:\r\n\r\n- Created a new function `init_binstar()` to grab the binstar domain and the tokenized domain. Placed these in _separate variables_ from `channel_alias`, so we can still refer to them if the user has changed `channel_alias` to point away from their Anaconda Server instance (as we saw in #2556).\r\n\r\n- Created a new function `channel_prefix()` that returns the proper value of `channel_alias`. From now on, `channel_alias` is accessed only through this function, so that it can be properly initialized when first needed. If `channel_alias` is `None` when this function is first called, it will be set to the Anaconda Server URL; but if it has been hardcoded, it will not be changed. \r\n\r\n- `channel_prefix` actually has two arguments: `token` and `offline`. If `token=True` _and_ `channel_alias` does in fact point to the AS instance, the token will be added to the returned URL. \r\n\r\n- `DEFAULT_CHANNEL_ALIAS` is now utilized only under two circumstances: if `offline` is True, or if anaconda-client is not installed. Note that if `offline` is True, then `DEFAULT_CHANNEL_ALIAS` will be filtered out during the normalization process (unless it's a `file:/` URL, of course).\r\n\r\n- Created a new function `add_binstar_tokens` that respects the `add_anaconda_token` flag even when `channel_alias` points away from the AS instance. This is now used in `normalize_urls` to make sure the token is added in the case where `channel_alias` points away from the AS instance."},"comment":{"url":"https://api.github.com/repos/conda/conda/issues/comments/230203541","html_url":"https://github.com/conda/conda/pull/2964#issuecomment-230203541","issue_url":"https://api.github.com/repos/conda/conda/issues/2964","id":230203541,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars.githubusercontent.com/u/8655789?v=3","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T04:42:53Z","updated_at":"2016-07-04T04:42:53Z","body":"## [Current coverage][cc-pull] is **72.22%**\n> Merging [#2964][cc-pull] into [4.1.x][cc-base-branch] will decrease coverage by **0.04%**\n\n```diff\n@@              4.1.x      #2964   diff @@\n==========================================\n  Files            45         45          \n  Lines          7046       7083    +37   \n  Methods           0          0          \n  Messages          0          0          \n  Branches          0          0          \n==========================================\n+ Hits           5091       5115    +24   \n- Misses         1955       1968    +13   \n  Partials          0          0          \n```\n\n> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [65cd26a...d78b655][cc-compare]\n[cc-base-branch]: https://codecov.io/gh/conda/conda/branch/4.1.x?src=pr\n[cc-compare]: https://codecov.io/gh/conda/conda/compare/65cd26a8977db6d3c2191831cd7ba8e8e16148c7...d78b655954ede85e38e05144304b6d6893962a0e\n[cc-pull]: https://codecov.io/gh/conda/conda/pull/2964?src=pr"}}
{"actor":{"display_login":"codecov-io"}}