{"action":"created","issue":{"url":"https://api.github.com/repos/conda/conda/issues/2651","repository_url":"https://api.github.com/repos/conda/conda","labels_url":"https://api.github.com/repos/conda/conda/issues/2651/labels{/name}","comments_url":"https://api.github.com/repos/conda/conda/issues/2651/comments","events_url":"https://api.github.com/repos/conda/conda/issues/2651/events","html_url":"https://github.com/conda/conda/issues/2651","id":159731708,"number":2651,"title":"Python 2 only deps restricting upgrade","user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars.githubusercontent.com/u/3019665?v=3","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-10T21:59:31Z","updated_at":"2016-06-10T23:17:06Z","closed_at":null,"body":"Suppose I have package that can be on Python 2 or Python 3, but it requires some backport modules for Python 2. If I start on Python 2, the upgrade to Python 3 gets blocked by the Python 2 dependencies. However, we all know they are not really blockers and we can try to remove them and workaround them. How effective this will be depends on how locked in your stack is to them. Here is a simple example with `jsonschema`. The recipe comes from `conda-forge` so we can clearly see `functools32` is a Python 2.7 dependency only from the [recipe]( https://github.com/conda-forge/jsonschema-feedstock/blob/fba25c91b4b79579ba261e68667aaec78fa9f33d/recipe/meta.yaml#L23 ). First I try to go straight to Python 3.\r\n\r\n```bash\r\n$ conda create -n jssenv python=2 jsonschema\r\nUsing Anaconda Cloud api site https://api.anaconda.org\r\nFetching package metadata: ............\r\nSolving package specifications: .........\r\n\r\nPackage plan for installation in environment /zopt/conda2/envs/jssenv:\r\n\r\nThe following NEW packages will be INSTALLED:\r\n\r\n    functools32: 3.2.3.2-py27_1 conda-forge\r\n    jsonschema:  2.5.1-py27_0   conda-forge\r\n    openssl:     1.0.2h-1       defaults   \r\n    pip:         8.1.2-py27_0   defaults   \r\n    python:      2.7.11-0       defaults   \r\n    readline:    6.2-2          defaults   \r\n    setuptools:  23.0.0-py27_0  defaults   \r\n    sqlite:      3.13.0-1       conda-forge\r\n    tk:          8.5.19-0       conda-forge\r\n    wheel:       0.29.0-py27_0  defaults   \r\n    zlib:        1.2.8-3        conda-forge\r\n\r\nProceed ([y]/n)? \r\n\r\nLinking packages ...\r\n[      COMPLETE      ]|################################################################################################################################| 100%\r\n#\r\n# To activate this environment, use:\r\n# $ source activate jssenv\r\n#\r\n# To deactivate this environment, use:\r\n# $ source deactivate\r\n#\r\n$ conda install -n jssenv python=3 \r\nUsing Anaconda Cloud api site https://api.anaconda.org\r\nFetching package metadata: ............\r\nSolving package specifications: ....\r\n\r\nThe following specifications were found to be in conflict:\r\n  - functools32 (target=functools32-3.2.3.2-py27_1.tar.bz2) -> python 2.7.*\r\n  - python 3*\r\nUse \"conda info <package>\" to see the dependencies for each package.\r\n```\r\n\r\nAs this doesn't work, I remove the Python 2 dependencies (in this case only one). Fortunately, it finds an older version of `jsonschema` where this dependency is not required. However, this is not always the case.\r\n\r\n```bash\r\n$ conda remove -n jssenv functools32\r\nUsing Anaconda Cloud api site https://api.anaconda.org\r\nFetching package metadata: ............\r\nSolving package specifications: .........\r\n\r\nPackage plan for package removal in environment /zopt/conda2/envs/jssenv:\r\n\r\nThe following packages will be REMOVED:\r\n\r\n    functools32: 3.2.3.2-py27_1 conda-forge\r\n\r\nThe following packages will be DOWNGRADED:\r\n\r\n    jsonschema:  2.5.1-py27_0   conda-forge --> 2.4.0-py27_0 defaults\r\n\r\nProceed ([y]/n)? \r\n\r\nUnlinking packages ...\r\n[      COMPLETE      ]|################################################################################################################################| 100%\r\nLinking packages ...\r\n[      COMPLETE      ]|################################################################################################################################| 100%\r\n$ conda install -n jssenv python=3 \r\nUsing Anaconda Cloud api site https://api.anaconda.org\r\nFetching package metadata: ............\r\nSolving package specifications: .........\r\n\r\nPackage plan for installation in environment /zopt/conda2/envs/jssenv:\r\n\r\nThe following packages will be downloaded:\r\n\r\n    package                    |            build\r\n    ---------------------------|-----------------\r\n    jsonschema-2.4.0           |           py35_0          53 KB  defaults\r\n\r\nThe following NEW packages will be INSTALLED:\r\n\r\n    xz:         5.0.5-1       conda-forge\r\n\r\nThe following packages will be UPDATED:\r\n\r\n    jsonschema: 2.4.0-py27_0  defaults    --> 2.4.0-py35_0  defaults   \r\n    pip:        8.1.2-py27_0  defaults    --> 8.1.2-py35_0  defaults   \r\n    python:     2.7.11-0      defaults    --> 3.5.1-0       conda-forge\r\n    setuptools: 23.0.0-py27_0 defaults    --> 23.0.0-py35_0 defaults   \r\n    wheel:      0.29.0-py27_0 defaults    --> 0.29.0-py35_0 defaults   \r\n\r\nThe following packages will be DOWNGRADED:\r\n\r\n    sqlite:     3.13.0-1      conda-forge --> 3.9.2-0       conda-forge\r\n\r\nProceed ([y]/n)? \r\n\r\nFetching packages ...\r\njsonschema-2.4 100% |#############################################################################################################| Time: 0:00:00 361.96 kB/s\r\nExtracting packages ...\r\n[      COMPLETE      ]|################################################################################################################################| 100%\r\nUnlinking packages ...\r\n[      COMPLETE      ]|################################################################################################################################| 100%\r\nLinking packages ...\r\n[      COMPLETE      ]|################################################################################################################################| 100%\r\n```\r\n\r\nNow I don't know what the *right* solution is here. Maybe it is worth telling the user that these packages must be removed as part of the upgrade and ask for confirmation that this is ok. While this example is simple, it becomes less straightforward for larger stacks (if it is possible at all). I would really appreciate hearing some thoughts on this."},"comment":{"url":"https://api.github.com/repos/conda/conda/issues/comments/225317758","html_url":"https://github.com/conda/conda/issues/2651#issuecomment-225317758","issue_url":"https://api.github.com/repos/conda/conda/issues/2651","id":225317758,"user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars.githubusercontent.com/u/3019665?v=3","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T23:17:05Z","updated_at":"2016-06-10T23:17:05Z","body":"Great info, @mingwandroid! I figured there was a precedent for this behavior elsewhere. It might be good if we can compare some more approaches and see what we can glean from them."}}
{"actor":{"display_login":"jakirkham"}}