repo
stringclasses 856
values | pull_number
int64 3
127k
| instance_id
stringlengths 12
58
| issue_numbers
sequencelengths 1
5
| base_commit
stringlengths 40
40
| patch
stringlengths 67
1.54M
| test_patch
stringlengths 0
107M
| problem_statement
stringlengths 3
307k
| hints_text
stringlengths 0
908k
| created_at
timestamp[s] |
---|---|---|---|---|---|---|---|---|---|
conda/conda | 8,154 | conda__conda-8154 | [
"8150"
] | b69054c6de710b8f46abbec2710205395369aec4 | diff --git a/conda/core/subdir_data.py b/conda/core/subdir_data.py
--- a/conda/core/subdir_data.py
+++ b/conda/core/subdir_data.py
@@ -448,15 +448,15 @@ def fetch_repodata_remote_request(url, etag, mod_stamp):
status_code = getattr(e.response, 'status_code', None)
if status_code in (403, 404):
if not url.endswith('/noarch'):
+ log.info("Unable to retrieve repodata (%d error) for %s", status_code, url)
+ return None
+ else:
if context.allow_non_channel_urls:
stderrlog.warning("Unable to retrieve repodata (%d error) for %s",
status_code, url)
return None
else:
raise UnavailableInvalidChannel(Channel(dirname(url)), status_code)
- else:
- log.info("Unable to retrieve repodata (%d error) for %s", status_code, url)
- return None
elif status_code == 401:
channel = Channel(url)
| diff --git a/tests/core/test_repodata.py b/tests/core/test_repodata.py
--- a/tests/core/test_repodata.py
+++ b/tests/core/test_repodata.py
@@ -12,7 +12,7 @@
from conda.common.io import env_var
from conda.core.index import get_index
from conda.core.subdir_data import Response304ContentUnchanged, cache_fn_url, read_mod_and_etag, \
- SubdirData
+ SubdirData, fetch_repodata_remote_request, UnavailableInvalidChannel
from conda.models.channel import Channel
try:
@@ -163,6 +163,24 @@ def test_cache_fn_url_repo_anaconda_com(self):
assert hash4 != hash6
+class FetchLocalRepodataTests(TestCase):
+
+ def test_fetch_repodata_remote_request_invalid_arch(self):
+ # see https://github.com/conda/conda/issues/8150
+ url = 'file:///fake/fake/fake/linux-64'
+ etag = None
+ mod_stamp = 'Mon, 28 Jan 2019 01:01:01 GMT'
+ result = fetch_repodata_remote_request(url, etag, mod_stamp)
+ assert result is None
+
+ def test_fetch_repodata_remote_request_invalid_noarch(self):
+ url = 'file:///fake/fake/fake/noarch'
+ etag = None
+ mod_stamp = 'Mon, 28 Jan 2019 01:01:01 GMT'
+ with pytest.raises(UnavailableInvalidChannel):
+ result = fetch_repodata_remote_request(url, etag, mod_stamp)
+
+
# @pytest.mark.integration
# class SubdirDataTests(TestCase):
#
| Local filesystem channel fails with conda 4.6
## Current Behavior
After updating to conda 4.6.1, using a local channel with for example `conda search -c file:///some/path '*'` fails with an `UnavailableInvalidChannel` error, while it worked as expected with conda 4.5.12.
### Steps to Reproduce
```
$ tree /opt/conda/conda-bld
/opt/conda/conda-bld
└── noarch
└── mypkg-1.0.0-py_0.tar.bz2
$ conda index /opt/conda/conda-bld
$ conda search -c file:///opt/conda/conda-bld '*'
UnavailableInvalidChannel: The channel is not accessible or is invalid.
channel name: opt/conda/conda-bld
channel url: file:///opt/conda/conda-bld
error code: 404
You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.
As of conda 4.3, a valid channel must contain a `noarch/repodata.json` and
associated `noarch/repodata.json.bz2` file, even if `noarch/repodata.json` is
empty. Use `conda index /opt/conda/conda-bld`, or create `noarch/repodata.json`
and associated `noarch/repodata.json.bz2`.
```
When switching back to conda 4.5.12 it works as expected:
```
$ conda install -y conda==4.5.12
$ conda search -c file:///opt/conda/conda-bld '*'
Loading channels: done
# Name Version Build Channel
mypkg 1.0.0 py_0 conda-bld
```
## Expected Behavior
The local channel should be used successfully as with conda 4.5.12.
## Environment Information
conda: 4.5.12
conda-build: 3.17.8
python: 3.7.1
| Thanks for reporting. conda-build 3.17.8 was built with 4.6.1 (https://ci.appveyor.com/project/conda-forge/conda-build-feedstock/builds/21915370), so I don't think it's 4.6.1 itself. Probably something subtle went wrong with conda-build 3.17.8 in its interaction with conda.
I see the same issues on my windows machines when using conda 4.6 but also for channels which are not related to the local conda-bld channel. In my case these are channels on network shares.
I'm getting this error for local channels accessed through HTTP. Exact same error message. Downgrading to 4.5.12 fixes this issue.
It appears as if conda 4.6.1 is expecting the presence of a `repodata.json` file in both the noarch directory and the directory of the current platform (for example linux-64). Conda 4.5.12 only required the noarch repodata.json file to exist.
I'll prepare a patch to restore the previous behavior. Until then creating an empty linux-64/win-64/osx-64 directory in the conda-bld directory and then running `conda index` will create the necessary files.
Good find, thanks @jjhelmus | 2019-01-28T19:00:04 |
conda/conda | 8,160 | conda__conda-8160 | [
"8080"
] | 37ebed39eb6d11e125664a8647f09c938f778468 | diff --git a/conda/base/context.py b/conda/base/context.py
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -745,8 +745,8 @@ def category_map(self):
)),
('Hidden and Undocumented', (
'allow_cycles', # allow cyclical dependencies, or raise
- 'add_pip_as_python_dependency',
'allow_conda_downgrades',
+ 'add_pip_as_python_dependency',
'debug',
'default_python',
'enable_private_envs',
diff --git a/conda/history.py b/conda/history.py
--- a/conda/history.py
+++ b/conda/history.py
@@ -23,7 +23,7 @@
from .common.compat import ensure_text_type, iteritems, open, text_type
from .common.path import paths_equal
from .core.prefix_data import PrefixData
-from .exceptions import CondaHistoryError, CondaUpgradeError, NotWritableError
+from .exceptions import CondaHistoryError, NotWritableError
from .gateways.disk.update import touch
from .models.dist import dist_str_to_quad
from .models.version import VersionOrder, version_relation_re
@@ -255,7 +255,15 @@ def get_user_requests(self):
"base_prefix": context.root_prefix,
"minimum_version": minimum_major_minor,
}
- raise CondaUpgradeError(message)
+ message += dedent("""
+ To work around this restriction, one can also set the config parameter
+ 'allow_conda_downgrades' to False at their own risk.
+ """)
+
+ # we need to rethink this. It's fine as a warning to try to get users
+ # to avoid breaking their system. However, right now it is preventing
+ # normal conda operation after downgrading conda.
+ # raise CondaUpgradeError(message)
return res
| diff --git a/tests/test_history.py b/tests/test_history.py
--- a/tests/test_history.py
+++ b/tests/test_history.py
@@ -185,23 +185,24 @@ def test_specs_line_parsing_43(self):
}
-def test_minimum_conda_version_error():
- with tempdir() as prefix:
- assert not isfile(join(prefix, 'conda-meta', 'history'))
- mkdir_p(join(prefix, 'conda-meta'))
- copy2(join(dirname(__file__), 'conda-meta', 'history'),
- join(prefix, 'conda-meta', 'history'))
-
- with open(join(prefix, 'conda-meta', 'history'), 'a') as fh:
- fh.write("==> 2018-07-09 11:18:09 <==\n")
- fh.write("# cmd: blarg\n")
- fh.write("# conda version: 42.42.4242\n")
-
- h = History(prefix)
-
- with pytest.raises(CondaUpgradeError) as exc:
- h.get_user_requests()
- exception_string = repr(exc.value)
- print(exception_string)
- assert "minimum conda version: 42.42" in exception_string
- assert "$ conda install -p" in exception_string
\ No newline at end of file
+# behavior disabled as part of https://github.com/conda/conda/pull/8160
+# def test_minimum_conda_version_error():
+# with tempdir() as prefix:
+# assert not isfile(join(prefix, 'conda-meta', 'history'))
+# mkdir_p(join(prefix, 'conda-meta'))
+# copy2(join(dirname(__file__), 'conda-meta', 'history'),
+# join(prefix, 'conda-meta', 'history'))
+
+# with open(join(prefix, 'conda-meta', 'history'), 'a') as fh:
+# fh.write("==> 2018-07-09 11:18:09 <==\n")
+# fh.write("# cmd: blarg\n")
+# fh.write("# conda version: 42.42.4242\n")
+
+# h = History(prefix)
+
+# with pytest.raises(CondaUpgradeError) as exc:
+# h.get_user_requests()
+# exception_string = repr(exc.value)
+# print(exception_string)
+# assert "minimum conda version: 42.42" in exception_string
+# assert "$ conda install -p" in exception_string
| conda-4.5.12 does not work after downgrading from conda-4.6rc1
after
conda update -c conda-canary conda
and later (because conda-4.6rc1 kept wanting to upgrade to python-3.7)
conda install conda=4.5 python=3.6
conda-4.5.12 now refuses to work
```
(base) $ conda install -c conda-forge conda=4.6
Solving environment: failed
CondaUpgradeError: This environment has previously been operated on by a conda version that's newer
than the conda currently being used. A newer version of conda is required.
target environment location: /home/dm/anaconda3
current conda version: 4.5.12
minimum conda version: 4.6
(base) $ conda update -c conda-forge conda
Solving environment: failed
CondaUpgradeError: This environment has previously been operated on by a conda version that's newer
than the conda currently being used. A newer version of conda is required.
target environment location: /home/dm/anaconda3
current conda version: 4.5.12
minimum conda version: 4.6
```
| 2019-01-29T17:21:31 |
|
conda/conda | 8,165 | conda__conda-8165 | [
"8136"
] | 41476d921d30bac16f4692a6281c1194721ebf6f | diff --git a/conda/history.py b/conda/history.py
--- a/conda/history.py
+++ b/conda/history.py
@@ -260,7 +260,7 @@ def get_user_requests(self):
'allow_conda_downgrades' to False at their own risk.
""")
- # we need to rethink this. It's fine as a warning to try to get users
+ # TODO: we need to rethink this. It's fine as a warning to try to get users
# to avoid breaking their system. However, right now it is preventing
# normal conda operation after downgrading conda.
# raise CondaUpgradeError(message)
diff --git a/conda_env/cli/main_update.py b/conda_env/cli/main_update.py
--- a/conda_env/cli/main_update.py
+++ b/conda_env/cli/main_update.py
@@ -107,7 +107,7 @@ def execute(args, parser):
for installer_type in env.dependencies:
try:
installers[installer_type] = get_installer(installer_type)
- except InvalidInstaller as e:
+ except InvalidInstaller:
sys.stderr.write(textwrap.dedent("""
Unable to install package for {0}.
diff --git a/conda_env/env.py b/conda_env/env.py
--- a/conda_env/env.py
+++ b/conda_env/env.py
@@ -78,7 +78,9 @@ def from_environment(name, prefix, no_builds=False, ignore_channels=False):
Returns: Environment object
"""
# requested_specs_map = History(prefix).get_requested_specs_map()
- precs = tuple(PrefixGraph(PrefixData(prefix).iter_records()).graph)
+ pd = PrefixData(prefix, pip_interop_enabled=True)
+
+ precs = tuple(PrefixGraph(pd.iter_records()).graph)
grouped_precs = groupby(lambda x: x.package_type, precs)
conda_precs = sorted(concatv(
grouped_precs.get(None, ()),
| diff --git a/tests/conda_env/support/pip_argh.yml b/tests/conda_env/support/pip_argh.yml
new file mode 100644
--- /dev/null
+++ b/tests/conda_env/support/pip_argh.yml
@@ -0,0 +1,6 @@
+name: pip_argh
+
+dependencies:
+ - pip
+ - pip:
+ - argh==0.26.2
diff --git a/tests/conda_env/test_create.py b/tests/conda_env/test_create.py
--- a/tests/conda_env/test_create.py
+++ b/tests/conda_env/test_create.py
@@ -1,13 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
-from argparse import ArgumentParser
-from contextlib import contextmanager
from logging import Handler, getLogger
from os.path import exists, join
-from shlex import split
-from shutil import rmtree
-from tempfile import mkdtemp
from unittest import TestCase
from uuid import uuid4
@@ -19,18 +14,12 @@
from conda.install import on_win
from conda.models.enums import PackageType
from conda.models.match_spec import MatchSpec
-from conda_env.cli.main import do_call as do_call_conda_env
-from conda_env.cli.main_create import configure_parser as create_configure_parser
-from conda_env.cli.main_update import configure_parser as update_configure_parser
from . import support_file
+from .utils import make_temp_envs_dir, Commands, run_command
PYTHON_BINARY = 'python.exe' if on_win else 'bin/python'
-def escape_for_winpath(p):
- return p.replace('\\', '\\\\')
-
-
def disable_dotlog():
class NullHandler(Handler):
def emit(self, record):
@@ -47,38 +36,6 @@ def reenable_dotlog(handlers):
dotlogger.handlers = handlers
-class Commands:
- CREATE = "create"
- UPDATE = "update"
-
-
-parser_config = {
- Commands.CREATE: create_configure_parser,
- Commands.UPDATE: update_configure_parser,
-}
-
-
-def run_command(command, env_name, *arguments):
- p = ArgumentParser()
- sub_parsers = p.add_subparsers(metavar='command', dest='cmd')
- parser_config[command](sub_parsers)
-
- arguments = list(map(escape_for_winpath, arguments))
- command_line = "{0} -n {1} -f {2}".format(command, env_name, " ".join(arguments))
-
- args = p.parse_args(split(command_line))
- do_call_conda_env(args, p)
-
-
-@contextmanager
-def make_temp_envs_dir():
- envs_dir = mkdtemp()
- try:
- yield envs_dir
- finally:
- rmtree(envs_dir, ignore_errors=True)
-
-
def package_is_installed(prefix, spec, pip=None):
spec = MatchSpec(spec)
prefix_recs = tuple(PrefixData(prefix).query(spec))
diff --git a/tests/conda_env/test_env.py b/tests/conda_env/test_env.py
--- a/tests/conda_env/test_env.py
+++ b/tests/conda_env/test_env.py
@@ -1,9 +1,21 @@
from collections import OrderedDict
import os
+from os.path import join
import random
import unittest
+from uuid import uuid4
+from conda.core.prefix_data import PrefixData
+from conda.base.context import reset_context
+from conda.common.io import env_vars
from conda.common.serialize import yaml_load
+from conda.install import on_win
+import ruamel_yaml
+
+from . import support_file
+from .utils import make_temp_envs_dir, Commands, run_command
+
+PYTHON_BINARY = 'python.exe' if on_win else 'bin/python'
try:
@@ -14,8 +26,6 @@
from conda_env import env
from conda_env import exceptions
-from . import support_file
-
class FakeStream(object):
def __init__(self):
@@ -340,3 +350,31 @@ def _test_saves_yaml_representation_of_file(self):
self.assert_(len(actual) > 0, msg='sanity check')
self.assertEqual(e.to_yaml(), actual)
+
+
+class SaveExistingEnvTestCase(unittest.TestCase):
+ def test_create_advanced_pip(self):
+ with make_temp_envs_dir() as envs_dir:
+ with env_vars({
+ 'CONDA_ENVS_DIRS': envs_dir,
+ 'CONDA_PIP_INTEROP_ENABLED': 'true',
+ }, reset_context):
+ env_name = str(uuid4())[:8]
+ prefix = join(envs_dir, env_name)
+ python_path = join(prefix, PYTHON_BINARY)
+
+ run_command(Commands.CREATE, env_name,
+ support_file('pip_argh.yml'))
+ out_file = join(envs_dir, 'test_env.yaml')
+
+ # make sure that the export reconsiders the presence of pip interop being enabled
+ PrefixData._cache_.clear()
+
+ with env_vars({
+ 'CONDA_ENVS_DIRS': envs_dir,
+ }, reset_context):
+ # note: out of scope of pip interop var. Should be enabling conda pip interop itself.
+ run_command(Commands.EXPORT, env_name, out_file)
+ with open(out_file) as f:
+ d = ruamel_yaml.load(f)
+ assert {'pip': ['argh==0.26.2']} in d['dependencies']
diff --git a/tests/conda_env/utils.py b/tests/conda_env/utils.py
new file mode 100644
--- /dev/null
+++ b/tests/conda_env/utils.py
@@ -0,0 +1,49 @@
+from argparse import ArgumentParser
+from contextlib import contextmanager
+from tempfile import mkdtemp
+from shlex import split
+
+from conda.gateways.disk.delete import rm_rf
+
+from conda_env.cli.main import do_call as do_call_conda_env
+from conda_env.cli.main_create import configure_parser as create_configure_parser
+from conda_env.cli.main_update import configure_parser as update_configure_parser
+from conda_env.cli.main_export import configure_parser as export_configure_parser
+
+
+class Commands:
+ CREATE = "create"
+ UPDATE = "update"
+ EXPORT = "export"
+
+
+parser_config = {
+ Commands.CREATE: create_configure_parser,
+ Commands.UPDATE: update_configure_parser,
+ Commands.EXPORT: export_configure_parser,
+}
+
+
+def escape_for_winpath(p):
+ return p.replace('\\', '\\\\')
+
+
+@contextmanager
+def make_temp_envs_dir():
+ envs_dir = mkdtemp()
+ try:
+ yield envs_dir
+ finally:
+ rm_rf(envs_dir)
+
+
+def run_command(command, env_name, *arguments):
+ p = ArgumentParser()
+ sub_parsers = p.add_subparsers(metavar='command', dest='cmd')
+ parser_config[command](sub_parsers)
+
+ arguments = list(map(escape_for_winpath, arguments))
+ command_line = "{0} -n {1} -f {2}".format(command, env_name, " ".join(arguments))
+
+ args = p.parse_args(split(command_line))
+ do_call_conda_env(args, p)
| conda env export omits pip packages (again)
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
conda env export omits pip install'ed packages. I can see this has come up before. This time it's on conda 4.6.0. I tried changing the pip version to 10.*, 18.1, 18.0, but this did not fix the issue.
Even when exporting with the -vv flag there are no informative outputs printed to the log. The failure to include pip appears to be completely silent.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
I test using conda-forge and and the base channels. First conda-forge:
```
(base) 09:36:54 login27:~/python/neuroconda$ conda create -n test-forge -c conda-forge python=3.6
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: /imaging/local/software/centos7/anaconda3/envs/test-forge
added / updated specs:
- python=3.6
The following NEW packages will be INSTALLED:
ca-certificates conda-forge/linux-64::ca-certificates-2018.11.29-ha4d7672_0
certifi conda-forge/linux-64::certifi-2018.11.29-py36_1000
libffi conda-forge/linux-64::libffi-3.2.1-hf484d3e_1005
libgcc-ng conda-forge/linux-64::libgcc-ng-7.3.0-hdf63c60_0
libstdcxx-ng conda-forge/linux-64::libstdcxx-ng-7.3.0-hdf63c60_0
ncurses conda-forge/linux-64::ncurses-6.1-hf484d3e_1002
openssl conda-forge/linux-64::openssl-1.0.2p-h14c3975_1002
pip conda-forge/linux-64::pip-18.1-py36_1000
python conda-forge/linux-64::python-3.6.7-hd21baee_1001
readline conda-forge/linux-64::readline-7.0-hf8c457e_1001
setuptools conda-forge/linux-64::setuptools-40.6.3-py36_0
sqlite conda-forge/linux-64::sqlite-3.26.0-h67949de_1000
tk conda-forge/linux-64::tk-8.6.9-h84994c4_1000
wheel conda-forge/linux-64::wheel-0.32.3-py36_0
xz conda-forge/linux-64::xz-5.2.4-h14c3975_1001
zlib conda-forge/linux-64::zlib-1.2.11-h14c3975_1004
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate test-forge
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) 09:37:38 login27:~/python/neuroconda$ conda activate test-forge
(test-forge) 09:38:20 login27:~/python/neuroconda$ pip install --no-deps pybids
Collecting pybids
Installing collected packages: pybids
Successfully installed pybids-0.7.0
(test-forge) 09:38:50 login27:~/python/neuroconda$ conda env export -f test.yml
(test-forge) 09:39:22 login27:~/python/neuroconda$ cat test.yml
name: test-forge
channels:
- conda-forge
- defaults
- r
dependencies:
- ca-certificates=2018.11.29=ha4d7672_0
- certifi=2018.11.29=py36_1000
- libffi=3.2.1=hf484d3e_1005
- libgcc-ng=7.3.0=hdf63c60_0
- libstdcxx-ng=7.3.0=hdf63c60_0
- ncurses=6.1=hf484d3e_1002
- openssl=1.0.2p=h14c3975_1002
- pip=18.1=py36_1000
- python=3.6.7=hd21baee_1001
- readline=7.0=hf8c457e_1001
- setuptools=40.6.3=py36_0
- sqlite=3.26.0=h67949de_1000
- tk=8.6.9=h84994c4_1000
- wheel=0.32.3=py36_0
- xz=5.2.4=h14c3975_1001
- zlib=1.2.11=h14c3975_1004
prefix: /imaging/local/software/centos7/anaconda3/envs/test-forge
(test-forge) 09:46:10 login27:~/python/neuroconda$ conda list pybids
# packages in environment at /imaging/local/software/centos7/anaconda3/envs/test-forge:
#
# Name Version Build Channel
pybids 0.7.0 pypi_0 pypi
```
Then base:
```
(base) 09:49:44 login27:~/python/neuroconda$ conda create -n test-base -c base python=3.6
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: /imaging/local/software/centos7/anaconda3/envs/test-base
added / updated specs:
- python=3.6
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2018.12.5 | 0 123 KB
certifi-2018.11.29 | py36_0 146 KB
libedit-3.1.20181209 | hc058e9b_0 188 KB
ncurses-6.1 | he6710b0_1 958 KB
openssl-1.1.1a | h7b6447c_0 5.0 MB
pip-18.1 | py36_0 1.8 MB
python-3.6.8 | h0371630_0 34.4 MB
readline-7.0 | h7b6447c_5 392 KB
setuptools-40.6.3 | py36_0 625 KB
sqlite-3.26.0 | h7b6447c_0 1.9 MB
tk-8.6.8 | hbc83047_0 3.1 MB
wheel-0.32.3 | py36_0 35 KB
zlib-1.2.11 | h7b6447c_3 120 KB
------------------------------------------------------------
Total: 48.8 MB
The following NEW packages will be INSTALLED:
ca-certificates pkgs/main/linux-64::ca-certificates-2018.12.5-0
certifi pkgs/main/linux-64::certifi-2018.11.29-py36_0
libedit pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
libffi pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4
libgcc-ng pkgs/main/linux-64::libgcc-ng-8.2.0-hdf63c60_1
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-8.2.0-hdf63c60_1
ncurses pkgs/main/linux-64::ncurses-6.1-he6710b0_1
openssl pkgs/main/linux-64::openssl-1.1.1a-h7b6447c_0
pip pkgs/main/linux-64::pip-18.1-py36_0
python pkgs/main/linux-64::python-3.6.8-h0371630_0
readline pkgs/main/linux-64::readline-7.0-h7b6447c_5
setuptools pkgs/main/linux-64::setuptools-40.6.3-py36_0
sqlite pkgs/main/linux-64::sqlite-3.26.0-h7b6447c_0
tk pkgs/main/linux-64::tk-8.6.8-hbc83047_0
wheel pkgs/main/linux-64::wheel-0.32.3-py36_0
xz pkgs/main/linux-64::xz-5.2.4-h14c3975_4
zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
Proceed ([y]/n)? y
Downloading and Extracting Packages
openssl-1.1.1a | 5.0 MB | ######################################################################################################################################################################## | 100%
zlib-1.2.11 | 120 KB | ######################################################################################################################################################################## | 100%
certifi-2018.11.29 | 146 KB | ######################################################################################################################################################################## | 100%
setuptools-40.6.3 | 625 KB | ######################################################################################################################################################################## | 100%
ca-certificates-2018 | 123 KB | ######################################################################################################################################################################## | 100%
libedit-3.1.20181209 | 188 KB | ######################################################################################################################################################################## | 100%
sqlite-3.26.0 | 1.9 MB | ######################################################################################################################################################################## | 100%
ncurses-6.1 | 958 KB | ######################################################################################################################################################################## | 100%
tk-8.6.8 | 3.1 MB | ######################################################################################################################################################################## | 100%
python-3.6.8 | 34.4 MB | ######################################################################################################################################################################## | 100%
readline-7.0 | 392 KB | ######################################################################################################################################################################## | 100%
wheel-0.32.3 | 35 KB | ######################################################################################################################################################################## | 100%
pip-18.1 | 1.8 MB | ######################################################################################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate test-base
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) 09:50:45 login27:~/python/neuroconda$ conda activate test-base
(test-base) 09:51:13 login27:~/python/neuroconda$ pip install --no-deps pybids
Collecting pybids
Installing collected packages: pybids
Successfully installed pybids-0.7.0
(test-base) 09:51:32 login27:~/python/neuroconda$ conda env export -f test.yml
(test-base) 09:51:57 login27:~/python/neuroconda$ cat test.yml
name: test-base
channels:
- defaults
- conda-forge
- r
dependencies:
- ca-certificates=2018.12.5=0
- certifi=2018.11.29=py36_0
- libedit=3.1.20181209=hc058e9b_0
- libffi=3.2.1=hd88cf55_4
- libgcc-ng=8.2.0=hdf63c60_1
- libstdcxx-ng=8.2.0=hdf63c60_1
- ncurses=6.1=he6710b0_1
- openssl=1.1.1a=h7b6447c_0
- pip=18.1=py36_0
- python=3.6.8=h0371630_0
- readline=7.0=h7b6447c_5
- setuptools=40.6.3=py36_0
- sqlite=3.26.0=h7b6447c_0
- tk=8.6.8=hbc83047_0
- wheel=0.32.3=py36_0
- xz=5.2.4=h14c3975_4
- zlib=1.2.11=h7b6447c_3
prefix: /imaging/local/software/centos7/anaconda3/envs/test-base
(test-base) 09:52:00 login27:~/python/neuroconda$ conda list pybids
# packages in environment at /imaging/local/software/centos7/anaconda3/envs/test-base:
#
# Name Version Build Channel
pybids 0.7.0 pypi_0 pypi
```
## Expected Behavior
<!-- What do you think should happen? -->
pip installed packages should appear in '-pip:' sub category. If this functionality is broken for whatever reason conda should complain loudly about this when exporting.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
(test-base) 09:54:19 login27:~/python/neuroconda$ conda info
active environment : test-base
active env location : /imaging/local/software/centos7/anaconda3/envs/test-base
shell level : 3
user config file : /home/jc01/.condarc
populated config files : /home/jc01/.condarc
conda version : 4.6.0
conda-build version : 3.10.5
python version : 3.6.5.final.0
base environment : /imaging/local/software/centos7/anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://conda.anaconda.org/r/linux-64
https://conda.anaconda.org/r/noarch
package cache : /imaging/local/software/centos7/anaconda3/pkgs
/home/jc01/.conda/pkgs
envs directories : /imaging/local/software/centos7/anaconda3/envs
/home/jc01/.conda/envs
platform : linux-64
user-agent : conda/4.6.0 requests/2.18.4 CPython/3.6.5 Linux/3.10.0-862.el7.x86_64 centos/7.5.1804 glibc/2.17
UID:GID : 6303:50
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /home/jc01/.condarc <==
ssl_verify: False
channels:
- conda-forge
- defaults
- r
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /imaging/local/software/centos7/anaconda3/envs/test-base:
#
# Name Version Build Channel
ca-certificates 2018.12.5 0 defaults
certifi 2018.11.29 py36_0 defaults
libedit 3.1.20181209 hc058e9b_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc-ng 8.2.0 hdf63c60_1 defaults
libstdcxx-ng 8.2.0 hdf63c60_1 defaults
ncurses 6.1 he6710b0_1 defaults
openssl 1.1.1a h7b6447c_0 defaults
pip 18.1 py36_0 defaults
pybids 0.7.0 pypi_0 pypi
python 3.6.8 h0371630_0 defaults
readline 7.0 h7b6447c_5 defaults
setuptools 40.6.3 py36_0 defaults
sqlite 3.26.0 h7b6447c_0 defaults
tk 8.6.8 hbc83047_0 defaults
wheel 0.32.3 py36_0 defaults
xz 5.2.4 h14c3975_4 defaults
zlib 1.2.11 h7b6447c_3 defaults
```
</p></details>
| ... However, downgrading to conda 4.5.9 restores normal pip export function. But broke my installation as detailed in #7788. I repaired it using the instructions there (removing `# conda version` lines from conda-meta/history). I then was able to `conda update conda`... to 4.5.12, which is now the latest available version on base and conda-forge. Anyway, exporting on 4.5.12 also works fine.
Which raises the question of how I ended up on 4.6.0 in the first place. I looked in the history file, and it seems `conda update -n base conda` put me on 4.6.0 on 16 January. So it looks like there was a conda-forge 4.6.0 release that got pulled. And that's where my problems started.
... And now that the 4.6.1 release is official, I tried the update again (from conda-forge). Same problem. However, it turns out that you can get pip export to work again if you turn on the new pip_interop_enabled flag:
```
(cbu_nipy_1_03dev) 02:34:09 login27:~/python/neuroconda$ conda config --set pip_interop_enabled False
(cbu_nipy_1_03dev) 02:34:15 login27:~/python/neuroconda$ conda env export -f test.yml
(cbu_nipy_1_03dev) 02:34:23 login27:~/python/neuroconda$ cat test.yml | grep pip
- apipkg=1.5=py_0
- pip=10.0.1=py36_0
(cbu_nipy_1_03dev) 02:34:39 login27:~/python/neuroconda$ conda config --set pip_interop_enabled True
(cbu_nipy_1_03dev) 02:34:44 login27:~/python/neuroconda$ conda env export -f test.yml
(cbu_nipy_1_03dev) 02:34:56 login27:~/python/neuroconda$ cat test.yml | grep pip
- apipkg=1.5=py_0
- pip=10.0.1=py36_0
- pip:
```
Hope this is useful for someone.
thanks! was trolling thru the source code trying to figure out how to re-enable this | 2019-01-29T21:50:38 |
conda/conda | 8,184 | conda__conda-8184 | [
"8178"
] | 8eeb1bba428cceb56c6dae120c51e35b3332b854 | diff --git a/conda/common/pkg_formats/python.py b/conda/common/pkg_formats/python.py
--- a/conda/common/pkg_formats/python.py
+++ b/conda/common/pkg_formats/python.py
@@ -113,7 +113,8 @@ def _check_files(self):
for fname in self.MANDATORY_FILES:
if self._metadata_dir_full_path:
fpath = join(self._metadata_dir_full_path, fname)
- assert isfile(fpath)
+ if not isfile(fpath):
+ raise OSError(ENOENT, strerror(ENOENT), fpath)
def _check_path_data(self, path, checksum, size):
"""Normalizes record data content and format."""
diff --git a/conda/core/prefix_data.py b/conda/core/prefix_data.py
--- a/conda/core/prefix_data.py
+++ b/conda/core/prefix_data.py
@@ -256,7 +256,8 @@ def _load_site_packages(self):
for af in non_conda_anchor_files:
try:
python_record = read_python_record(self.prefix_path, af, python_pkg_record.version)
- except EnvironmentError:
+ except EnvironmentError as e:
+ log.info("Python record ignored for anchor path '%s'\n due to %s", af, e)
continue
except ValidationError:
import sys
| diff --git a/tests/common/pkg_formats/test_python.py b/tests/common/pkg_formats/test_python.py
--- a/tests/common/pkg_formats/test_python.py
+++ b/tests/common/pkg_formats/test_python.py
@@ -5,6 +5,7 @@
from __future__ import absolute_import, division, print_function, unicode_literals
from datetime import datetime
+from errno import ENOENT
import os
from os.path import basename, lexists
from pprint import pprint
@@ -523,8 +524,9 @@ def test_pydist_check_files():
# Test mandatory file not found
os.remove(fpaths[0])
- with pytest.raises(AssertionError):
+ with pytest.raises(EnvironmentError) as exc:
PythonInstalledDistribution(temp_path, "2.7", None)
+ assert exc.value.errno == ENOENT
def test_python_dist_info():
| conda pip interop AssertionError in 4.6.1
This is the error with the most reports for 4.6.1 (over 100 in the last 24 hours). I've got a PR in the works to resolve this one.
```
error: AssertionError()
command: D:\Users\rahul\Anaconda3\Scripts\conda-script.py list
user_agent: conda/4.6.1 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17763
_messageid: -9223372036617369010
_messagetime: 1548792058544 / 2019-01-29 14:00:58
Traceback (most recent call last):
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\exceptions.py", line 1001, in __call__
return func(*args, **kwargs)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 142, in execute
show_channel_urls=context.show_channel_urls)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 80, in print_packages
show_channel_urls=show_channel_urls)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\cli\main_list.py", line 45, in list_packages
installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(),
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 116, in iter_records
return itervalues(self._prefix_records)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 145, in _prefix_records
return self.__prefix_records or self.load() or self.__prefix_records
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 69, in load
self._load_site_packages()
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\core\prefix_data.py", line 258, in _load_site_packages
python_record = read_python_record(self.prefix_path, af, python_pkg_record.version)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\gateways\disk\read.py", line 245, in read_python_record
pydist = PythonDistribution.init(prefix_path, anchor_file, python_version)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 78, in init
return PythonInstalledDistribution(prefix_path, anchor_file, python_version)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 382, in __init__
super(PythonInstalledDistribution, self).__init__(anchor_full_path, python_version)
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 106, in __init__
self._check_files()
File "D:\Users\rahul\Anaconda3\lib\site-packages\conda\common\pkg_formats\python.py", line 116, in _check_files
assert isfile(fpath)
AssertionError
```
| 2019-01-30T14:49:40 |
|
conda/conda | 8,198 | conda__conda-8198 | [
"8185"
] | 7a68286a737c7b5cd48c83d39bd615f99d939304 | diff --git a/conda/core/prefix_data.py b/conda/core/prefix_data.py
--- a/conda/core/prefix_data.py
+++ b/conda/core/prefix_data.py
@@ -7,6 +7,7 @@
from logging import getLogger
from os import listdir
from os.path import basename, isdir, isfile, join, lexists
+import re
from .._vendor.auxlib.exceptions import ValidationError
from ..base.constants import CONDA_TARBALL_EXTENSION, PREFIX_MAGIC_FILE
@@ -220,7 +221,9 @@ def _load_site_packages(self):
# Get anchor files for corresponding conda (handled) python packages
prefix_graph = PrefixGraph(self.iter_records())
python_records = prefix_graph.all_descendants(python_pkg_record)
- conda_python_packages = get_conda_anchor_files_and_records(python_records)
+ conda_python_packages = get_conda_anchor_files_and_records(
+ site_packages_dir, python_records
+ )
# Get all anchor files and compare against conda anchor files to find clobbered conda
# packages and python packages installed via other means (not handled by conda)
@@ -276,16 +279,27 @@ def _load_site_packages(self):
return new_packages
-def get_conda_anchor_files_and_records(python_records):
+def get_conda_anchor_files_and_records(site_packages_short_path, python_records):
"""Return the anchor files for the conda records of python packages."""
anchor_file_endings = ('.egg-info/PKG-INFO', '.dist-info/RECORD', '.egg-info')
conda_python_packages = odict()
+ matcher = re.compile(
+ r"^%s/[^/]+(?:%s)$" % (
+ re.escape(site_packages_short_path),
+ r"|".join(re.escape(fn) for fn in anchor_file_endings)
+ )
+ ).match
+
for prefix_record in python_records:
- for fpath in prefix_record.files:
- if fpath.endswith(anchor_file_endings) and 'site-packages' in fpath:
- # Then 'fpath' is an anchor file
- conda_python_packages[fpath] = prefix_record
+ anchor_paths = tuple(fpath for fpath in prefix_record.files if matcher(fpath))
+ if len(anchor_paths) > 1:
+ anchor_path = sorted(anchor_paths, key=len)[0]
+ log.info("Package %s has multiple python anchor files.\n"
+ " Using %s", prefix_record.record_id(), anchor_path)
+ conda_python_packages[anchor_path] = prefix_record
+ elif anchor_paths:
+ conda_python_packages[anchor_paths[0]] = prefix_record
return conda_python_packages
| diff --git a/tests/core/test_prefix_data.py b/tests/core/test_prefix_data.py
--- a/tests/core/test_prefix_data.py
+++ b/tests/core/test_prefix_data.py
@@ -136,18 +136,19 @@ def test_pip_interop_osx():
def test_get_conda_anchor_files_and_records():
valid_tests = [
- os.sep.join(('v', 'site-packages', 'spam', '.egg-info', 'PKG-INFO')),
- os.sep.join(('v', 'site-packages', 'foo', '.dist-info', 'RECORD')),
- os.sep.join(('v', 'site-packages', 'bar', '.egg-info')),
+ 'v/site-packages/spam.egg-info/PKG-INFO',
+ 'v/site-packages/foo.dist-info/RECORD',
+ 'v/site-packages/bar.egg-info',
]
invalid_tests = [
- os.sep.join(('i', 'site-packages', '.egg-link')),
- os.sep.join(('i', 'spam', '.egg-info', 'PKG-INFO')),
- os.sep.join(('i', 'foo', '.dist-info', 'RECORD')),
- os.sep.join(('i', 'bar', '.egg-info')),
- os.sep.join(('i', 'site-packages', 'spam')),
- os.sep.join(('i', 'site-packages', 'foo')),
- os.sep.join(('i', 'site-packages', 'bar')),
+ 'v/site-packages/valid-package/_vendor/invalid-now.egg-info/PKG-INFO',
+ 'i/site-packages/stuff.egg-link',
+ 'i/spam.egg-info/PKG-INFO',
+ 'i/foo.dist-info/RECORD',
+ 'i/bar.egg-info',
+ 'i/site-packages/spam',
+ 'i/site-packages/foo',
+ 'i/site-packages/bar',
]
tests = valid_tests + invalid_tests
records = []
@@ -156,10 +157,10 @@ def test_get_conda_anchor_files_and_records():
record.files = [path]
records.append(record)
- output = get_conda_anchor_files_and_records(records)
+ output = get_conda_anchor_files_and_records("v/site-packages", records)
expected_output = odict()
for i in range(len(valid_tests)):
expected_output[valid_tests[i]] = records[i]
_print_output(output, expected_output)
- assert output, expected_output
+ assert output == expected_output
| Package is wrongly listed as from `pypi` channel / `conda list` crashes with a stacktrace
## Current Behavior
* `conda list` lists a package (`bleach`) as being from `pypi` instead of `conda-forge`
* sometimes `conda list` fails with a stacktrace
### Steps to Reproduce
```
λ conda create -n test_bleach -c conda-forge bleach=3.1.0
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: W:\Miniconda3\envs\test_bleach
added / updated specs:
- bleach=3.1.0
The following packages will be downloaded:
package | build
---------------------------|-----------------
bleach-3.1.0 | py_0 110 KB conda-forge
certifi-2018.11.29 | py37_1000 144 KB conda-forge
pip-19.0.1 | py37_0 1.8 MB conda-forge
python-3.7.1 | hc182675_1000 20.9 MB conda-forge
setuptools-40.7.1 | py37_0 633 KB conda-forge
six-1.12.0 | py37_1000 21 KB conda-forge
vc-14 | 0 985 B conda-forge
vs2015_runtime-14.0.25420 | 0 1.9 MB conda-forge
webencodings-0.5.1 | py_1 12 KB conda-forge
wheel-0.32.3 | py37_0 51 KB conda-forge
wincertstore-0.2 | py37_1002 13 KB conda-forge
------------------------------------------------------------
Total: 25.6 MB
The following NEW packages will be INSTALLED:
bleach conda-forge/noarch::bleach-3.1.0-py_0
certifi conda-forge/win-64::certifi-2018.11.29-py37_1000
pip conda-forge/win-64::pip-19.0.1-py37_0
python conda-forge/win-64::python-3.7.1-hc182675_1000
setuptools conda-forge/win-64::setuptools-40.7.1-py37_0
six conda-forge/win-64::six-1.12.0-py37_1000
vc conda-forge/win-64::vc-14-0
vs2015_runtime conda-forge/win-64::vs2015_runtime-14.0.25420-0
webencodings conda-forge/noarch::webencodings-0.5.1-py_1
wheel conda-forge/win-64::wheel-0.32.3-py37_0
wincertstore conda-forge/win-64::wincertstore-0.2-py37_1002
Proceed ([y]/n)?
Downloading and Extracting Packages
six-1.12.0 | 21 KB | ############################################################################ | 100%
vs2015_runtime-14.0. | 1.9 MB | ############################################################################ | 100%
wheel-0.32.3 | 51 KB | ############################################################################ | 100%
wincertstore-0.2 | 13 KB | ############################################################################ | 100%
certifi-2018.11.29 | 144 KB | ############################################################################ | 100%
setuptools-40.7.1 | 633 KB | ############################################################################ | 100%
webencodings-0.5.1 | 12 KB | ############################################################################ | 100%
python-3.7.1 | 20.9 MB | ############################################################################ | 100%
vc-14 | 985 B | ############################################################################ | 100%
bleach-3.1.0 | 110 KB | ############################################################################ | 100%
pip-19.0.1 | 1.8 MB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: \ WARNING conda.core.envs_manager:register_env(43): Unable to register environment. Path not writ
able.
environment location: W:\Miniconda3\envs\test_bleach
registry file: C:\Users\tadeu\.conda\environments.txt
done
#
# To activate this environment, use:
# > activate test_bleach
#
# To deactivate an active environment, use:
# > deactivate
#
# * for power-users using bash, you must source
#
λ conda list -n test_bleach
# packages in environment at W:\Miniconda3\envs\test_bleach:
#
# Name Version Build Channel
certifi 2018.11.29 py37_1000 conda-forge
pip 19.0.1 py37_0 conda-forge
python 3.7.1 hc182675_1000 conda-forge
setuptools 40.7.1 py37_0 conda-forge
six 1.12.0 py37_1000 conda-forge
vc 14 0 conda-forge
vs2015_runtime 14.0.25420 0 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.32.3 py37_0 conda-forge
wincertstore 0.2 py37_1002 conda-forge
```
NOTE: doesn't even appear in the first listing, before `activate` ^
```
λ conda activate test_bleach
(test_bleach) λ conda list
# packages in environment at W:\Miniconda3\envs\test_bleach:
#
# Name Version Build Channel
bleach 3.1.0 pypi_0 pypi
certifi 2018.11.29 py37_1000 conda-forge
pip 19.0.1 py37_0 conda-forge
python 3.7.1 hc182675_1000 conda-forge
setuptools 40.7.1 py37_0 conda-forge
six 1.12.0 py37_1000 conda-forge
vc 14 0 conda-forge
vs2015_runtime 14.0.25420 0 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.32.3 py37_0 conda-forge
wincertstore 0.2 py37_1002 conda-forge
```
Note that `bleach` is listed as if coming from pip/`pypi`!
Sometimes there is a more serious error on `conda list` (seems to be very related, but I couldn't get an easy way to reproduce it yet), it will print this stacktrace:
```
Traceback (most recent call last):
File "W:\Miniconda\lib\site-packages\conda\exceptions.py", line 1001, in __call__
return func(*args, **kwargs)
File "W:\Miniconda\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "W:\Miniconda\lib\site-packages\conda\cli\conda_argparse.py", line 81, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "W:\Miniconda\lib\site-packages\conda\cli\main_list.py", line 142, in execute
show_channel_urls=context.show_channel_urls)
File "W:\Miniconda\lib\site-packages\conda\cli\main_list.py", line 80, in print_packages
show_channel_urls=show_channel_urls)
File "W:\Miniconda\lib\site-packages\conda\cli\main_list.py", line 45, in list_packages
installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(),
File "W:\Miniconda\lib\site-packages\conda\core\prefix_data.py", line 116, in iter_records
return itervalues(self._prefix_records)
File "W:\Miniconda\lib\site-packages\conda\core\prefix_data.py", line 145, in _prefix_records
return self.__prefix_records or self.load() or self.__prefix_records
File "W:\Miniconda\lib\site-packages\conda\core\prefix_data.py", line 69, in load
self._load_site_packages()
File "W:\Miniconda\lib\site-packages\conda\core\prefix_data.py", line 237, in _load_site_packages
prefix_rec = self._prefix_records.pop(conda_python_packages[conda_anchor_file].name)
KeyError: 'bleach'
```
## Expected Behavior
The package should be listed with the proper channel and there should be no error with stacktrace in `conda list`.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
shell level : 0
user config file : C:\Users\tadeu\.condarc
populated config files :
conda version : 4.6.1
conda-build version : not installed
python version : 3.7.1.final.0
base environment : W:\Miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : W:\Miniconda3\pkgs
C:\Users\tadeu\.conda\pkgs
C:\Users\tadeu\AppData\Local\conda\conda\pkgs
envs directories : W:\Miniconda3\envs
C:\Users\tadeu\.conda\envs
C:\Users\tadeu\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.1 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17134
administrator : True
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at W:\Miniconda3:
#
# Name Version Build Channel
asn1crypto 0.24.0 py37_0 defaults
ca-certificates 2018.12.5 0 defaults
certifi 2018.11.29 py37_0 defaults
cffi 1.11.5 py37h74b6da3_1 defaults
chardet 3.0.4 py37_1 defaults
conda 4.6.1 py37_0 defaults
conda-env 2.6.0 1 defaults
console_shortcut 0.1.1 3 defaults
cryptography 2.4.2 py37h7a1dbc1_0 defaults
idna 2.8 py37_0 defaults
menuinst 1.4.14 py37hfa6e2cd_0 defaults
openssl 1.1.1a he774522_0 defaults
pip 18.1 py37_0 defaults
pycosat 0.6.3 py37hfa6e2cd_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 18.0.0 py37_0 defaults
pysocks 1.6.8 py37_0 defaults
python 3.7.1 h8c8aaf0_6 defaults
pywin32 223 py37hfa6e2cd_1 defaults
requests 2.21.0 py37_0 defaults
ruamel_yaml 0.15.46 py37hfa6e2cd_0 defaults
setuptools 40.6.3 py37_0 defaults
six 1.12.0 py37_0 defaults
sqlite 3.26.0 he774522_0 defaults
urllib3 1.24.1 py37_0 defaults
vc 14.1 h0510ff6_4 defaults
vs2015_runtime 14.15.26706 h3a45250_0 defaults
wheel 0.32.3 py37_0 defaults
win_inet_pton 1.0.1 py37_1 defaults
wincertstore 0.2 py37_0 defaults
yaml 0.1.7 hc54c509_2 defaults
```
</p></details>
| Note that this is reproducible without `conda-forge`:
```
λ conda create -n test_bleach_2 bleach
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: W:\Miniconda3\envs\test_bleach_2
added / updated specs:
- bleach
The following packages will be downloaded:
package | build
---------------------------|-----------------
bleach-3.1.0 | py37_0 222 KB
python-3.7.2 | h8c8aaf0_0 17.7 MB
webencodings-0.5.1 | py37_1 19 KB
wheel-0.32.3 | py37_0 53 KB
------------------------------------------------------------
Total: 18.0 MB
The following NEW packages will be INSTALLED:
bleach pkgs/main/win-64::bleach-3.1.0-py37_0
ca-certificates pkgs/main/win-64::ca-certificates-2018.12.5-0
certifi pkgs/main/win-64::certifi-2018.11.29-py37_0
openssl pkgs/main/win-64::openssl-1.1.1a-he774522_0
pip pkgs/main/win-64::pip-18.1-py37_0
python pkgs/main/win-64::python-3.7.2-h8c8aaf0_0
setuptools pkgs/main/win-64::setuptools-40.6.3-py37_0
six pkgs/main/win-64::six-1.12.0-py37_0
sqlite pkgs/main/win-64::sqlite-3.26.0-he774522_0
vc pkgs/main/win-64::vc-14.1-h0510ff6_4
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.15.26706-h3a45250_0
webencodings pkgs/main/win-64::webencodings-0.5.1-py37_1
wheel pkgs/main/win-64::wheel-0.32.3-py37_0
wincertstore pkgs/main/win-64::wincertstore-0.2-py37_0
Proceed ([y]/n)?
Downloading and Extracting Packages
wheel-0.32.3 | 53 KB | ############################################################################ | 100%
webencodings-0.5.1 | 19 KB | ############################################################################ | 100%
bleach-3.1.0 | 222 KB | ############################################################################ | 100%
python-3.7.2 | 17.7 MB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: / WARNING conda.core.envs_manager:register_env(43): Unable to register environment. Path not writ
able.
environment location: W:\Miniconda3\envs\test_bleach_2
registry file: C:\Users\tadeu\.conda\environments.txt
done
#
# To activate this environment, use
#
# $ conda activate test_bleach_2
#
# To deactivate an active environment, use
#
# $ conda deactivate
λ conda list -n test_bleach_2
# packages in environment at W:\Miniconda3\envs\test_bleach_2:
#
# Name Version Build Channel
ca-certificates 2018.12.5 0
certifi 2018.11.29 py37_0
openssl 1.1.1a he774522_0
pip 18.1 py37_0
python 3.7.2 h8c8aaf0_0
setuptools 40.6.3 py37_0
six 1.12.0 py37_0
sqlite 3.26.0 he774522_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.15.26706 h3a45250_0
webencodings 0.5.1 py37_1
wheel 0.32.3 py37_0
wincertstore 0.2 py37_0
λ activate test_bleach_2
conda.bat activate test_bleach_2
(test_bleach_2) λ conda list
# packages in environment at W:\Miniconda3\envs\test_bleach_2:
#
# Name Version Build Channel
bleach 3.1.0 pypi_0 pypi
ca-certificates 2018.12.5 0
certifi 2018.11.29 py37_0
openssl 1.1.1a he774522_0
pip 18.1 py37_0
python 3.7.2 h8c8aaf0_0
setuptools 40.6.3 py37_0
six 1.12.0 py37_0
sqlite 3.26.0 he774522_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.15.26706 h3a45250_0
webencodings 0.5.1 py37_1
wheel 0.32.3 py37_0
wincertstore 0.2 py37_0
```
I've noticed that there's something weird in the `conda-meta/history` file:
```
==> 2019-01-30 13:57:26 <==
# cmd: W:\Miniconda3\Scripts\conda-script.py create -n test_bleach_2 bleach
# conda version: 4.6.1
+defaults::bleach-3.1.0-py37_0
+defaults::ca-certificates-2018.12.5-0
+defaults::certifi-2018.11.29-py37_0
+defaults::openssl-1.1.1a-he774522_0
+defaults::pip-18.1-py37_0
+defaults::python-3.7.2-h8c8aaf0_0
+defaults::setuptools-40.6.3-py37_0
+defaults::six-1.12.0-py37_0
+defaults::sqlite-3.26.0-he774522_0
+defaults::vc-14.1-h0510ff6_4
+defaults::vs2015_runtime-14.15.26706-h3a45250_0
+defaults::webencodings-0.5.1-py37_1
+defaults::wheel-0.32.3-py37_0
+defaults::wincertstore-0.2-py37_0
# update specs: ['bleach']
```
`bleach` is installed from `defaults`, but in the end there is this `"update specs: ['bleach']"`
I saw this in the uploaded error reports. Several times, but only with the `bleach` package. Seems like there's something peculiar going on with https://conda.anaconda.org/conda-forge/noarch/bleach-3.1.0-py_0.tar.bz2?
What type of json files associated with `bleach` do you see in the `conda-meta/` directory?
There's no json for `bleach` in `conda-meta/`, right after the env creation:
```
certifi-2018.11.29-py37_1000.json
history
pip-19.0.1-py37_0.json
python-3.7.1-hc182675_1000.json
setuptools-40.7.1-py37_0.json
six-1.12.0-py37_1000.json
vc-14-0.json
vs2015_runtime-14.0.25420-0.json
webencodings-0.5.1-py_1.json
wheel-0.32.3-py37_0.json
wincertstore-0.2-py37_1002.json
```
I've reproduced exactly the same behavior on macOS instead of Windows.
```
$ conda create -n test_bleach_2 -c conda-forge bleach
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: /Users/kfranz/continuum/conda/devenv/envs/test_bleach_2
added / updated specs:
- bleach
The following packages will be downloaded:
package | build
---------------------------|-----------------
bleach-3.1.0 | py_0 110 KB conda-forge
bzip2-1.0.6 | h1de35cc_1002 148 KB conda-forge
ca-certificates-2018.11.29 | ha4d7672_0 143 KB conda-forge
certifi-2018.11.29 | py37_1000 145 KB conda-forge
libcxx-7.0.0 | h2d50403_2 1.1 MB conda-forge
libffi-3.2.1 | h0a44026_1005 42 KB conda-forge
llvm-meta-7.0.0 | 0 2 KB conda-forge
ncurses-6.1 | h0a44026_1002 1.3 MB conda-forge
openssl-1.0.2p | h1de35cc_1002 3.0 MB conda-forge
pip-19.0.1 | py37_0 1.8 MB conda-forge
python-3.7.1 | h145921a_1000 21.8 MB conda-forge
readline-7.0 | hcfe32e1_1001 393 KB conda-forge
setuptools-40.7.1 | py37_0 632 KB conda-forge
six-1.12.0 | py37_1000 22 KB conda-forge
sqlite-3.26.0 | h1765d9f_1000 2.4 MB conda-forge
tk-8.6.9 | ha441bb4_1000 3.1 MB conda-forge
webencodings-0.5.1 | py_1 12 KB conda-forge
wheel-0.32.3 | py37_0 34 KB conda-forge
xz-5.2.4 | h1de35cc_1001 268 KB conda-forge
zlib-1.2.11 | h1de35cc_1004 101 KB conda-forge
------------------------------------------------------------
Total: 36.6 MB
The following NEW packages will be INSTALLED:
bleach conda-forge/noarch::bleach-3.1.0-py_0
bzip2 conda-forge/osx-64::bzip2-1.0.6-h1de35cc_1002
ca-certificates conda-forge/osx-64::ca-certificates-2018.11.29-ha4d7672_0
certifi conda-forge/osx-64::certifi-2018.11.29-py37_1000
libcxx conda-forge/osx-64::libcxx-7.0.0-h2d50403_2
libffi conda-forge/osx-64::libffi-3.2.1-h0a44026_1005
llvm-meta conda-forge/noarch::llvm-meta-7.0.0-0
ncurses conda-forge/osx-64::ncurses-6.1-h0a44026_1002
openssl conda-forge/osx-64::openssl-1.0.2p-h1de35cc_1002
pip conda-forge/osx-64::pip-19.0.1-py37_0
python conda-forge/osx-64::python-3.7.1-h145921a_1000
readline conda-forge/osx-64::readline-7.0-hcfe32e1_1001
setuptools conda-forge/osx-64::setuptools-40.7.1-py37_0
six conda-forge/osx-64::six-1.12.0-py37_1000
sqlite conda-forge/osx-64::sqlite-3.26.0-h1765d9f_1000
tk conda-forge/osx-64::tk-8.6.9-ha441bb4_1000
webencodings conda-forge/noarch::webencodings-0.5.1-py_1
wheel conda-forge/osx-64::wheel-0.32.3-py37_0
xz conda-forge/osx-64::xz-5.2.4-h1de35cc_1001
zlib conda-forge/osx-64::zlib-1.2.11-h1de35cc_1004
Proceed ([y]/n)? y
Downloading and Extracting Packages
libcxx-7.0.0 | 1.1 MB | ###################################################################################################################################################### | 100%
certifi-2018.11.29 | 145 KB | ###################################################################################################################################################### | 100%
bleach-3.1.0 | 110 KB | ###################################################################################################################################################### | 100%
setuptools-40.7.1 | 632 KB | ###################################################################################################################################################### | 100%
openssl-1.0.2p | 3.0 MB | ###################################################################################################################################################### | 100%
xz-5.2.4 | 268 KB | ###################################################################################################################################################### | 100%
pip-19.0.1 | 1.8 MB | ###################################################################################################################################################### | 100%
bzip2-1.0.6 | 148 KB | ###################################################################################################################################################### | 100%
six-1.12.0 | 22 KB | ###################################################################################################################################################### | 100%
libffi-3.2.1 | 42 KB | ###################################################################################################################################################### | 100%
python-3.7.1 | 21.8 MB | ###################################################################################################################################################### | 100%
ca-certificates-2018 | 143 KB | ###################################################################################################################################################### | 100%
ncurses-6.1 | 1.3 MB | ###################################################################################################################################################### | 100%
sqlite-3.26.0 | 2.4 MB | ###################################################################################################################################################### | 100%
zlib-1.2.11 | 101 KB | ###################################################################################################################################################### | 100%
wheel-0.32.3 | 34 KB | ###################################################################################################################################################### | 100%
readline-7.0 | 393 KB | ###################################################################################################################################################### | 100%
llvm-meta-7.0.0 | 2 KB | ###################################################################################################################################################### | 100%
tk-8.6.9 | 3.1 MB | ###################################################################################################################################################### | 100%
webencodings-0.5.1 | 12 KB | ###################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate test_bleach_2
#
# To deactivate an active environment, use
#
# $ conda deactivate
$ conda list -n test_bleach_2
# packages in environment at /Users/kfranz/continuum/conda/devenv/envs/test_bleach_2:
#
# Name Version Build Channel
bzip2 1.0.6 h1de35cc_1002 conda-forge
ca-certificates 2018.11.29 ha4d7672_0 conda-forge
certifi 2018.11.29 py37_1000 conda-forge
libcxx 7.0.0 h2d50403_2 conda-forge
libffi 3.2.1 h0a44026_1005 conda-forge
llvm-meta 7.0.0 0 conda-forge
ncurses 6.1 h0a44026_1002 conda-forge
openssl 1.0.2p h1de35cc_1002 conda-forge
pip 19.0.1 py37_0 conda-forge
python 3.7.1 h145921a_1000 conda-forge
readline 7.0 hcfe32e1_1001 conda-forge
setuptools 40.7.1 py37_0 conda-forge
six 1.12.0 py37_1000 conda-forge
sqlite 3.26.0 h1765d9f_1000 conda-forge
tk 8.6.9 ha441bb4_1000 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.32.3 py37_0 conda-forge
xz 5.2.4 h1de35cc_1001 conda-forge
zlib 1.2.11 h1de35cc_1004 conda-forge
$ conda activate test_bleach_2
$ conda list
# packages in environment at /Users/kfranz/continuum/conda/devenv/envs/test_bleach_2:
#
# Name Version Build Channel
bleach 3.1.0 pypi_0 pypi
bzip2 1.0.6 h1de35cc_1002 conda-forge
ca-certificates 2018.11.29 ha4d7672_0 conda-forge
certifi 2018.11.29 py37_1000 conda-forge
libcxx 7.0.0 h2d50403_2 conda-forge
libffi 3.2.1 h0a44026_1005 conda-forge
llvm-meta 7.0.0 0 conda-forge
ncurses 6.1 h0a44026_1002 conda-forge
openssl 1.0.2p h1de35cc_1002 conda-forge
pip 19.0.1 py37_0 conda-forge
python 3.7.1 h145921a_1000 conda-forge
readline 7.0 hcfe32e1_1001 conda-forge
setuptools 40.7.1 py37_0 conda-forge
six 1.12.0 py37_1000 conda-forge
sqlite 3.26.0 h1765d9f_1000 conda-forge
tk 8.6.9 ha441bb4_1000 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.32.3 py37_0 conda-forge
xz 5.2.4 h1de35cc_1001 conda-forge
zlib 1.2.11 h1de35cc_1004 conda-forge
```
Ok the bit of logic in play here is at
https://github.com/conda/conda/blob/7a68286a737c7b5cd48c83d39bd615f99d939304/conda/core/prefix_data.py#L232-L252
The problem is that we're actually deleting the `bleach` record in `conda-meta`.
The value of `clobbered_conda_anchor_files` is `{'lib/python3.7/site-packages/bleach/_vendor/html5lib-1.0.1.dist-info/RECORD'}`.
The value of `conda_anchor_files` is `{'lib/python3.7/site-packages/bleach/_vendor/html5lib-1.0.1.dist-info/RECORD', 'lib/python3.7/site-packages/setuptools-40.7.1-py3.7.egg-info/PKG-INFO', 'lib/python3.7/site-packages/six-1.12.0-py3.7.egg-info/PKG-INFO', 'lib/python3.7/site-packages/webencodings-0.5.1-py2.7.egg-info/PKG-INFO', 'lib/python3.7/site-packages/bleach-3.1.0.dist-info/RECORD', 'lib/python3.7/site-packages/pip-19.0.1-py3.7.egg-info/PKG-INFO', 'lib/python3.7/site-packages/wheel-0.32.3-py3.7.egg-info/PKG-INFO', 'lib/python3.7/site-packages/certifi-2018.11.29-py3.7.egg-info'}`, which has two entries for the bleach package.
So the root cause is in
https://github.com/conda/conda/blob/7a68286a737c7b5cd48c83d39bd615f99d939304/conda/core/prefix_data.py#L280-L291
Alternately, maybe we should consider that bleach package malformed? | 2019-01-31T14:32:07 |
conda/conda | 8,208 | conda__conda-8208 | [
"8199"
] | 7a68286a737c7b5cd48c83d39bd615f99d939304 | diff --git a/conda/models/version.py b/conda/models/version.py
--- a/conda/models/version.py
+++ b/conda/models/version.py
@@ -519,8 +519,14 @@ def get_matcher(self, vspec):
elif operator_str == "!=":
vo_str = vo_str[:-2]
operator_str = "!=startswith"
- else:
+ elif operator_str == "~=":
raise InvalidVersionSpec(vspec_str, "invalid operator with '.*'")
+ else:
+ log.warning("Using .* with relational operator is superfluous and deprecated "
+ "and will be removed in a future version of conda. Your spec was "
+ "{}, but conda is ignoring the .* and treating it as {}"
+ .format(vo_str, vo_str[:-2]))
+ vo_str = vo_str[:-2]
try:
self.operator_func = OPERATOR_MAP[operator_str]
except KeyError:
| Cannot install or Update with version constraint error
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
I try to install or update anything and it fails
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
scopatz@artemis ~ $ conda install conda-smithy -vv
DEBUG conda.gateways.logging:set_verbosity(148): verbosity set to 2
Collecting package metadata: ...working... DEBUG conda.core.solve:solve_final_state(212): solving prefix /home/scopatz/miniconda3
specs_to_remove: frozenset()
specs_to_add: frozenset({MatchSpec("conda-smithy")})
prune: False
Traceback (most recent call last):
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/version.py", line 38, in __call__
return cls._cache_[arg]
KeyError: '<3.*'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1001, in __call__
return func(*args, **kwargs)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 20, in execute
install(args, parser, 'install')
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/cli/install.py", line 253, in install
force_reinstall=context.force_reinstall or context.force,
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 107, in solve_for_transaction
force_remove, force_reinstall)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 145, in solve_for_diff
force_remove)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 235, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 277, in _collect_all_metadata
ssc.specs_map.update(ssc.specs_from_history_map)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/_vendor/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 747, in specs_from_history_map
return History(self.prefix).get_requested_specs_map()
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/history.py", line 278, in get_requested_specs_map
spec_map.update(((s.name, s) for s in update_specs))
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/history.py", line 278, in <genexpr>
spec_map.update(((s.name, s) for s in update_specs))
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/history.py", line 277, in <genexpr>
update_specs = (MatchSpec(spec) for spec in request.get('update_specs', ()))
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/match_spec.py", line 53, in __call__
return super(MatchSpecType, cls).__call__(**parsed)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/match_spec.py", line 175, in __init__
self._match_components = self._build_components(**kwargs)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/match_spec.py", line 389, in _build_components
return frozendict(_make_component(key, value) for key, value in iteritems(kwargs))
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/match_spec.py", line 389, in <genexpr>
return frozendict(_make_component(key, value) for key, value in iteritems(kwargs))
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/match_spec.py", line 403, in _make_component
matcher = _implementors[field_name](value)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/version.py", line 40, in __call__
val = cls._cache_[arg] = super(SingleStrArgCachingType, cls).__call__(arg)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/version.py", line 486, in __init__
vspec_str, matcher, is_exact = self.get_matcher(vspec)
File "/home/scopatz/miniconda3/lib/python3.6/site-packages/conda/models/version.py", line 523, in get_matcher
raise InvalidVersionSpec(vspec_str, "invalid operator with '.*'")
conda.exceptions.InvalidVersionSpec: Invalid version '<3.*': invalid operator with '.*'
failed
```
Note that `conda-smithy` is a placeholder here. It could be any package.
## Expected Behavior
code intalls / updates
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
$ conda info
active environment : None
user config file : /home/scopatz/.condarc
populated config files : /home/scopatz/.condarc
conda version : 4.6.2
conda-build version : 3.17.8
python version : 3.6.7.final.0
base environment : /home/scopatz/miniconda3 (writable)
channel URLs : http://35.232.222.82/conda-forge/--blacklist=abi,--max-build-no/linux-64
http://35.232.222.82/conda-forge/--blacklist=abi,--max-build-no/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/scopatz/miniconda3/pkgs
/home/scopatz/.conda/pkgs
envs directories : /home/scopatz/miniconda3/envs
/home/scopatz/.conda/envs
platform : linux-64
user-agent : conda/4.6.2 requests/2.21.0 CPython/3.6.7 Linux/4.18.0-13-generic ubuntu/18.10 glibc/2.28
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
$ conda config --show-sources
==> /home/scopatz/.condarc <==
changeps1: False
channels:
- http://35.232.222.82/conda-forge/--blacklist=abi,--max-build-no
- defaults
show_channel_urls: False
always_yes: True
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
$ conda list --show-channel-urls
# packages in environment at /home/scopatz/miniconda3:
#
# Name Version Build Channel
_license 1.1 py36_1 defaults
absl-py 0.7.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
alabaster 0.7.12 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
alsa-lib 1.1.5 h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
anaconda-client 1.7.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
appdirs 1.4.3 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
argcomplete 1.9.4 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
asn1crypto 0.24.0 py36_1003 http://35.232.222.82/conda-forge/--blacklist=abi
astor 0.7.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
asttokens 1.1.13 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
async_generator 1.10 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
atk 2.25.90 hf2eb9ee_1001 http://35.232.222.82/conda-forge/--blacklist=abi
atomicwrites 1.2.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
attrs 18.2.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
audioread 2.1.5 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
autoconf 2.69 pl526h470a237_9 http://35.232.222.82/conda-forge/--blacklist=abi
automake 1.16.1 pl526_1003 http://35.232.222.82/conda-forge/--blacklist=abi
automat 0.7.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
awscli 1.16.96 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
babel 2.6.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
backcall 0.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
backports 1.0 py_2 http://35.232.222.82/conda-forge/--blacklist=abi
backports.functools_lru_cache 1.5 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
backports.os 0.1.1 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
backports.shutil_get_terminal_size 1.0.0 py_3 http://35.232.222.82/conda-forge/--blacklist=abi
backports.weakref 1.0.post1 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
beautifulsoup4 4.7.1 py36_1001 http://35.232.222.82/conda-forge/--blacklist=abi
bibtexparser 1.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
binstar 0.12 2 defaults
binutils_impl_linux-64 2.31.1 h6176602_1 http://35.232.222.82/conda-forge/--blacklist=abi
binutils_linux-64 2.31.1 h6176602_3 http://35.232.222.82/conda-forge/--blacklist=abi
bitarray 0.8.3 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
black 18.9b0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
blas 1.1 openblas http://35.232.222.82/conda-forge/--blacklist=abi
blinker 1.4 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
blosc 1.15.1 hf484d3e_1002 http://35.232.222.82/conda-forge/--blacklist=abi
blz removed 0 defaults
boto 2.49.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
boto3 1.9.86 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
botocore 1.12.86 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
bz2file 0.98 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
bzip2 1.0.6 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
c-ares 1.15.0 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
ca-certificates 2018.11.29 ha4d7672_0 http://35.232.222.82/conda-forge/--blacklist=abi
cached-property 1.5.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
cairo 1.14.12 h80bd089_1005 http://35.232.222.82/conda-forge/--blacklist=abi
cerberus 1.2 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
certifi 2018.11.29 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
cffi 1.11.5 py36h9745a5d_1001 http://35.232.222.82/conda-forge/--blacklist=abi
chardet 3.0.4 py36_1003 http://35.232.222.82/conda-forge/--blacklist=abi
chrpath 0.16 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
clangdev 7.0.1 h6c845d6_1000 http://35.232.222.82/conda-forge/--blacklist=abi
click 7.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
cloog 0.18.0 0 defaults
cloud_sptheme 1.9.4 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
cloudpickle 0.6.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
clyent 1.2.2 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
cmake 3.13.2 h8d4ced6_1000 http://35.232.222.82/conda-forge/--blacklist=abi
colorama 0.3.9 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
conda 4.6.2 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
conda-build 3.17.8 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
conda-build-all 1.1.3 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
conda-env 2.6.0 1 http://35.232.222.82/conda-forge/--blacklist=abi
conda-forge-pinning 2019.01.29 0 http://35.232.222.82/conda-forge/--blacklist=abi
conda-smithy 3.2.12 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
conda-verify 3.1.1 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
configobj 5.0.6 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
constantly 15.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
contextvars 2.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
cryptography 2.5 py36hb7f436b_0 http://35.232.222.82/conda-forge/--blacklist=abi
cryptography-vectors 2.5 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
cudatoolkit 10.0.130 0 defaults
curl 7.63.0 h646f8bb_1000 http://35.232.222.82/conda-forge/--blacklist=abi
cycler 0.10.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
cython 0.29.3 py36hf484d3e_0 http://35.232.222.82/conda-forge/--blacklist=abi
cytoolz 0.9.0.1 py36h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
dask-core 1.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
dbus 1.13.0 h4e0c4b3_1000 http://35.232.222.82/conda-forge/--blacklist=abi
decorator 4.3.2 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
defusedxml 0.5.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
deprecated 1.2.4 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
distributed 1.25.2 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
django 2.0.8 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
django-extensions 2.1.5 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
django-haystack 2.8.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
django-widget-tweaks 1.4.3 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
djangorestframework 3.9.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
docker-compose 1.23.2 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
docker-py 3.7.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
docker-pycreds 0.3.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
dockerpty 0.4.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
docopt 0.6.2 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
docutils 0.14 py36_1001 http://35.232.222.82/conda-forge/--blacklist=abi
drf-haystack 1.8.3 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
dynd-python removed 0 defaults
ecosystem 0.0.0 pypi_0 pypi
entrypoints 0.3 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
et_xmlfile 1.0.1 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
eventlet 0.23.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
expat 2.2.5 hf484d3e_1002 http://35.232.222.82/conda-forge/--blacklist=abi
fastcache 1.0.2 py36h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
ffmpeg 2.8.6 hf82bc7d_7 http://35.232.222.82/conda-forge/absl-py,alabaster,alsa-lib,anaconda-client,appdirs,argcomplete,asn1crypto,astor,asttokens,async_generator,atk,atomicwrites,attrs,audioread,autoconf,automake,automat,awscli,babel,backcall,backports,backports.functools_lru_cache,backports.os,backports.shutil_get_terminal_size,backports.weakref,bcolz,beautifulsoup4,bibtexparser,bitarray,bkcharts,black,blas,bleach,blinker,blosc,bokeh,boost,boost-cpp,boto,boto3,botocore,bz2file,bzip2,c-ares,ca-certificates,cached-property,cairo,cerberus,certifi,cffi,chardet,chrpath,clangdev,click,cloog,cloud_sptheme,cloudpickle,clyent,cmake,coincbc,colorama,conda,conda-build,conda-build-all,conda-env,conda-forge-pinning,conda-smithy,conda-verify,configobj,constantly,contextvars,cryptography,cryptography-vectors,curl,cycler,cyclus-build-deps,cython,cytoolz,dask,dask-core,datashape,dbus,decorator,defusedxml,distributed,django,django-extensions,django-haystack,django-widget-tweaks,djangorestframework,docker-compose,docker-py,docker-pycreds,dockerpty,docopt,docutils,drf-haystack,embree,entrypoints,et_xmlfile,eventlet,expat,fastcache,ffmpeg,filelock,flake8,flake8-import-order,flake8-polyfill,flask,flask-socketio,fontconfig,freetype,funcsigs,future,gast,gdk-pixbuf,gensim,gettext,ghostscript,git-lfs,gitdb,gitdb2,github3.py,gitpython,glib,glibmm,glob2,gmp,gmpy2,gnutls,gobject-introspection,google-cloud-sdk,graphite2,graphviz,greenlet,grpcio,gst-plugins-base,gstreamer,gtk2,gunicorn,h11,h2,h5py,harfbuzz,hdf5,heapdict,hpack,html5lib,hypercorn,hyperframe,hyperlink,icu,idna,imageio,imagesize,immutables,importlib_metadata,incremental,ipykernel,ipython,ipython_genutils,isl,isodate,itsdangerous,itypes,jbig,jdcal,jedi,jinja2,jmespath,joblib,jpeg,jsoncpp,jsonschema,jupyter_client,jupyter_core,jwcrypto,keras,keras-applications,keras-preprocessing,kiwisolver,krb5,kubernetes,lapack,latexcodec,lazyasd,libarchive,libassuan,libcurl,libedit,libffi,libflac,libgcc,libgcc-ng,libgcrypt,libgfortran,libgfortran-ng,libgpg-error,libgpuarray,libiconv,libidn11,libksba,libogg,libpng,libprotobuf,librosa,libsigcpp,libsndfile,libsodium,libssh2,libstdcxx-ng,libtiff,libtool,libuuid,libuv,libvorbis,libxcb,libxml2,libxmlpp,libxslt,llvm-meta,llvmdev,llvmlite,locket,lxml,lz4,lz4-c,lzo,m4,make,mako,markdown,markupsafe,matplotlib,matplotlib-base,mccabe,memory_profiler,mistune,mock,more-itertools,mpc,mpfr,mpi,mpich,mpmath,msgpack-python,msrest,multipledispatch,nbconvert,nbformat,ncurses,ndg-httpsclient,nettle,networkx,nltk,nodejs,nose,notebook,npth,ntbtls,nuitka,numba,numexpr,numpy,numpydoc,oauthlib,odo,olefile,openblas,openpyxl,openssl,oset,outcome,packaging,pandas,pandoc,pandocfilters,pango,parso,partd,patchelf,path.py,patsy,pbr,pcre,pep8,pep8-naming,perl,pexpect,pickleshare,pillow,pip,pixman,pkg-config,pkginfo,pluggy,ply,portaudio,pprintpp,prettytable,profimp,prometheus_client,prompt_toolkit,protobuf,psutil,pthread-stubs,ptyprocess,pv,py,pyasn1,pyasn1-modules,pybtex,pybtex-docutils,pycodestyle,pycosat,pycparser,pycrypto,pyflakes,pygithub,pygments,pygpu,pyhamcrest,pyjwt,pyopenssl,pyparsing,pyqt,pyrsistent,pysocks,pysoundfile,pystan,pytables,pytest,pytest-django,pytest-django-haystack,pytest-tornado,python,python-coreapi,python-coreschema,python-crfsuite,python-dateutil,python-engineio,python-graphviz,python-libarchive-c,python-socketio,python-sounddevice,python3-openid,pytoml,pytz,pywavelets,pyyaml,pyzmq,qt,qtpy,readline,redis-py,requests,requests-oauthlib,resampy,rhash,rope,rsa,ruamel.yaml,ruamel_yaml,ruby,s3fs,s3transfer,scikit-image,scikit-learn,scipy,send2trash,service_identity,setuptools,simplegeneric,simplejson,sip,six,smart_open,smmap,smmap2,sniffio,snowballstemmer,social-auth-app-django,social-auth-core,sortedcontainers,sparse,sphinx,sphinx_rtd_theme,sphinxcontrib-bibtex,sphinxcontrib-websupport,sqlalchemy,sqlite,statsmodels,sympy,tblib,tensorboard,tensorflow,termcolor,terminado,testpath,texttable,theano,tk,toml,toolchain,toolchain_c_linux-64,toolchain_cxx_linux-64,toolz,tornado,tox,tqdm,traitlets,trio,twisted,twython,typing,typing_extensions,ujson,uncertainties,unyt,uritemplate,uritemplate.py,urllib3,urwid,uvloop,virtualenv,vitables,vsts-python-api,wcwidth,webencodings,websocket-client,websockets,werkzeug,wheel,whoosh,wsproto,x264,xlrd,xlsxwriter,xlwt,xorg-kbproto,xorg-libice,xorg-libsm,xorg-libx11,xorg-libxau,xorg-libxdmcp,xorg-libxext,xorg-libxpm,xorg-libxrender,xorg-libxt,xorg-renderproto,xorg-xextproto,xorg-xproto,xz,yaml,yasm,zeromq,zict,zlib,zope.interface,zstd,--max-build-no
filelock 3.0.10 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
flake8 3.7.0 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
flake8-import-order 0.18 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
flake8-polyfill 1.0.2 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
flask 1.0.2 py_2 http://35.232.222.82/conda-forge/--blacklist=abi
flask-socketio 3.0.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
fontconfig 2.13.1 h2176d3f_1000 http://35.232.222.82/conda-forge/--blacklist=abi
freetype 2.9.1 h94bbf69_1005 http://35.232.222.82/conda-forge/--blacklist=abi
funcsigs 1.0.2 py_3 http://35.232.222.82/conda-forge/--blacklist=abi
future 0.17.1 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
gast 0.2.1.post0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
gcc 4.8.5 7 defaults
gcc_impl_linux-64 7.3.0 habb00fd_1 http://35.232.222.82/conda-forge/--blacklist=abi
gcc_linux-64 7.3.0 h553295d_3 http://35.232.222.82/conda-forge/--blacklist=abi
gdk-pixbuf 2.36.12 h4f1c04b_1001 http://35.232.222.82/conda-forge/--blacklist=abi
gettext 0.19.8.1 h9745a5d_1001 http://35.232.222.82/conda-forge/--blacklist=abi
ghostscript 9.22 hf484d3e_1001 http://35.232.222.82/conda-forge/--blacklist=abi
git 2.20.1 pl526hc122a05_1001 http://35.232.222.82/conda-forge/--blacklist=abi
git-lfs 2.6.1 0 http://35.232.222.82/conda-forge/--blacklist=abi
gitdb 0.6.4 py36_1002 http://35.232.222.82/conda-forge/--blacklist=abi
gitdb2 2.0.5 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
github3.py 1.3.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
gitpython 2.1.11 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
glib 2.56.2 had28632_1001 http://35.232.222.82/conda-forge/--blacklist=abi
glibmm 2.52.1 h9fafe60_1000 http://35.232.222.82/conda-forge/--blacklist=abi
glob2 0.6 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
gmp 6.1.2 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
gmpy2 2.0.8 py36hc8893dd_2 defaults
gnutls 3.6.5 hd3a4fd2_1001 http://35.232.222.82/conda-forge/--blacklist=abi
gobject-introspection 1.56.1 py36h9e29830_1001 http://35.232.222.82/conda-forge/--blacklist=abi
google-cloud-sdk 232.0.0 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
graphite2 1.3.13 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
graphviz 2.38.0 hcf1ce16_1009 http://35.232.222.82/conda-forge/--blacklist=abi
greenlet 0.4.15 py36h7b6447c_0 defaults
grpcio 1.16.0 py36h4f00d22_1000 http://35.232.222.82/conda-forge/--blacklist=abi
gst-plugins-base 1.12.5 h3865690_1000 http://35.232.222.82/conda-forge/--blacklist=abi
gstreamer 1.12.5 h0cc0488_1000 http://35.232.222.82/conda-forge/--blacklist=abi
gtk2 2.24.31 h5baeb44_1000 http://35.232.222.82/conda-forge/--blacklist=abi
gunicorn 19.9.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
gxx_impl_linux-64 7.3.0 hdf63c60_1 http://35.232.222.82/conda-forge/--blacklist=abi
gxx_linux-64 7.3.0 h553295d_3 http://35.232.222.82/conda-forge/--blacklist=abi
h11 0.8.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
h2 3.1.0 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
harfbuzz 1.9.0 he243708_1001 http://35.232.222.82/conda-forge/--blacklist=abi
heapdict 1.0.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
hpack 3.0.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
html5lib 1.0.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
hypercorn 0.4.6 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
hyperframe 5.2.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
hyperlink 17.3.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
icu 58.2 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
idna 2.8 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
imagesize 1.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
immutables 0.9 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
importlib_metadata 0.6 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
incremental 17.5.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
intel-openmp 2019.1 144 defaults
ipykernel 5.1.0 py36h24bf2e0_1002 http://35.232.222.82/conda-forge/--blacklist=abi
ipython 7.2.0 py36h24bf2e0_1000 http://35.232.222.82/conda-forge/--blacklist=abi
ipython_genutils 0.2.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
isl 0.12.2 0 defaults
isodate 0.6.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
itsdangerous 1.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
itypes 1.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
jbig 2.1 h14c3975_2001 http://35.232.222.82/conda-forge/--blacklist=abi
jdcal 1.4 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
jedi 0.13.2 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
jinja2 2.10 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
jmespath 0.9.3 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
joblib 0.13.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
jpeg 9c h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
jsoncpp 1.8.4 h6bb024c_1001 http://35.232.222.82/conda-forge/--blacklist=abi
jsonschema 3.0.0a3 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
jupyter_client 5.2.4 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
jupyter_core 4.4.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
jwcrypto 0.5.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
kiwisolver 1.0.1 py36h6bb024c_1002 http://35.232.222.82/conda-forge/--blacklist=abi
krb5 1.16.3 hc83ff2d_1000 http://35.232.222.82/conda-forge/--blacklist=abi
kubernetes 1.13.2 h8a17f66_1000 http://35.232.222.82/conda-forge/--blacklist=abi
latexcodec 1.0.6 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
lazyasd 0.1.4 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
libarchive 3.3.3 ha149a29_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libassuan 2.5.2 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libboost 1.67.0 h46d08c1_4 defaults
libcurl 7.63.0 h01ee5af_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libdynd 0.7.2 0 defaults
libedit 3.1.20170329 hf8c457e_1001 http://35.232.222.82/conda-forge/--blacklist=abi
libffi 3.2.1 hf484d3e_1005 http://35.232.222.82/conda-forge/--blacklist=abi
libflac 1.3.1 hf484d3e_1002 http://35.232.222.82/conda-forge/--blacklist=abi
libgcc 7.2.0 h69d50b8_2 http://35.232.222.82/conda-forge/--blacklist=abi
libgcc-ng 7.3.0 hdf63c60_0 http://35.232.222.82/conda-forge/--blacklist=abi
libgcrypt 1.8.4 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libgfortran 3.0.0 1 http://35.232.222.82/conda-forge/--blacklist=abi
libgfortran-ng 7.3.0 hdf63c60_0 defaults
libgpg-error 1.32 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libgpuarray 0.7.6 h14c3975_1003 http://35.232.222.82/conda-forge/--blacklist=abi
libiconv 1.15 h14c3975_1004 http://35.232.222.82/conda-forge/--blacklist=abi
libksba 1.3.5 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
liblief 0.9.0 h7725739_2 defaults
libogg 1.3.2 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
libopenblas 0.3.3 h5a2b251_3 defaults
libpng 1.6.36 h84994c4_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libprotobuf 3.6.1 hdbcaa40_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libsigcpp 2.10.0 hf484d3e_1001 http://35.232.222.82/conda-forge/--blacklist=abi
libsndfile 1.0.28 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libsodium 1.0.16 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
libssh2 1.8.0 h1ad7b7a_1003 http://35.232.222.82/conda-forge/--blacklist=abi
libstdcxx-ng 7.3.0 hdf63c60_0 http://35.232.222.82/conda-forge/--blacklist=abi
libtiff 4.0.10 h648cc4a_1001 http://35.232.222.82/conda-forge/--blacklist=abi
libtool 2.4.6 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
libuuid 2.32.1 h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libuv 1.24.1 h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
libvorbis 1.3.5 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
libxcb 1.13 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
libxml2 2.9.8 h143f9aa_1005 http://35.232.222.82/conda-forge/--blacklist=abi
libxmlpp 2.40.1 he0df586_1003 http://35.232.222.82/conda-forge/--blacklist=abi
libxslt 1.1.32 h4785a14_1002 http://35.232.222.82/conda-forge/--blacklist=abi
llvm-meta 7.0.1 0 http://35.232.222.82/conda-forge/--blacklist=abi
llvmdev 7.0.1 h6bb024c_1001 http://35.232.222.82/conda-forge/--blacklist=abi
llvmlite 0.26.0 py36hdbcaa40_1000 http://35.232.222.82/conda-forge/--blacklist=abi
locket 0.2.0 py_2 http://35.232.222.82/conda-forge/--blacklist=abi
lxml 4.3.0 py36h23eabaa_1000 http://35.232.222.82/conda-forge/--blacklist=abi
lz4 2.1.6 py36ha8eefa0_1000 http://35.232.222.82/conda-forge/--blacklist=abi
lz4-c 1.8.1.2 h14c3975_0 defaults
lzo 2.10 h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
m4 1.4.18 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
make 4.2.1 h14c3975_2004 http://35.232.222.82/conda-forge/--blacklist=abi
mako 1.0.7 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
markdown 2.6.11 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
markupsafe 1.1.0 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
mccabe 0.6.1 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
memory_profiler 0.55.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
mistune 0.8.4 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
mkl 2019.1 144 defaults
mkl-rt 11.1 p0 pkgs/pro
mock 2.0.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
more-itertools 4.3.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
mpc 1.0.3 hec55b23_5 defaults
mpfr 3.1.5 h11a74b3_2 defaults
mpi 1.0 mpich http://35.232.222.82/conda-forge/--blacklist=abi
mpich 3.2.1 h1c2f66e_1007 http://35.232.222.82/conda-forge/--blacklist=abi
mpmath 1.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
msgpack-python 0.6.1 py36h6bb024c_0 http://35.232.222.82/conda-forge/--blacklist=abi
msrest 0.6.2 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
multipledispatch 0.6.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
nbconvert 5.3.1 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
nbformat 4.4.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
ncurses 6.1 hf484d3e_1002 http://35.232.222.82/conda-forge/--blacklist=abi
ndg-httpsclient 0.5.1 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
nettle 3.4.1 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
networkx 2.2 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
nodejs 11.9.0 hf484d3e_0 http://35.232.222.82/conda-forge/--blacklist=abi
nose 1.3.7 py36_1002 http://35.232.222.82/conda-forge/--blacklist=abi
notebook 5.7.4 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
npth 1.6 hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
ntbtls 0.1.2 hdbcaa40_1000 http://35.232.222.82/conda-forge/--blacklist=abi
nuitka 0.6.1.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
numpy 1.16.0 py36_blas_openblash1522bff_1000 [blas_openblas] http://35.232.222.82/conda-forge/--blacklist=abi
numpydoc 0.8.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
oauthlib 2.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
olefile 0.46 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
openblas 0.3.3 h9ac9557_1001 http://35.232.222.82/conda-forge/--blacklist=abi
openpyxl 2.5.14 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
openssl 1.0.2p h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
oset 0.1.3 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
outcome 1.0.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
packaging 19.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pandoc 2.6 0 http://35.232.222.82/conda-forge/--blacklist=abi
pandocfilters 1.4.2 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
pango 1.40.14 hf0c64fd_1003 http://35.232.222.82/conda-forge/--blacklist=abi
parso 0.3.2 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
partd 0.3.9 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
patchelf 0.9 hf484d3e_1002 http://35.232.222.82/conda-forge/--blacklist=abi
path.py 11.5.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pbr 5.1.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pcre 8.41 hf484d3e_1003 http://35.232.222.82/conda-forge/--blacklist=abi
pep8 1.7.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pep8-naming 0.8.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
perl 5.26.2 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
pexpect 4.6.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pickleshare 0.7.5 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pillow 5.4.1 py36h00a061d_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pip 19.0.1 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
pixman 0.34.0 h14c3975_1003 http://35.232.222.82/conda-forge/--blacklist=abi
pkg-config 0.29.2 h14c3975_1004 http://35.232.222.82/conda-forge/--blacklist=abi
pkginfo 1.5.0.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pluggy 0.8.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
ply 3.11 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
portaudio 19.6.0 hf484d3e_2 http://35.232.222.82/conda-forge/--blacklist=abi
pprintpp 0.3.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
prettytable 0.7.2 py_2 http://35.232.222.82/conda-forge/--blacklist=abi
profimp 0.0.3 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
prometheus_client 0.5.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
prompt_toolkit 2.0.8 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
protobuf 3.6.1 py36hf484d3e_1001 http://35.232.222.82/conda-forge/--blacklist=abi
psutil 5.4.8 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pthread-stubs 0.4 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
ptyprocess 0.6.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pv 1.6.6 h470a237_0 http://35.232.222.82/conda-forge/--blacklist=abi
py 1.7.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
py-lief 0.9.0 py36h7725739_2 defaults
pyasn1 0.4.4 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
pyasn1-modules 0.2.3 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pybtex 0.22.2 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
pybtex-docutils 0.2.1 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pycodestyle 2.5.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pycosat 0.6.3 py36h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
pycparser 2.19 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pycrypto 2.6.1 py36h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
pycurl 7.43.0.2 py36hb7f436b_0 defaults
pyflakes 2.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pygithub 1.43.4 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
pygments 2.3.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pyhamcrest 1.9.0 py_2 http://35.232.222.82/conda-forge/--blacklist=abi
pyjwt 1.7.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pyopenssl 18.0.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pyparsing 2.3.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pyqt 5.6.0 py36h13b7fb3_1008 http://35.232.222.82/conda-forge/--blacklist=abi
pyrsistent 0.14.9 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pysocks 1.6.8 py36_1002 http://35.232.222.82/conda-forge/--blacklist=abi
pytest 4.1.1 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
pytest-django 3.4.5 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pytest-django-haystack 0.3.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pytest-tornado 0.5.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
python 3.6.7 hd21baee_1001 http://35.232.222.82/conda-forge/--blacklist=abi
python-coreapi 2.3.3 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
python-coreschema 0.0.4 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
python-crfsuite 0.9.6 py36h6bb024c_1000 http://35.232.222.82/conda-forge/--blacklist=abi
python-dateutil 2.7.5 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
python-engineio 3.0.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
python-graphviz 0.8.4 py36_1002 http://35.232.222.82/conda-forge/--blacklist=abi
python-libarchive-c 2.8 py36_1004 http://35.232.222.82/conda-forge/--blacklist=abi
python-socketio 3.0.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
python3-openid 3.1.0 py36_1001 http://35.232.222.82/conda-forge/--blacklist=abi
pytoml 0.1.20 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pytz 2018.9 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
pyyaml 3.13 py36h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
pyzmq 17.1.2 py36h6afc9c9_1001 http://35.232.222.82/conda-forge/--blacklist=abi
qt 5.6.2 hbe13537_1012 http://35.232.222.82/conda-forge/--blacklist=abi
qtpy 1.6.0 pyh8a2030e_0 http://35.232.222.82/conda-forge/--blacklist=abi
quart 0.6.11 pypi_0 pypi
readline 7.0 hf8c457e_1001 http://35.232.222.82/conda-forge/--blacklist=abi
redis 5.0.3 h7b6447c_0 defaults
redis-py 3.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
requests 2.21.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
requests-oauthlib 1.0.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
rhash 1.3.6 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
rope 0.10.7 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
rsa 3.4.2 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
ruamel.yaml 0.15.87 py36h14c3975_0 http://35.232.222.82/conda-forge/--blacklist=abi
ruamel_yaml 0.15.71 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
ruby 2.4.4 h54e3902_1001 http://35.232.222.82/conda-forge/--blacklist=abi
s3fs 0.2.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
s3transfer 0.1.13 py36_1001 http://35.232.222.82/conda-forge/--blacklist=abi
send2trash 1.5.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
service_identity 17.0.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
setuptools 40.7.1 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
shyaml 0.5.2 pypi_0 pypi
sigcpp 2.30.0 0 cyclus
simplegeneric 0.8.1 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
simplejson 3.16.0 py36h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
sip 4.18.1 py36hf484d3e_1000 http://35.232.222.82/conda-forge/--blacklist=abi
six 1.12.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
smart_open 1.8.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
smmap 0.9.0 py_2 http://35.232.222.82/conda-forge/--blacklist=abi
smmap2 2.0.5 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
sniffio 1.0.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
snowballstemmer 1.2.1 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
social-auth-app-django 3.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
social-auth-core 3.0.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
sockjs-tornado 1.0.6 py36_0 defaults
sortedcontainers 2.1.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
soupsieve 1.7.1 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
sparse 0.5.0+12.gde981ea pypi_0 pypi
sphinx 1.8.3 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
sphinx_rtd_theme 0.4.2 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
sphinxcontrib-bibtex 0.4.2 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
sphinxcontrib-websupport 1.1.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
sqlalchemy 1.2.17 py36h14c3975_0 http://35.232.222.82/conda-forge/--blacklist=abi
sqlite 3.26.0 h67949de_1000 http://35.232.222.82/conda-forge/--blacklist=abi
sympy 1.3 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
system 5.8 2 defaults
tblib 1.3.2 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
tensorly 0.4.3 pypi_0 pypi
termcolor 1.1.0 py_2 http://35.232.222.82/conda-forge/--blacklist=abi
terminado 0.8.1 py36_1001 http://35.232.222.82/conda-forge/--blacklist=abi
testpath 0.4.2 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
texttable 1.6.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
tk 8.6.9 h84994c4_1000 http://35.232.222.82/conda-forge/--blacklist=abi
toml 0.10.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
toolz 0.9.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
tornado 5.1.1 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
tox 3.6.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
tqdm 4.29.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
traitlets 4.3.2 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
trio 0.9.0 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
twisted 18.9.0 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
twython 3.7.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
typing 3.6.4 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
typing_extensions 3.6.6 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
ujson 1.35 py36h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
umdone 0.1.dev0 pypi_0 pypi
uritemplate 3.0.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
uritemplate.py 3.0.2 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
urllib3 1.24.1 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
urwid 2.0.1 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
util-linux 2.21 0 defaults
uvloop 0.12.0 py36h14c3975_0 http://35.232.222.82/conda-forge/--blacklist=abi
virtualenv 16.1.0 pypi_0 pypi
vsts-python-api 0.1.22 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
wcwidth 0.1.7 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
webencodings 0.5.1 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
websocket-client 0.54.0 py36_1000 http://35.232.222.82/conda-forge/--blacklist=abi
websockets 7.0 py36h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
werkzeug 0.14.1 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
wheel 0.32.3 py36_0 http://35.232.222.82/conda-forge/--blacklist=abi
whoosh 2.7.4 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
wrapt 1.11.1 py36h14c3975_0 http://35.232.222.82/conda-forge/--blacklist=abi
wsproto 0.12.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
x264 1!152.20180717 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
xlrd 1.2.0 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
xlsxwriter 1.1.2 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
xlwt 1.3.0 py_1 http://35.232.222.82/conda-forge/--blacklist=abi
xonsh 0.6.7 pypi_0 pypi
xorg-kbproto 1.0.7 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libice 1.0.9 h14c3975_1004 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libsm 1.2.3 h4937e3b_1000 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libx11 1.6.6 h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libxau 1.0.8 h14c3975_1006 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libxdmcp 1.1.2 h14c3975_1007 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libxext 1.3.3 h14c3975_1004 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libxpm 3.5.12 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libxrender 0.9.10 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-libxt 1.1.5 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-renderproto 0.11.1 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-xextproto 7.3.0 h14c3975_1002 http://35.232.222.82/conda-forge/--blacklist=abi
xorg-xproto 7.0.31 h14c3975_1007 http://35.232.222.82/conda-forge/--blacklist=abi
xz 5.2.4 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
yaml 0.1.7 h14c3975_1001 http://35.232.222.82/conda-forge/--blacklist=abi
yasm 1.3.0 h99c0ef8_2 defaults
zeromq 4.2.5 hf484d3e_1006 http://35.232.222.82/conda-forge/--blacklist=abi
zict 0.1.3 py_0 http://35.232.222.82/conda-forge/--blacklist=abi
zlib 1.2.11 h14c3975_1004 http://35.232.222.82/conda-forge/--blacklist=abi
zope.interface 4.6.0 py36h14c3975_1000 http://35.232.222.82/conda-forge/--blacklist=abi
zstd 1.3.8 h7510944_1002 http://35.232.222.82/conda-forge/--blacklist=abi
```
</p></details>
| Does this affect 4.6.1? Or is it just a regression in the canary package for now?
I believe this is a regression present in all of 4.6. We'll look into it. This kind of thing can't change without some deprecation notice time.
Thanks @msarahan!
Any idea on how to recover from this? I think I might need to remove my miniconda installation and then reinstall.
you might be able to force a downgrade by using a 4.5.x tarball from your package cache, or by downloading one from repo.anaconda.com manually.
``conda install /path/to/conda-4.5.13-py37-0.tar.bz2``
might bypass the dependency check stuff, and thus get you over this hump. | 2019-02-01T23:21:54 |
|
conda/conda | 8,219 | conda__conda-8219 | [
"8102"
] | 500d280e277a5915dcc7e1792718bda8929aefb6 | diff --git a/conda/core/initialize.py b/conda/core/initialize.py
--- a/conda/core/initialize.py
+++ b/conda/core/initialize.py
@@ -468,6 +468,12 @@ def make_initialize_plan(conda_prefix, shells, for_user, for_system, anaconda_pr
raise NotImplementedError()
if 'powershell' in shells:
+ if for_user:
+ profile = '$PROFILE.CurrentUserAllHosts'
+
+ if for_system:
+ profile = '$PROFILE.AllUsersAllHosts'
+
# There's several places PowerShell can store its path, depending
# on if it's Windows PowerShell, PowerShell Core on Windows, or
# PowerShell Core on macOS/Linux. The easiest way to resolve it is to
@@ -477,12 +483,12 @@ def find_powershell_paths(*exe_names):
for exe_name in exe_names:
try:
yield subprocess_call(
- (exe_name, '-NoProfile', '-Command', '$PROFILE')
+ (exe_name, '-NoProfile', '-Command', profile)
).stdout.strip()
except Exception:
pass
- config_powershell_paths = tuple(
+ config_powershell_paths = set(
find_powershell_paths('powershell', 'pwsh', 'pwsh-preview')
)
@@ -496,11 +502,6 @@ def find_powershell_paths(*exe_names):
}
})
- if for_system:
- raise NotImplementedError(
- "PowerShell hooks are only implemented for per-user profiles."
- )
-
if 'cmd.exe' in shells:
if for_user:
plan.append({
| [4.6.0] conda init powershell --all-users
With the new `4.6.0rc1` `conda init powershell` puts the below config in your *user* `$PROFILE`
```powershell
C:\> $PROFILE
C:\Users\dhirschfeld\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
C:\> cat $PROFILE
#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
(& C:\Miniconda3\Scripts\conda.exe shell.powershell hook) | Out-String | Invoke-Expression
#endregion
C:\>
```
If you have an AllUsers install of Miniconda (e.g. in `C:\Miniconda3`) it would be good to be able to initialize powershell for all users i.e. in the `$PROFILE.AllUsersAllHosts`
```powershell
C:\> $PROFILE.AllUsersAllHosts
C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
```
| Might be as simple as changing the below:
https://github.com/conda/conda/blob/1bf5787d01e61eb4c418651fcfd328e5cffbd0d5/conda/core/initialize.py#L463-L495
...to:
```python
if 'powershell' in shells:
if for_user:
profile = '$PROFILE.CurrentUserAllHosts'
if for_system:
profile = '$PROFILE.AllUsersAllHosts'
config_path = subprocess_call(
('powershell.exe', '-NoProfile', '-Command', profile)
).stdout.strip()
if config_path is not None:
plan.append({
'function': init_powershell_user.__name__,
'kwargs': {
'target_path': config_path,
'conda_prefix': conda_prefix,
}
})
``` | 2019-02-05T11:33:10 |
|
conda/conda | 8,222 | conda__conda-8222 | [
"8221"
] | 086813603450b34f0f46a8bc24de61958ec90f68 | diff --git a/conda/core/initialize.py b/conda/core/initialize.py
--- a/conda/core/initialize.py
+++ b/conda/core/initialize.py
@@ -1246,7 +1246,7 @@ def _powershell_profile_content(conda_prefix):
conda_powershell_module = dals("""
#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
- (& {conda_exe} "shell.powershell" "hook") | Out-String | Invoke-Expression
+ (& "{conda_exe}" "shell.powershell" "hook") | Out-String | Invoke-Expression
#endregion
""".format(conda_exe=conda_exe))
| Space in path breaks powershell (conda >=4.6.x)
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
Setup miniconda to a path with space in it. Update conda, run `conda --init`
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
C:\Windows\system32>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
& : The term 'C:\Users\Wani\scratch\mc' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Wani\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:4 char:4
+ (& C:\Users\Wani\scratch\mc 3\Scripts\conda.exe "shell.powershell" "h ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Wani\scratch\mc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Loading personal and system profiles took 849ms.
```
## Expected Behavior
<!-- What do you think should happen? -->
The profile file written by conda init shouldn't be incorrect.
| 2019-02-05T16:15:27 |
||
conda/conda | 8,229 | conda__conda-8229 | [
"7789"
] | bd3151e764a7534c71c0f64628b7162a552d9365 | diff --git a/conda/core/link.py b/conda/core/link.py
--- a/conda/core/link.py
+++ b/conda/core/link.py
@@ -6,9 +6,10 @@
from collections import defaultdict, namedtuple
from logging import getLogger
import os
-from os.path import basename, dirname, isdir, join
+from os.path import abspath, basename, dirname, isdir, join
from subprocess import CalledProcessError
import sys
+import tempfile
from traceback import format_exception_only
import warnings
@@ -596,7 +597,8 @@ def _execute_actions(pkg_idx, axngroup):
for axn_idx, action in enumerate(axngroup.actions):
action.execute()
if axngroup.type in ('unlink', 'link'):
- run_script(target_prefix, prec, 'post-unlink' if is_unlink else 'post-link')
+ run_script(target_prefix, prec, 'post-unlink' if is_unlink else 'post-link',
+ activate=True)
except Exception as e: # this won't be a multi error
# reverse this package
log.debug("Error in action #%d for pkg_idx #%d %r", axn_idx, pkg_idx, action,
@@ -958,7 +960,7 @@ def _calculate_change_report(prefix, unlink_precs, link_precs, download_urls, sp
return change_report
-def run_script(prefix, prec, action='post-link', env_prefix=None):
+def run_script(prefix, prec, action='post-link', env_prefix=None, activate=False):
"""
call the post-link (or pre-unlink) script, and return True on success,
False on failure
@@ -994,13 +996,35 @@ def run_script(prefix, prec, action='post-link', env_prefix=None):
if on_win:
try:
- command_args = [os.environ[str('COMSPEC')], '/d', '/c', path]
+ comspec = os.environ[str('COMSPEC')]
except KeyError:
log.info("failed to run %s for %s due to COMSPEC KeyError", action, prec.dist_str())
return False
+ if activate:
+ conda_bat = env.get("CONDA_BAT", abspath(join(context.root_prefix, 'bin', 'conda')))
+ with tempfile.NamedTemporaryFile(
+ mode='w', prefix=prefix, suffix='.bat', delete=False) as fh:
+ fh.write('@CALL \"{0}\" activate \"{1}\"\n'.format(conda_bat, prefix))
+ fh.write('echo "PATH: %PATH%\n')
+ fh.write('@CALL \"{0}\"\n'.format(path))
+ script_caller = fh.name
+ command_args = [comspec, '/d', '/c', script_caller]
+ else:
+ command_args = [comspec, '/d', '/c', path]
+
else:
shell_path = 'sh' if 'bsd' in sys.platform else 'bash'
- command_args = [shell_path, "-x", path]
+ if activate:
+ conda_exe = env.get("CONDA_EXE", abspath(join(context.root_prefix, 'bin', 'conda')))
+ with tempfile.NamedTemporaryFile(mode='w', prefix=prefix, delete=False) as fh:
+ fh.write("eval \"$(\"{0}\" \"shell.posix\" \"hook\")\"\n".format(conda_exe)),
+ fh.write("conda activate \"{0}\"\n".format(prefix)),
+ fh.write("source \"{}\"\n".format(path))
+ script_caller = fh.name
+ command_args = [shell_path, "-x", script_caller]
+ else:
+ command_args = [shell_path, "-x", path]
+ script_caller = None
env['ROOT_PREFIX'] = context.root_prefix
env['PREFIX'] = env_prefix or prefix
@@ -1036,6 +1060,9 @@ def run_script(prefix, prec, action='post-link', env_prefix=None):
else:
messages(prefix)
return True
+ finally:
+ if script_caller is not None:
+ os.remove(script_caller)
def messages(prefix):
| diff --git a/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/activate_d_test.bat b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/activate_d_test.bat
new file mode 100644
--- /dev/null
+++ b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/activate_d_test.bat
@@ -0,0 +1,2 @@
+echo "setting TEST_VAR"
+set TEST_VAR=1
diff --git a/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/bld.bat b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/bld.bat
new file mode 100644
--- /dev/null
+++ b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/bld.bat
@@ -0,0 +1,6 @@
+mkdir %PREFIX%\etc\conda\activate.d
+copy %RECIPE_DIR%\activate_d_test.bat %PREFIX%\etc\conda\activate.d\test.bat
+
+mkdir %PREFIX%\etc\conda\deactivate.d
+echo "echo setting TEST_VAR" > %PREFIX%\etc\conda\deactivate.d\test.bat
+echo set TEST_VAR= > %PREFIX%\etc\conda\deactivate.d\test.bat
diff --git a/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/build.sh b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/build.sh
new file mode 100644
--- /dev/null
+++ b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/build.sh
@@ -0,0 +1,7 @@
+mkdir -p $PREFIX/etc/conda/activate.d
+echo "echo 'setting TEST_VAR' && export TEST_VAR=1" > $PREFIX/etc/conda/activate.d/test.sh
+chmod +x $PREFIX/etc/conda/activate.d/test.sh
+
+mkdir -p $PREFIX/etc/conda/deactivate.d
+echo "echo 'unsetting TEST_VAR' && unset TEST_VAR" > $PREFIX/etc/conda/deactivate.d/test.sh
+chmod +x $PREFIX/etc/conda/deactivate.d/test.sh
diff --git a/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/meta.yaml b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/meta.yaml
new file mode 100644
--- /dev/null
+++ b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/meta.yaml
@@ -0,0 +1,13 @@
+package:
+ name: _conda_test_env_activated_when_post_link_executed
+ version: 1.0
+
+about:
+ summary: test package that checks for an activated env in the post link script
+ description: |
+ This is a test packages that checks that conda environment are activated
+ when running a post link script. This package has an activate.d script which
+ sets the environment variable TEST_VAR. The packages post link script tests
+ that this variable is set, if it is not the script fails. If this post
+ link script is run under a different environment, for example the base env,
+ there is a good chance that it will fail.
diff --git a/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/post-link.bat b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/post-link.bat
new file mode 100644
--- /dev/null
+++ b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/post-link.bat
@@ -0,0 +1,8 @@
+
+echo "TEST_VAR is set to :%TEST_VAR%:" >> %PREFIX%\.messages.txt
+if "%TEST_VAR%"=="1" (
+ echo "Success: TEST_VAR is set correctly" >> %PREFIX%\.messages.txt
+ exit 0
+)
+echo "ERROR: TEST_VAR is not set or set incorrectly" >> %PREFIX%\.messages.txt
+exit 1
diff --git a/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/post-link.sh b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/post-link.sh
new file mode 100644
--- /dev/null
+++ b/tests/data/_conda_test_env_activated_when_post_link_executed_recipe/post-link.sh
@@ -0,0 +1,8 @@
+# send feedback to .messages to make debugging easier
+echo "TEST_VAR is set to :${TEST_VAR}:" >> "$PREFIX/.messages.txt"
+if [ "${TEST_VAR}" != "1" ]; then
+ echo "Error: TEST_VAR is not set or set incorrectly" >> "$PREFIX/.messages.txt";
+ exit 1;
+fi
+echo "Success: TEST_VAR is set correctly" >> "$PREFIX/.messages.txt"
+exit 0
diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -247,7 +247,7 @@ def package_is_installed(prefix, spec):
spec = MatchSpec(spec)
prefix_recs = tuple(PrefixData(prefix).query(spec))
if len(prefix_recs) > 1:
- raise AssertionError("Multiple packages installed.%s"
+ raise AssertionError("Multiple packages installed.%s"
% (dashlist(prec.dist_str() for prec in prefix_recs)))
return bool(len(prefix_recs))
@@ -2152,6 +2152,13 @@ def test_run_script_called(self):
assert package_is_installed(prefix, 'openssl')
assert rs.call_count == 1
+ def test_post_link_run_in_env(self):
+ test_pkg = '_conda_test_env_activated_when_post_link_executed'
+ # a non-unicode name must be provided here as activate.d scripts
+ # are not execuated on windows, see https://github.com/conda/conda/issues/8241
+ with make_temp_env(test_pkg, '-c conda-test', name='post_link_test') as prefix:
+ assert package_is_installed(prefix, test_pkg)
+
def test_conda_info_python(self):
stdout, stderr = run_command(Commands.INFO, None, "python=3.5")
assert "python 3.5.1 0" in stdout
| Envs need to be activated before post-link scripts run
In Python 3.7, we removed a patch to Python that put Library/bin on PATH. This was done because putting that on PATH broke the new conda activate stuff somehow. A side effect of this change is that packages with post-link scripts may fail to run (see https://github.com/ContinuumIO/anaconda-issues/issues/10082 for one example). At a minimum, we should be activating environments before we run post-link scripts. We should think about pre-unlink and pre-link, too, I guess.
| Without https://github.com/conda/conda/issues/6820, I'm a little bit nervous about the effect this could have on install times. I guess we'll see. | 2019-02-05T21:36:30 |
conda/conda | 8,259 | conda__conda-8259 | [
"8258"
] | 18ef83386b1cc7f99f956a4fcd841a28c5237839 | diff --git a/conda/core/path_actions.py b/conda/core/path_actions.py
--- a/conda/core/path_actions.py
+++ b/conda/core/path_actions.py
@@ -6,7 +6,7 @@
from abc import ABCMeta, abstractmethod, abstractproperty
from errno import EXDEV
from logging import getLogger
-from os.path import basename, dirname, getsize, join
+from os.path import basename, dirname, getsize, join, isdir
import re
from uuid import uuid4
@@ -32,7 +32,7 @@
create_hard_link_or_copy, create_link,
create_python_entry_point, extract_tarball,
make_menu, mkdir_p, write_as_json_to_file)
-from ..gateways.disk.delete import rm_rf
+from ..gateways.disk.delete import rm_rf, path_is_clean
from ..gateways.disk.permissions import make_writable
from ..gateways.disk.read import (compute_md5sum, compute_sha256sum, islink, lexists,
read_index_json)
@@ -370,7 +370,8 @@ def execute(self):
def reverse(self):
if self._execute_successful:
log.trace("reversing link creation %s", self.target_prefix)
- rm_rf(self.target_full_path, clean_empty_parents=True)
+ if not isdir(self.target_full_path) or path_is_clean(self.target_full_path):
+ rm_rf(self.target_full_path, clean_empty_parents=True)
class PrefixReplaceLinkAction(LinkPathAction):
@@ -975,7 +976,8 @@ def reverse(self):
backoff_rename(self.holding_full_path, self.target_full_path, force=True)
def cleanup(self):
- rm_rf(self.holding_full_path, clean_empty_parents=True)
+ if not isdir(self.holding_full_path) or path_is_clean(self.target_full_path):
+ rm_rf(self.holding_full_path, clean_empty_parents=True)
class RemoveMenuAction(RemoveFromPrefixPathAction):
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -330,6 +330,15 @@ def test_create_install_update_remove_smoketest(self):
assert not package_is_installed(prefix, 'flask')
assert package_is_installed(prefix, 'python=3')
+ def test_install_broken_post_install_keeps_existing_folders(self):
+ # regression test for https://github.com/conda/conda/issues/8258
+ with make_temp_env("python=3.5") as prefix:
+ assert exists(join(prefix, BIN_DIRECTORY))
+ assert package_is_installed(prefix, 'python=3')
+
+ run_command(Commands.INSTALL, prefix, '-c', 'conda-test', 'failing_post_link', use_exception_handler=True)
+ assert exists(join(prefix, BIN_DIRECTORY))
+
def test_safety_checks(self):
# This test uses https://anaconda.org/conda-test/spiffy-test-app/0.5/download/noarch/spiffy-test-app-0.5-pyh6afbcc8_0.tar.bz2
# which is a modification of https://anaconda.org/conda-test/spiffy-test-app/1.0/download/noarch/spiffy-test-app-1.0-pyh6afabb7_0.tar.bz2
| conda/bin deleted when conda install errors in 4.6.3
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
```
The files in the anaconda/bin directory were deleted when running `conda install` on a new local build of a recipe. When the recipe errors/fails conda tries to roll back. During the role back, rm_rf is called on the anaconda/bin folder. The complete contents of the folder are deleted. This is from conda 4.6.3
```
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
conda install --use-local -v -y <recipe>
```
## Expected Behavior
<!-- What do you think should happen? -->
```
If conda install is unsuccessful conda should not remove the entire contents of the anaconda/bin folder.
```
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
Not available. Unfortunetly, the conda binary is no longer available to run any conda command. But the conda version was 4.6.3
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
```
</p></details>
### Output from the command
```
No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
INFO:conda_build.variants:Adding in variants from internal_defaults
INFO:conda_build.metadata:Attempting to finalize metadata for hg19-civic
WARNING: symlink_conda() is deprecated.
INFO:conda_build.build:Packaging hg19-civic
INFO:conda_build.build:Packaging hg19-civic-1-0
No files or script found for output hg19-civic
WARNING:conda_build.build:No files or script found for output hg19-civic
/scratch/local/u0055382/tmp1fopUu/hg19-civic-1-0.tar.bz2: C1115 Found invalid license "None" in info/index.json
/scratch/local/u0055382/tmp1fopUu/hg19-civic-1-0.tar.bz2: C1134 Found pre/post link file "bin/.hg19-civic-post-link.sh" in archive
INFO:conda_build.variants:Adding in variants from /scratch/local/u0055382/tmpSvYdIK/info/recipe/conda_build_config.yaml
Collecting package metadata: ...working... done
Solving environment: ...working... done
initializing UnlinkLinkTransaction with
target_prefix: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
unlink_precs:
link_precs:
bioconda::gsort-0.0.6-1
local::hg19-civic-1-0
## Package Plan ##
environment location: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
added / updated specs:
- hg19-civic
The following packages will be downloaded:
package | build
---------------------------|-----------------
hg19-civic-1 | 0 6 KB local
------------------------------------------------------------
Total: 6 KB
The following NEW packages will be INSTALLED:
gsort bioconda/linux-64::gsort-0.0.6-1
hg19-civic uufs/chpc.utah.edu/common/home/u0055382/anaconda2/conda-bld/noarch::hg19-civic-1-0
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... ===> LINKING PACKAGE: bioconda::gsort-0.0.6-1 <===
prefix=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
source=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/gsort-0.0.6-1
===> LINKING PACKAGE: local::hg19-civic-1-0 <===
prefix=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
source=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/hg19-civic-1-0
$ bash -x /uufs/chpc.utah.edu/common/home/u0055382/anaconda2nTV9V8
==> cwd: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin <==
==> exit code: 1 <==
==> stdout <==
*****************************
Inactive or out-of-date environment variables:
> $ggd_hg19_civic
To activate inactive or out-of-date vars, run:
source activate base
*****************************
Retrieving the latest data downloads from CIViC
Creating civic_genes, civic_gene_summaries, and civic_variants BED files
==> stderr <==
+ [[ hB != hxB ]]
+ XTRACE_STATE=-x
+ [[ hxB != hxB ]]
+ VERBOSE_STATE=+v
+ set +xv
+ unset XTRACE_STATE VERBOSE_STATE
++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda shell.posix hook
+ eval 'export CONDA_EXE="/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda"
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
__conda_hashr() {
if [ -n "${ZSH_VERSION:+x}" ]; then
\rehash
elif [ -n "${POSH_VERSION:+x}" ]; then
: # pass
else
\hash -r
fi
}
__conda_activate() {
if [ -n "${CONDA_PS1_BACKUP:+x}" ]; then
# Handle transition from shell activated with conda <= 4.3 to a subsequent activation
# after conda updated to >= 4.4. See issue #6173.
PS1="$CONDA_PS1_BACKUP"
\unset CONDA_PS1_BACKUP
fi
\local cmd="$1"
shift
\local ask_conda
ask_conda="$(PS1="$PS1" "$CONDA_EXE" shell.posix "$cmd" "$@")" || \return $?
\eval "$ask_conda"
__conda_hashr
}
__conda_reactivate() {
\local ask_conda
ask_conda="$(PS1="$PS1" "$CONDA_EXE" shell.posix reactivate)" || \return $?
\eval "$ask_conda"
__conda_hashr
}
conda() {
if [ "$#" -lt 1 ]; then
"$CONDA_EXE"
else
\local cmd="$1"
shift
case "$cmd" in
activate|deactivate)
__conda_activate "$cmd" "$@"
;;
install|update|upgrade|remove|uninstall)
"$CONDA_EXE" "$cmd" "$@" && __conda_reactivate
;;
*) "$CONDA_EXE" "$cmd" "$@" ;;
esac
fi
}
if [ -z "${CONDA_SHLVL+x}" ]; then
\export CONDA_SHLVL=0
PATH="$(dirname "$(dirname "$CONDA_EXE")")/condabin:${PATH:-}"
\export PATH
# We'\''re not allowing PS1 to be unbound. It must at least be set.
# However, we'\''re not exporting it, which can cause problems when starting a second shell
# via a first shell (i.e. starting zsh from bash).
if [ -z "${PS1+x}" ]; then
PS1=
fi
fi
conda activate base'
++ export CONDA_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
++ CONDA_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
++ '[' -z '' ']'
++ export CONDA_SHLVL=0
++ CONDA_SHLVL=0
++++ dirname /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
+++ dirname /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin
++ PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
++ export PATH
++ '[' -z '' ']'
++ PS1=
++ conda activate base
++ '[' 2 -lt 1 ']'
++ local cmd=activate
++ shift
++ case "$cmd" in
++ __conda_activate activate base
++ '[' -n '' ']'
++ local cmd=activate
++ shift
++ local ask_conda
+++ PS1=
+++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda shell.posix activate base
++ ask_conda='PS1='\''(base) '\''
\export CONDA_DEFAULT_ENV='\''base'\''
\export CONDA_EXE='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda'\''
\export CONDA_PREFIX='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2'\''
\export CONDA_PROMPT_MODIFIER='\''(base) '\''
\export CONDA_PYTHON_EXE='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/python'\''
\export CONDA_SHLVL='\''1'\''
\export PATH='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper'\'''
++ eval 'PS1='\''(base) '\''
\export CONDA_DEFAULT_ENV='\''base'\''
\export CONDA_EXE='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda'\''
\export CONDA_PREFIX='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2'\''
\export CONDA_PROMPT_MODIFIER='\''(base) '\''
\export CONDA_PYTHON_EXE='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/python'\''
\export CONDA_SHLVL='\''1'\''
\export PATH='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper'\'''
+++ PS1='(base) '
+++ export CONDA_DEFAULT_ENV=base
+++ CONDA_DEFAULT_ENV=base
+++ export CONDA_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
+++ CONDA_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
+++ export CONDA_PREFIX=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
+++ CONDA_PREFIX=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
+++ export 'CONDA_PROMPT_MODIFIER=(base) '
+++ CONDA_PROMPT_MODIFIER='(base) '
+++ export CONDA_PYTHON_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/python
+++ CONDA_PYTHON_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/python
+++ export CONDA_SHLVL=1
+++ CONDA_SHLVL=1
+++ export PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
+++ PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
++ __conda_hashr
++ '[' -n '' ']'
++ '[' -n '' ']'
++ hash -r
+ conda activate /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
+ '[' 2 -lt 1 ']'
+ local cmd=activate
+ shift
+ case "$cmd" in
+ __conda_activate activate /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
+ '[' -n '' ']'
+ local cmd=activate
+ shift
+ local ask_conda
++ PS1='(base) '
++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda shell.posix activate /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
+ ask_conda='PS1='\''(base) '\''
\export CONDA_PROMPT_MODIFIER='\''(base) '\''
\export CONDA_SHLVL='\''1'\''
\export PATH='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper'\'''
+ eval 'PS1='\''(base) '\''
\export CONDA_PROMPT_MODIFIER='\''(base) '\''
\export CONDA_SHLVL='\''1'\''
\export PATH='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper'\'''
++ PS1='(base) '
++ export 'CONDA_PROMPT_MODIFIER=(base) '
++ CONDA_PROMPT_MODIFIER='(base) '
++ export CONDA_SHLVL=1
++ CONDA_SHLVL=1
++ export PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
++ PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
+ __conda_hashr
+ '[' -n '' ']'
+ '[' -n '' ']'
+ hash -r
+ source /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.hg19-civic-post-link.sh
++ set -eo pipefail -o nounset
+++ conda info --root
+++ '[' 2 -lt 1 ']'
+++ local cmd=info
+++ shift
+++ case "$cmd" in
+++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda info --root
++ export CONDA_ROOT=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
++ CONDA_ROOT=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
+++ find /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/ -name 'hg19-civic-1*'
+++ grep -v .tar.bz2
+++ grep '1-.*0$\|1\_.*0$'
++ PKG_DIR=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/hg19-civic-1-0
++ export RECIPE_DIR=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1
++ RECIPE_DIR=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1
++ '[' -d /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1 ']'
++ mkdir -p /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1
++ recipe_env_name=ggd_hg19-civic
+++ echo ggd_hg19-civic
+++ sed s/-/_/g
++ recipe_env_name=ggd_hg19_civic
+++ conda info --envs
+++ grep '*'
+++ '[' 2 -lt 1 ']'
+++ local cmd=info
+++ shift
+++ case "$cmd" in
+++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda info --envs
+++ grep -o '\/.*'
++ env_dir=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
++ activate_dir=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/etc/conda/activate.d
++ deactivate_dir=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/etc/conda/deactivate.d
++ mkdir -p /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/etc/conda/activate.d
++ mkdir -p /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/etc/conda/deactivate.d
++ echo 'export ggd_hg19_civic=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1'
++ echo 'unset ggd_hg19_civic'
++ ggd show-env
++ cd /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1
++ bash /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/hg19-civic-1-0/info/recipe/recipe.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 498k 100 498k 0 0 1100k 0 --:--:-- --:--:-- --:--:-- 1103k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 73962 100 73962 0 0 419k 0 --:--:-- --:--:-- --:--:-- 419k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3281k 100 3281k 0 0 9483k 0 --:--:-- --:--:-- --:--:-- 9456k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 162 100 162 0 0 650 0 --:--:-- --:--:-- --:--:-- 650
100 4122 100 4122 0 0 7926 0 --:--:-- --:--:-- --:--:-- 7926
Traceback (most recent call last):
File "merge_civic_files.py", line 8, in <module>
gene_coords = open("../ensembl/sorted.ensembl.gene.coords", "r")
IOError: [Errno 2] No such file or directory: '../ensembl/sorted.ensembl.gene.coords'
===> REVERSING PACKAGE LINK: local::hg19-civic-1-0 <===
prefix=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
Could not remove or rename /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.nfs000000010afff996000008c6. Please remove this file manually (you may need to reboot to free file handles)
rsync: delete_file: unlink(.nfs000000010afff996000008c6) failed: Device or resource busy (16)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
Removing folder /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin the fast way (with rsync) failed. Do you have rsync available?
rm_rf failed for /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin
failed
An error occurred while installing package 'local::hg19-civic-1-0'.
LinkError: post-link script failed for package local::hg19-civic-1-0
running your command again with `-v` will provide additional information
location of failed script: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.hg19-civic-post-link.sh
==> script messages <==
<None>
Attempting to roll back.
Rolling back transaction: ...working... ===> REVERSING PACKAGE LINK: bioconda::gsort-0.0.6-1 <===
prefix=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
rsync: delete_file: unlink(.nfs000000010afff996000008c6) failed: Device or resource busy (16)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
Removing folder /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin the fast way (with rsync) failed. Do you have rsync available?
Could not remove or rename /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.nfs000000010afff996000008c6. Please remove this file manually (you may need to reboot to free file handles)
rsync: delete_file: unlink(.nfs000000010afff996000008c6) failed: Device or resource busy (16)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
Removing folder /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin the fast way (with rsync) failed. Do you have rsync available?
rm_rf failed for /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin
done
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1002, in __call__
return func(*args, **kwargs)
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/main_install.py", line 20, in execute
install(args, parser, 'install')
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/install.py", line 271, in install
handle_txn(unlink_link_transaction, prefix, args, newenv)
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/install.py", line 300, in handle_txn
unlink_link_transaction.execute()
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 242, in execute
self._execute(tuple(concat(interleave(itervalues(self.prefix_action_groups)))))
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 563, in _execute
rollback_excs,
CondaMultiError: post-link script failed for package local::hg19-civic-1-0
running your command again with `-v` will provide additional information
location of failed script: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.hg19-civic-post-link.sh
==> script messages <==
<None>
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/ggd", line 11, in <module>
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/ggd/__main__.py", line 40, in main
args.func(parser, args)
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/ggd/check_recipe.py", line 116, in check_recipe
_install(bz2,str(recipe['package']['name']))
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/ggd/check_recipe.py", line 74, in _install
stdout=sys.stdout)
File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['conda', 'install', '-v', '--use-local', '-y', 'hg19-civic']' returned non-zero exit status 1
```
Note. The script states:
```
Could not remove or rename /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.nfs000000010afff996000008c6. Please remove this file manually (you may need to reboot to free file handles)
rsync: delete_file: unlink(.nfs000000010afff996000008c6) failed: Device or resource busy (16)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
Removing folder /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin the fast way (with rsync) failed. Do you have rsync available?
rm_rf failed for /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin
```
however, the contents of anaconda2/bin was deleted.
| That's pretty bad. Sorry. Well fix this ASAP. Thanks for reporting.
On Mon, Feb 11, 2019, 17:07 Michael Cormier <[email protected] wrote:
> Current Behavior
>
> The files in the anaconda/bin directory were deleted when running `conda install` on a new local build of a recipe. When the recipe errors/fails conda tries to roll back. During the role back, rm_rf is called on the anaconda/bin folder. The complete contents of the folder are deleted. This is from conda 4.6.3
>
> Steps to Reproduce
>
> conda install --use-local -v -y <recipe>
>
> Expected Behavior
>
> If conda install is unsuccessful conda should not remove the entire contents of the anaconda/bin folder.
>
> Environment Information `conda info`
>
> Not available. Unfortunetly, the conda binary is no longer available to run any conda command. But the conda version was 4.6.3
>
> `conda config --show-sources`
>
> `conda list --show-channel-urls`
>
> Output from the command
>
> No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
> WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
> INFO:conda_build.variants:Adding in variants from internal_defaults
> INFO:conda_build.metadata:Attempting to finalize metadata for hg19-civic
> WARNING: symlink_conda() is deprecated.
> INFO:conda_build.build:Packaging hg19-civic
> INFO:conda_build.build:Packaging hg19-civic-1-0
> No files or script found for output hg19-civic
> WARNING:conda_build.build:No files or script found for output hg19-civic
> /scratch/local/u0055382/tmp1fopUu/hg19-civic-1-0.tar.bz2: C1115 Found invalid license "None" in info/index.json
> /scratch/local/u0055382/tmp1fopUu/hg19-civic-1-0.tar.bz2: C1134 Found pre/post link file "bin/.hg19-civic-post-link.sh" in archive
> INFO:conda_build.variants:Adding in variants from /scratch/local/u0055382/tmpSvYdIK/info/recipe/conda_build_config.yaml
> Collecting package metadata: ...working... done
> Solving environment: ...working... done
> initializing UnlinkLinkTransaction with
> target_prefix: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> unlink_precs:
>
> link_precs:
> bioconda::gsort-0.0.6-1
> local::hg19-civic-1-0
>
>
>
> ## Package Plan ##
>
> environment location: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
>
> added / updated specs:
> - hg19-civic
>
>
> The following packages will be downloaded:
>
> package | build
> ---------------------------|-----------------
> hg19-civic-1 | 0 6 KB local
> ------------------------------------------------------------
> Total: 6 KB
>
> The following NEW packages will be INSTALLED:
>
> gsort bioconda/linux-64::gsort-0.0.6-1
> hg19-civic uufs/chpc.utah.edu/common/home/u0055382/anaconda2/conda-bld/noarch::hg19-civic-1-0
>
>
> Preparing transaction: ...working... done
> Verifying transaction: ...working... done
> Executing transaction: ...working... ===> LINKING PACKAGE: bioconda::gsort-0.0.6-1 <===
> prefix=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> source=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/gsort-0.0.6-1
>
>
> ===> LINKING PACKAGE: local::hg19-civic-1-0 <===
> prefix=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> source=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/hg19-civic-1-0
>
>
> $ bash -x /uufs/chpc.utah.edu/common/home/u0055382/anaconda2nTV9V8
> ==> cwd: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin <==
> ==> exit code: 1 <==
> ==> stdout <==
> *****************************
>
> Inactive or out-of-date environment variables:
> > $ggd_hg19_civic
>
> To activate inactive or out-of-date vars, run:
> source activate base
>
> *****************************
>
> Retrieving the latest data downloads from CIViC
> Creating civic_genes, civic_gene_summaries, and civic_variants BED files
>
> ==> stderr <==
> + [[ hB != hxB ]]
> + XTRACE_STATE=-x
> + [[ hxB != hxB ]]
> + VERBOSE_STATE=+v
> + set +xv
> + unset XTRACE_STATE VERBOSE_STATE
> ++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda shell.posix hook
> + eval 'export CONDA_EXE="/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda"
> # Copyright (C) 2012 Anaconda, Inc
> # SPDX-License-Identifier: BSD-3-Clause
>
> __conda_hashr() {
> if [ -n "${ZSH_VERSION:+x}" ]; then
> \rehash
> elif [ -n "${POSH_VERSION:+x}" ]; then
> : # pass
> else
> \hash -r
> fi
> }
>
> __conda_activate() {
> if [ -n "${CONDA_PS1_BACKUP:+x}" ]; then
> # Handle transition from shell activated with conda <= 4.3 to a subsequent activation
> # after conda updated to >= 4.4. See issue #6173.
> PS1="$CONDA_PS1_BACKUP"
> \unset CONDA_PS1_BACKUP
> fi
>
> \local cmd="$1"
> shift
> \local ask_conda
> ask_conda="$(PS1="$PS1" "$CONDA_EXE" shell.posix "$cmd" "$@")" || \return $?
> \eval "$ask_conda"
> __conda_hashr
> }
>
> __conda_reactivate() {
> \local ask_conda
> ask_conda="$(PS1="$PS1" "$CONDA_EXE" shell.posix reactivate)" || \return $?
> \eval "$ask_conda"
> __conda_hashr
> }
>
> conda() {
> if [ "$#" -lt 1 ]; then
> "$CONDA_EXE"
> else
> \local cmd="$1"
> shift
> case "$cmd" in
> activate|deactivate)
> __conda_activate "$cmd" "$@"
> ;;
> install|update|upgrade|remove|uninstall)
> "$CONDA_EXE" "$cmd" "$@" && __conda_reactivate
> ;;
> *) "$CONDA_EXE" "$cmd" "$@" ;;
> esac
> fi
> }
>
> if [ -z "${CONDA_SHLVL+x}" ]; then
> \export CONDA_SHLVL=0
> PATH="$(dirname "$(dirname "$CONDA_EXE")")/condabin:${PATH:-}"
> \export PATH
>
> # We'\''re not allowing PS1 to be unbound. It must at least be set.
> # However, we'\''re not exporting it, which can cause problems when starting a second shell
> # via a first shell (i.e. starting zsh from bash).
> if [ -z "${PS1+x}" ]; then
> PS1=
> fi
> fi
>
>
> conda activate base'
> ++ export CONDA_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
> ++ CONDA_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
> ++ '[' -z '' ']'
> ++ export CONDA_SHLVL=0
> ++ CONDA_SHLVL=0
> ++++ dirname /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
> +++ dirname /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin
> ++ PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
> ++ export PATH
> ++ '[' -z '' ']'
> ++ PS1=
> ++ conda activate base
> ++ '[' 2 -lt 1 ']'
> ++ local cmd=activate
> ++ shift
> ++ case "$cmd" in
> ++ __conda_activate activate base
> ++ '[' -n '' ']'
> ++ local cmd=activate
> ++ shift
> ++ local ask_conda
> +++ PS1=
> +++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda shell.posix activate base
> ++ ask_conda='PS1='\''(base) '\''
> \export CONDA_DEFAULT_ENV='\''base'\''
> \export CONDA_EXE='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda'\''
> \export CONDA_PREFIX='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2'\''
> \export CONDA_PROMPT_MODIFIER='\''(base) '\''
> \export CONDA_PYTHON_EXE='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/python'\''
> \export CONDA_SHLVL='\''1'\''
> \export PATH='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper'\'''
> ++ eval 'PS1='\''(base) '\''
> \export CONDA_DEFAULT_ENV='\''base'\''
> \export CONDA_EXE='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda'\''
> \export CONDA_PREFIX='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2'\''
> \export CONDA_PROMPT_MODIFIER='\''(base) '\''
> \export CONDA_PYTHON_EXE='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/python'\''
> \export CONDA_SHLVL='\''1'\''
> \export PATH='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper'\'''
> +++ PS1='(base) '
> +++ export CONDA_DEFAULT_ENV=base
> +++ CONDA_DEFAULT_ENV=base
> +++ export CONDA_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
> +++ CONDA_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda
> +++ export CONDA_PREFIX=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> +++ CONDA_PREFIX=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> +++ export 'CONDA_PROMPT_MODIFIER=(base) '
> +++ CONDA_PROMPT_MODIFIER='(base) '
> +++ export CONDA_PYTHON_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/python
> +++ CONDA_PYTHON_EXE=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/python
> +++ export CONDA_SHLVL=1
> +++ CONDA_SHLVL=1
> +++ export PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
> +++ PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
> ++ __conda_hashr
> ++ '[' -n '' ']'
> ++ '[' -n '' ']'
> ++ hash -r
> + conda activate /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> + '[' 2 -lt 1 ']'
> + local cmd=activate
> + shift
> + case "$cmd" in
> + __conda_activate activate /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> + '[' -n '' ']'
> + local cmd=activate
> + shift
> + local ask_conda
> ++ PS1='(base) '
> ++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda shell.posix activate /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> + ask_conda='PS1='\''(base) '\''
> \export CONDA_PROMPT_MODIFIER='\''(base) '\''
> \export CONDA_SHLVL='\''1'\''
> \export PATH='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper'\'''
> + eval 'PS1='\''(base) '\''
> \export CONDA_PROMPT_MODIFIER='\''(base) '\''
> \export CONDA_SHLVL='\''1'\''
> \export PATH='\''/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper'\'''
> ++ PS1='(base) '
> ++ export 'CONDA_PROMPT_MODIFIER=(base) '
> ++ CONDA_PROMPT_MODIFIER='(base) '
> ++ export CONDA_SHLVL=1
> ++ CONDA_SHLVL=1
> ++ export PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
> ++ PATH=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/condabin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin:/uufs/chpc.utah.edu/common/home/u0055382/htslib/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/lumpy-sv/bin:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/bin/intel64:/uufs/chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/uufs/kingspeak.peaks/sys/pkg/slurm/std/bin:/opt/dell/srvadmin/bin:/uufs/chpc.utah.edu/common/home/u0055382/bin:/uufs/chpc.utah.edu/common/home/u0055382/svtyper
> + __conda_hashr
> + '[' -n '' ']'
> + '[' -n '' ']'
> + hash -r
> + source /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.hg19-civic-post-link.sh
> ++ set -eo pipefail -o nounset
> +++ conda info --root
> +++ '[' 2 -lt 1 ']'
> +++ local cmd=info
> +++ shift
> +++ case "$cmd" in
> +++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda info --root
> ++ export CONDA_ROOT=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> ++ CONDA_ROOT=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> +++ find /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/ -name 'hg19-civic-1*'
> +++ grep -v .tar.bz2
> +++ grep '1-.*0$\|1\_.*0$'
> ++ PKG_DIR=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/hg19-civic-1-0
> ++ export RECIPE_DIR=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1
> ++ RECIPE_DIR=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1
> ++ '[' -d /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1 ']'
> ++ mkdir -p /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1
> ++ recipe_env_name=ggd_hg19-civic
> +++ echo ggd_hg19-civic
> +++ sed s/-/_/g
> ++ recipe_env_name=ggd_hg19_civic
> +++ conda info --envs
> +++ grep '*'
> +++ '[' 2 -lt 1 ']'
> +++ local cmd=info
> +++ shift
> +++ case "$cmd" in
> +++ /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/conda info --envs
> +++ grep -o '\/.*'
> ++ env_dir=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> ++ activate_dir=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/etc/conda/activate.d
> ++ deactivate_dir=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/etc/conda/deactivate.d
> ++ mkdir -p /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/etc/conda/activate.d
> ++ mkdir -p /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/etc/conda/deactivate.d
> ++ echo 'export ggd_hg19_civic=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1'
> ++ echo 'unset ggd_hg19_civic'
> ++ ggd show-env
> ++ cd /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/share/ggd/Homo_sapiens/hg19/hg19-civic/1
> ++ bash /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/pkgs/hg19-civic-1-0/info/recipe/recipe.sh
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 100 498k 100 498k 0 0 1100k 0 --:--:-- --:--:-- --:--:-- 1103k
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 100 73962 100 73962 0 0 419k 0 --:--:-- --:--:-- --:--:-- 419k
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 100 3281k 100 3281k 0 0 9483k 0 --:--:-- --:--:-- --:--:-- 9456k
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 100 162 100 162 0 0 650 0 --:--:-- --:--:-- --:--:-- 650
> 100 4122 100 4122 0 0 7926 0 --:--:-- --:--:-- --:--:-- 7926
> Traceback (most recent call last):
> File "merge_civic_files.py", line 8, in <module>
> gene_coords = open("../ensembl/sorted.ensembl.gene.coords", "r")
> IOError: [Errno 2] No such file or directory: '../ensembl/sorted.ensembl.gene.coords'
>
>
>
> ===> REVERSING PACKAGE LINK: local::hg19-civic-1-0 <===
> prefix=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
>
>
> Could not remove or rename /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.nfs000000010afff996000008c6. Please remove this file manually (you may need to reboot to free file handles)
>
> rsync: delete_file: unlink(.nfs000000010afff996000008c6) failed: Device or resource busy (16)
> rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
> Removing folder /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin the fast way (with rsync) failed. Do you have rsync available?
>
> rm_rf failed for /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin
>
> failed
> An error occurred while installing package 'local::hg19-civic-1-0'.
> LinkError: post-link script failed for package local::hg19-civic-1-0
> running your command again with `-v` will provide additional information
> location of failed script: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.hg19-civic-post-link.sh
> ==> script messages <==
> <None>
>
> Attempting to roll back.
>
>
> Rolling back transaction: ...working... ===> REVERSING PACKAGE LINK: bioconda::gsort-0.0.6-1 <===
> prefix=/uufs/chpc.utah.edu/common/home/u0055382/anaconda2
>
>
> rsync: delete_file: unlink(.nfs000000010afff996000008c6) failed: Device or resource busy (16)
> rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
> Removing folder /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin the fast way (with rsync) failed. Do you have rsync available?
>
> Could not remove or rename /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.nfs000000010afff996000008c6. Please remove this file manually (you may need to reboot to free file handles)
>
> rsync: delete_file: unlink(.nfs000000010afff996000008c6) failed: Device or resource busy (16)
> rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
> Removing folder /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin the fast way (with rsync) failed. Do you have rsync available?
>
> rm_rf failed for /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin
>
> done
> Traceback (most recent call last):
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 1002, in __call__
> return func(*args, **kwargs)
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 84, in _main
> exit_code = do_call(args, p)
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
> exit_code = getattr(module, func_name)(args, parser)
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/main_install.py", line 20, in execute
> install(args, parser, 'install')
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/install.py", line 271, in install
> handle_txn(unlink_link_transaction, prefix, args, newenv)
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/cli/install.py", line 300, in handle_txn
> unlink_link_transaction.execute()
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 242, in execute
> self._execute(tuple(concat(interleave(itervalues(self.prefix_action_groups)))))
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/conda/core/link.py", line 563, in _execute
> rollback_excs,
> CondaMultiError: post-link script failed for package local::hg19-civic-1-0
> running your command again with `-v` will provide additional information
> location of failed script: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.hg19-civic-post-link.sh
> ==> script messages <==
> <None>
>
>
>
> Traceback (most recent call last):
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/ggd", line 11, in <module>
>
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/ggd/__main__.py", line 40, in main
> args.func(parser, args)
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/ggd/check_recipe.py", line 116, in check_recipe
> _install(bz2,str(recipe['package']['name']))
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/site-packages/ggd/check_recipe.py", line 74, in _install
> stdout=sys.stdout)
> File "/uufs/chpc.utah.edu/common/home/u0055382/anaconda2/lib/python2.7/subprocess.py", line 190, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['conda', 'install', '-v', '--use-local', '-y', 'hg19-civic']' returned non-zero exit status 1
>
>
> Note. The script states:
>
> Could not remove or rename /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin/.nfs000000010afff996000008c6. Please remove this file manually (you may need to reboot to free file handles)
>
> rsync: delete_file: unlink(.nfs000000010afff996000008c6) failed: Device or resource busy (16)
> rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
> Removing folder /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin the fast way (with rsync) failed. Do you have rsync available?
>
> rm_rf failed for /uufs/chpc.utah.edu/common/home/u0055382/anaconda2/bin
>
> however, the contents of anaconda2/bin was deleted.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8258>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AACV-c7InmuUJe5eeAV9s0j_Ks1CFmlxks5vMfehgaJpZM4a1Pvw>
> .
>
Sorry, I'm trying to make sense of this, but there's a lot of confusing information here:
1. It looks like you got into this by doing a conda build command:
```
No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
INFO:conda_build.variants:Adding in variants from internal_defaults
INFO:conda_build.metadata:Attempting to finalize metadata for hg19-civic
WARNING: symlink_conda() is deprecated.
INFO:conda_build.build:Packaging hg19-civic
INFO:conda_build.build:Packaging hg19-civic-1-0
No files or script found for output hg19-civic
WARNING:conda_build.build:No files or script found for output hg19-civic
/scratch/local/u0055382/tmp1fopUu/hg19-civic-1-0.tar.bz2: C1115 Found invalid license "None" in info/index.json
/scratch/local/u0055382/tmp1fopUu/hg19-civic-1-0.tar.bz2: C1134 Found pre/post link file "bin/.hg19-civic-post-link.sh" in archive
INFO:conda_build.variants:Adding in variants from /scratch/local/u0055382/tmpSvYdIK/info/recipe/conda_build_config.yaml
```
2. Then it goes to install stuff in what looks like a base environment install. I don't understand how the conda build command led to this. There's no way that I know of to do that.
```
Solving environment: ...working... done
initializing UnlinkLinkTransaction with
target_prefix: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
unlink_precs:
link_precs:
bioconda::gsort-0.0.6-1
local::hg19-civic-1-0
## Package Plan ##
environment location: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
added / updated specs:
- hg19-civic
The following packages will be downloaded:
package | build
---------------------------|-----------------
hg19-civic-1 | 0 6 KB local
------------------------------------------------------------
Total: 6 KB
The following NEW packages will be INSTALLED:
gsort bioconda/linux-64::gsort-0.0.6-1
hg19-civic uufs/chpc.utah.edu/common/home/u0055382/anaconda2/conda-bld/noarch::hg19-civic-1-0
```
Sorry, but we're going to need more info to make any sense of the situation. What order of commands made this happen?
1) conda build is called to build a local conda package.
2) conda install is calles to install the local package created in step 1.
On Mon, Feb 11, 2019 at 4:57 PM Mike Sarahan <[email protected]>
wrote:
> Sorry, I'm trying to make sense of this, but there's a lot of confusing
> information here:
>
> 1. It looks like you got into this by doing a conda build command:
>
> No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
> WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml. Falling back to default numpy value of 1.11
> INFO:conda_build.variants:Adding in variants from internal_defaults
> INFO:conda_build.metadata:Attempting to finalize metadata for hg19-civic
> WARNING: symlink_conda() is deprecated.
> INFO:conda_build.build:Packaging hg19-civic
> INFO:conda_build.build:Packaging hg19-civic-1-0
> No files or script found for output hg19-civic
> WARNING:conda_build.build:No files or script found for output hg19-civic
> /scratch/local/u0055382/tmp1fopUu/hg19-civic-1-0.tar.bz2: C1115 Found invalid license "None" in info/index.json
> /scratch/local/u0055382/tmp1fopUu/hg19-civic-1-0.tar.bz2: C1134 Found pre/post link file "bin/.hg19-civic-post-link.sh" in archive
> INFO:conda_build.variants:Adding in variants from /scratch/local/u0055382/tmpSvYdIK/info/recipe/conda_build_config.yaml
>
>
> 1. Then it goes to install stuff in what looks like a base environment
> install. I don't understand how the conda build command led to this.
> There's no way that I know of to do that.
>
> Solving environment: ...working... done
> initializing UnlinkLinkTransaction with
> target_prefix: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
> unlink_precs:
>
> link_precs:
> bioconda::gsort-0.0.6-1
> local::hg19-civic-1-0
>
>
>
> ## Package Plan ##
>
> environment location: /uufs/chpc.utah.edu/common/home/u0055382/anaconda2
>
> added / updated specs:
> - hg19-civic
>
>
> The following packages will be downloaded:
>
> package | build
> ---------------------------|-----------------
> hg19-civic-1 | 0 6 KB local
> ------------------------------------------------------------
> Total: 6 KB
>
> The following NEW packages will be INSTALLED:
>
> gsort bioconda/linux-64::gsort-0.0.6-1
> hg19-civic uufs/chpc.utah.edu/common/home/u0055382/anaconda2/conda-bld/noarch::hg19-civic-1-0
>
> Sorry, but we're going to need more info to make any sense of the
> situation. What order of commands made this happen?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8258#issuecomment-462544519>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AhmyhiKY6vWYH1-BX028RHType0G0Et4ks5vMgN9gaJpZM4a1Pvw>
> .
>
Here's the problem with what you're saying:
```
conda install --use-local -v -y <recipe>
```
conda does not operate on recipes. This command makes no sense. Conda-build builds packages from recipes, and packages are what conda operates on. Your command history does not show a conda-build command (only some output that looks like conda-build output), and it also does not show a ``conda install`` command (only output that looks like conda install output). Please clarify what exactly you did.
My appoligies, it should be <pkg> rather than <recipe>. That is: conda
install --use-local -v -y <pkg>
I have a script that will run conda build on a recipe, and if the recipe is
successfully built into a package it will run conda install on the new
package. The actual commands are masked by the script that is running them,
but both conda build and conda install are being called.
On Mon, Feb 11, 2019 at 5:04 PM Mike Sarahan <[email protected]>
wrote:
> Here's the problem with what you're saying:
>
> conda install --use-local -v -y <recipe>
>
> conda does not operate on recipes. This command makes no sense.
> Conda-build builds packages from recipes, and packages are what conda
> operates on. Your command history does not show a conda-build command (only
> some output that looks like conda-build output), and it also does not show
> a conda install command (only output that looks like conda install
> output). Please clarify what exactly you did.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8258#issuecomment-462546196>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AhmyhtmuxMYp-tB6Zr3vxOkJFwf1suL6ks5vMgUegaJpZM4a1Pvw>
> .
>
Thanks, I've created a reproducer. It removes the folder where the post-link script was - so $PREFIX/bin on unix, and %PREFIX%\Scripts on Windows. I'll look into a fix and add a test.
This should fix it. The problem is that the transaction thinks it created the folder (because it always tries to), so it should also try to remove it.
```
diff --git a/conda/core/path_actions.py b/conda/core/path_actions.py
index b6375c769..5fd15f082 100644
--- a/conda/core/path_actions.py
+++ b/conda/core/path_actions.py
@@ -6,7 +6,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
from abc import ABCMeta, abstractmethod, abstractproperty
from errno import EXDEV
from logging import getLogger
-from os.path import basename, dirname, getsize, join
+from os.path import basename, dirname, getsize, join, isdir
import re
from uuid import uuid4
@@ -370,7 +370,8 @@ class LinkPathAction(CreateInPrefixPathAction):
def reverse(self):
if self._execute_successful:
log.trace("reversing link creation %s", self.target_prefix)
- rm_rf(self.target_full_path, clean_empty_parents=True)
+ if not isdir(self.target_full_path):
+ rm_rf(self.target_full_path, clean_empty_parents=True)
class PrefixReplaceLinkAction(LinkPathAction):
@@ -975,7 +976,8 @@ class UnlinkPathAction(RemoveFromPrefixPathAction):
backoff_rename(self.holding_full_path, self.target_full_path, force=True)
def cleanup(self):
- rm_rf(self.holding_full_path, clean_empty_parents=True)
+ if not isdir(self.holding_full_path):
+ rm_rf(self.holding_full_path, clean_empty_parents=True)
class RemoveMenuAction(RemoveFromPrefixPathAction):
```
I'll put up a PR with the test package a little later. | 2019-02-12T02:00:08 |
conda/conda | 8,268 | conda__conda-8268 | [
"8264"
] | 8afbb299f81a40c56d031b50f8a9b21d6b382e8f | diff --git a/conda/cli/main_config.py b/conda/cli/main_config.py
--- a/conda/cli/main_config.py
+++ b/conda/cli/main_config.py
@@ -252,7 +252,7 @@ def execute_config(args, parser):
json_get[key] = rc_config[key]
continue
- if isinstance(rc_config[key], (bool, string_types)):
+ if isinstance(rc_config[key], (bool, int, string_types)):
stdout_write(" ".join(("--set", key, text_type(rc_config[key]))))
else: # assume the key is a list-type
# Note, since conda config --add prepends, these are printed in
| conda config --get throws a traceback
```
(/root/dev) [root@21ca1df2ceaa conda]# conda config --set verbosity 1
(/root/dev) [root@21ca1df2ceaa conda]# conda config --get verbosity
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/root/dev/lib/python3.6/site-packages/conda/exceptions.py", line 1001, in __call__
return func(*args, **kwargs)
File "/root/dev/lib/python3.6/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/root/dev/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 81, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/root/dev/lib/python3.6/site-packages/conda/cli/main_config.py", line 28, in execute
execute_config(args, parser)
File "/root/dev/lib/python3.6/site-packages/conda/cli/main_config.py", line 255, in execute_config
numitems = len(items)
TypeError: object of type 'int' has no len()
`$ /root/dev/bin/conda config --get verbosity`
```
| 2019-02-13T04:02:46 |
||
conda/conda | 8,272 | conda__conda-8272 | [
"8270"
] | ad31c75a4e73a423ef584b2918adece9301d6c6e | diff --git a/conda/base/constants.py b/conda/base/constants.py
--- a/conda/base/constants.py
+++ b/conda/base/constants.py
@@ -24,13 +24,23 @@
APP_NAME = 'conda'
-SEARCH_PATH = (
- '/etc/conda/.condarc',
- '/etc/conda/condarc',
- '/etc/conda/condarc.d/',
- '/var/lib/conda/.condarc',
- '/var/lib/conda/condarc',
- '/var/lib/conda/condarc.d/',
+if on_win:
+ SEARCH_PATH = (
+ 'C:/ProgramData/conda/.condarc',
+ 'C:/ProgramData/conda/condarc',
+ 'C:/ProgramData/conda/condarc.d',
+ )
+else:
+ SEARCH_PATH = (
+ '/etc/conda/.condarc',
+ '/etc/conda/condarc',
+ '/etc/conda/condarc.d/',
+ '/var/lib/conda/.condarc',
+ '/var/lib/conda/condarc',
+ '/var/lib/conda/condarc.d/',
+ )
+
+SEARCH_PATH += (
'$CONDA_ROOT/.condarc',
'$CONDA_ROOT/condarc',
'$CONDA_ROOT/condarc.d/',
| condarc file precedence not respected when merging
In my system `.condarc` I have `defaults` and `conda-forge` and in my user `.condarc` I have my own `dhirschfeld` channel:
![image](https://user-images.githubusercontent.com/881019/52687124-445f2300-2f9c-11e9-9474-bb677267d09c.png)
My understanding ([from this blog post](https://www.anaconda.com/conda-configuration-engine-power-users/)) was that the system `.condarc` should take precedence when merging and that my channel should be *appended* to the channel list. This is the behaviour I'd like, but not what I'm observing in practice:
```
(base) C:\> conda info
active environment : base
active env location : C:\Miniconda3
shell level : 1
user config file : C:\Users\dhirschfeld\.condarc
populated config files : C:\Miniconda3\.condarc
C:\Users\dhirschfeld\.condarc
conda version : 4.6.3
conda-build version : not installed
python version : 3.7.1.final.0
base environment : C:\Miniconda3 (writable)
channel URLs : https://conda.anaconda.org/dhirschfeld/win-64
https://conda.anaconda.org/dhirschfeld/noarch
https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
https://conda.anaconda.org/conda-forge/win-64
https://conda.anaconda.org/conda-forge/noarch
package cache : C:\Miniconda3\pkgs
C:\Users\dhirschfeld\.conda\pkgs
C:\Users\dhirschfeld\AppData\Local\conda\conda\pkgs
envs directories : C:\Miniconda3\envs
C:\Users\dhirschfeld\.conda\envs
C:\Users\dhirschfeld\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.3 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False
```
| This one is tricky and unfortunate, and there’s really no good solution. What’s happening is that the “system” .condarc in the base environment is also the .condarc in the active environment. It gets doubled up, and sandwiches the user .condarc when the base environment is the active environment.
> there’s really no good solution
The best solution is to use one of the lower-level paths other than the .condarc in your base environment.
https://github.com/conda/conda/blob/b1a29f1/conda/base/constants.py#L27-L45
However the search path was originally laid out for unix-y file systems and we never really added in a switch for a search path that's more Windows-native.
Will python on Windows automatically covert `/etc/conda/.condarc` to `C:\etc\conda\.condarc` for you?
I've found that adding `#!top` in the system condarc does put them at the top (and maintains the order) - e.g.
```
channels:
- defaults #!top
- conda-forge #!top
```
```
(base) C:\> conda info
active environment : base
active env location : C:\Miniconda3
shell level : 1
user config file : C:\Users\dhirschfeld\.condarc
populated config files : C:\Miniconda3\.condarc
C:\Users\dhirschfeld\.condarc
conda version : 4.6.3
conda-build version : not installed
python version : 3.7.1.final.0
base environment : C:\Miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
https://conda.anaconda.org/conda-forge/win-64
https://conda.anaconda.org/conda-forge/noarch
https://conda.anaconda.org/dhirschfeld/win-64
https://conda.anaconda.org/dhirschfeld/noarch
package cache : C:\Miniconda3\pkgs
C:\Users\dhirschfeld\.conda\pkgs
C:\Users\dhirschfeld\AppData\Local\conda\conda\pkgs
envs directories : C:\Miniconda3\envs
C:\Users\dhirschfeld\.conda\envs
C:\Users\dhirschfeld\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.3 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False
```
> *Will python on Windows automatically convert `/etc/conda/.condarc` to `C:\etc\conda\.condarc` for you?*
It seems so:
```
(base) C:\> New-Item -Type File -Force /etc/conda/.condarc
Directory: C:\etc\conda
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 13/02/2019 3:49 PM 0 .condarc
(base) C:\> Add-Content /etc/conda/.condarc 'Hello World!'
(base) C:\> python
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> with open('/etc/conda/.condarc', 'r') as f:
... print(f.read())
...
Hello World!
>>>
```
Ha! Here's something interesting - the 'Hello World' `.condarc` file I created just "broke conda"! :laughing:
```
(base) C:\> conda info
[y/N]: N
(base) C:\>
```
I think "Don't do that" is a valid solution to that problem though - deleting the folder "fixed" my conda again.
If I move my `.condarc` file to either `C:\Miniconda3\condarc` or `C:\Miniconda3\condarc.d`
directories it doesn't get picked up at all.
***Edit:*** Is this perhaps because `CONDA_ROOT` is undefined?
```
(base) C:\> $env:CONDA_ROOT
(base) C:\>
```
Maybe, to not conflate the base environment with a system configuration, the system configuration could live in `C:\ProgramData\conda\.condarc` on Windows? | 2019-02-13T06:29:15 |
|
conda/conda | 8,289 | conda__conda-8289 | [
"8241"
] | 3fb40e1e02609ea851bbbd13186b62bddb3b2f8f | diff --git a/conda/activate.py b/conda/activate.py
--- a/conda/activate.py
+++ b/conda/activate.py
@@ -532,8 +532,13 @@ def expand(path):
def ensure_binary(value):
+ encoding = 'utf-8'
+ if on_win:
+ import ctypes
+ acp = ctypes.cdll.kernel32.GetACP()
+ encoding = str(acp)
try:
- return value.encode('utf-8')
+ return value.encode(encoding)
except AttributeError: # pragma: no cover
# AttributeError: '<>' object has no attribute 'encode'
# In this case assume already binary type and do nothing
diff --git a/conda/common/compat.py b/conda/common/compat.py
--- a/conda/common/compat.py
+++ b/conda/common/compat.py
@@ -215,7 +215,7 @@ def ensure_text_type(value):
except ImportError: # pragma: no cover
from pip._vendor.requests.packages.chardet import detect
encoding = detect(value).get('encoding') or 'utf-8'
- return value.decode(encoding)
+ return value.decode(encoding, errors='replace')
except UnicodeEncodeError: # pragma: no cover
# it's already text_type, so ignore?
# not sure, surfaced with tests/models/test_match_spec.py test_tarball_match_specs
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -2156,7 +2156,7 @@ def test_post_link_run_in_env(self):
test_pkg = '_conda_test_env_activated_when_post_link_executed'
# a non-unicode name must be provided here as activate.d scripts
# are not execuated on windows, see https://github.com/conda/conda/issues/8241
- with make_temp_env(test_pkg, '-c conda-test', name='post_link_test') as prefix:
+ with make_temp_env(test_pkg, '-c conda-test') as prefix:
assert package_is_installed(prefix, test_pkg)
def test_conda_info_python(self):
| activate.d scripts not run on windows if prefix contains unicode
activate.d scripts are not run on windows if the path contains unicode characters. A test for this is to create environments with and without unicode characters with the `_test_set_env_in_activate_d` package in the `jjhelmus` channel. When activated the `TEST_VAR` variable should be set to "1". In environments with unicode characters running the activate.d script fails because of an invalid path in the activation script.
| 2019-02-14T20:30:16 |
|
conda/conda | 8,290 | conda__conda-8290 | [
"8255"
] | c06cee03757b2946831d8d5006ecffce9eb6d053 | diff --git a/conda/exports.py b/conda/exports.py
--- a/conda/exports.py
+++ b/conda/exports.py
@@ -285,8 +285,12 @@ def cleanup(self, _warn=False, _warnings=_warnings):
_rm_rf(self.name)
self._closed = True
if _warn and _warnings.warn:
- _warnings.warn("Implicitly cleaning up {!r}".format(self),
- _warnings.ResourceWarning)
+ try:
+ _warnings.warn("Implicitly cleaning up {!r}".format(self),
+ _warnings.ResourceWarning)
+ except AttributeError:
+ _warnings.warn("Implicitly cleaning up {!r}".format(self),
+ RuntimeWarning)
def __exit__(self, exc, value, tb):
self.cleanup()
diff --git a/conda/gateways/disk/delete.py b/conda/gateways/disk/delete.py
--- a/conda/gateways/disk/delete.py
+++ b/conda/gateways/disk/delete.py
@@ -7,9 +7,9 @@
import fnmatch
from logging import getLogger
from os import rename, unlink, walk, makedirs, getcwd, rmdir, listdir
-from os.path import abspath, dirname, isdir, join, split, exists
+from os.path import abspath, dirname, isdir, join, split, exists, isfile, normpath, basename
import shutil
-from subprocess import Popen, PIPE, check_call, CalledProcessError
+from subprocess import check_output, STDOUT, CalledProcessError
import sys
from . import MAX_TRIES, exp_backoff_fn
@@ -27,16 +27,25 @@
def rmtree(path, *args, **kwargs):
# subprocessing to delete large folders can be quite a bit faster
+ path = normpath(path)
if on_win:
try:
- check_call('rd /s /q "{}"'.format(path), shell=True)
+ # the fastest way seems to be using DEL to recursively delete files
+ # https://www.ghacks.net/2017/07/18/how-to-delete-large-folders-in-windows-super-fast/
+ # However, this is not entirely safe, as it can end up following symlinks to folders
+ # https://superuser.com/a/306618/184799
+ # so, we stick with the slower, but hopefully safer way. Maybe if we figured out how
+ # to scan for any possible symlinks, we could do the faster way.
+ # out = check_output('DEL /F/Q/S *.* > NUL 2> NUL'.format(path), shell=True,
+ # stderr=STDOUT, cwd=path)
+ out = check_output('RD /S /Q "{}" > NUL 2> NUL'.format(path), shell=True,
+ stderr=STDOUT)
except CalledProcessError as e:
- if e.returncode == 5:
- # skip permission errors
- log.warn("")
- pass
- else:
+ if e.returncode != 5:
+ log.error("Removing folder {} the fast way failed. Output was: {}".format(out))
raise
+ else:
+ log.debug("removing dir contents the fast way failed. Output was: {}".format(out))
else:
try:
makedirs('.empty')
@@ -44,18 +53,17 @@ def rmtree(path, *args, **kwargs):
pass
# yes, this looks strange. See
# https://unix.stackexchange.com/a/79656/34459
- # https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html
+ # https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html # NOQA
rsync = which('rsync')
- if rsync:
+ if rsync and isdir('.empty'):
try:
- check_call([rsync, '-a', '--delete', join(getcwd(), '.empty') + "/", path + "/"])
+ out = check_output(
+ [rsync, '-a', '--delete', join(getcwd(), '.empty') + "/", path + "/"],
+ stderr=STDOUT)
except CalledProcessError:
- log.warn("Removing folder {} the fast way (with rsync) failed. "
- "Do you have rsync available?".format(path))
- shutil.rmtree(path)
- else:
- shutil.rmtree(path)
- shutil.rmtree('.empty')
+ log.debug("removing dir contents the fast way failed. Output was: {}".format(out))
+ shutil.rmtree('.empty')
+ shutil.rmtree(path)
def unlink_or_rename_to_trash(path):
@@ -68,25 +76,36 @@ def unlink_or_rename_to_trash(path):
make_writable(path)
unlink(path)
except EnvironmentError:
- try:
- rename(path, path + ".trash")
- except EnvironmentError:
- if on_win:
- # on windows, it is important to use the rename program, as just using python's
- # rename leads to permission errors when files are in use.
- condabin_dir = join(context.conda_prefix, "condabin")
- trash_script = join(condabin_dir, 'rename_tmp.bat')
- if exists(trash_script):
- _dirname, _fn = split(path)
- p = Popen(['cmd.exe', '/C', trash_script, _dirname, _fn, _fn + ".trash"],
- stdout=PIPE, stderr=PIPE)
- stdout, stderr = p.communicate()
- else:
- log.debug("{} is missing. Conda was not installed correctly or has been "
- "corrupted. Please file an issue on the conda github repo."
- .format(trash_script))
- log.warn("Could not remove or rename {}. Please remove this file manually (you may "
- "need to reboot to free file handles)".format(path))
+ if not fnmatch.fnmatch(path, '*.conda_trash*'):
+ try:
+ rename(path, path + ".conda_trash")
+ except EnvironmentError:
+ if on_win:
+ # on windows, it is important to use the rename program, as just using python's
+ # rename leads to permission errors when files are in use.
+ condabin_dir = join(context.conda_prefix, "condabin")
+ trash_script = join(condabin_dir, 'rename_tmp.bat')
+ if exists(trash_script):
+ _dirname, _fn = split(path)
+ dest_fn = path + ".conda_trash"
+ counter = 1
+ while isfile(dest_fn):
+ dest_fn = dest_fn.splitext[0] + '.conda_trash_{}'.format(counter)
+ counter += 1
+ try:
+ out = check_output(['cmd.exe', '/C', trash_script, _dirname, _fn,
+ basename(dest_fn)],
+ stderr=STDOUT)
+ except CalledProcessError:
+ log.debug("renaming file path {} to trash failed. Output was: {}"
+ .format(path, out))
+
+ else:
+ log.debug("{} is missing. Conda was not installed correctly or has been "
+ "corrupted. Please file an issue on the conda github repo."
+ .format(trash_script))
+ log.warn("Could not remove or rename {}. Please remove this file manually (you "
+ "may need to reboot to free file handles)".format(path))
def remove_empty_parent_paths(path):
@@ -132,10 +151,10 @@ def delete_trash(prefix):
exclude = set(['envs'])
for root, dirs, files in walk(prefix, topdown=True):
dirs[:] = [d for d in dirs if d not in exclude]
- for basename in files:
- if (fnmatch.fnmatch(basename, "*.trash") or
- fnmatch.fnmatch(basename, "*" + CONDA_TEMP_EXTENSION)):
- filename = join(root, basename)
+ for fn in files:
+ if (fnmatch.fnmatch(fn, "*.conda_trash*") or
+ fnmatch.fnmatch(fn, "*" + CONDA_TEMP_EXTENSION)):
+ filename = join(root, fn)
try:
unlink(filename)
remove_empty_parent_paths(filename)
@@ -188,7 +207,7 @@ def path_is_clean(path):
if not clean:
for root, dirs, fns in walk(path):
for fn in fns:
- if not (fnmatch.fnmatch(fn, "*.trash") or
+ if not (fnmatch.fnmatch(fn, "*.conda_trash*") or
fnmatch.fnmatch(fn, "*" + CONDA_TEMP_EXTENSION)):
return False
return True
| rsync error
## Current Behavior
after installing packages, I get this error:
```
rsync: change_dir "/.empty" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]
WARNING conda.gateways.disk.delete:rmtree(55): Removing folder /anaconda/envs/ds/.condatmp the fast way (with rsync) failed. Do you have rsync available?
```
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
conda install <package>
```
## Expected Behavior
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : ds
active env location : /anaconda/envs/ds
shell level : 2
user config file : /home/<user>/.condarc
populated config files : /home/<user>/.condarc
conda version : 4.6.2
conda-build version : not installed
python version : 3.7.2.final.0
base environment : /anaconda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /anaconda/pkgs
/home/<user>/.conda/pkgs
envs directories : /anaconda/envs
/home/<user>/.conda/envs
platform : linux-64
user-agent : conda/4.6.2 requests/2.21.0 CPython/3.7.2 Linux/4.15.0-1037-azure ubuntu/16.04.5 glibc/2.23
UID:GID : 1003:1003
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /home/bjenkellefsen/.condarc <==
channels:
- defaults
- conda-forge
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /anaconda/envs/ds:
#
# Name Version Build Channel
_tflow_select 2.1.0 gpu anaconda
absl-py 0.5.0 pypi_0 pypi
alabaster 0.7.12 py36_0 defaults
anaconda custom py36hbbc8b67_0 defaults
anaconda-client 1.7.2 py36_0 defaults
anaconda-project 0.8.2 py36_0 defaults
appdirs 1.4.3 py36h28b3542_0 defaults
arrow-cpp 0.11.1 py36hc7aa0dd_1001 conda-forge
asn1crypto 0.24.0 py36_0 defaults
astor 0.7.1 pypi_0 pypi
astroid 2.1.0 py36_0 defaults
astropy 3.1.1 py36h7b6447c_0 defaults
atomicwrites 1.3.0 py_0 defaults
attrs 18.2.0 py36h28b3542_0 defaults
automat 0.7.0 py36_0 defaults
babel 2.6.0 py36_0 defaults
backcall 0.1.0 py36_0 defaults
backports 1.0 py36_1 defaults
backports.os 0.1.1 py36_0 defaults
backports.shutil_get_terminal_size 1.0.0 py36_2 defaults
beautifulsoup4 4.7.1 py36_1 defaults
bitarray 0.8.3 py36h14c3975_0 defaults
bkcharts 0.2 py36_0 defaults
blas 1.0 mkl defaults
blaze 0.11.3 py36_0 defaults
bleach 3.1.0 pypi_0 pypi
blosc 1.14.4 hdbcaa40_0 defaults
bokeh 1.0.4 py36_0 defaults
boost-cpp 1.68.0 h11c811c_1000 conda-forge
boto 2.49.0 py36_0 defaults
boto3 1.9.33 py_0 conda-forge
botocore 1.12.33 py_0 conda-forge
bottleneck 1.2.1 py36h035aef0_1 defaults
bz2file 0.98 py_0 conda-forge
bzip2 1.0.6 h14c3975_5 defaults
c-ares 1.15.0 h470a237_1 conda-forge
ca-certificates 2019.1.23 0 anaconda
cairo 1.14.12 h8948797_3 defaults
certifi 2018.11.29 py36_0 anaconda
cffi 1.11.5 py36he75722e_1 defaults
chardet 3.0.4 py36_1 defaults
click 7.0 py36_0 defaults
cloudpickle 0.7.0 py_0 defaults
clyent 1.2.2 py36_1 defaults
colorama 0.4.1 py36_0 defaults
constantly 15.1.0 py36h28b3542_0 defaults
contextlib2 0.5.5 py36_0 defaults
cryptography 2.5 py36h1ba5d50_0 defaults
cudatoolkit 10.0.130 0 anaconda
cudnn 7.3.1 cuda10.0_0 anaconda
cupti 10.0.130 0 anaconda
curl 7.63.0 hbc83047_1000 defaults
cycler 0.10.0 py36_0 defaults
cymem 1.31.2 py36_0 conda-forge
cython 0.29.4 py36he6710b0_0 defaults
cytoolz 0.9.0.1 py36h14c3975_1 defaults
dask 1.1.1 py_0 defaults
dask-core 1.1.1 py_0 defaults
datashape 0.5.4 py36_1 defaults
dbus 1.13.2 h714fa37_1 defaults
decorator 4.3.2 py36_0 defaults
defusedxml 0.5.0 py36_1 defaults
dill 0.2.8.2 py36_1000 conda-forge
distributed 1.25.3 py36_0 defaults
docutils 0.14 py36_0 defaults
en-core-web-sm 2.0.0 pypi_0 pypi
entrypoints 0.3 py36_0 defaults
et_xmlfile 1.0.1 py36_0 defaults
expat 2.2.6 he6710b0_0 defaults
faiss-gpu 1.4.0 py36_cuda8.0.61_1 pytorch
fastcache 1.0.2 py36h14c3975_2 defaults
fasttext 0.8.22 pypi_0 pypi
filelock 3.0.10 py36_0 defaults
flask 1.0.2 py36_1 defaults
flask-cors 3.0.7 py36_0 defaults
fontconfig 2.13.0 h9420a91_0 defaults
freetype 2.9.1 h8a8886c_1 defaults
fribidi 1.0.5 h7b6447c_0 defaults
gast 0.2.0 pypi_0 pypi
gensim 3.5.0 py36_0 conda-forge
get_terminal_size 1.0.0 haa9412d_0 defaults
gevent 1.4.0 py36h7b6447c_0 defaults
glib 2.56.2 hd408876_0 defaults
glob2 0.6 py36_1 defaults
gmp 6.1.2 h6c8ec71_1 defaults
gmpy2 2.0.8 py36h10f8cd9_2 defaults
graphite2 1.3.12 h23475e2_2 defaults
graphviz 2.40.1 h21bd128_2 anaconda
greenlet 0.4.15 py36h7b6447c_0 defaults
grpcio 1.15.0 pypi_0 pypi
gst-plugins-base 1.14.0 hbbd80ab_1 defaults
gstreamer 1.14.0 hb453b48_1 defaults
h5py 2.8.0 py36h989c5e5_3 defaults
harfbuzz 1.8.8 hffaf4a1_0 defaults
hdf5 1.10.2 hba1933b_1 defaults
heapdict 1.0.0 py36_2 defaults
html5lib 1.0.1 py36_0 defaults
hyperlink 18.0.0 py36_0 defaults
icu 58.2 h9c2bf20_1 defaults
idna 2.8 py36_0 defaults
imageio 2.4.1 py36_0 defaults
imagesize 1.1.0 py36_0 defaults
importlib_metadata 0.7 py36_0 defaults
incremental 17.5.0 py36_0 defaults
intel-openmp 2019.1 144 defaults
ipykernel 5.1.0 py36h39e3cac_0 defaults
ipython 7.2.0 py36h39e3cac_0 defaults
ipython_genutils 0.2.0 py36_0 defaults
ipywidgets 7.4.2 py36_0 anaconda
isort 4.3.4 py36_0 defaults
itsdangerous 1.1.0 py36_0 defaults
jbig 2.1 hdba287a_0 defaults
jdcal 1.4 py36_0 defaults
jedi 0.13.2 py36_0 defaults
jeepney 0.4 py36_0 defaults
jinja2 2.10 py36_0 defaults
jmespath 0.9.3 py_1 conda-forge
jpeg 9b h024ee3a_2 defaults
jsonschema 2.6.0 py36_0 defaults
jupyter 1.0.0 py36_7 anaconda
jupyter_client 5.2.4 py36_0 defaults
jupyter_console 6.0.0 py36_0 defaults
jupyter_core 4.4.0 py36_0 defaults
jupyterlab 0.35.4 py36_0 conda-forge
jupyterlab_launcher 0.13.1 py36_0 defaults
jupyterlab_server 0.2.0 py36_0 defaults
jupyterthemes 0.20.0 py_0 conda-forge
keras 2.2.4 0 anaconda
keras-applications 1.0.6 py36_0 anaconda
keras-base 2.2.4 py36_0 anaconda
keras-preprocessing 1.0.5 py36_0 anaconda
keyring 17.1.1 py36_0 defaults
kiwisolver 1.0.1 py36hf484d3e_0 defaults
krb5 1.16.1 h173b8e3_7 defaults
lazy-object-proxy 1.3.1 py36h14c3975_2 defaults
lesscpy 0.13.0 py_1 conda-forge
libarchive 3.3.3 h5d8350f_2 defaults
libcurl 7.63.0 h20c2e04_1000 defaults
libedit 3.1.20170329 h6b74fdf_2 defaults
libevent 2.1.8 h1ba5d50_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc 7.2.0 h69d50b8_2 defaults
libgcc-ng 8.2.0 hdf63c60_1 defaults
libgfortran-ng 7.3.0 hdf63c60_0 defaults
libgpuarray 0.7.6 h470a237_3 conda-forge
libiconv 1.15 h14c3975_1004 conda-forge
liblief 0.9.0 h7725739_1 defaults
libpng 1.6.35 hbc83047_0 defaults
libprotobuf 3.5.2 hd28b015_1 conda-forge
libsodium 1.0.16 h1bed415_0 defaults
libssh2 1.8.0 h1ba5d50_4 defaults
libstdcxx-ng 8.2.0 hdf63c60_1 defaults
libtiff 4.0.9 he85c1e1_2 defaults
libtool 2.4.6 h7b6447c_5 defaults
libuuid 1.0.3 h1bed415_2 defaults
libxcb 1.13 h1bed415_1 defaults
libxml2 2.9.8 h26e45fe_1 defaults
libxslt 1.1.32 h1312cb7_0 defaults
llvmlite 0.27.0 py36hd408876_0 defaults
locket 0.2.0 py36_1 defaults
lsh 0.3.0 pypi_0 pypi
lxml 4.3.0 py36hefd8a0e_0 defaults
lz4-c 1.8.1.2 h14c3975_0 defaults
lzo 2.10 h49e0be7_2 defaults
mako 1.0.7 py_1 conda-forge
markdown 3.0.1 pypi_0 pypi
markupsafe 1.1.0 py36h7b6447c_0 defaults
matplotlib 3.0.2 py36h5429711_0 defaults
mccabe 0.6.1 py36_1 defaults
mistune 0.8.4 py36h7b6447c_0 defaults
mkl 2019.1 144 defaults
mkl-service 1.1.2 py36he904b0f_5 defaults
mkl_fft 1.0.10 py36ha843d7b_0 defaults
mkl_random 1.0.2 py36hd81dba3_0 defaults
more-itertools 5.0.0 py36_0 defaults
mpc 1.1.0 h10f8cd9_1 defaults
mpfr 4.0.1 hdf1c602_3 defaults
mpmath 1.1.0 py36_0 defaults
msgpack-numpy 0.4.3.2 py_0 conda-forge
msgpack-python 0.6.1 py36hfd86e86_1 defaults
multipledispatch 0.6.0 py36_0 defaults
murmurhash 0.28.0 py36hfc679d8_0 conda-forge
nbconvert 5.4.0 py36_1 anaconda
nbformat 4.4.0 py36_0 defaults
ncurses 6.1 he6710b0_1 defaults
networkx 2.2 py36_1 defaults
ninja 1.8.2 py36h6bb024c_1 defaults
nltk 3.4 py36_1 defaults
nose 1.3.7 py36_2 defaults
notebook 5.7.4 py36_0 anaconda
numba 0.42.0 py36h962f231_0 defaults
numexpr 2.6.9 py36h9e4a6bb_0 defaults
numpy 1.15.4 py36h7e9f1db_0 defaults
numpy-base 1.15.4 py36hde5b4d6_0 defaults
numpydoc 0.8.0 py36_0 defaults
odo 0.5.1 py36_0 defaults
olefile 0.46 py36_0 defaults
openpyxl 2.5.14 py_0 defaults
openssl 1.1.1 h7b6447c_0 anaconda
packaging 19.0 py36_0 defaults
pandas 0.24.1 py36he6710b0_0 defaults
pandoc 1.19.2.1 hea2e7c5_1 defaults
pandocfilters 1.4.2 py36_1 defaults
pango 1.42.4 h049681c_0 defaults
parquet-cpp 1.5.1 3 conda-forge
parso 0.3.2 py36_0 defaults
partd 0.3.9 py36_0 defaults
patchelf 0.9 he6710b0_3 defaults
path.py 11.5.0 py36_0 defaults
pathlib2 2.3.3 py36_0 defaults
patsy 0.5.1 py36_0 defaults
pcre 8.42 h439df22_0 defaults
pep8 1.7.1 py36_0 defaults
pexpect 4.6.0 py36_0 defaults
pickleshare 0.7.5 py36_0 defaults
pillow 5.4.1 py36h34e0f95_0 defaults
pip 19.0.1 py36_0 defaults
pixman 0.34.0 hceecf20_3 defaults
pkginfo 1.5.0.1 py36_0 defaults
plac 0.9.6 py_1 conda-forge
pluggy 0.8.1 py36_0 defaults
ply 3.11 py36_0 defaults
popt 1.16 h1cef754_2002 conda-forge
preshed 1.0.1 py36hfc679d8_0 conda-forge
prometheus_client 0.5.0 py36_0 defaults
prompt_toolkit 2.0.8 py_0 defaults
protobuf 3.6.1 pypi_0 pypi
psutil 5.5.0 py36h7b6447c_0 defaults
ptyprocess 0.6.0 py36_0 defaults
py 1.7.0 py36_0 defaults
py-lief 0.9.0 py36h7725739_1 defaults
pyarrow 0.11.1 py36hbbcf98d_1002 conda-forge
pyasn1 0.4.4 py36h28b3542_0 defaults
pyasn1-modules 0.2.2 py36_0 defaults
pybind11 2.2.4 py36h2d50403_1 conda-forge
pycodestyle 2.5.0 py36_0 defaults
pycosat 0.6.3 py36h14c3975_0 defaults
pycparser 2.19 py36_0 defaults
pycrypto 2.6.1 py36h14c3975_9 defaults
pycurl 7.43.0.2 py36h1ba5d50_0 defaults
pydot 1.3.0 py36_1 anaconda
pyflakes 2.1.0 py36_0 defaults
pygments 2.3.1 py36_0 defaults
pygpu 0.7.6 py36h7eb728f_0 conda-forge
pylint 2.2.2 py36_0 defaults
pyodbc 4.0.25 py36he6710b0_0 defaults
pyopengl 3.1.1a1 py36_0 defaults
pyopenssl 19.0.0 py36_0 defaults
pyparsing 2.3.1 py36_0 defaults
pyqt 5.9.2 py36h05f1152_2 defaults
pysocks 1.6.8 py36_0 defaults
pytables 3.4.4 py36ha205bf6_0 defaults
pytest 4.2.0 py36_0 defaults
pytest-arraydiff 0.3 py36h39e3cac_0 defaults
pytest-astropy 0.5.0 py36_0 defaults
pytest-doctestplus 0.2.0 py36_0 defaults
pytest-openfiles 0.3.2 py36_0 defaults
pytest-remotedata 0.3.1 py36_0 defaults
python 3.6.8 h0371630_0 defaults
python-dateutil 2.7.5 py36_0 defaults
python-libarchive-c 2.8 py36_6 defaults
pytorch 1.0.0 py3.6_cuda9.0.176_cudnn7.4.1_1 pytorch
pytz 2018.9 py36_0 defaults
pywavelets 1.0.1 py36hdd07704_0 defaults
pyyaml 3.13 py36h14c3975_0 defaults
pyzmq 17.1.2 py36h14c3975_0 defaults
qt 5.9.7 h5867ecd_1 defaults
qtawesome 0.5.6 py_0 defaults
qtconsole 4.4.3 py36_0 defaults
qtpy 1.6.0 py_0 defaults
readline 7.0 h7b6447c_5 defaults
regex 2017.11.09 py36_0 conda-forge
requests 2.21.0 py36_0 defaults
rope 0.11.0 py36_0 defaults
rsync 3.1.3 h84994c4_1002 conda-forge
ruamel_yaml 0.15.46 py36h14c3975_0 defaults
s3transfer 0.1.13 py36_1001 conda-forge
scikit-image 0.14.1 py36he6710b0_0 defaults
scikit-learn 0.20.2 py36hd81dba3_0 defaults
scipy 1.2.0 py36h7c811a0_0 defaults
seaborn 0.9.0 py36_0 defaults
secretstorage 3.1.0 py36_0 defaults
send2trash 1.5.0 py36_0 defaults
service_identity 17.0.0 py36h28b3542_0 defaults
setuptools 39.1.0 pypi_0 pypi
simplegeneric 0.8.1 py36_2 defaults
singledispatch 3.4.0.3 py36_0 defaults
sip 4.19.8 py36hf484d3e_0 defaults
six 1.12.0 py36_0 defaults
smart_open 1.7.1 py_0 conda-forge
snappy 1.1.7 hbae5bb6_3 defaults
snowballstemmer 1.2.1 py36_0 defaults
sortedcollections 1.1.2 py36_0 defaults
sortedcontainers 2.1.0 py36_0 defaults
soupsieve 1.7.1 py36_0 defaults
spacy 2.0.13 py36hf8a1672_0 conda-forge
sphinx 1.8.4 py36_0 defaults
sphinxcontrib 1.0 py36_1 defaults
sphinxcontrib-websupport 1.1.0 py36_1 defaults
spyder 3.3.2 py36_0 defaults
spyder-kernels 0.4.2 py36_0 defaults
sqlalchemy 1.2.17 py36h7b6447c_0 defaults
sqlite 3.26.0 h7b6447c_0 defaults
statsmodels 0.9.0 py36h035aef0_0 defaults
sympy 1.3 py36_0 defaults
tblib 1.3.2 py36_0 defaults
tensorboard 1.9.0 py36_0 conda-forge
tensorflow 1.9.0 py36_0 conda-forge
tensorflow-base 1.9.0 mkl_py36h2ca6a6a_0 defaults
tensorflow-gpu 1.9.0 hf154084_0 defaults
termcolor 1.1.0 pypi_0 pypi
terminado 0.8.1 py36_1 defaults
testpath 0.4.2 py36_0 defaults
theano 1.0.3 py36_0 conda-forge
thinc 6.10.3 py36hf8a1672_3 conda-forge
thrift-cpp 0.11.0 h02b749d_3 defaults
tk 8.6.8 hbc83047_0 defaults
toolz 0.9.0 py36_0 defaults
tornado 5.1.1 py36h7b6447c_0 defaults
tqdm 4.29.1 py_0 defaults
traitlets 4.3.2 py36_0 defaults
twisted 18.7.0 py36h14c3975_1 defaults
typed-ast 1.1.0 py36h14c3975_0 defaults
ujson 1.35 py36h470a237_1 conda-forge
unicodecsv 0.14.1 py36_0 defaults
unixodbc 2.3.7 h14c3975_0 defaults
urllib3 1.24.1 py36_0 defaults
wcwidth 0.1.7 py36_0 defaults
webencodings 0.5.1 py36_1 defaults
werkzeug 0.14.1 py36_0 defaults
wheel 0.32.3 py36_0 defaults
widgetsnbextension 3.4.2 py36_0 anaconda
wrapt 1.11.1 py36h7b6447c_0 defaults
wurlitzer 1.0.2 py36_0 defaults
xlrd 1.2.0 py36_0 defaults
xlsxwriter 1.1.2 py36_0 defaults
xlwt 1.3.0 py36_0 defaults
xz 5.2.4 h14c3975_4 defaults
yaml 0.1.7 had09818_2 defaults
zeromq 4.2.5 hf484d3e_1 defaults
zict 0.1.3 py36_0 defaults
zlib 1.2.11 h7b6447c_3 defaults
zope 1.0 py36_1 defaults
zope.interface 4.5.0 py36h14c3975_0 defaults
zstd 1.3.3 1 conda-forge
```
</p></details>
| Something I did made the problem go away. I will close it for now.
I've suddenly started getting this error in my container build pipeline, so if you or anyone else happen to remember why this is, that'd be rad.
```
rsync: change_dir "/.empty" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
WARNING conda.gateways.disk.delete:rmtree(54): Removing folder /opt/conda/.condatmp the fast way (with rsync) failed. Do you have rsync available?
rsync: change_dir "/.empty" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
WARNING: 'conda clean --source-cache' is deprecated.
Use 'conda build purge-all' to remove source cache files.
WARNING conda.gateways.disk.delete:rmtree(54): Removing folder /opt/conda/pkgs/cache the fast way (with rsync) failed. Do you have rsync available?
```
It's not an error, it's a warning. Conda tries to use rsync to remove files more quickly. If that doesn't work, it's harmless - you see the output you posted, and conda does its thing a slower way. Maybe we need to just silence that error a bit better.
I've heard that Conda's having issues with 4.6.3, so that may be why I've got a lot of warnings and errors popping up suddenly. https://github.com/jupyter/docker-stacks/issues/807#issuecomment-463715818 ?
That particular part is new in 4.6.3. | 2019-02-15T02:33:35 |
|
conda/conda | 8,328 | conda__conda-8328 | [
"6696"
] | 662df07042b2b0f5096334c4594f4351a5685978 | diff --git a/conda/cli/install.py b/conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -201,7 +201,11 @@ def install(args, parser, command='install'):
specs = []
if args.file:
for fpath in args.file:
- specs.extend(common.specs_from_url(fpath, json=context.json))
+ try:
+ specs.extend(common.specs_from_url(fpath, json=context.json))
+ except UnicodeError:
+ raise CondaError("Error reading file, file should be a text file containing"
+ " packages \nconda create --help for details")
if '@EXPLICIT' in specs:
explicit(specs, prefix, verbose=not context.quiet, index_args=index_args)
return
| warn on incorrect use of `conda install --file` argument
```
error: UnicodeDecodeError('charmap', b'BZh91AY&SY+\xeah\xb3\x02<M\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe2\xc30.\xddt\x84r|s)\xf7\xbdel\x1b\xee\x95\xef\xbb\xbe\xb9\xf7\xcd\xf7\xce\xef\xa1\x93\xe8\xfa\xb7\xdf\x0c\xfb\xef\xb7\xaez`\x07@\x03)\x04\x00\x00\x0fW\xbd\xe0\xf1\xd3@\xf6\x18\x07;s\xdfp\xe8\xaa_6\xe0\x1f{\xbc\x06\xf1c\xa0\x01@(\xf7\x86\x9e\xeb\xb8\xd36\xae6\xd9m\xa1\xaa\xa1}\x9d\x8d\xca+\xa0\x18\xaa6\x07@\xcb\xe3v\xfaE\xefM=\x05HSZ(g\xd8\x00\xf46{\xef\x80\x00Wz^\xdb\xe0;/{\x9b\xb9\xcf\x838{\xcf\xa0<\xde\xbeoW\xa6\xb4ty\xef\xb6\xaf\xb7\xc7\xde\xe1\xdc\xf7Z\x1e>\xect\x0e\xaf@\x00k\xe3\xef\xbe\xef\x07\xbe\xde\xf8\xbd\xb0\x00\x00\xf6\xcd\x10\xbd\xa5-\xeb\xdcu\xed\xef9\xd7\x80\x03=\xe9m\xdd\xd7\xdb\xed\x14\x1d:\x9b\x0fn\xf9\xb5}\xef\xb5\xef\x8d\xefy\xd9J/\xb6\x93\xd6\x9aV\x8dh4\xb6\x01\xf7U\x03Y\x18@\xa2\xb5\x8a\x87\xdc}\xde\xf9\xb6\xef\xbe\xd5\x01\xa0\xb3kT[\xb9\xd1\xdb\xbc\xf1\xf3\x0e\x90\x14\x00\x15\xdb\xefw\xddgZ\x01\xa9\x00|1\xde\xcf\x90\xfa\x03\x00\x00>\x8e8\xd0)\x88\x04Z\xfba]\xb0\x92\xa1\xe1\x0e\xfb\xe3\xc3!\xb2\x1b\x1c\xc0\x03\xdd\xef\xbet\x06\x82G\x9fw\xb9\xd5\x00\xad\xa8^\x9d\xf3\x9e\x015\xf4\xd0\x17\xb9{\x92|\xbe\xb7\x03\x8f\xa0\x1e\xea^\xd6\x05qe\xb5\xa5\xa98\x1c\x00\xd8\xb2\xedu\xe3\x85h;\xef{\xdf}\x8fG{\xdc\xeb\xb9\x81\xb1\xf5\xba\xef}\xc6^\xd5\x93k%\xa9g\xd1\xeb\xaa\xdf\x07\x9b\x8f\xaeq\x9d\xf7:\xaa\x16E\xdd\xf7\x9b3\x16\xc0\xdb\x06\xf6eD\x06\x9a\x1bc\xd7\x9d\xe7{6\xbeGo{\xdd:\xe8q\x97\x9a\xf5\xf2w\xd9\xf7s\xde\xde\xbe\xef\xbc\xf6\xb6s;\xb4\x9e\xdes\xe0\x03\xd1\xd7_\x1e\x9f@c\xeb\xbb];\xb7\xde\xf5\xd8\x95ml\rbh\xa5\xedTP\x02\xb3\xday\xbbt\xad\xdd\xdd\xa4i\x8f\xbe\xbe\xdb\xef\xbe\xd5|\x1an\xa6\xecrV\xd7Z\xf2\xf1\xd0T\x85\xe0;\xd3\xde\xd8\xe9\xdd\xb3\xafx\xc5b\xfb\x10]\x87\xbd\'\xb8(oc\\\xf3\x1d\xd8Nfks\xde\xe0\tU\x0e\xf6\x0b\xb0V\x9d\xec<u\x9e\x81\xad(2\x0e\xb9\x03\x93\xb6\xaf^\x05\x17A\xdb\x00[{\xc7s\xc9\xbd_-\xdcs\xc77>\x01\xdf9\xee\xaf\x14\xa5B\x82\x95\xf7\x1f=\xb7\xcc}w\xb7\x94\xfa\xd9\xcd\x8e\x9eC\xc3^\xb4\x1e\xcb\xbe\xd3\xd7\xd06\xc1\xad\xedJ7\xde\xe0\x00\x1e\xf8\xc3\xeb\xdb\x01R\x15B\xda\x10\xddz\xb1\xbb}}\xf7ot\xeb\xe8\x0f^\xb5\xd7\xbe\xfbe\xf7=\x8e=\xb7h\xf8\xfb{Qx\x84\t6\xcf\x9b\xd7\xbbL\xcb\xee(\r<@\x06\xde\xe0\x1e\x81\xe4\xf4\x05\x00\x00\x02\xd9\xe8\x00\x00\x00\x00\x06\xdfx\x02\xa8\xf2/G\xbe\xc0\x01\xd3M\x00\xfb\xb0\x18\xe5F<\xfb}\xf6\x01\xa0\x0f@\x1dk\xd9\x9c\xb3}\xb7n\xec\xde\xb7\x9e\xcfy\xe3\xb0\x07\x9a\xdb\x8e\xdc\xbb\x8e\xf5\xb6[)T\x1e\xdbom.\xee\xeb7Z\xfb\xdcv\xb6l\x0bywJ\x9f{\x9d\xb7\xb5\xd8\t\xb6\xe7jq\xb8v\xcd\xd6\xef\xae\xd1\x0e\xec\xf7\xdaN\xf7\xdfww\xbb\xb1\xf3\xa3{\xab\xeam\x8aP\xf44\x9d\x06\xa7l=\xf7\xdd{\xef\x8a\xf9\xef\x9f=\xef\x1ez.\xf6\xed\xb2z\xf8X\xdfgk\xe1\xef\x80\xfb\xd9\xb7\xc6\xf9\xf7\xbd\xa7{\xac\xdch\xf7\xde\xeep\xfb\x1b\xde\xed\xd7\xbdw\xbb\xb9;\xef>\xd3\xb7\xb1\xf7\xc5\xbb\xe9\xbboy^\xf5V\xd4\thP\x1a\xa0\n\x00P\xb3\rn\x1e\xd3\x1f-\xcd\xf7\xbb\xd5|6\xa7\xb6\xd9\x97\x04\xda\xaa\xb6\xd6m\x1b}\xf6<\xaf}\x8e\xd7t\xc3d)\xa3\xad\x14(h\xe9\xca \xd8V6\xac\x02\xdbZ\x0b\xb2\xdd\xcb\xad\xbb\xbb]>\xf9\xddvb}\x9a\xb3\x00\x14\xf5NB\x95\x13\xa5\x86\xfb1Vvn\xdc\xa6u\xba\xe5\xa6\xb2\xd5\x94\xd0\x00\xd6q\x8aQJ\xdd\x9c\x07r\xc7wjZa\xd3w\xc7\x0e\xae\xcd\xb6Jj\xf4\xf7\x03^%.|\xefV/\xbb\xe8\x9dxz\x1f{f\xf1\x1f\x00>\xe3\xb9f\x1bc\x96\xad\xb6\xc7N\xec\xeb\xb5\x0f\xb7;oNq\x1fRn\x06\x9a\x1a\xdb\x8e\x1c\xea\xde\x8ak.\xed\xdbu\x95\xa4\xbd\xcdS\x96\xd8\xbdqu\x07\x9e`\x07C\xeeg\xd7\xa3l&\xc1\xd3\xb9\x83v+\xa3\xa1\xb6\xf9wh\x80\x86\xad\xb5Zl\x1a\x16\xc5\xa3\x8f,\xf3\xc3,\xad\xb7\xa6:y\xde\x8e\x9d4\x00\x07M\x07\xa1Ww\x1c\xcb\x1ba\x85k\x00\x1a\t\xbe\xdb<\xf2=+\xa0\x0e{\xba\xf5\xbd\xde\xb1Mh\x00\x00\n\x1b\xa2\xeek\xb3n\xeeu\xdd0\xeb\x1dw\xb6\xf5\xbc\xde\xcfv\xf4\xefz\xdc\xa6\xebrs\xb5\xedx\xd5\xa0\xfb\x9e\xec\x93\xdb\xef\x99\xf2y\xf0\x03\xed\x80\xd6\xd6\x1d\xb0:\xa4v\x19\xd8+\x15;g|\xf8\x8e\xe8\x1f}\xaf[\x9e\xeb\x89\xed\xe5\xefs\xbe=\x80\xdeWpVj\xde\xe7O_;\xee\x80c\xbbN\x15w\xde\xf5\xd7\xa5\xf5\xd7\xc7\xdfZdto)\xdb\x80\x00\x03M(\x02\xf6=\xca+z\x08\xeb\xb0=\xe7q\xe4fu\x17}\xefJ\xab\xbd\xbe\xdf[O\xb6\xbb\xaf\xb7\xaf\xbd\xae\xd8S\x80\xd0\x03\x94\x8d[/]\xe7\x9a\xb6=\x9b\xb5n\xef8>\xee\xcd\xceA\xf7\x8e\xf7\x93\x0f\xb7\xbep\xf9\xbe\xfb\xce\xfb]{\xe6[\xd7P\xfah\xfam\x81\xad\x1b`hk\xa7\xce\xba\xf9wv\xb7\xbbw\xcf=\xbd\xdb\xaf\x91\r\xef\xb7\xaf\xb5\xa6\xde\xc7\xbd\xcf]Y\xbb\xed\xdd\xeb\x9f7R{b\xf5\x9d\xb3\xba\xee\x1e>\xfb\xe9|\xeb\x8e\xbe\xed\xd3\xdf}\xe9\xf16\xcf\xa6\xee\xed\xbb\xbe\xec\xfb\x9d\xe7\xdb;9{\xb7\xaf}>\xfb\x81\xf2\x1e\x95G\xabl\xf5}\xd5\xdbg\x1d;\xbd\xef\x81\xdb\xd9\xee\xee{F\x9d\xb3E\xed\xde|\x9f}\xf5\xda\x8e\xfb\xbaAdLm\x8e\xe3\xdf^\xfb\xe6\xfa"T\x8a\x97mT_[\xeb#u\xdfk{\xe5\xab\xeb5\xf3\x14-}\xa7\r\xf3}\xf6}6SX\x0b\xebg\xbe\xea\x9d\xee+\x17\xa7\xbeg\xbe\xe73\xc4\xb7\xd7{\xc7\xda{\xde\xee\x8b\xab\xd2n>\x9e\xec[\x1bL\xed_{\xdd\xb3\xd7*\x17\xcfw+=s^\xec\x0e> \xa2\x12\t\x01K|\xfb\xd5\xb6RQ(\x0c\xe6;\xbe\xfb\xa3\xbd\xdd\xef\x9f\x1b\xdfx>\xbc\xdf{\xb7x5_k\xcd\xc6\x85\x8eis\x93!\x8erp\x00\xf4\x05\xf7\xbe\xe7"\r\xeb\xc3\xe0\x06\x8f@|;\x1e\xfb\xc2\x14\x03\xdd\xb8\xf9w\x03P\xa1\r\x11\x04\x00L\x80\x00\x00\x00\x00\x00F\x04\xc2d\r\x00\x00\x00\x00\x00\x00\x00\x04\xc0\x00\x00\x04\xc10\x00\x04a\x00\x00\x00\x1a\x00\t\xb4hA\xa0\x80@\x08\x00&\x80F@\x00\t\xa6\x9a\x00&\x00\x00\x98\x9944\rL\xd4i\x84\xd3\x02d\x06\x9a4\xd3\x056\x8c\x99Ldd\xd0d\xd2\x8f\x11\x84\xf4\x10\xc9O\xc24\xd4\xf4\xc1L\xd0\x13hI\xe2OH%2\x11\x04\x08\x10\t\xa0\x08\xd3 \x024\xd3\t\x84\xc9\xa6\x93\x02z\r4\rS\xc4\xd4\xf2e=\x13\xc6\x80\xa3\xcaz\x98\x9e\xa6d\x994\x9e&\x05=\x90dh\x13$\xf2G\xa4\xc6Dd\xf4\xc8\x9a1\xa9\xb4M=LL\x9e\x9a\x086\x88\xd3A&\x92$ @\x04\x01\x1a4\x98\x13\x04\xc8b\ny5=\xa2\x9f\x90\xd3@L\x04\xc1\r\x1a\'\xa9\xb4\x9bS\xd0\xc1T\xf7\xa4=\x06\x91\xb5)\xfbEM\xe6\x89\xea\xa7\xe2)\xb4\xd9\'\xa1O\xc5O\xf5\x18\xa6\xd0\xd4\xf6\xa9\xe2\x9a\x99\x8fR6\x88\x8d\xe5Oh\xa62M\x19=5\x02$\x88A\r\x04d\x04\xc2\r0\x86\x91\x80&\x13L#\nyO)\xe8\xd3M\x18\x99\x06\x934\x99S=0\x06\x83*y0\x89\xe0\x9aeO\x19\x02j\x9e\x9bBg\xa6\x93\x19I\xe4\x9e\xa9\xec\xa9\xa7\xe4\xd3\xd2\x08\xd3S=S\xf2\xa3\xf4M\xa8\xc1#\xcd\x14\xde\xa4\x11$\x81\x02\x00\x9a\x00L OA\x88\x02hmL\x0112z#M2h\x1a\r\r\x0cS\xd0\x057\xa8\xd4\xa7\xfa\x01\x88\xa4\xf6\x9bM4\x8d\x90e3\x13Jbz\x9f\xa8\xc4&\xcax\x94\xdbH\x9eS\xda&\xa6\xf5F\xf52\x9bS\xf4I\xa6\xd4\x07\xa9\xa7\xae\xebg\xaey\xb4\x0b\xfdi\xee4ouqm\xe8i\xedp\xe1|\xe9\xd2\xf1\xcb\xccV\x92\x97F\xe2\x1e\xb5\xacY\x00nVF\x91hV;\x90`B\xf1\xc5\xd7\xba3(\xe5\xc5.\xb2\x1e%\xf7\xf0,p3\xfa,{N\xccV\xc4y\xb7S\x81\xa0A]B\xf2\xaf\x88\xac\xde\xaa\x05\x12a\x84u\xe7+h\xc2\xce\'%S\xb5\x84A\xc93hC\x88L.\x9c({V7\xdf\xb4@\x01\xe2\xf8c\xd8k\xf78\xf5\xe5\xdf\xcd\x96x_\xb7\x16\xbd\x80\\/\nW^\xff|\xc6\xc2v\xc2h\xa9\xb9\xb3\x07\xd9J\xc8;\x05X\x7f\xcdH\xdd\x13!\x0f6A%\xe2\x9dL\xac\xccmge9\x86\xd6\xadf\x8b.\x0f\x90`\xa5F\x8cE\x10\x14\x86\x8c\xb1c\n\xf2\xff\xfa\xb5mY\x9a\xb6\x01:rAA(\xf0a\xa6\x83\xcfm\xc8B\\\x18\xde\x83\x06\x80\xe2a\x17\xc6\xcf-\'\x889\x88\xa2H\'\x04&\xaaqX\x9cS Q\xf0$\x00\xfcD\x0f\xc7@k\x8d\x052\x94\x1f\xc7\xb7\xc5s\x7fv\xf3\xf8\xff\xba\xf2\xf29\x1a\xfc\x97\xef\xfd\xa7\xb5\xa2\xe9Qw\xb2\xbc?\xf5\xf3\x83A\x0c\x17\xf1\x1c\xe58\xad\x89\x90\x15\x18\xaa\xc2\xb5\x00`\xc0\xe8\xbf)1!\x1d\xbf\x99\xf5\xef~{\x0f\x89\xa2$\xef9\'\xa2\xcb\x9e\xf2\xca\xfc\xa4V?\xff\x1f\xd5\xffK\xff\xbb\x7f\xc5!\x8a\xb2C\x08dI4\xc6\x8a?\xf37\xf5\xcc\xaa\xb1\xd9~\x0fi6&S@\xc3\x92\xba\xc2k\x11\x00D\t\x8a\xc1A\xf2\xb9\x93\x08L#\xd4\xa0\xd5n7\x93\x0c_\xf8\x9f\x9b\xff\xb0\xab5\xfa\xec\xcf\xdcq\xf8\'p\xe2\r\xe66,\xce\x19]8\x8b9\x82\xce\x0c\x03\x06I\xb0\x9f\xb3\xfe\xda\xad\xe4\xb4a\xbe\x88cc\x92zG!\x95\x83\x06K\xa2Zn3r0\x02\x01\xd6O\xfd\x11\x16\xa9t\xc0qo\x90\xc82m\x8c\x8a\x9b\xcc\xf9\xd0?m\xde\xf5\xf8\xbe\xa0\xc0U\x93\xc1\xc8G \x19\x97\xeeq-\x1e\xa49A\xfa@tK\xaa\x1d\x90\x8f\x8c\x99\x12n\x87\xb4#%.bZJH\x9f\x03\xe0\x11\xa1\xf5\xf8\x8cX\x80\nG\x07u\x86\x94\xe9\x88\x85"\x0b0\x15d\xcc\x18pv\x11w\xfa\xad\xb8\x04\xa8Yy\xd4\xa2\xe8\xf2\x86M\xb2\xda?;`\xda\xb2\x8bu\x08\xc9\x9b\x83\r\xe0\xa2\x9e\xaeA\xf8-A--))C&\x04\x98\x93\x12aI\x17\x87d&\xa4\x82d\x80\x85\x06\xe4\x80{\x11P*\xca\xd0E\x80W%\xd9\xda\xa4\xa3\xa0m\xf9\xd8\xebl|x\x8e\xda7\x9ah\xcc\xe2\xe1\x84(\x84\x83\x83\xd2W\x85\xfd<\x01\x9a\x9d<\\\xd9\xee 8\xad\xbd{\x8b\x9f>n.\xbe~.~-:)\xa3\xc0\xdf\xe8o\xea\x1a\x878\xb4\xb3F\xf0\xec\xf4P\x07\x04s\xc1\x0eFa5\xbe\xa8\xe2\xef\xc1G\x8ex\x8f\xb2^>\xa6n\x0eB\x18\xb8\x85x\x00o4\x8b\x87\xbd\xca\x00c\xc81\xf5\x8f\xc5\x18\x88\xc3\x8bTr\xc7\x8bC\xca\xae+ \x12\xaa\xabP\xca\x86\x82((\xa2\x07Qa\xde\xe6\x98\xf60\xe6u!\xe2W\x04\xe4^\xf7%D\xd5\xedd\x0c:\xe1\xc3:\x99\xdf\x19\xdc\xc3\xd2\x0fM\x07\xce\xbe\x7f\x86\xe6/\xcb\xfa=d\xec9\xbeOC2\x8b\x07S\x05#k\xb7\xe9n;\xa3\xd1\x80\xcd\xa3\x08\xb3\x1f]a\xd4@\x0e\x0c\xdau\xf4U\xcf\x86\n\xb4\x81\xac,\xb0\x0b\x05\x83Q\t\xf2\x10\xd9\x1b\x17\xd4\xc1\x983\xa41\x03!dg\xce\xcc\xf5:\xa5\xba\xf5\xcdp\xa5\x88B3\x02o\xf24\x9b\xfe\x92i\xda\x9c\xac\xd7\x12\x1c\x92\x07#\x91\xea\xb9V\xf4\x0e\xc5\x80+\xeb\x88\xaf0\x8a\xb5T\x10\xfa\x94\x1d\xf0v\xfe\xc6?\x95;\xff\x06\xfb\xadE\xd7\xce\xde[\xa1T\xe6=\xd6qZ\x06i\xbe\xfb\x9a?\xcaj1\xad8\x95\x90kACp\x81\x87\xb9\xa1\xbb*\x88jn\r\xbb\x0c\xb6U\xd0k\x99\xcb\xe7s*b\x97<\xd6\x06\x05[|B\x8b\xe2qX\xc3]C]\x8b\xa6\xd9\x87\xcc\xc9\xa0>\x92\x0c\x10\x06dFu\x08}\x9d\x91\xa7R`a\xff\xd1*\xa3(\xb6\x13\n&\xaa\x8e\x8d\x84\xc0B\xe5N\x00\xbb\xcf\x15,\xf5-MO\x90\xee\xc4v}>\xc4v=\x7f_n+\xe8/X\xeb\x88PE\xd9\xb2\xf7\x8du\xce\x16\x16\x81\xdaZv\xdb`\xecrVD\x053\x01^;u6\xdcx\xed\x18\xee\xb5;Kq\xdc\x06a|\xcb\xb16\x1eC,\xbb(\x06\xa2=\xb4\x0f;\x08\x81\x10\x01\x02\x9e\x93\x94\x9e\x9f\x9cVrqi\xf9\xc6"jyT\xe7\x12\xbc\xf2\x98\xe9\xf7\x95\x18Q\xd1Q\xd0\xb1\rQF\xbdvq\x7ff:\x9d\xbb_T/1\xd9\xef\x1b\xa3\xd76\x0b\x16\x86\xac\xcd\xf6\x19\x9b\x1ag%\x8c\xd0rL\xfe\xba\xb8\xb9\x90p6\x9aje\x14\xe0\xac\xe0+\xae\xaa\xa6\x18\xeac$%\x07\xd9\xa2\x0b< t\x8a\xddSg\x9a\x1a\xc0\x88uD@\xe4\xc2$X\xf6\xee\xaf\x0f\xc3\xae\xe7\x04\xe2\xd5\x13#^\xf6\xba2\x04"\xb3\x0f\xe11\xb5\x0f\xb4\xd6\xe29\xe8\x8c6\xa7\xe8\xd97\xbaH\xa45\xf7\x8d\xb8\xb8\x95\xdfqr-\xc9\xc3\xa9\xf5\xb9\x8e\xfe[\rb\x02Y\x81\x9e\xa5(\x82\x1a*\x91\xfd\xde\x8f/\xde\x9a\xd9\xe1\x11\xfc"\xad\x9f,\x84\x1c\x8a$b\xc4g\xb6\xd45\xf1\xdc\xb2\xf8Q\xf7P_:\x01?\xe9\xc6\xcb\xaf*\x00\xf8\xe2$G\xa9\x8a\xde\x022\xf4\x88\x88B\nZ\x1e\xce\x00\x8d\xa0\x82\xb2B\xc4!\xac20\xa9P$\x86x\xa9\x88\xb3E\xa6\xbd\x9b\x9f\x8dd\x80\x98[\xf3f[\xfb\x99\xbeg+k\xd0\xc1\xe5\xd66z\x8dT\xe7\x9e\xc2k\x08\x93a\x1f_6\x14C\xa4\x81\xdd\xf4=\x7f@;\xffdQ\xdeX\xae\xfe\xbb\xc2\xc6n\xbb\xd9[\xbd\xcf\xe6X*s5\xf6\x14Q\xdd\x90\t\xff\xea\x84\xc0\xeb\x8a(\x90U\x8cE\x88\xa8\x8cT\x15F#\x15"\x83\xe8\x14\xf8\x12[\x0f\x9e5,\xcf\x90L\xc9\xed\xa6\xa9\x9f\x0e\xcc~F\x8b\xc3y\xfaM\xea\xa7\xa3N\xd1\xf8\x0c\x00:\x8e\x14`\x83\x07\x9aE\x11\n5aZN\xce\xcc1\x044\x85\n\r\x8d\x88\xd0\xa2\x08\x94,:\x19\x1b\x98u\xb8\x98\xcdfv^\xd7\rm\n\t\xbd\xe1\xf7\xd6\xa8\x00\'\x85$4.\x90\xcd\x9e\xa4\x1b@\xa2\xc5\t$\x86\xd0\xb7G\x13\x81d\xe1\xa1\xb2^%\xd4r\xc3x\xc2\xbeK\x19\xf4\xfa\xca\x1c4\x14A\x00~\xc4Dx\x07[\xd3\xd8\x0c\x0c\xf1\xd6\xac\xabQR\xc9\xaf\xaa\xd5\xf0\x9f)\xc0\xb9.vk/\xe1cZ\xdeN\xad*\x8a\xbd"\xad\xd5\xbe\x0e\xcdq\xde\xfc_\xaa\xe9\x11\xe9\xa8\x0b\x88\xdfSMH\xea\x9a/\x84\x1f\x11\x99\x9a\xb7\xcd\xf2\xe7\xb3D\xa6]\xda\xa8\x93\x0c\xa8\x1a\x04>\x8f\xb3\xf5\x9d\xb4\xc3\xbd\xf0f\xdf\xc6\xcf}\xdf\xf5h\x03\x807\xd7?\xd8ox0\x1d\xa6\xfd\xaap\xd7{\xb5\xa4\xfb\xdbb\xe3$}\xa2\x0c\ny\xe9\x94\xde\xa6\x04T)\xf2\xa3\x1e\xc6\xfc\xb9\x1e\x8c\xb8\'\xa0\xc8\x0fR\x1aI\xa2\x02\x89\xd05k\xe7#\xe7\xf9\xdf\xc1\xdd\xb0\x88@8\r\xb7\x8f`\xd2\xfb\x16\x7f\xb3\xe0\xfaj\xa4v,x\xba\x9a\xfeW\rj\x88|\x87\x1fE\xca\xce\xee\xc3\xf0\x00C\x11B\xc3\x07\xf7\xfb\x13\x1b\xdb\xa3\x00\xba\xf1\xd1\x90\xc1\x83!\xed\xee\xe7\x06\x17\x87S\x0c\xee\x7f\xc6\xea^\xb7Fk\xddU\x94\x84\x84#\x92MY\x0e7]\xe6O\x8d\xf5\x1bc\xddY\xf4:\xfb\xb9\xf6\xdf\xeb\xff\x86\xa3\xfd\xd5^Z$P\x98\xc4~\x15\x0c\x95\x1fP\xa3\np&\xb3\xe6\xe5\xd7\x07\xfdZ/\xd8\x18g\xff4\xcc\x0bKm\x1f\xb3\x84.>9\tu?\xb4\x84\xe0kKiN\x8b\xfd\xf9pU\'\xac\xcc\x12\xbeO\xff\xa1\x14G\xf6\xfc\x1e\x0f/\xb1\xb3\xe2!\xba\xa2@\xdf\x03\x95=\x18\x14\xd4\xf0p\xado\x8b\x82A\xd9!\xbc\xe2\x80$q\xb7\xd58\xb5wg"0\xec\'Y\xee\xf6\xb9i\xc62\x84\xc2\x06k\\\xa8R\x11\xb3\xee\xe5Q<v\xea\rW\x9f\x96\xe3\xc2\xb3,\xbb]\xa5\xd9\xa2\xaf\xd87\x9e_5fL\x9d\xa7|a\x95L\x9aE\xc5\xee\x82\x93\xd8\x13\xd0\xc8x\xb6i\x02N\x15~\x88\x90\xe8\xb0\xd5\xcd\xf8?\x10\x0c\x8ds\xbd\xf8p\x9c\x81w\x9f?a>7\x85\xb6\xe9s\x10\x86\x9dz\x1b\xe1t\xb4a\x81\x04z\xe1\xd5\xe3\xfdF\x8c\xec\xc6X$\r\xb4\xd3\xe3\xcc\xc1\xde\xb8\x83\xfeuu(\xc3\xaf\xf0}K\xb6\xa9x+\x01M\xcb\xf5\xc6\xdd\xca\xc7Ls\xf3\x13N\xf0\xea\x19\x9830"\x19\x92\xb8\x97\x9c$\xf2\x1d1f\x0c\xc0#\x039\x96QZ\x95\xd1\x15\'/"\xa7%\xc4b\x8ab;:\'\xd3\x7f\xb5`\x0cG\xac8\xcd\x06y\xdcM\xae%&\xff\x87NL+\x9f\xf8\x9e\x8e\x8e\xc3\x01p\x8fpGQ\xa6?\x8a\x08\xacZc\x13\xe9\xbc\x7f8\xfc\x9f{\x9b\xf1[\xd7\xdeg\xe9d!Y\xee\xbd1?\xba\x16\x87\xf5Y\xff\x81\x81\xfc\xb5O\xc3\xf0^S\xf4^y\xd3vY\xe8\xf9_\xab\xa5!\xfeB\xaa\xa4_\x94lR\x1f}\xf5\xcd\x1a<\xaf\xae\x88`\xcc\x94T\xc3\x94\xa5\xd59\xb4\x8d\xe0a\xdf}\xf9\xbfMWX\x90\xd1\x16\x84!",%\x19\xa0es\xbd"\x1f8\x80\xa0\xbcN\x84\x90\x95\xa0\xe6E\xf9\xe6\xa8|\x1erD9\x8b\xa3\x04\x1a_\xa6\xda\x96\xff\xaa\xcb\x97\xfe~\xa1\xf1\xcd\xfcD\xf6Up\x18$/\xa1c\x17\xf4q\x10\x10@\xa3v76\x8f\xcf\xb0Nl\xaf\x05dY{\x8b\x97\x17\x88\xd1\x83M\x9e\x1e\x1cTn\xa3F\xcc\xe6L*\\\x93#\x8aK\xb6]S\x94\x10H7\xc7\xd8\xf4\xb9\xaa\x7f\xcc\xe9 7a\x84>\x11\x137KT\x8a&\x918\x81{rD\xe7p\xc1\xf1\xe9A\x11beu\xb0\x8b}\x8c\x83\x85\x86\xce\xebP\xbb\x91\x0c=\xa4\x00-\x81\xe4\x82+\x1c4\x84\xdd\xe9\xac\xdf\xe0\x8c\x83\xfd\xe0G\xc4[\xc9\xd3\xd5\xa4\xb7A\xb6\x05\xd8\x92\xc3ov\xd1\x10P\xd6\x80$hhTe\xc9\xf5\xee\xcf\xc1\xf9\xfb\xa6\x10V\xf4S\xbf\x897\xe3\xaa\xc2_\x9b\xbb\xa2\x84\xad\x0fSK\x9b\x9f*}\x910\x81\x8fX\x89w\xc6\xbf\xe3{z\xb7w\xdbX\x8fu\xb3\xd6F~\xb9\xd6\\]\xfd\x92\xc2\xef\x13\xe5\x83\x1f\xaf?\'\x176Gm#\x1e/\xdc\\O\xa6\xc6\xea\n\xe3\x17{$\x94S\xea\xf5\x89\xf5\xf7\xe3^_\xb3]\xae\xc4\xa7\xf4\xc2\xf4\xdd\x93\xd0\xf4\xa23@T!\rlU\xbd)\x86\xbd\xcc\xd8\x15Z\xe4E\x0f\x15\xed%\xd92Ae\x0b\xd0\x17\x1cm\xb7\xb1\xbeb\x18O\xdf\xa5\x12A\xbc6\x0566\x0c\\\xda+;`\xa4\x19\x0b\x95-\xee\xce-\x8b2\x06Cb@\x8b\x06\xca\xfa3@\x1c(\x98h\x9c\xda\xa82\xfd(\x18\x98\xc7\xda\xfb\xaa.\x9el+\xd8\xcc/{C7W^\xff\xe1\xcb\xd8\xe7v\xdc\x15\xdfn\x04\x0e\x04\xe5uK\xdb\x8b\x83\xf5\xe4\xedT\xd9\xa5\xe1\x06d<.\xdc\x023\xbe,\xab*\xf7\x8e\x01\x05\xc8\xc8\x80\xfd\x0c\x89\x1f)\x85\x1f\x98\x94v\xee\x8d\x95\xc1U\xee\xfdK\xe2\x84\xcf\xa8w\xb7X\xd7\xe5\x95 \x0ei\xfd&\x81Q\x9f~U``\x07\xeeb\xbc\xd5HnF\xe8\xc8\x8c\x1duY\x14\x16C\xcf.xP\x89D\x90\xd5\x01\xbc\xdd\xe5\x18\xaeA\x93&\x00q\xbd\xf0\xda\xd3M`\x9f\x99\xe1\xfe\x0f\xbf\xec\xf9\xf5\xce\xe7\xe5\xecx\xd9\x08x\x18W\x81v:\xdf\x91\xee\xf3\xa2\x97\xd7\xd8\x158@\'\x82\x00\xd8l\xb0k\xb0 \xcd\x00_nXW\xae\x12\xa4\xb8\x02D JPa\x9fj\xc8\x07\xb8\x1a\x03J\x17\x0e\x1f\xf1\xcdH\x0b\xfc\x8atx\x9dx\x1d#\x91\xd9\xec\x81\xf2\xe2\xa9\xad\xb7N\x94\xb1\r\xaa\'\xb5\x1a\xb8\xb5\xed\xa6\x05\xb5\xfa#a\xd7#Al\xec\xb3\xa7\xa3{g\xc8\xf1\xb8\x1a\xb5\x10\xd5D\xd5ia/vX\xb0\x19pl\xc5\x8f\x9c\xef\xd91\xcdl\xd6\x83t,\xf9\xc6f]\x19\x9a\x92\x89\x81\xa8\xc2\x071\x13N\x92\tu"\x98\xf8\xaa\x92\x0c\xe8\xf1\x86\xed\xc1.\x1aH\x92g*\x84\x95U\x14LQN\x81\x89\x0e\xa6D\xa6\xdc\xd5\xcd\xa6\xaaiL\xb2^\xf1U\xf5KH\xc6:\xa1:m`R\xe7Y\x18\xa6\xab\x17\xd6\xb1\xb6\x0c\xcb\x1b\x9cU\xc1E\xef\x87V\x91z7U\\\xdd\x8b\xe0~\x1a\xa1\xe4 =\x1a>\x8a\xee\x00\x05!B\xb0H\x00\xd9P\xba\x97\x05\x0f\xd9\x12\xe2\xbcCN\xcc\xe0\xcb\x1b_ \xe2\xf9\'\xaf\xde\xcet9\x9e&l\xb83;;\xc03/\x1d\xc4X\x06\x7fU\x8b\xefa4\xe1\x12\xd0\xd1o\xbc\xfb\x970\x80\xa8\xa0K\xbeV\x16r\x9aZ\x03\xc3\xd3\t#\xc6\xe1\xdf\x04dS<\xc6\x85\xc1\xd1YB\xc0\x81\x98\xf1C\x145\x1c"\xc2\x18\x9f\x1bI\x90t\t\xeaH\x81\xaa\xa1\t\xbb\xe3v\x1dnpD\xe7D2\x93\x88\xf9y\xa8\xe7c"u\x14Q!\xc8\xbe\xfb\\\xe9\x9d6\xd3\x91\xa9f\x05 \x18\xc7\xa0z\x9aE4n\\\xf9\xa0\xafH\x90\x80\x82\xc6\x89,U\xc4\x90\x81+.\x00\x92V\x9d\xbcv\xadL?\x07\rc\x14\xcbx\x9a\xe3Qr\xd8\xd1\xc3v\xf5\xb9\x9c\x94\x99\x07*\xa2\x81Pz(u*%n\xd2\x8adb\x02\xc3\x9eRY-P6\x13\x1c\x14C0\xa2\xacU@3d\x02\x86\x01\x994GsI\x19:p\x9a\xe7\xdd\xa1\xbe\xb2\r\xf2&\xa0\xdbk\xfa!\x1d;\x89\x15\x99\x17L\x85\xd2\xedn \xc4\x0b\x98\x17;\x041m\xb3\xea]m\xc7\xe8\x1fE&h\xd6\xaa\xaaE\xe7\xa0\xde}\xf1\xf0:_R\xee\xa6\xea\xf9\x1eF:\x03y\x9a\xc6\xfc\xd9\xdb\xd6\xb9[^E\x17/\n\x9bp\xad\xcb\xf93\x1f3\x8c\x1e\x9b\xc8\xc2\xd0XL\x08.\\\xb4p\x06d`KI\x90\x96\xb14\x05\x14U\xb6t\x05\x865\xcc\xf4\xdb\x96\x11s\xa2m\x13\xbes\x14\xd4\x94m\xd8\x06\xa0\xf0\x08\xe6%\x16\xfbF\x82\xbd-\x9f\xec\xdd>\xa4\x80)\x94 l\x8c\x05\xce\xce\xd4N\xda\x13L.|\xb7\xfb\x89\x9aG\x0f\x03@\xee\xe0\xa5\xac=t\xf1\x1b\xb1\xbc\x0b\xbd/\x1bj\xf0\x82\x02\xee\n\xe1\xb4\xbb\xa7b\xee|{\xa4\x1c^\xe3\xb5?\xd6^\xf4\xfd\x1dq\x83\xc9`\xc0.\x0c \xaa\x89j\x11\'\x0fZ\xcf\x12\xecn\x8c\x0c\xc8\x1f\xbaA\xfb\x90\xd4\x00T\xd3\x95n\x8b\x88)\x91w\xf4\xaf\x9eg\xadi;\xd2\xfc\xf4\x15\x9f\x08\xfdfd\x1a9\xa9=*\xc1\xe4DV\x0c<\xc0\x1c\xd8 2V\x9e\xbdY\x13\x96\xcd\x10\x91\xeeb8\x8a\x0c\xa6\xa2\xa5 7\xe1\xf8+9\xd25\x82!\xce\x1e&/\x1b\x1b\x88\t>\xa1t\xc9e\xe4G\xbd\xe8f\xcb\xc8oW0\xf2\xc6\x100f-{\xd0\x80\xf5m\xf6z\xdbg\xd3\xe5\xfbq\x8f\xdc\xf3\x17\xf4G\x97F\xff\xbf\t\xc28\xf4\xb2\x8cy\x86@\xd6\x10\xc0`\xbc\xd8\x17\xb9\x19\x9f\x0en\xb8\x98|L\xc0k\x81C!f\xb7\xb8\xa3\xe0-[\x1a\x82\x84\x17\x8c\xceq\xac\x9c~\x9d\x01H\x06\x14j\xc3\xd8\xed\x02)\xca\xd0q\x00*\x037=B\xae\xc9\xa1\xbbn*\xfd\xea\x87\xc0\xb0|\xbb\xa8\x9f4\xf3\x1d\xac\xac\xc7\x06\x97\x90\xa0\x80\'\x927\xab\xe9$&0\x81\xa1A\x97Fv\x80WWS\xc4\x01\x80f\xd2$\x05q\xefH\xbe\xbd6\xd9\xf6\x9a\xb9\xe6\x81\x0f\xa58\xa0\xeb\xa0A\x84\xb7$\x88Ts\xf4\xb8\x1df0\xf4\xcdixt\xaa\xa5\xf5K\xef\x11\xd8gc\xaeOsj\x0cBq\x12f\xf5\xd3\xd2@\x1c\xf6@\xacn\x99\n\x95\xa7\xb4\x95\x9dT\x8b\x08\x81vr!\xaeb\x99\xa9\xd7gi;&\xd8?\x7fYq\xffd\x0fvg\xa8\xec\xba\x81\x92\x17\x03\x19\xf0\xab\x85K\x8d]e\xf4v|R|\xe6\xc9<\xb8\xa95"\x8cST\x94bx\xca\xc9\x95\xfd\xa8\xe2\xb2n\x08\xa3 \x05\xd9g\xdc\xd0\xffc\xd7\xe6d\x0f.kL\x80\x19N\xf1\xe8\xcc;8\x93\xa1\xb4q\xfc@\xd2\x02\xcf\x0c\x10\x99h\xf30\xf3\xd8E\x87\xb1\xe6\xeav.\x87\xbe\x80-\xd7\xddn\xc6\x94\xef\x87a\xce\xda\xa2_\x90<\x1d\xe1\xc5\x00\xf9hg\xb3\x010\xd4!\xb5T\xa6\xcca8\x89O\x04\x12\x9e\xd7\xa5\xa4\x9d\xb7\xc8\xb7\xac\xbd\xd6w|Vppq\x82\xb98\xf3\xe6\xd9\x16\x02=\x1fGY\x9bm!\xae\xe8N9\xc1C\xc6s\x02\x8bZg\xfa\xf5{\'e~\xb2\xd3@"\xe1\x80<M\xd5\x03\x1ep\xa2&\x06W\x93\x9a\x80\x9edK\xda\xef\x06\x07\xb1\x1a\x07\xcf\xd9=\x9c\x9a\xa9\xee\xa5wg\xf9\x9c\x8e\xb3\x86\xc1\x81\xd2P\x9b\xf1aspa`\xa5\xc8\x12\x08\x12\\\xd1\xeel\xfcZ\xaao\x0b\x1c\xc5h\xe6\x04;\x99oG\xe1\xd7\x07\xfc\xd3\xa1\xcdH\t]\xa8[\xae\x1b\x96?#\xd4p\xde\xdd\xc7\xe3;\xda\x81\xbc\xa9\xf2{\x06\x9b\x1c7P\x14r\xb4\x89\xcc\xb9G^\r\xdc\xc3\x98v\xe4\x18\xf0d\xc5\x03c\xd1\r\xcc\xeen\x19\xb5\xa39\xbajo0\xb6\x06\xd7o~\x1b\x83\x12\xa6\xa21\xea9\xe9\x93\xe2\xfa\xa35\xf5\x17\xf6\xd7=\\\xdd\x14k\xf48\xa5\xbbS\xc1\tV\xd0!6\xfe\xae\x17s\xbb\xf5M\xb3\x99\xf4Fs$\xf0w\x1472\x14\xe76e\'@\xda\x88N*,t&,}\xe6\xd4k\x8b`\x0f\x18s\xa3\x80S\x8e\x01\x85\x0c\x01\xbf\xa9\xddN\xc4\x14\x91;\xc5^\xd9\x89u\x82\xb5BP\xb8G[\x06\x88\xb4!3\xc6P\xef\xa5\x17"\xa5\xf4\x1c\xac\xadDJ\x14%v\x9b\xa1\t\xcfj\x8a\xbb\xb0:\xee\xf0\xcb\\\xcb\xa09\x08\x07}\x9d\x1c\x0b\xe0\xa7Uh\x87a\x87\x8e\x1e\xa2~\xcd\x14\xef\xd3V\x7f\x7f\xd9`@U\xcdP\x84\x92L\xb0a\x17\xa3\x9a\xa6E\xf7N\xbeeK\xa4;\xa6\x06\xb2HI\xc6\xc1\xd4C\x06+2[|\x9b\xd4\xfd@gpeR\xbbqd\xd6"\xb0D\x83\x85i\x0fF\xee\xc6,\x90\xd8@\xb4[K\xb7\xc4\xad+3>\x05\x10\x852\x0eC\xa8|\x9b\xdc\x84\xbe\xf1\xe0\x9f\xb1>>,\x14\xbbp\xb8\xeb\x83\xa3q\x9b\xf8\x17O\xd3\xcd\xd19u\xaf3;{\xdar3\\\xc7n|=\xaf*}=u\xd4n\r\xda8[\xce\xea\x18}7 \xb3\xd2n;{=\xcf\xa7C\xb8\xc3\xad\xe2}\x99`%\x17u\xfb{=\xf6\x94\xcd\x86:D\xee\xcb>\x93\xf3\xb9\x16H\x1b(\xd6\xce>\xeb(\x9b\xe6\xeb\xe3r\xf8\xfc=\xb2\xc1\xae}\xba\xe0\x1a\xde)\xc91\n\x822\xe4\x1c\xb6^\xbe\xecf\xf8p\xc7[\xcf\xe6\xee4t\x06\xa1\xda!F\xee\xd0s%|\xb6\xf0HG\xa8\xbe\x99\x9e,z\x8f\xc0\x83\xd9\xcf\xeb\xf9\xd3\xb1\x9a\xdb>\xd3\x07\x1e\xac\x00q(\x81\xb3\xba\xe2\xb1\x7f\x84\xc5\xc6\xa0\x1f\xf0\xa0\x0f\xb3\xaf\xee\xdetHB\xce\xa8\xa3\xcc\x80\xc8`\xe5d\xe6#\x18\xc8O7\xb18\x92\xd78`\x14\xb47\x97\x91\x8d\xae\xb7WZ\xa4\xa3\xa7t\x89dX\x99\xd8\x01=\x059_eA\x12\xb8\x89\xca\xe2\x18\x87\x85@\xba\xc3\xc9\x0c\xa5D\xab\xcb\xfd|\x13\x83K9W\xa0\xd0\xb6\xf2\x16s\x85\x94\x8a\x91\xde?I@\t\xc0\x15l\xa4\x95\xaf\xb3a\x00ec(c\x91\x16\xf1\x86\x83\x11\xe1\x00\xc1\xacW\xd9J\x07\xb0\xed\xf9\xed\x88ns\x9ezDQ\x87\x91\xf0\xad_Gna7B\xde\xc2j\xbeE\xbcls\x15\\\xbe\x11M\'d\xbc\xc9\x00\xd6~\x12\xe4sswJ\x88HxP\x8a\x0bld%\xaey\n,\xbc\x9c\x16\x12\x92\xd5\\\xa4\x9b,m\xcc(\xa2r!\xf2\x01\x00$\xea\x12.!k\x81\t\xe8eT\x9a\x12\xf9\x16\xf5/Q\xcf\x92,T\xe6D\xad\xc1\xa9\x9f\xafk\x85\x87i\'\x17/\x87E;\xb3\x82\xcc\xb8}\x8f\xba\xa1\xde\xd9\x11\xf8<\xe3\nI\x9f=r\x90\xcf9\x8cP\xadF\x01o\xe9Q\x87\x11X\xa2\x8d:}\x054v\x02\x81\xbd\x0c\xa36!\xb4\x14\xd3\x86@J\t\xc4\xb8~`\x82I\x92\xb4\xd5\x07\xc3\xcc\x04\xde\xd3_t\x90\xadE\xbdu\x8b\xdfE\xf8y\xf2:f\xd1:n*q\'#\x95\xcd\xa1\x86J\x16#\x1e\xca\x04c\t\xe6\x03\tR\x8c5\x9a\xf4\xd4\xa3\x17\xde\xc9\xbd\xc8\x836\xab@\xe3\x99H[\xca\xaan\x11\xe7\x16\xad\x08\xf3\xf4\xc1\x1e\x07\xc9U\x950A\xb8t\x17\x1b\xfc\x8d\xf8=\x08\xcd\xa0N2R\x13{\x0f\xa1\x8c\x82}\x16\xa7\xe7o\xf3@\xd1M\x97H{\x83\x92z\xb6%\\q\xcf4{\x1cS\xc8[\xe5g.\x16\xeawS\xfd\x1c\x8b\xaa\x01\xadeO\x96\xbaR\\)\xf2\xd7\xb3\xb6Y2e\x9a)9\x82F]\x11\xc4f\xaen\xd4\x95\xa9)\x15\\[IP\xb2A\xda\xdf\xe8g\x87D\xc0\xe3\x1cY\xcc\x15H\xf6\x8e\x81A{\\\xeb\xcd!&\xb4\x82\x02\xf4`\xad\xe3:\xb2p\x87\x91\xbef\xb5\xd7\xa8\xb9<\xe2\x93\xb55P\xf3\xd9\xb4\xb1\xa3\n\xe3\xf3T\xb0\xbc\x84\xab7u\xb5\xf6\xd4\xb8\xde\xa7eOBv\x12\x831p\xb2C\x85\xd3j\x15TI+\xa9H\x1b\xba\xb7(U\xb1y\xcd\x91\x9b~\xb8G\xc8F\xd8?p\xf5\x9bh\x1e\x9a\x8ax\xe4\xaeXaa\xb2\xa3\xb7\xba\xd6\x8bv\x82\x00lFS!{\x86\x83\x94\xcdd\xb1j5L`6d\x81S\xaa\n2\x99\x99\x11\xcf/3\x15\xf7?U\xb3\x03\xa8g\x95Cm\x1f!9\x93qZ#}\t\x0c]}>*\xf1\x8f~\xb5]LG\x8d1\xf4\x1a#j\xb0@b\xce\xf2\x95\x11A},||\xc5\x06\xcbs\xbb\x82y`(Y\xf2\xe1\x04\x99n\xb6\xb3\x01\x8b\x11k\nK:\xda\xcb`!\xef\xa7x`\x10\x1c\xd4_\x05uUa\x85C\x1c\xce\x95\xec\xe2\x15\xe9@\x08\x88\x0fN.\xe6\xb8\xf5\x07\xb7R!\xe4C\xe7\xacQ\xb4\x9a\x08\x84\xf5T\x8a\xb9\x10\x91"\xf3\x88\xb9y\xf2\xe5\x90\xe6\x01\xd2\xf1\xa1^pc\x07\xa5\xec9\x16\xec.\xf7\x92\x9e\x06\xcbW\xa2\xb3h\xfa7z\xc0\xdd\xab\x8c&\x9a\x0b\x13\x97\xb9TBdq\x9d2\xf6K\xbbb h\xea^\xed\xf1\x97!=\xed\x8b\xf9\xf2\x0c[t\x16$\x11\xde\x16\xc4\xfb44\x11{\xd0CsJ.7[\xa6\x97\xdd\x04\xd6g\xbe\xd3Kk\x1b\xfc\xca\xfd\x9f\x88\xbd\xe0]\x0b\x1d\xf6\xa3\x04\xda\xb0M<4P>\xdba\n\xfe\xf3\x9b\xf7\xdf\xe4\x1f\xc8:\xc3Ix~\x01\x89[\xdc\xc3XV]\xb8\x82PG0\xcb\xdc\xacww\xfc`\xe28\xdc\xdb\xeeh\x04*\xfdq\xd6\x1da\x8c=\xa0Dy\x08\x0e\xa7\xb0 c\xcb\x91N\x17}\xaa\x8e\xbbp\xf1\xe6\x93\xee\xa8\x90\x13.\xae\xdf\xc8\xbb3\xc6\x08\xfd?\r,1\xbfO8\xaf\xcdIa\xf7\t\x96/\xe2f\x03\x0cR\x18\xd8\xbfq\xb1\xca\xc6\x03T\x98\xc7,@(\xca\xbe`\xdb\x10R\xee\xfa\xc4\xbb\xbf5\xfd\xf0\x97~\x1f\x00a\x91\x84\xe9\xac\xd8y\xfd?u\xe6\xee\x0fy\xb5\xbe3\x0fh\x7fp\xd3\xa4\x0e\x86\x14a\xee\xa9\xaf{A\t\xf7\xb8\xf4\x96\x97@;\t\xf9\xbc\xaeOK\xfe\x7f\xe1\xf6\x19\xf3\x1e\xe7\x99J\x16\xc9\x1d\xee\x9b\xe6\xde\xc9\xa40\xe9\xf5\xf88\xa9\x82\x04\xf0l\x81\x89\xa8\x01\xc9S\x17\x9b1\xae\xfe\xbf\x08\xa3\xccG\xf0\x17\xee\x17\xe0\xa2\xf1\xfa\x9f\xe5\xeb\xed\xbc\xec\x90@\xf9\xc7xl\x0b\xe6\x07^\x142\xe9\xc5\xad\xda\x9c\x1d\xd8@\x86\x1e^\x0f\xd4\xd9\xfd\x9d\x81A\xe5\x06\x08m\x8b\x05\xa5h\xa0^\x19\x01\x07\x07\x86\x86,^\xa2\xa6\xdc\xe7\x1e\xca@D\x18\xf4\xef\xa0~\xaf:\x02 4\xea\xd5\xf8\x9f}\xa6\x80X\xce\xf6o\xd4\x8d\x14[\xf5\xd0\x12\x98\xaa(f\x08\xdd\xb4\x04\x8c\xec\xb8\x7f\xed\xee\xf5\x9e\x04@:\xb2\x0c\xb7p\x06\xb9\xd1qA\xe4\x8f\xd8\xce\xe6\x01vq\x9ch\x9f\x0b\x04\xcf\x01\xb0\x80k\x80\xd0\x8c0"\\\x03(MV\x9a)\x8d\x16[\x0b5?\xe0\x19\xf31Q\xfan\x84\xa8\x89\xb9B(5Rj\xf0k\x01\xc3\x97\xc7\x90\x1e\x0f3\x1d#~\x0f\xf1A\x926t\x16\xd8\x11\xc8\x12\x02#O\xd2\xf8\x87U\xc0!\xb5\xeb\x01\xb2\xc9\xa7\xa7\xd9\xb8\xec\xf2\xfe_\x8fQ)\x06P\xb2\xe6\x80!\x84\xbc\xbd"\x91\xe0C\x81\x19\x0e\x19\xc9\x14L\x92\xec\x1a\x83XsiB\'\xe1\xc2)TA4p\xc5\xc4\x91!\xd3EVJ\x13\xc6\x9b\xd8\n5\x81\x00\xc8\x00,\xd5!G\xc2\x1b\xd1F\x00\xc3\xbc\xaaZ\xcc\x91\xf1\xb3\xdd3\xf4\xc33|\x8f\xa1\xcf\x14\xfe\xf7m\xc2\xdez\xfa\xe1p\x97\x89\xc0\x13\x95\xc5\xb5\x96', 142, 143, 'character maps to <undefined>')
command: C:\ProgramData\Anaconda3\Scripts\conda install --file https://repo.continuum.io/pkgs/free/win-32/pyyaml-3.11-py27_3.tar.bz2
user_agent: conda/4.4.7 requests/2.18.4 CPython/3.6.3 Windows/7 Windows/6.1.7601
_messageid: -9223372036837525397
_messagetime: 1515518595057 / 2018-01-09 11:23:15
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", line 743, in __call__
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line 78, in _main
exit_code = do_call(args, p)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 76, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main_install.py", line 11, in execute
install(args, parser, 'install')
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\install.py", line 182, in install
specs.extend(common.specs_from_url(fpath, json=context.json))
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\common.py", line 126, in specs_from_url
for line in open(path):
File "C:\ProgramData\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 142: character maps to <undefined>
```
| The `--file` parameter on `conda install` isn't meant for something like `conda install --file package.tar.bz2` or for `environment.yml` files. Basically, if we have a problem parsing the contents of the file around https://github.com/conda/conda/blob/4.4.11/conda/cli/install.py#L182, we should raise an appropriate `CondaError` with a helpful message.
similar to #6697 | 2019-02-23T18:28:46 |
|
conda/conda | 8,342 | conda__conda-8342 | [
"8341"
] | ad31c75a4e73a423ef584b2918adece9301d6c6e | diff --git a/conda/activate.py b/conda/activate.py
--- a/conda/activate.py
+++ b/conda/activate.py
@@ -530,8 +530,7 @@ def ensure_binary(value):
encoding = 'utf-8'
if on_win:
import ctypes
- acp = ctypes.cdll.kernel32.GetACP()
- encoding = str(acp)
+ encoding = 'cp' + str(ctypes.cdll.kernel32.GetACP())
try:
return value.encode(encoding)
except AttributeError: # pragma: no cover
@@ -736,7 +735,7 @@ def _build_activate_shell_custom(self, export_vars):
if on_win:
import ctypes
export_vars.update({
- "PYTHONIOENCODING": ctypes.cdll.kernel32.GetACP(),
+ "PYTHONIOENCODING": 'cp' + str(ctypes.cdll.kernel32.GetACP()),
})
def _hook_preamble(self):
| diff --git a/tests/test_activate.py b/tests/test_activate.py
--- a/tests/test_activate.py
+++ b/tests/test_activate.py
@@ -38,7 +38,7 @@
if on_win:
import ctypes
- PYTHONIOENCODING = ctypes.cdll.kernel32.GetACP()
+ PYTHONIOENCODING = 'cp' + str(ctypes.cdll.kernel32.GetACP())
else:
PYTHONIOENCODING = None
| LookupError: unknown encoding: 65001 caused by pull/8289
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
![image](https://user-images.githubusercontent.com/4780199/53404057-d250fa00-39ef-11e9-9b54-57a880fc09e7.png)
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
chcp 65001
conda update --all
```
## Expected Behavior
<!-- What do you think should happen? -->
No Exception should be throw
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
user config file : C:\Users\xxxxx\.condarc
populated config files : C:\Users\xxxxx\.condarc
conda version : 4.6.7
conda-build version : not installed
python version : 3.7.2.final.0
base environment : D:\Miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : D:\Miniconda3\pkgs
C:\Users\xxxxx\.conda\pkgs
C:\Users\xxxxx\AppData\Local\conda\conda\pkgs
envs directories : D:\Miniconda3\envs
C:\Users\xxxxx\.conda\envs
C:\Users\xxxxx\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.7 requests/2.21.0 CPython/3.7.2 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> C:\Users\xxxxx\.condarc <==
ssl_verify: True
channels:
- defaults
report_errors: False
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at D:\Miniconda3:
#
# Name Version Build Channel
asn1crypto 0.24.0 py37_0 defaults
backcall 0.1.0 py37_0 defaults
bleach 3.1.0 py37_0 defaults
ca-certificates 2019.1.23 0 defaults
certifi 2018.11.29 py37_0 defaults
cffi 1.11.5 py37h74b6da3_1 defaults
chardet 3.0.4 py37_1 defaults
colorama 0.4.1 py37_0 defaults
conda 4.6.7 py37_0 defaults
conda-env 2.6.0 1 defaults
console_shortcut 0.1.1 3 defaults
cryptography 2.5 py37h7a1dbc1_0 defaults
decorator 4.3.2 py37_0 defaults
entrypoints 0.3 py37_0 defaults
idna 2.8 py37_0 defaults
ipykernel 5.1.0 py37h39e3cac_0 defaults
ipython 7.3.0 py37h39e3cac_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
jedi 0.13.2 py37_0 defaults
jinja2 2.10 py37_0 defaults
jsonschema 2.6.0 py37_0 defaults
jupyter_client 5.2.4 py37_0 defaults
jupyter_core 4.4.0 py37_0 defaults
jupyterlab_server 0.2.0 py37_0 defaults
libsodium 1.0.16 h9d3ae62_0 defaults
m2w64-gcc-libgfortran 5.3.0 6 defaults
m2w64-gcc-libs 5.3.0 7 defaults
m2w64-gcc-libs-core 5.3.0 7 defaults
m2w64-gmp 6.1.0 2 defaults
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 defaults
markupsafe 1.1.0 py37he774522_0 defaults
menuinst 1.4.14 py37hfa6e2cd_0 defaults
mistune 0.8.4 py37he774522_0 defaults
msys2-conda-epoch 20160418 1 defaults
nbconvert 5.3.1 py37_0 defaults
nbformat 4.4.0 py37_0 defaults
notebook 5.7.4 py37_0 defaults
openssl 1.1.1a he774522_0 defaults
pandoc 2.2.3.2 0 defaults
pandocfilters 1.4.2 py37_1 defaults
parso 0.3.2 py37_0 defaults
pickleshare 0.7.5 py37_0 defaults
pip 19.0.1 py37_0 defaults
prometheus_client 0.5.0 py37_0 defaults
prompt_toolkit 2.0.8 py_0 defaults
pycosat 0.6.3 py37hfa6e2cd_0 defaults
pycparser 2.19 py37_0 defaults
pygments 2.3.1 py37_0 defaults
pyopenssl 19.0.0 py37_0 defaults
pysocks 1.6.8 py37_0 defaults
python 3.7.2 h8c8aaf0_10 defaults
python-dateutil 2.7.5 py37_0 defaults
pywin32 223 py37hfa6e2cd_1 defaults
pywinpty 0.5.5 py37_1000 defaults
pyzmq 17.1.2 py37ha925a31_2 defaults
requests 2.21.0 py37_0 defaults
ruamel_yaml 0.15.46 py37hfa6e2cd_0 defaults
send2trash 1.5.0 py37_0 defaults
setuptools 40.8.0 py37_0 defaults
six 1.12.0 py37_0 defaults
sqlite 3.26.0 he774522_0 defaults
terminado 0.8.1 py37_1 defaults
testpath 0.4.2 py37_0 defaults
tornado 5.1.1 py37hfa6e2cd_0 defaults
traitlets 4.3.2 py37_0 defaults
urllib3 1.24.1 py37_0 defaults
vc 14.1 h0510ff6_4 defaults
vs2015_runtime 14.15.26706 h3a45250_0 defaults
wcwidth 0.1.7 py37_0 defaults
webencodings 0.5.1 py37_1 defaults
wheel 0.32.3 py37_0 defaults
win_inet_pton 1.0.1 py37_1 defaults
wincertstore 0.2 py37_0 defaults
winpty 0.4.3 4 defaults
yaml 0.1.7 hc54c509_2 defaults
zeromq 4.3.1 h33f27b4_3 defaults
```
</p></details>
| pr https://github.com/conda/conda/pull/8289 caused this problem by introduce:
```
if on_win:
import ctypes
acp = ctypes.cdll.kernel32.GetACP()
encoding = str(acp)
try:
return value.encode(encoding)
```
https://github.com/conda/conda/blob/master/conda/activate.py#L533-L534
cdll.kernel32.GetACP() returns codepage number, which should not be use as encode format without 'cp' prefix.
instead it should be:
```
encoding = 'cp' + str(cdll.kernel32.GetACP())
```
![image](https://user-images.githubusercontent.com/4780199/53404770-4f30a380-39f1-11e9-9865-201be93efbdb.png)
I believe it also caused issue https://github.com/conda/conda/issues/8327
```
"PYTHONIOENCODING": ctypes.cdll.kernel32.GetACP(),
```
https://github.com/conda/conda/blob/master/conda/activate.py#L739
here should be another problem, 'cp' prefix should be included | 2019-02-26T10:57:13 |
conda/conda | 8,352 | conda__conda-8352 | [
"8347"
] | ad31c75a4e73a423ef584b2918adece9301d6c6e | diff --git a/conda_env/installers/pip.py b/conda_env/installers/pip.py
--- a/conda_env/installers/pip.py
+++ b/conda_env/installers/pip.py
@@ -38,7 +38,7 @@ def _pip_install_via_requirements(prefix, specs, args, *_, **kwargs):
requirements.write('\n'.join(specs))
requirements.close()
# pip command line...
- pip_cmd = ['install', '-r', requirements.name]
+ pip_cmd = ['install', '-r', '"{}"'.format(requirements.name)]
pip_subprocess(pip_cmd, prefix, cwd=pip_workdir)
finally:
# Win/Appveyor does not like it if we use context manager + delete=True.
| Unable to create environment from yml file with pip install
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
I am trying to create an environment on Mac OS using a `.yml` file. This has worked fine in the past, but it doesn't work at all anymore (including with previously used yml files). It spits out a bunch of weird output.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
conda env create -f test.yml
cat test.yml:
name: testpip
channels:
- defaults
- conda-forge
dependencies:
- python
- pip:
- dill
output:
Collecting package metadata: done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
CondaEnvException: Pip subcommand failed with
output:
error: ++ /Users/Michael/.brew/anaconda3/bin/conda shell.posix hook
+ eval 'export CONDA_EXE="/Users/Michael/.brew/anaconda3/bin/conda"
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
__conda_hashr() {
if [ -n "${ZSH_VERSION:+x}" ]; then
\rehash
elif [ -n "${POSH_VERSION:+x}" ]; then
: # pass
else
\hash -r
fi
}
__conda_activate() {
if [ -n "${CONDA_PS1_BACKUP:+x}" ]; then
# Handle transition from shell activated with conda <= 4.3 to a subsequent activation
# after conda updated to >= 4.4. See issue #6173.
PS1="$CONDA_PS1_BACKUP"
\unset CONDA_PS1_BACKUP
fi
\local cmd="$1"
shift
\local ask_conda
ask_conda="$(PS1="$PS1" "$CONDA_EXE" shell.posix "$cmd" "$@")" || \return $?
\eval "$ask_conda"
__conda_hashr
}
__conda_reactivate() {
\local ask_conda
ask_conda="$(PS1="$PS1" "$CONDA_EXE" shell.posix reactivate)" || \return $?
\eval "$ask_conda"
__conda_hashr
}
conda() {
if [ "$#" -lt 1 ]; then
"$CONDA_EXE"
else
\local cmd="$1"
shift
case "$cmd" in
activate|deactivate)
__conda_activate "$cmd" "$@"
;;
install|update|upgrade|remove|uninstall)
"$CONDA_EXE" "$cmd" "$@" && __conda_reactivate
;;
*) "$CONDA_EXE" "$cmd" "$@" ;;
esac
fi
}
if [ -z "${CONDA_SHLVL+x}" ]; then
\export CONDA_SHLVL=0
PATH="$(dirname "$(dirname "$CONDA_EXE")")/condabin:${PATH:-}"
\export PATH
# We'\''re not allowing PS1 to be unbound. It must at least be set.
# However, we'\''re not exporting it, which can cause problems when starting a second shell
# via a first shell (i.e. starting zsh from bash).
if [ -z "${PS1+x}" ]; then
PS1=
fi
fi
conda activate base'
++ export CONDA_EXE=/Users/Michael/.brew/anaconda3/bin/conda
++ CONDA_EXE=/Users/Michael/.brew/anaconda3/bin/conda
++ '[' -z x ']'
++ conda activate base
++ '[' 2 -lt 1 ']'
++ local cmd=activate
++ shift
++ case "$cmd" in
++ __conda_activate activate base
++ '[' -n '' ']'
++ local cmd=activate
++ shift
++ local ask_conda
+++ PS1=
+++ /Users/Michael/.brew/anaconda3/bin/conda shell.posix activate base
++ ask_conda='\export CONDA_PROMPT_MODIFIER='\'''\''
\export CONDA_SHLVL='\''1'\''
\export PATH='\''/Users/Michael/.dotfiles/bin:/Users/Michael/.brew/anaconda3/bin:/Users/Michael/.brew/anaconda3/condabin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin'\'''
++ eval '\export CONDA_PROMPT_MODIFIER='\'''\''
\export CONDA_SHLVL='\''1'\''
\export PATH='\''/Users/Michael/.dotfiles/bin:/Users/Michael/.brew/anaconda3/bin:/Users/Michael/.brew/anaconda3/condabin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin'\'''
+++ export CONDA_PROMPT_MODIFIER=
+++ CONDA_PROMPT_MODIFIER=
+++ export CONDA_SHLVL=1
+++ CONDA_SHLVL=1
+++ export PATH=/Users/Michael/.dotfiles/bin:/Users/Michael/.brew/anaconda3/bin:/Users/Michael/.brew/anaconda3/condabin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin
+++ PATH=/Users/Michael/.dotfiles/bin:/Users/Michael/.brew/anaconda3/bin:/Users/Michael/.brew/anaconda3/condabin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin
++ __conda_hashr
++ '[' -n '' ']'
++ '[' -n '' ']'
++ hash -r
+ conda activate /Users/Michael/.brew/anaconda3/envs/testpip
+ '[' 2 -lt 1 ']'
+ local cmd=activate
+ shift
+ case "$cmd" in
+ __conda_activate activate /Users/Michael/.brew/anaconda3/envs/testpip
+ '[' -n '' ']'
+ local cmd=activate
+ shift
+ local ask_conda
++ PS1=
++ /Users/Michael/.brew/anaconda3/bin/conda shell.posix activate /Users/Michael/.brew/anaconda3/envs/testpip
+ ask_conda='\export CONDA_DEFAULT_ENV='\''testpip'\''
\export CONDA_PREFIX='\''/Users/Michael/.brew/anaconda3/envs/testpip'\''
\export CONDA_PREFIX_1='\''/Users/Michael/.brew/anaconda3'\''
\export CONDA_PROMPT_MODIFIER='\'''\''
\export CONDA_SHLVL='\''2'\''
\export PATH='\''/Users/Michael/.dotfiles/bin:/Users/Michael/.brew/anaconda3/envs/testpip/bin:/Users/Michael/.brew/anaconda3/condabin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin'\'''
+ eval '\export CONDA_DEFAULT_ENV='\''testpip'\''
\export CONDA_PREFIX='\''/Users/Michael/.brew/anaconda3/envs/testpip'\''
\export CONDA_PREFIX_1='\''/Users/Michael/.brew/anaconda3'\''
\export CONDA_PROMPT_MODIFIER='\'''\''
\export CONDA_SHLVL='\''2'\''
\export PATH='\''/Users/Michael/.dotfiles/bin:/Users/Michael/.brew/anaconda3/envs/testpip/bin:/Users/Michael/.brew/anaconda3/condabin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin'\'''
++ export CONDA_DEFAULT_ENV=testpip
++ CONDA_DEFAULT_ENV=testpip
++ export CONDA_PREFIX=/Users/Michael/.brew/anaconda3/envs/testpip
++ CONDA_PREFIX=/Users/Michael/.brew/anaconda3/envs/testpip
++ export CONDA_PREFIX_1=/Users/Michael/.brew/anaconda3
++ CONDA_PREFIX_1=/Users/Michael/.brew/anaconda3
++ export CONDA_PROMPT_MODIFIER=
++ CONDA_PROMPT_MODIFIER=
++ export CONDA_SHLVL=2
++ CONDA_SHLVL=2
++ export PATH=/Users/Michael/.dotfiles/bin:/Users/Michael/.brew/anaconda3/envs/testpip/bin:/Users/Michael/.brew/anaconda3/condabin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin
++ PATH=/Users/Michael/.dotfiles/bin:/Users/Michael/.brew/anaconda3/envs/testpip/bin:/Users/Michael/.brew/anaconda3/condabin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin
+ __conda_hashr
+ '[' -n '' ']'
+ '[' -n '' ']'
+ hash -r
/Users/Michael/.brew/anaconda3/envs/testpip/.tmpjnp3x_cw: line 3: syntax error near unexpected token `('
/Users/Michael/.brew/anaconda3/envs/testpip/.tmpjnp3x_cw: line 3: `pip install -r /[PATH REMOVED FOR PRIVACY (Location of test.yml)]/condaenv.cx06b6nv.requirements.txt'
```
## Expected Behavior
<!-- What do you think should happen? -->
It should install an environment with python and dill. I know that I can install dill with conda directly, but this is just an example package from pip.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : base
active env location : /Users/Michael/.brew/anaconda3
shell level : 1
user config file : /Users/Michael/.condarc
populated config files : /Users/Michael/.condarc
conda version : 4.6.7
conda-build version : 3.17.6
python version : 3.7.1.final.0
base environment : /Users/Michael/.brew/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/Michael/.brew/anaconda3/pkgs
/Users/Michael/.conda/pkgs
envs directories : /Users/Michael/.brew/anaconda3/envs
/Users/Michael/.conda/envs
platform : osx-64
user-agent : conda/4.6.7 requests/2.21.0 CPython/3.7.1 Darwin/18.2.0 OSX/10.14.3
UID:GID : 501:20
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /Users/Michael/.condarc <==
changeps1: False
ssl_verify: True
channels:
- defaults
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
packages in environment at /Users/Michael/.brew/anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0 defaults
alabaster 0.7.12 py37_0 defaults
anaconda 2018.12 py37_0 defaults
anaconda-client 1.7.2 py37_0 defaults
anaconda-navigator 1.9.6 py37_0 defaults
anaconda-project 0.8.2 py37_0 defaults
appnope 0.1.0 py37_0 defaults
appscript 1.0.1 py37h1de35cc_1 defaults
asn1crypto 0.24.0 py37_0 defaults
astroid 2.1.0 py37_0 defaults
astropy 3.1 py37h1de35cc_0 defaults
atomicwrites 1.2.1 py37_0 defaults
attrs 18.2.0 py37h28b3542_0 defaults
babel 2.6.0 py37_0 defaults
backcall 0.1.0 py37_0 defaults
backports 1.0 py37_1 defaults
backports.os 0.1.1 py37_0 defaults
backports.shutil_get_terminal_size 1.0.0 py37_2 defaults
beautifulsoup4 4.6.3 py37_0 defaults
bitarray 0.8.3 py37h1de35cc_0 defaults
bkcharts 0.2 py37_0 defaults
blas 1.0 mkl defaults
blaze 0.11.3 py37_0 defaults
bleach 3.0.2 py37_0 defaults
blosc 1.14.4 hd9629dc_0 defaults
bokeh 1.0.2 py37_0 defaults
boto 2.49.0 py37_0 defaults
bottleneck 1.2.1 py37h1d22016_1 defaults
bzip2 1.0.6 h1de35cc_5 defaults
ca-certificates 2018.03.07 0 defaults
certifi 2018.11.29 py37_0 defaults
cffi 1.11.5 py37h6174b99_1 defaults
chardet 3.0.4 py37_1 defaults
click 7.0 py37_0 defaults
cloudpickle 0.6.1 py37_0 defaults
clyent 1.2.2 py37_1 defaults
colorama 0.4.1 py37_0 defaults
conda 4.6.7 py37_0 defaults
conda-build 3.17.6 py37_0 defaults
conda-env 2.6.0 1 defaults
conda-verify 3.1.1 py37_0 defaults
contextlib2 0.5.5 py37_0 defaults
cryptography 2.4.2 py37ha12b0ac_0 defaults
curl 7.63.0 ha441bb4_1000 defaults
cycler 0.10.0 py37_0 defaults
cython 0.29.2 py37h0a44026_0 defaults
cytoolz 0.9.0.1 py37h1de35cc_1 defaults
dask 1.0.0 py37_0 defaults
dask-core 1.0.0 py37_0 defaults
datashape 0.5.4 py37_1 defaults
dbus 1.13.2 h760590f_1 defaults
decorator 4.3.0 py37_0 defaults
defusedxml 0.5.0 py37_1 defaults
distributed 1.25.1 py37_0 defaults
docutils 0.14 py37_0 defaults
entrypoints 0.2.3 py37_2 defaults
et_xmlfile 1.0.1 py37_0 defaults
expat 2.2.6 h0a44026_0 defaults
fastcache 1.0.2 py37h1de35cc_2 defaults
filelock 3.0.10 py37_0 defaults
flask 1.0.2 py37_1 defaults
flask-cors 3.0.7 py37_0 defaults
freetype 2.9.1 hb4e5f40_0 defaults
future 0.17.1 py37_0 defaults
get_terminal_size 1.0.0 h7520d66_0 defaults
gettext 0.19.8.1 h15daf44_3 defaults
gevent 1.3.7 py37h1de35cc_1 defaults
glib 2.56.2 hd9629dc_0 defaults
glob2 0.6 py37_1 defaults
gmp 6.1.2 hb37e062_1 defaults
gmpy2 2.0.8 py37h6ef4df4_2 defaults
greenlet 0.4.15 py37h1de35cc_0 defaults
h5py 2.8.0 py37h878fce3_3 defaults
hdf5 1.10.2 hfa1e0ec_1 defaults
heapdict 1.0.0 py37_2 defaults
html5lib 1.0.1 py37_0 defaults
icu 58.2 h4b95b61_1 defaults
idna 2.8 py37_0 defaults
imageio 2.4.1 py37_0 defaults
imagesize 1.1.0 py37_0 defaults
importlib_metadata 0.6 py37_0 defaults
intel-openmp 2019.1 144 defaults
ipykernel 5.1.0 py37h39e3cac_0 defaults
ipython 7.2.0 py37h39e3cac_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
ipywidgets 7.4.2 py37_0 defaults
isort 4.3.4 py37_0 defaults
itsdangerous 1.1.0 py37_0 defaults
jbig 2.1 h4d881f8_0 defaults
jdcal 1.4 py37_0 defaults
jedi 0.13.2 py37_0 defaults
jinja2 2.10 py37_0 defaults
jpeg 9b he5867d9_2 defaults
jsonschema 2.6.0 py37_0 defaults
jupyter 1.0.0 py37_7 defaults
jupyter_client 5.2.4 py37_0 defaults
jupyter_console 6.0.0 py37_0 defaults
jupyter_core 4.4.0 py37_0 defaults
jupyterlab 0.35.3 py37_0 defaults
jupyterlab_server 0.2.0 py37_0 defaults
keyring 17.0.0 py37_0 defaults
kiwisolver 1.0.1 py37h0a44026_0 defaults
krb5 1.16.1 hddcf347_7 defaults
lazy-object-proxy 1.3.1 py37h1de35cc_2 defaults
libarchive 3.3.3 h786848e_5 defaults
libcurl 7.63.0 h051b688_1000 defaults
libcxx 4.0.1 hcfea43d_1 defaults
libcxxabi 4.0.1 hcfea43d_1 defaults
libedit 3.1.20170329 hb402a30_2 defaults
libffi 3.2.1 h475c297_4 defaults
libgfortran 3.0.1 h93005f0_2 defaults
libiconv 1.15 hdd342a3_7 defaults
liblief 0.9.0 h2a1bed3_0 defaults
libpng 1.6.35 ha441bb4_0 defaults
libsodium 1.0.16 h3efe00b_0 defaults
libssh2 1.8.0 ha12b0ac_4 defaults
libtiff 4.0.9 hcb84e12_2 defaults
libxml2 2.9.8 hab757c2_1 defaults
libxslt 1.1.32 hb819dd2_0 defaults
llvmlite 0.26.0 py37h8c7ce04_0 defaults
locket 0.2.0 py37_1 defaults
lxml 4.2.5 py37hef8c89e_0 defaults
lz4-c 1.8.1.2 h1de35cc_0 defaults
lzo 2.10 h362108e_2 defaults
markupsafe 1.1.0 py37h1de35cc_0 defaults
matplotlib 3.0.2 py37h54f8f79_0 defaults
mccabe 0.6.1 py37_1 defaults
mistune 0.8.4 py37h1de35cc_0 defaults
mkl 2019.1 144 defaults
mkl-service 1.1.2 py37hfbe908c_5 defaults
mkl_fft 1.0.6 py37h27c97d8_0 defaults
mkl_random 1.0.2 py37h27c97d8_0 defaults
more-itertools 4.3.0 py37_0 defaults
mpc 1.1.0 h6ef4df4_1 defaults
mpfr 4.0.1 h3018a27_3 defaults
mpmath 1.1.0 py37_0 defaults
msgpack-python 0.5.6 py37h04f5b5a_1 defaults
multipledispatch 0.6.0 py37_0 defaults
navigator-updater 0.2.1 py37_0 defaults
nb_conda_kernels 2.2.0 py37_1 defaults
nbconvert 5.4.0 py37_1 defaults
nbformat 4.4.0 py37_0 defaults
ncurses 6.1 h0a44026_1 defaults
networkx 2.2 py37_1 defaults
nltk 3.4 py37_1 defaults
nodejs 10.13.0 h0a44026_0 defaults
nose 1.3.7 py37_2 defaults
notebook 5.7.4 py37_0 defaults
numba 0.41.0 py37h6440ff4_0 defaults
numexpr 2.6.8 py37h7413580_0 defaults
numpy 1.15.4 py37hacdab7b_0 defaults
numpy-base 1.15.4 py37h6575580_0 defaults
numpydoc 0.8.0 py37_0 defaults
odo 0.5.1 py37_0 defaults
olefile 0.46 py37_0 defaults
openpyxl 2.5.12 py37_0 defaults
openssl 1.1.1a h1de35cc_0 defaults
packaging 18.0 py37_0 defaults
pandas 0.23.4 py37h6440ff4_0 defaults
pandoc 1.19.2.1 ha5e8f32_1 defaults
pandocfilters 1.4.2 py37_1 defaults
parso 0.3.1 py37_0 defaults
partd 0.3.9 py37_0 defaults
path.py 11.5.0 py37_0 defaults
pathlib2 2.3.3 py37_0 defaults
patsy 0.5.1 py37_0 defaults
pcre 8.42 h378b8a2_0 defaults
pep8 1.7.1 py37_0 defaults
pexpect 4.6.0 py37_0 defaults
pickleshare 0.7.5 py37_0 defaults
pillow 5.3.0 py37hb68e598_0 defaults
pip 18.1 py37_0 defaults
pkginfo 1.4.2 py37_1 defaults
pluggy 0.8.0 py37_0 defaults
ply 3.11 py37_0 defaults
prometheus_client 0.5.0 py37_0 defaults
prompt_toolkit 2.0.7 py37_0 defaults
psutil 5.4.8 py37h1de35cc_0 defaults
ptyprocess 0.6.0 py37_0 defaults
py 1.7.0 py37_0 defaults
py-lief 0.9.0 py37hd4eaf27_0 defaults
pycodestyle 2.4.0 py37_0 defaults
pycosat 0.6.3 py37h1de35cc_0 defaults
pycparser 2.19 py37_0 defaults
pycrypto 2.6.1 py37h1de35cc_9 defaults
pycurl 7.43.0.2 py37ha12b0ac_0 defaults
pyflakes 2.0.0 py37_0 defaults
pygments 2.3.1 py37_0 defaults
pylint 2.2.2 py37_0 defaults
pyodbc 4.0.25 py37h0a44026_0 defaults
pyopenssl 18.0.0 py37_0 defaults
pyparsing 2.3.0 py37_0 defaults
pyqt 5.9.2 py37h655552a_2 defaults
pysocks 1.6.8 py37_0 defaults
pytables 3.4.4 py37h13cba08_0 defaults
pytest 4.0.2 py37_0 defaults
pytest-arraydiff 0.3 py37h39e3cac_0 defaults
pytest-astropy 0.5.0 py37_0 defaults
pytest-doctestplus 0.2.0 py37_0 defaults
pytest-openfiles 0.3.1 py37_0 defaults
pytest-remotedata 0.3.1 py37_0 defaults
python 3.7.1 haf84260_7 defaults
python-dateutil 2.7.5 py37_0 defaults
python-libarchive-c 2.8 py37_6 defaults
python.app 2 py37_9 defaults
pytz 2018.7 py37_0 defaults
pywavelets 1.0.1 py37h1d22016_0 defaults
pyyaml 3.13 py37h1de35cc_0 defaults
pyzmq 17.1.2 py37h1de35cc_0 defaults
qt 5.9.7 h468cd18_1 defaults
qtawesome 0.5.3 py37_0 defaults
qtconsole 4.4.3 py37_0 defaults
qtpy 1.5.2 py37_0 defaults
readline 7.0 h1de35cc_5 defaults
requests 2.21.0 py37_0 defaults
rope 0.11.0 py37_0 defaults
ruamel_yaml 0.15.46 py37h1de35cc_0 defaults
scikit-image 0.14.1 py37h0a44026_0 defaults
scikit-learn 0.20.1 py37h27c97d8_0 defaults
scipy 1.1.0 py37h1410ff5_2 defaults
seaborn 0.9.0 py37_0 defaults
send2trash 1.5.0 py37_0 defaults
setuptools 40.6.3 py37_0 defaults
simplegeneric 0.8.1 py37_2 defaults
singledispatch 3.4.0.3 py37_0 defaults
sip 4.19.8 py37h0a44026_0 defaults
six 1.12.0 py37_0 defaults
snappy 1.1.7 he62c110_3 defaults
snowballstemmer 1.2.1 py37_0 defaults
sortedcollections 1.0.1 py37_0 defaults
sortedcontainers 2.1.0 py37_0 defaults
sphinx 1.8.2 py37_0 defaults
sphinxcontrib 1.0 py37_1 defaults
sphinxcontrib-websupport 1.1.0 py37_1 defaults
spyder 3.3.2 py37_0 defaults
spyder-kernels 0.3.0 py37_0 defaults
sqlalchemy 1.2.15 py37h1de35cc_0 defaults
sqlite 3.26.0 ha441bb4_0 defaults
statsmodels 0.9.0 py37h1d22016_0 defaults
sympy 1.3 py37_0 defaults
tblib 1.3.2 py37_0 defaults
terminado 0.8.1 py37_1 defaults
testpath 0.4.2 py37_0 defaults
tk 8.6.8 ha441bb4_0 defaults
toolz 0.9.0 py37_0 defaults
tornado 5.1.1 py37h1de35cc_0 defaults
tqdm 4.28.1 py37h28b3542_0 defaults
traitlets 4.3.2 py37_0 defaults
unicodecsv 0.14.1 py37_0 defaults
unixodbc 2.3.7 h1de35cc_0 defaults
urllib3 1.24.1 py37_0 defaults
wcwidth 0.1.7 py37_0 defaults
webencodings 0.5.1 py37_1 defaults
werkzeug 0.14.1 py37_0 defaults
wheel 0.32.3 py37_0 defaults
widgetsnbextension 3.4.2 py37_0 defaults
wrapt 1.10.11 py37h1de35cc_2 defaults
wurlitzer 1.0.2 py37_0 defaults
xlrd 1.2.0 py37_0 defaults
xlsxwriter 1.1.2 py37_0 defaults
xlwings 0.15.1 py37_0 defaults
xlwt 1.3.0 py37_0 defaults
xz 5.2.4 h1de35cc_4 defaults
yaml 0.1.7 hc338f04_2 defaults
zeromq 4.2.5 h0a44026_1 defaults
zict 0.1.3 py37_0 defaults
zlib 1.2.11 h1de35cc_3 defaults
zstd 1.3.7 h5bba6e5_0 defaults
```
</p></details>
| We don't really support installing anaconda inside of homebrew. If you can identify what problem appears to happen with our activation script:
```
/Users/Michael/.brew/anaconda3/envs/testpip/.tmpjnp3x_cw: line 3: syntax error near unexpected token `('
```
We'd be happy to take a look. However, your configuration may be a problem here. The recent change that happened was to activate the conda env that is created prior to running pip. This code does work in our tests, but there's always room for something on your system that our code doesn't account for.
https://github.com/conda/conda/blob/master/conda_env/pip_util.py#L24
https://github.com/conda/conda/blob/master/conda/utils.py#L262-L288
Thanks for the response. I can't see why homebrew would make any difference, it's just like installing Anaconda to a different directory, right?
This has been working fine forever, it just broke today. I'm happy to help diagnose the issue, but I don't understand the code you linked to well enough to figure out the error directly. Any pointers?
As I suspected, this isn't an issue with homebrew. I just installed the distribution of anaconda straight from the website, then did `conda update conda`, and then ran `conda env create -f test.yml`. The output is below.
```
Collecting package metadata: done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
CondaEnvException: Pip subcommand failed with
output:
error: ++ /Users/Michael/anaconda3/bin/conda shell.posix hook
+ eval 'export CONDA_EXE="/Users/Michael/anaconda3/bin/conda"
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
__conda_hashr() {
if [ -n "${ZSH_VERSION:+x}" ]; then
\rehash
elif [ -n "${POSH_VERSION:+x}" ]; then
: # pass
else
\hash -r
fi
}
__conda_activate() {
if [ -n "${CONDA_PS1_BACKUP:+x}" ]; then
# Handle transition from shell activated with conda <= 4.3 to a subsequent activation
# after conda updated to >= 4.4. See issue #6173.
PS1="$CONDA_PS1_BACKUP"
\unset CONDA_PS1_BACKUP
fi
\local cmd="$1"
shift
\local ask_conda
ask_conda="$(PS1="$PS1" "$CONDA_EXE" shell.posix "$cmd" "$@")" || \return $?
\eval "$ask_conda"
__conda_hashr
}
__conda_reactivate() {
\local ask_conda
ask_conda="$(PS1="$PS1" "$CONDA_EXE" shell.posix reactivate)" || \return $?
\eval "$ask_conda"
__conda_hashr
}
conda() {
if [ "$#" -lt 1 ]; then
"$CONDA_EXE"
else
\local cmd="$1"
shift
case "$cmd" in
activate|deactivate)
__conda_activate "$cmd" "$@"
;;
install|update|upgrade|remove|uninstall)
"$CONDA_EXE" "$cmd" "$@" && __conda_reactivate
;;
*) "$CONDA_EXE" "$cmd" "$@" ;;
esac
fi
}
if [ -z "${CONDA_SHLVL+x}" ]; then
\export CONDA_SHLVL=0
PATH="$(dirname "$(dirname "$CONDA_EXE")")/condabin:${PATH:-}"
\export PATH
# We'\''re not allowing PS1 to be unbound. It must at least be set.
# However, we'\''re not exporting it, which can cause problems when starting a second shell
# via a first shell (i.e. starting zsh from bash).
if [ -z "${PS1+x}" ]; then
PS1=
fi
fi
conda activate base'
++ export CONDA_EXE=/Users/Michael/anaconda3/bin/conda
++ CONDA_EXE=/Users/Michael/anaconda3/bin/conda
++ '[' -z x ']'
++ conda activate base
++ '[' 2 -lt 1 ']'
++ local cmd=activate
++ shift
++ case "$cmd" in
++ __conda_activate activate base
++ '[' -n '' ']'
++ local cmd=activate
++ shift
++ local ask_conda
+++ PS1=
+++ /Users/Michael/anaconda3/bin/conda shell.posix activate base
++ ask_conda='\export CONDA_PROMPT_MODIFIER='\'''\''
\export CONDA_SHLVL='\''1'\''
\export PATH='\''/Users/Michael/.dotfiles/bin:/Users/Michael/anaconda3/bin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin'\'''
++ eval '\export CONDA_PROMPT_MODIFIER='\'''\''
\export CONDA_SHLVL='\''1'\''
\export PATH='\''/Users/Michael/.dotfiles/bin:/Users/Michael/anaconda3/bin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin'\'''
+++ export CONDA_PROMPT_MODIFIER=
+++ CONDA_PROMPT_MODIFIER=
+++ export CONDA_SHLVL=1
+++ CONDA_SHLVL=1
+++ export PATH=/Users/Michael/.dotfiles/bin:/Users/Michael/anaconda3/bin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin
+++ PATH=/Users/Michael/.dotfiles/bin:/Users/Michael/anaconda3/bin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin
++ __conda_hashr
++ '[' -n '' ']'
++ '[' -n '' ']'
++ hash -r
+ conda activate /Users/Michael/anaconda3/envs/testpip
+ '[' 2 -lt 1 ']'
+ local cmd=activate
+ shift
+ case "$cmd" in
+ __conda_activate activate /Users/Michael/anaconda3/envs/testpip
+ '[' -n '' ']'
+ local cmd=activate
+ shift
+ local ask_conda
++ PS1=
++ /Users/Michael/anaconda3/bin/conda shell.posix activate /Users/Michael/anaconda3/envs/testpip
+ ask_conda='\export CONDA_DEFAULT_ENV='\''testpip'\''
\export CONDA_PREFIX='\''/Users/Michael/anaconda3/envs/testpip'\''
\export CONDA_PREFIX_1='\''/Users/Michael/anaconda3'\''
\export CONDA_PROMPT_MODIFIER='\'''\''
\export CONDA_SHLVL='\''2'\''
\export PATH='\''/Users/Michael/.dotfiles/bin:/Users/Michael/anaconda3/envs/testpip/bin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin'\'''
+ eval '\export CONDA_DEFAULT_ENV='\''testpip'\''
\export CONDA_PREFIX='\''/Users/Michael/anaconda3/envs/testpip'\''
\export CONDA_PREFIX_1='\''/Users/Michael/anaconda3'\''
\export CONDA_PROMPT_MODIFIER='\'''\''
\export CONDA_SHLVL='\''2'\''
\export PATH='\''/Users/Michael/.dotfiles/bin:/Users/Michael/anaconda3/envs/testpip/bin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin'\'''
++ export CONDA_DEFAULT_ENV=testpip
++ CONDA_DEFAULT_ENV=testpip
++ export CONDA_PREFIX=/Users/Michael/anaconda3/envs/testpip
++ CONDA_PREFIX=/Users/Michael/anaconda3/envs/testpip
++ export CONDA_PREFIX_1=/Users/Michael/anaconda3
++ CONDA_PREFIX_1=/Users/Michael/anaconda3
++ export CONDA_PROMPT_MODIFIER=
++ CONDA_PROMPT_MODIFIER=
++ export CONDA_SHLVL=2
++ CONDA_SHLVL=2
++ export PATH=/Users/Michael/.dotfiles/bin:/Users/Michael/anaconda3/envs/testpip/bin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin
++ PATH=/Users/Michael/.dotfiles/bin:/Users/Michael/anaconda3/envs/testpip/bin:/Applications/CPLEX_Studio128/cplex/bin/x86-64_osx:/Users/Michael/.brew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/opt/X11/bin
+ __conda_hashr
+ '[' -n '' ']'
+ '[' -n '' ']'
+ hash -r
/Users/Michael/anaconda3/envs/testpip/.tmp3af49sb0: line 3: syntax error near unexpected token `('
/Users/Michael/anaconda3/envs/testpip/.tmp3af49sb0: line 3: `pip install -r /[REMOVED FOR PRIVACY]/condaenv.c163kmcx.requirements.txt'
```
```
conda info
active environment : base
active env location : /Users/Michael/anaconda3
shell level : 1
user config file : /Users/Michael/.condarc
populated config files : /Users/Michael/.condarc
conda version : 4.6.7
conda-build version : 3.17.6
python version : 3.7.1.final.0
base environment : /Users/Michael/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/Michael/anaconda3/pkgs
/Users/Michael/.conda/pkgs
envs directories : /Users/Michael/anaconda3/envs
/Users/Michael/.conda/envs
platform : osx-64
user-agent : conda/4.6.7 requests/2.21.0 CPython/3.7.1 Darwin/18.2.0 OSX/10.14.3
UID:GID : 501:20
netrc file : None
offline mode : False
```
```
conda config --show-sources
==> /Users/Michael/.condarc <==
changeps1: False
ssl_verify: True
channels:
- defaults
```
I activate conda by sourcing `. $HOME/anaconda3/etc/profile.d/conda.sh` in my .bashrc.
This seems like a bug in anaconda, not related homebrew. Can you help me diagnose it?
Homebrew-installed Anaconda is a package manager managing a package manager. It seems they don't do any real customization, aside from possibly requiring sudo: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/anaconda.rb - so maybe it's not that bad. It's still a bad idea in general, and even worse the more conflated and opinionated brew is with its anaconda installation. Opinions are fine, but when those opinions become adopted by others who don't necessarily even understand that they're straying from default behavior, they give maintainers headaches. The same can be said for us when we patch software to make it behave slightly differently and cause problems.
Anyway, to troubleshoot this, you'll want to open this file:
/Users/Michael/.brew/anaconda3/lib/python3.7/site-packages/conda/conda_env/pip_util.py
Put a breakpoint in here:
https://github.com/conda/conda/blob/master/conda_env/pip_util.py#L31
```
import pdb; pdb.set_trace()
```
now run your conda env create command. When it gets to the PDB prompt, print out the location of the temporary file:
```
print(script_caller)
```
Find that file on your hard drive and upload it here. There's some shell script error here that may also involve your shell rc file. What shell do you use? Have you run ``conda init``? We may need to look at the rc file for your shell to figure out where the syntax error is coming in.
Thanks for the reply. Hopefully you saw my last comment that this is unrelated to homebrew. The same thing happens with a fresh install of Anaconda from the website. The contents of `script_caller` are:
```
eval "$("/Users/Michael/.brew/anaconda3/bin/conda" "shell.posix" "hook")"
conda activate "/Users/Michael/.brew/anaconda3/envs/testpip"
pip install -r /Users/Michael/[PATH TO test.yml]/condaenv.4s068msn.requirements.txt
```
and the contents of `condaenv.4s068msn.requirements.txt` are:
```
dill
```
There are no newlines at the end of either file. As I stated in my previous comment, the way that I get anaconda on the path (and the conda command set up) is by sourcing `conda.sh` with `. $HOME/anaconda3/etc/profile.d/conda.sh` in my `.bashrc` (I use bash, obviously).
I can't find any other issues with conda, everything else seems to be working fine. Thoughts?
Also, my .inputrc is
```
$include /etc/inputrc
"\C-p":history-search-backward
"\C-n":history-search-forward
set colored-stats On
set completion-ignore-case On
set completion-prefix-display-length 3
set mark-symlinked-directories On
set show-all-if-ambiguous On
set show-all-if-unmodified On
set visible-stats On
```
in case that helps (given that you said there was some rc stuff happening).
I've solved it. There can't be a space in the path to the environment file. I'm not sure what has changed that is causing the bug, but as long as `test.yml` doesn't have a space in the path to it, everything is fine. If there is a space, I get the error.
I suspect that the `pip install -r path/to/test directory/test.yml` is the problem. It needs to be quoted. I can't figure out where the args for pip get set up, but whenever that happens, the path to the temporary requirements.txt file needs to be quoted (since that is created in the same directory as the .yml file).
Do you see where the fix needs to happen?
I suspect the line that needs to change is [here](https://github.com/conda/conda/blob/43aae7c6957bb771423f6a178d37704bc8739b36/conda_env/installers/pip.py#L41).
Just to follow up, if you change the line [here](https://github.com/conda/conda/blob/43aae7c6957bb771423f6a178d37704bc8739b36/conda_env/installers/pip.py#L41) from:
```
pip_cmd = ['install', '-r', requirements.name]
```
to
```
pip_cmd = ['install', '-r', '"{}"'.format(requirements.name)]
```
The problem goes away. The output of the tmp file that is created is now:
```
eval "$("/Users/Michael/.brew/anaconda3/bin/conda" "shell.posix" "hook")"
conda activate "/Users/Michael/.brew/anaconda3/envs/testpip"
pip install -r "/Users/Michael/test directory/condaenv.phc8fpjk.requirements.txt"
```
Which properly quotes the space.
Though, I haven't tested that change thoroughly, so I don't know if it could possibly break something else.
Thanks for your help in isolating the issue. We'll have it fixed in the
next release. If you'd like credit for your work in sorting this out,
please consider submitting a PR with your changes.
On Tue, Feb 26, 2019, 19:19 albertmichaelj <[email protected]> wrote:
> Just to follow up, if you change the link here
> <https://github.com/conda/conda/blob/43aae7c6957bb771423f6a178d37704bc8739b36/conda_env/installers/pip.py#L41>
> from:
>
> pip_cmd = ['install', '-r', requirements.name]
>
> to
>
> pip_cmd = ['install', '-r', '"{}"'.format(requirements.name)]
>
> The problem goes away. The output of the tmp file that is created is now:
>
> eval "$("/Users/Michael/.brew/anaconda3/bin/conda" "shell.posix" "hook")"
> conda activate "/Users/Michael/.brew/anaconda3/envs/testpip"
> pip install -r "/Users/Michael/test directory/condaenv.phc8fpjk.requirements.txt"
>
> Which properly quotes the space.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8347#issuecomment-467683852>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AACV-Y_w7Iz81SPvfCWkARCHaAPwrDVQks5vRd0bgaJpZM4bTFg9>
> .
>
| 2019-02-27T13:17:02 |
|
conda/conda | 8,444 | conda__conda-8444 | [
"8391"
] | b94d9f4d750c8028531eb589a5e2d7fad819d806 | diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -354,9 +354,19 @@ def _find_inconsistent_packages(self, ssc):
log.debug("inconsistent precs: %s",
dashlist(inconsistent_precs) if inconsistent_precs else 'None')
if inconsistent_precs:
+ print(dedent("""
+ The environment is inconsistent, please check the package plan carefully
+ The following packages are causing the inconsistency:"""))
+ print(dashlist(inconsistent_precs))
for prec in inconsistent_precs:
# pop and save matching spec in specs_map
- ssc.add_back_map[prec.name] = (prec, ssc.specs_map.pop(prec.name, None))
+ spec = ssc.specs_map.pop(prec.name, None)
+ ssc.add_back_map[prec.name] = (prec, spec)
+ # inconsistent environments should maintain the python version
+ # unless explicitly requested by the user. This along with the logic in
+ # _add_specs maintains the major.minor version
+ if prec.name == 'python':
+ ssc.specs_map['python'] = spec
ssc.solution_precs = tuple(prec for prec in ssc.solution_precs
if prec not in inconsistent_precs)
return ssc
diff --git a/conda/resolve.py b/conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -892,6 +892,13 @@ def bad_installed(self, installed, new_specs):
sat_name_map[self.to_sat_name(prec)] = prec
specs.append(MatchSpec('%s %s %s' % (prec.name, prec.version, prec.build)))
new_index = {prec: prec for prec in itervalues(sat_name_map)}
+ name_map = {p.name: p for p in new_index}
+ if 'python' in name_map and 'pip' not in name_map:
+ python_prec = new_index[name_map['python']]
+ if 'pip' in python_prec.depends:
+ # strip pip dependency from python if not installed in environment
+ new_deps = [d for d in python_prec.depends if d != 'pip']
+ python_prec.depends = new_deps
r2 = Resolve(new_index, True, channels=self.channels)
C = r2.gen_clauses()
constraints = r2.generate_spec_constraints(C, specs)
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -598,7 +598,7 @@ def test_create_empty_env(self):
assert stderr == ''
self.assertIsInstance(stdout, str)
- @pytest.mark.skipif(on_win and context.subdir == "win-32", reason="conda-forge doesn't do win-32")
+ @pytest.mark.skipif(reason="conda-forge doesn't have a full set of packages")
def test_strict_channel_priority(self):
stdout, stderr = run_command(
Commands.CREATE, "/",
diff --git a/tests/test_resolve.py b/tests/test_resolve.py
--- a/tests/test_resolve.py
+++ b/tests/test_resolve.py
@@ -1030,6 +1030,20 @@ def test_broken_install():
# always insure installed packages _are_ in the index
+def test_pip_depends_removed_on_inconsistent_env():
+ installed = r.install(['python 2.7*'])
+ pkg_names = [p.name for p in installed]
+ assert 'python' in pkg_names
+ assert 'pip' not in pkg_names
+ # add pip as python dependency
+ for pkg in installed:
+ if pkg.name == 'python':
+ pkg.depends += ('pip', )
+ assert pkg.name != 'pip'
+ bad_pkgs = r.bad_installed(installed, [])[0]
+ assert bad_pkgs is None
+
+
def test_remove():
installed = r.install(['pandas', 'python 2.7*'])
_installed = [rec.dist_str() for rec in installed]
| conda install command upgraded Python from 3.6 to 3.7 but did not upgrade all other packages
## Current Behavior
I'm using my "catch-all" environment where I have a whole bunch of stuff installed, managed by conda. The full revision history is below. I tried to install two packages (that were possibly already there). The package plan upgraded Python to 3.7, which I would expect to upgrade *all* packages, at least those that are not pure Python.
After I proceeded with the installation against my better judgment, indeed, everything was borked — IPython, NumPy, etc.
### Steps to Reproduce
Unfortunately I don't have a minimal example, but I am providing my full environment history in case it is sufficient.
I was at Rev 33, and typed:
```
conda install pygithub tqdm --channel conda-forge
```
(But the channel had no real effect as far as I can tell.)
This resulted in rev 34 which included Python 3.7, but not py37 packages of everything else installed in the environment.
conda output:
<details>
```
$ conda install pygithub tqdm --channel conda-forge
Collecting package metadata: done
Solving environment: / WARNING conda.common.logic:get_sat_solver_cls(278): Could not run SAT solver through interface 'pycryptosat'.
done
## Package Plan ##
environment location: /home/jni/miniconda3/envs/cf
added / updated specs:
- pygithub
- tqdm
The following packages will be downloaded:
package | build
---------------------------|-----------------
asn1crypto-0.24.0 | py37_1003 154 KB conda-forge
certifi-2018.11.29 | py37_1000 145 KB conda-forge
cffi-1.12.2 | py37h9745a5d_0 217 KB conda-forge
chardet-3.0.4 | py37_1003 167 KB conda-forge
cryptography-2.5 | py37hb7f436b_1 643 KB conda-forge
curl-7.64.0 | h646f8bb_0 143 KB conda-forge
deprecated-1.2.4 | py_0 9 KB conda-forge
idna-2.8 | py37_1000 100 KB conda-forge
krb5-1.16.3 | hc83ff2d_1000 1.4 MB conda-forge
libcurl-7.64.0 | h01ee5af_0 586 KB conda-forge
libgfortran-3.0.0 | 1 281 KB conda-forge
libspatialite-4.3.0a | h9968ff2_1023 3.1 MB conda-forge
openssl-1.0.2r | h14c3975_0 3.1 MB conda-forge
pip-19.0.3 | py37_0 1.8 MB conda-forge
pygithub-1.43.5 | py37_0 2.0 MB conda-forge
pyjwt-1.7.1 | py_0 17 KB conda-forge
pyopenssl-19.0.0 | py37_0 81 KB conda-forge
pysocks-1.6.8 | py37_1002 22 KB conda-forge
python-3.7.1 | hd21baee_1001 36.4 MB conda-forge
requests-2.21.0 | py37_1000 84 KB conda-forge
setuptools-40.8.0 | py37_0 625 KB conda-forge
six-1.12.0 | py37_1000 22 KB conda-forge
tqdm-4.31.1 | py_0 40 KB conda-forge
urllib3-1.24.1 | py37_1000 148 KB conda-forge
wheel-0.33.1 | py37_0 34 KB conda-forge
wrapt-1.11.1 | py37h14c3975_0 45 KB conda-forge
------------------------------------------------------------
Total: 51.3 MB
The following NEW packages will be INSTALLED:
deprecated conda-forge/noarch::deprecated-1.2.4-py_0
pip conda-forge/linux-64::pip-19.0.3-py37_0
The following packages will be UPDATED:
asn1crypto 0.24.0-py36_0 --> 0.24.0-py37_1003
cffi 1.11.5-py36_0 --> 1.12.2-py37h9745a5d_0
chardet 3.0.4-py36_0 --> 3.0.4-py37_1003
cryptography pkgs/main::cryptography-2.4.2-py36h1b~ --> conda-forge::cryptography-2.5-py37hb7f436b_1
curl pkgs/main::curl-7.62.0-hbc83047_0 --> conda-forge::curl-7.64.0-h646f8bb_0
idna 2.6-py36_1 --> 2.8-py37_1000
krb5 1.14.6-0 --> 1.16.3-hc83ff2d_1000
libcurl pkgs/main::libcurl-7.62.0-h20c2e04_0 --> conda-forge::libcurl-7.64.0-h01ee5af_0
libspatialite pkgs/main::libspatialite-4.3.0a-h7274~ --> conda-forge::libspatialite-4.3.0a-h9968ff2_1023
pycparser conda-forge/linux-64::pycparser-2.18-~ --> conda-forge/noarch::pycparser-2.19-py_0
pygithub 1.39-py36_0 --> 1.43.5-py37_0
pyjwt 1.6.4-py_0 --> 1.7.1-py_0
pyopenssl 18.0.0-py36_0 --> 19.0.0-py37_0
pysocks 1.6.8-py36_1 --> 1.6.8-py37_1002
python pkgs/main::python-3.6.8-h0371630_0 --> conda-forge::python-3.7.1-hd21baee_1001
requests 2.18.4-py36_1 --> 2.21.0-py37_1000
setuptools 39.1.0-py36_0 --> 40.8.0-py37_0
six 1.11.0-py36_1 --> 1.12.0-py37_1000
tqdm 4.26.0-py_0 --> 4.31.1-py_0
urllib3 1.22-py36_0 --> 1.24.1-py37_1000
wheel 0.31.0-py36_0 --> 0.33.1-py37_0
wrapt pkgs/main::wrapt-1.10.11-py36h14c3975~ --> conda-forge::wrapt-1.11.1-py37h14c3975_0
The following packages will be SUPERSEDED by a higher-priority channel:
dbus pkgs/main::dbus-1.13.2-h714fa37_1 --> conda-forge::dbus-1.13.0-h4e0c4b3_1000
expat pkgs/main::expat-2.2.6-he6710b0_0 --> conda-forge::expat-2.2.5-hf484d3e_1002
gst-plugins-base pkgs/main::gst-plugins-base-1.14.0-hb~ --> conda-forge::gst-plugins-base-1.12.5-h3865690_1000
gstreamer pkgs/main::gstreamer-1.14.0-hb453b48_1 --> conda-forge::gstreamer-1.12.5-h0cc0488_1000
libgcc-ng pkgs/main::libgcc-ng-8.2.0-hdf63c60_1 --> conda-forge::libgcc-ng-7.3.0-hdf63c60_0
libgfortran pkgs/free --> conda-forge
libstdcxx-ng pkgs/main::libstdcxx-ng-8.2.0-hdf63c6~ --> conda-forge::libstdcxx-ng-7.3.0-hdf63c60_0
pcre pkgs/main::pcre-8.42-h439df22_0 --> conda-forge::pcre-8.41-hf484d3e_1003
qt pkgs/main::qt-5.9.7-h5867ecd_1 --> conda-forge::qt-5.6.2-hf70d934_9
The following packages will be DOWNGRADED:
certifi 2018.11.29-py36_1000 --> 2018.11.29-py37_1000
openssl 1.1.1a-h14c3975_1000 --> 1.0.2r-h14c3975_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
deprecated-1.2.4 | 9 KB | ################################################################################################################################################################################################################### | 100%
python-3.7.1 | 36.4 MB | ################################################################################################################################################################################################################### | 100%
libspatialite-4.3.0a | 3.1 MB | ################################################################################################################################################################################################################### | 100%
six-1.12.0 | 22 KB | ################################################################################################################################################################################################################### | 100%
certifi-2018.11.29 | 145 KB | ################################################################################################################################################################################################################### | 100%
tqdm-4.31.1 | 40 KB | ################################################################################################################################################################################################################### | 100%
idna-2.8 | 100 KB | ################################################################################################################################################################################################################### | 100%
pyopenssl-19.0.0 | 81 KB | ################################################################################################################################################################################################################### | 100%
libgfortran-3.0.0 | 281 KB | ################################################################################################################################################################################################################### | 100%
pyjwt-1.7.1 | 17 KB | ################################################################################################################################################################################################################### | 100%
cffi-1.12.2 | 217 KB | ################################################################################################################################################################################################################### | 100%
pysocks-1.6.8 | 22 KB | ################################################################################################################################################################################################################### | 100%
chardet-3.0.4 | 167 KB | ################################################################################################################################################################################################################### | 100%
pygithub-1.43.5 | 2.0 MB | ################################################################################################################################################################################################################### | 100%
curl-7.64.0 | 143 KB | ################################################################################################################################################################################################################### | 100%
wheel-0.33.1 | 34 KB | ################################################################################################################################################################################################################### | 100%
requests-2.21.0 | 84 KB | ################################################################################################################################################################################################################### | 100%
libcurl-7.64.0 | 586 KB | ################################################################################################################################################################################################################### | 100%
pip-19.0.3 | 1.8 MB | ################################################################################################################################################################################################################### | 100%
krb5-1.16.3 | 1.4 MB | ################################################################################################################################################################################################################### | 100%
cryptography-2.5 | 643 KB | ################################################################################################################################################################################################################### | 100%
urllib3-1.24.1 | 148 KB | ################################################################################################################################################################################################################### | 100%
asn1crypto-0.24.0 | 154 KB | ################################################################################################################################################################################################################### | 100%
openssl-1.0.2r | 3.1 MB | ################################################################################################################################################################################################################### | 100%
setuptools-40.8.0 | 625 KB | ################################################################################################################################################################################################################### | 100%
wrapt-1.11.1 | 45 KB | ################################################################################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
```
</details>
revision history:
<details>
```
$ conda list --revisions
2018-05-19 15:23:23 (rev 0)
+affine-2.2.0 (conda-forge)
+altair-2.0.1 (conda-forge)
+appdirs-1.4.3 (conda-forge)
+asn1crypto-0.24.0 (conda-forge)
+attrs-18.1.0 (conda-forge)
+backcall-0.1.0 (conda-forge)
+backports-1.0 (conda-forge)
+backports.weakref-1.0rc1 (conda-forge)
+beautifulsoup4-4.6.0 (conda-forge)
+blas-1.1 (conda-forge)
+bleach-1.5.0 (conda-forge)
+blosc-1.14.0 (conda-forge)
+bokeh-0.12.15 (conda-forge)
+boost-1.66.0 (conda-forge)
+boost-cpp-1.66.0 (conda-forge)
+boto3-1.7.24 (conda-forge)
+botocore-1.10.24 (conda-forge)
+bottleneck-1.2.1 (conda-forge)
+branca-0.3.0 (conda-forge)
+bzip2-1.0.6 (conda-forge)
+ca-certificates-2018.4.16 (conda-forge)
+cairo-1.14.12
+cartopy-0.16.0 (conda-forge)
+certifi-2018.4.16 (conda-forge)
+cffi-1.11.5 (conda-forge)
+chardet-3.0.4 (conda-forge)
+click-6.7 (conda-forge)
+click-plugins-1.0.3 (conda-forge)
+cligj-0.4.0 (conda-forge)
+cloudpickle-0.5.3 (conda-forge)
+colorcet-1.0.0 (conda-forge)
+coverage-4.5.1 (conda-forge)
+cryptography-2.2.1 (conda-forge)
+curl-7.59.0 (conda-forge)
+cycler-0.10.0 (conda-forge)
+cython-0.28.2 (conda-forge)
+cytoolz-0.9.0.1 (conda-forge)
+dask-0.15.2 (conda-forge)
+dask-core-0.15.2 (conda-forge)
+datashader-0.6.2 (conda-forge)
+datashape-0.5.4 (conda-forge)
+dbus-1.13.2
+decorator-4.3.0 (conda-forge)
+descartes-1.1.0 (conda-forge)
+distributed-1.18.1 (conda-forge)
+docutils-0.14 (conda-forge)
+entrypoints-0.2.3 (conda-forge)
+et_xmlfile-1.0.1 (conda-forge)
+expat-2.2.5 (conda-forge)
+fastcache-1.0.2 (conda-forge)
+fftw-3.3.7 (conda-forge)
+fiona-1.7.11 (conda-forge)
+folium-0.5.0 (conda-forge)
+fontconfig-2.12.6 (conda-forge)
+freetype-2.8.1 (conda-forge)
+freexl-1.0.5 (conda-forge)
+funcsigs-1.0.2 (conda-forge)
+gdal-2.2.2
+geopandas-0.3.0 (conda-forge)
+geos-3.6.2 (conda-forge)
+giflib-5.1.4 (conda-forge)
+glib-2.53.6
+gmp-6.1.2 (conda-forge)
+gmpy2-2.0.8 (conda-forge)
+gputools-0.2.6 (talley)
+graphite2-1.3.11 (conda-forge)
+graphviz-2.38.0 (conda-forge)
+gst-plugins-base-1.12.4
+gstreamer-1.12.4
+h5netcdf-0.5.1 (conda-forge)
+h5py-2.8.0 (conda-forge)
+harfbuzz-1.7.6
+hdf4-4.2.13 (conda-forge)
+hdf5-1.10.1 (conda-forge)
+heapdict-1.0.0 (conda-forge)
+holoviews-1.10.4 (conda-forge)
+html5lib-0.9999999 (conda-forge)
+hypothesis-3.56.9 (conda-forge)
+icu-58.2 (conda-forge)
+idna-2.6 (conda-forge)
+imageio-2.3.0 (conda-forge)
+ipykernel-4.8.2 (conda-forge)
+ipython-6.4.0 (conda-forge)
+ipython_genutils-0.2.0 (conda-forge)
+ipywidgets-7.2.1 (conda-forge)
+jdcal-1.4 (conda-forge)
+jedi-0.12.0 (conda-forge)
+jinja2-2.10 (conda-forge)
+jmespath-0.9.3 (conda-forge)
+jpeg-9b (conda-forge)
+json-c-0.12.1 (conda-forge)
+jsonschema-2.6.0 (conda-forge)
+jupyter-1.0.0 (conda-forge)
+jupyter_client-5.2.3 (conda-forge)
+jupyter_console-5.2.0 (conda-forge)
+jupyter_core-4.4.0 (conda-forge)
+kealib-1.4.7 (conda-forge)
+kiwisolver-1.0.1 (conda-forge)
+krb5-1.14.6 (conda-forge)
+libdap4-3.19.2 (conda-forge)
+libffi-3.2.1 (conda-forge)
+libgcc-ng-7.2.0
+libgdal-2.2.2
+libgfortran-3.0.0
+libiconv-1.15 (conda-forge)
+libkml-1.3.0 (conda-forge)
+libnetcdf-4.4.1.1 (conda-forge)
+libpng-1.6.34 (conda-forge)
+libpq-9.6.6
+libprotobuf-3.5.2 (conda-forge)
+libsodium-1.0.16 (conda-forge)
+libspatialindex-1.8.5 (conda-forge)
+libspatialite-4.3.0a
+libssh2-1.8.0 (conda-forge)
+libstdcxx-ng-7.2.0
+libtiff-4.0.9 (conda-forge)
+libtool-2.4.6 (conda-forge)
+libxcb-1.13 (conda-forge)
+libxml2-2.9.8 (conda-forge)
+libxslt-1.1.32 (conda-forge)
+line_profiler-2.1.2 (conda-forge)
+llvmlite-0.23.0 (conda-forge)
+locket-0.2.0 (conda-forge)
+lxml-4.2.1 (conda-forge)
+lzo-2.10 (conda-forge)
+mako-1.0.7 (conda-forge)
+markdown-2.6.11 (conda-forge)
+markupsafe-1.0 (conda-forge)
+matplotlib-2.2.2
+memory_profiler-0.52.0 (conda-forge)
+mistune-0.8.3 (conda-forge)
+mock-2.0.0 (conda-forge)
+more-itertools-4.1.0 (conda-forge)
+mpc-1.1.0 (conda-forge)
+mpfr-3.1.5 (conda-forge)
+mpmath-1.0.0 (conda-forge)
+msgpack-python-0.5.6 (conda-forge)
+multipledispatch-0.5.0 (conda-forge)
+munch-2.3.2 (conda-forge)
+nbconvert-5.3.1 (conda-forge)
+nbformat-4.4.0 (conda-forge)
+ncurses-5.9 (conda-forge)
+netcdf4-1.3.1 (conda-forge)
+networkx-2.1 (conda-forge)
+notebook-5.5.0 (conda-forge)
+numba-0.38.0 (conda-forge)
+numexpr-2.6.5 (conda-forge)
+numpy-1.11.3 (conda-forge)
+ocl-icd-2.2.9 (conda-forge)
+olefile-0.45.1 (conda-forge)
+openblas-0.2.20 (conda-forge)
+openjpeg-2.3.0 (conda-forge)
+openpyxl-2.5.3 (conda-forge)
+openssl-1.0.2o (conda-forge)
+owslib-0.16.0 (conda-forge)
+packaging-17.1 (conda-forge)
+pandas-0.23.0 (conda-forge)
+pandoc-2.2.1 (conda-forge)
+pandocfilters-1.4.2 (conda-forge)
+pango-1.40.14 (conda-forge)
+param-1.6.1 (conda-forge)
+parso-0.2.0 (conda-forge)
+partd-0.3.8 (conda-forge)
+patsy-0.5.0 (conda-forge)
+pbr-4.0.2 (conda-forge)
+pcre-8.41 (conda-forge)
+pexpect-4.5.0 (conda-forge)
+pickleshare-0.7.4 (conda-forge)
+pillow-5.1.0 (conda-forge)
+pint-0.8.1 (conda-forge)
+pip-9.0.3 (conda-forge)
+pixman-0.34.0 (conda-forge)
+plotly-2.6.0 (conda-forge)
+pluggy-0.6.0 (conda-forge)
+poppler-0.60.1
+poppler-data-0.4.9 (conda-forge)
+proj4-4.9.3 (conda-forge)
+prompt_toolkit-1.0.15 (conda-forge)
+protobuf-3.5.2 (conda-forge)
+psutil-5.4.5 (conda-forge)
+psycopg2-2.7.4 (conda-forge)
+ptyprocess-0.5.2 (conda-forge)
+py-1.5.3 (conda-forge)
+pycparser-2.18 (conda-forge)
+pyepsg-0.3.2 (conda-forge)
+pygments-2.2.0 (conda-forge)
+pyopencl-2018.1.1 (conda-forge)
+pyopengl-3.1.1a1 (conda-forge)
+pyopenssl-18.0.0 (conda-forge)
+pyparsing-2.2.0 (conda-forge)
+pyproj-1.9.5.1 (conda-forge)
+pyqt-5.9.2
+pysal-1.14.3 (conda-forge)
+pyshp-1.2.12 (conda-forge)
+pysocks-1.6.8 (conda-forge)
+pytables-3.4.3 (conda-forge)
+pytest-3.5.1 (conda-forge)
+pytest-cov-2.5.1 (conda-forge)
+python-3.6.3
+python-dateutil-2.7.3 (conda-forge)
+python-graphviz-0.8.3 (conda-forge)
+pytools-2018.4 (conda-forge)
+pytz-2018.4 (conda-forge)
+pywavelets-0.5.2 (conda-forge)
+pyyaml-3.12 (conda-forge)
+pyzmq-17.0.0 (conda-forge)
+qt-5.9.4
+qtconsole-4.3.1 (conda-forge)
+rasterio-0.36.0 (conda-forge)
+readline-7.0 (conda-forge)
+reikna-0.6.8 (conda-forge)
+requests-2.18.4 (conda-forge)
+rtree-0.8.3 (conda-forge)
+s3transfer-0.1.13 (conda-forge)
+scikit-image-0.13.1 (conda-forge)
+scikit-learn-0.19.1 (conda-forge)
+scipy-1.1.0 (conda-forge)
+seaborn-0.8.1 (conda-forge)
+send2trash-1.5.0 (conda-forge)
+setuptools-39.1.0 (conda-forge)
+shapely-1.6.4 (conda-forge)
+simplegeneric-0.8.1 (conda-forge)
+sip-4.19.8 (conda-forge)
+six-1.11.0 (conda-forge)
+snakeviz-0.4.2
+snuggs-1.4.1 (conda-forge)
+sortedcontainers-1.5.10 (conda-forge)
+spimagine-0.2.5 (talley)
+sqlalchemy-1.2.7 (conda-forge)
+sqlite-3.22.0 (conda-forge)
+statsmodels-0.8.0 (conda-forge)
+sympy-1.1.1 (conda-forge)
+tblib-1.3.2 (conda-forge)
+tensorflow-1.3.0 (conda-forge)
+terminado-0.8.1 (conda-forge)
+testpath-0.3.1 (conda-forge)
+tk-8.6.7 (conda-forge)
+toolz-0.9.0 (conda-forge)
+tornado-4.4.3 (conda-forge)
+tqdm-4.23.3 (conda-forge)
+traitlets-4.3.2 (conda-forge)
+typing-3.6.4 (conda-forge)
+urllib3-1.22 (conda-forge)
+util-linux-2.21
+vigra-1.11.1 (conda-forge)
+vincent-0.4.4 (conda-forge)
+wcwidth-0.1.7 (conda-forge)
+webencodings-0.5 (conda-forge)
+werkzeug-0.14.1 (conda-forge)
+wheel-0.31.0 (conda-forge)
+widgetsnbextension-3.2.1 (conda-forge)
+xarray-0.10.4 (conda-forge)
+xerces-c-3.2.1 (conda-forge)
+xgboost-0.71 (conda-forge)
+xlrd-1.1.0 (conda-forge)
+xlwt-1.3.0 (conda-forge)
+xorg-libxau-1.0.8 (conda-forge)
+xorg-libxdmcp-1.1.2 (conda-forge)
+xz-5.2.3 (conda-forge)
+yaml-0.1.7 (conda-forge)
+zeromq-4.2.5 (conda-forge)
+zict-0.1.3 (conda-forge)
+zlib-1.2.11 (conda-forge)
2018-05-31 08:58:13 (rev 1)
+asv-0.2.1 (conda-forge)
2018-05-31 09:00:04 (rev 2)
ca-certificates {2018.4.16 (conda-forge) -> 2018.03.07}
certifi {2018.4.16 (conda-forge) -> 2018.4.16}
openssl {1.0.2o (conda-forge) -> 1.0.2o}
2018-05-31 09:01:58 (rev 3)
ca-certificates {2018.03.07 -> 2018.4.16 (conda-forge)}
certifi {2018.4.16 -> 2018.4.16 (conda-forge)}
openssl {1.0.2o -> 1.0.2o (conda-forge)}
2018-05-31 09:05:23 (rev 4)
numpy {1.11.3 (conda-forge) -> 1.14.3 (conda-forge)}
-spimagine-0.2.5 (talley)
2018-06-01 08:49:49 (rev 5)
+ipdb-0.11 (conda-forge)
2018-06-06 12:30:52 (rev 6)
+gast-0.2.0 (conda-forge)
+ply-3.11 (conda-forge)
+pythran-0.8.5 (conda-forge)
2018-06-07 11:27:13 (rev 7)
+altgraph-0.15 (conda-forge)
+macholib-1.8 (conda-forge)
+pycrypto-2.6.1 (conda-forge)
+pyinstaller-3.3.1 (conda-forge)
2018-06-12 16:46:45 (rev 8)
+vispy-0.5.3 (conda-forge)
2018-06-15 19:48:49 (rev 9)
fiona {1.7.11 (conda-forge) -> 1.7.12 (conda-forge)}
2018-06-22 16:33:56 (rev 10)
+ipyvolume-0.4.5 (conda-forge)
+ipywebrtc-0.3.0 (conda-forge)
+traittypes-0.2.1 (conda-forge)
2018-07-14 15:19:20 (rev 11)
numba {0.38.0 (conda-forge) -> 0.38.1 (conda-forge)}
2018-07-25 13:42:17 (rev 12)
+pudb-2018.1 (conda-forge)
+urwid-1.3.1 (conda-forge)
2018-08-24 15:05:37 (rev 13)
ca-certificates {2018.4.16 (conda-forge) -> 2018.8.13 (conda-forge)}
certifi {2018.4.16 (conda-forge) -> 2018.8.13 (conda-forge)}
openssl {1.0.2o (conda-forge) -> 1.0.2o (conda-forge)}
seaborn {0.8.1 (conda-forge) -> 0.9.0 (conda-forge)}
2018-09-18 10:21:40 (rev 14)
bokeh {0.12.15 (conda-forge) -> 0.13.0}
2018-09-21 15:47:27 (rev 15)
ca-certificates {2018.8.13 (conda-forge) -> 2018.8.24 (conda-forge)}
certifi {2018.8.13 (conda-forge) -> 2018.8.24 (conda-forge)}
openssl {1.0.2o (conda-forge) -> 1.0.2p (conda-forge)}
+flask-1.0.2 (conda-forge)
+itsdangerous-0.24 (conda-forge)
2018-10-01 15:54:43 (rev 16)
certifi {2018.8.24 (conda-forge) -> 2018.8.24 (conda-forge)}
tqdm {4.23.3 (conda-forge) -> 4.26.0 (conda-forge)}
+pygithub-1.39 (conda-forge)
+pyjwt-1.6.4 (conda-forge)
2018-10-02 19:25:36 (rev 17)
+conda-4.5.11 (conda-forge)
+conda-build-3.15.1 (conda-forge)
+conda-env-2.6.0 (conda-forge)
+conda-forge-pinning-2018.10.01 (conda-forge)
+conda-smithy-3.1.12 (conda-forge)
+filelock-3.0.4 (conda-forge)
+gitdb2-2.0.4 (conda-forge)
+gitpython-2.1.11 (conda-forge)
+glob2-0.6 (conda-forge)
+patchelf-0.9 (conda-forge)
+pkginfo-1.4.2 (conda-forge)
+pycosat-0.6.3 (conda-forge)
+ruamel.yaml-0.15.71 (conda-forge)
+ruamel_yaml-0.15.71 (conda-forge)
+smmap2-2.0.4 (conda-forge)
2018-10-02 22:58:20 (rev 18)
cairo {1.14.12 -> 1.14.12 (conda-forge)}
dbus {1.13.2 -> 1.13.0 (conda-forge)}
fontconfig {2.12.6 (conda-forge) -> 2.13.1 (conda-forge)}
freetype {2.8.1 (conda-forge) -> 2.9.1 (conda-forge)}
glib {2.53.6 -> 2.55.0 (conda-forge)}
graphviz {2.38.0 (conda-forge) -> 2.38.0 (conda-forge)}
gst-plugins-base {1.12.4 -> 1.12.5 (conda-forge)}
gstreamer {1.12.4 -> 1.12.5 (conda-forge)}
harfbuzz {1.7.6 -> 1.9.0 (conda-forge)}
jpeg {9b (conda-forge) -> 9c (conda-forge)}
matplotlib {2.2.2 -> 2.2.3 (conda-forge)}
pango {1.40.14 (conda-forge) -> 1.40.14 (conda-forge)}
pillow {5.1.0 (conda-forge) -> 5.3.0 (conda-forge)}
poppler {0.60.1 -> 0.67.0 (conda-forge)}
pyqt {5.9.2 -> 5.6.0}
qt {5.9.4 -> 5.6.2 (conda-forge)}
sqlite {3.22.0 (conda-forge) -> 3.24.0}
tk {8.6.7 (conda-forge) -> 8.6.8 (conda-forge)}
xz {5.2.3 (conda-forge) -> 5.2.4 (conda-forge)}
+gettext-0.19.8.1 (conda-forge)
+libedit-3.1.20170329 (conda-forge)
+libgcc-7.2.0 (conda-forge)
+libuuid-2.32.1 (conda-forge)
+xorg-kbproto-1.0.7 (conda-forge)
+xorg-libice-1.0.9 (conda-forge)
+xorg-libsm-1.2.2 (conda-forge)
+xorg-libx11-1.6.6 (conda-forge)
+xorg-libxext-1.3.3 (conda-forge)
+xorg-libxpm-3.5.12 (conda-forge)
+xorg-libxrender-0.9.10 (conda-forge)
+xorg-libxt-1.1.5 (conda-forge)
+xorg-renderproto-0.11.1 (conda-forge)
+xorg-xextproto-7.3.0 (conda-forge)
+xorg-xproto-7.0.31 (conda-forge)
2018-10-03 10:40:36 (rev 19)
cairo {1.14.12 (conda-forge) -> 1.14.12 (conda-forge)}
dbus {1.13.0 (conda-forge) -> 1.13.2}
glib {2.55.0 (conda-forge) -> 2.56.2 (conda-forge)}
gst-plugins-base {1.12.5 (conda-forge) -> 1.14.0}
gstreamer {1.12.5 (conda-forge) -> 1.14.0}
harfbuzz {1.9.0 (conda-forge) -> 1.9.0 (conda-forge)}
libgcc-ng {7.2.0 -> 8.2.0}
libstdcxx-ng {7.2.0 -> 8.2.0}
matplotlib {2.2.3 (conda-forge) -> 3.0.0}
pcre {8.41 (conda-forge) -> 8.42}
poppler {0.67.0 (conda-forge) -> 0.65.0}
pyqt {5.6.0 -> 5.9.2}
qt {5.6.2 (conda-forge) -> 5.9.6}
+libcurl-7.61.1
2018-10-23 01:20:41 (rev 20)
+alabaster-0.7.12
+astroid-2.0.4
+babel-2.6.0
+imagesize-1.1.0
+isort-4.3.4
+jeepney-0.4
+keyring-15.1.0
+lazy-object-proxy-1.3.1
+mccabe-0.6.1
+numpydoc-0.8.0
+pycodestyle-2.4.0
+pyflakes-2.0.0
+pylint-2.1.1
+qtawesome-0.5.1
+qtpy-1.5.1
+rope-0.11.0
+secretstorage-3.1.0
+snowballstemmer-1.2.1
+sphinx-1.8.1
+sphinxcontrib-1.0
+sphinxcontrib-websupport-1.1.0
+spyder-3.3.1
+spyder-kernels-0.2.6
+typed-ast-1.1.0
+wrapt-1.10.11
2018-11-09 17:45:13 (rev 21)
ca-certificates {2018.8.24 (conda-forge) -> 2018.10.15 (conda-forge)}
certifi {2018.8.24 (conda-forge) -> 2018.10.15 (conda-forge)}
openssl {1.0.2p (conda-forge) -> 1.0.2p (conda-forge)}
2018-11-20 19:27:42 (rev 22)
scikit-learn {0.19.1 (conda-forge) -> 0.20.0 (conda-forge)}
2018-11-20 19:29:59 (rev 23)
numpy {1.14.3 (conda-forge) -> 1.15.4 (conda-forge)}
openblas {0.2.20 (conda-forge) -> 0.3.3 (conda-forge)}
scikit-learn {0.20.0 (conda-forge) -> 0.20.0 (conda-forge)}
scipy {1.1.0 (conda-forge) -> 1.1.0 (conda-forge)}
2018-11-20 20:11:33 (rev 24)
+umap-learn-0.3.6 (conda-forge)
2018-11-21 17:30:18 (rev 25)
bokeh {0.13.0 -> 1.0.1 (conda-forge)}
2018-12-28 09:27:38 (rev 26)
pylint {2.1.1 -> 2.2.2}
2018-12-28 09:36:52 (rev 27)
+flake8-3.6.0
2019-01-17 16:50:53 (rev 28)
+mypy-0.650
+mypy_extensions-0.4.1
2019-02-04 20:37:24 (rev 29)
ca-certificates {2018.10.15 (conda-forge) -> 2018.11.29 (conda-forge)}
certifi {2018.10.15 (conda-forge) -> 2018.11.29 (conda-forge)}
cryptography {2.2.1 (conda-forge) -> 2.4.2}
curl {7.59.0 (conda-forge) -> 7.62.0}
dask {0.15.2 (conda-forge) -> 1.1.1 (conda-forge)}
dask-core {0.15.2 (conda-forge) -> 1.1.1 (conda-forge)}
distributed {1.18.1 (conda-forge) -> 1.25.3 (conda-forge)}
expat {2.2.5 (conda-forge) -> 2.2.6}
h5py {2.8.0 (conda-forge) -> 2.8.0 (conda-forge)}
hdf5 {1.10.1 (conda-forge) -> 1.10.2 (conda-forge)}
kealib {1.4.7 (conda-forge) -> 1.4.9 (conda-forge)}
libcurl {7.61.1 -> 7.62.0}
libedit {3.1.20170329 (conda-forge) -> 3.1.20170329 (conda-forge)}
libgdal {2.2.2 -> 2.2.4 (conda-forge)}
libnetcdf {4.4.1.1 (conda-forge) -> 4.6.1 (conda-forge)}
libpng {1.6.34 (conda-forge) -> 1.6.36 (conda-forge)}
libpq {9.6.6 -> 9.5.3 (conda-forge)}
libssh2 {1.8.0 (conda-forge) -> 1.8.0 (conda-forge)}
ncurses {5.9 (conda-forge) -> 6.1 (conda-forge)}
netcdf4 {1.3.1 (conda-forge) -> 1.4.1 (conda-forge)}
openjpeg {2.3.0 (conda-forge) -> 2.3.0 (conda-forge)}
openssl {1.0.2p (conda-forge) -> 1.1.1a (conda-forge)}
poppler {0.65.0 -> 0.67.0 (conda-forge)}
psycopg2 {2.7.4 (conda-forge) -> 2.6.2}
pytables {3.4.3 (conda-forge) -> 3.4.4 (conda-forge)}
python {3.6.3 -> 3.6.8}
qt {5.9.6 -> 5.9.7}
readline {7.0 (conda-forge) -> 7.0 (conda-forge)}
sqlite {3.24.0 -> 3.26.0 (conda-forge)}
tornado {4.4.3 (conda-forge) -> 5.1.1 (conda-forge)}
vigra {1.11.1 (conda-forge) -> 1.11.1 (conda-forge)}
xerces-c {3.2.1 (conda-forge) -> 3.2.0 (conda-forge)}
+cftime-1.0.3.4 (conda-forge)
+geotiff-1.4.2 (conda-forge)
2019-02-04 20:41:40 (rev 30)
matplotlib {3.0.0 -> 3.0.2 (conda-forge)}
tk {8.6.8 (conda-forge) -> 8.6.9 (conda-forge)}
+matplotlib-base-3.0.2 (conda-forge)
2019-02-05 22:35:36 (rev 31)
+pytest-flake8-1.0.4 (conda-forge)
2019-02-11 13:21:58 (rev 32)
+visvis-1.11.1 (conda-forge)
2019-02-15 11:03:22 (rev 33)
cython {0.28.2 (conda-forge) -> 0.29.5 (conda-forge)}
2019-03-08 15:01:24 (rev 34)
asn1crypto {0.24.0 (conda-forge) -> 0.24.0 (conda-forge)}
certifi {2018.11.29 (conda-forge) -> 2018.11.29 (conda-forge)}
cffi {1.11.5 (conda-forge) -> 1.12.2 (conda-forge)}
chardet {3.0.4 (conda-forge) -> 3.0.4 (conda-forge)}
cryptography {2.4.2 -> 2.5 (conda-forge)}
curl {7.62.0 -> 7.64.0 (conda-forge)}
dbus {1.13.2 -> 1.13.0 (conda-forge)}
expat {2.2.6 -> 2.2.5 (conda-forge)}
gst-plugins-base {1.14.0 -> 1.12.5 (conda-forge)}
gstreamer {1.14.0 -> 1.12.5 (conda-forge)}
idna {2.6 (conda-forge) -> 2.8 (conda-forge)}
krb5 {1.14.6 (conda-forge) -> 1.16.3 (conda-forge)}
libcurl {7.62.0 -> 7.64.0 (conda-forge)}
libgcc-ng {8.2.0 -> 7.3.0 (conda-forge)}
libgfortran {3.0.0 -> 3.0.0 (conda-forge)}
libspatialite {4.3.0a -> 4.3.0a (conda-forge)}
libstdcxx-ng {8.2.0 -> 7.3.0 (conda-forge)}
openssl {1.1.1a (conda-forge) -> 1.0.2r (conda-forge)}
pcre {8.42 -> 8.41 (conda-forge)}
pip {9.0.3 (conda-forge) -> 19.0.3 (conda-forge)}
pycparser {2.18 (conda-forge) -> 2.19 (conda-forge)}
pygithub {1.39 (conda-forge) -> 1.43.5 (conda-forge)}
pyjwt {1.6.4 (conda-forge) -> 1.7.1 (conda-forge)}
pyopenssl {18.0.0 (conda-forge) -> 19.0.0 (conda-forge)}
pysocks {1.6.8 (conda-forge) -> 1.6.8 (conda-forge)}
python {3.6.8 -> 3.7.1 (conda-forge)}
qt {5.9.7 -> 5.6.2 (conda-forge)}
requests {2.18.4 (conda-forge) -> 2.21.0 (conda-forge)}
setuptools {39.1.0 (conda-forge) -> 40.8.0 (conda-forge)}
six {1.11.0 (conda-forge) -> 1.12.0 (conda-forge)}
tqdm {4.26.0 (conda-forge) -> 4.31.1 (conda-forge)}
urllib3 {1.22 (conda-forge) -> 1.24.1 (conda-forge)}
wheel {0.31.0 (conda-forge) -> 0.33.1 (conda-forge)}
wrapt {1.10.11 -> 1.11.1 (conda-forge)}
-asv-0.2.1 (conda-forge)
-bleach-1.5.0 (conda-forge)
-html5lib-0.9999999 (conda-forge)
-notebook-5.5.0 (conda-forge)
-scikit-image-0.13.1 (conda-forge)
+deprecated-1.2.4 (conda-forge)
```
</details>
`conda install --revision=33`, thankfully, gave me back my working environment.
## Expected Behavior
<!-- What do you think should happen? -->
Either Python should not be updated, or everything should be updated.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
$ conda info
active environment : cf
active env location : /home/jni/miniconda3/envs/cf
shell level : 1
user config file : /home/jni/.condarc
populated config files : /home/jni/.condarc
conda version : 4.6.7
conda-build version : not installed
python version : 3.6.8.final.0
base environment : /home/jni/miniconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/jni/miniconda3/pkgs
/home/jni/.conda/pkgs
envs directories : /home/jni/miniconda3/envs
/home/jni/.conda/envs
platform : linux-64
user-agent : conda/4.6.7 requests/2.18.4 CPython/3.6.8 Linux/4.15.0-29-generic ubuntu/18.04.1 glibc/2.27
UID:GID : 1000:1000
netrc file : /home/jni/.netrc
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
$ conda config --show-sources
==> /home/jni/.condarc <==
add_pip_as_python_dependency: True
create_default_packages:
- ipykernel
- jupyter
- jupyter_contrib_nbextensions
- pip
- blas=*=openblas
channel_priority: strict
channels:
- conda-forge
- defaults
show_channel_urls: True
sat_solver: pycryptosat
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
$ conda list --show-channel-urls
# packages in environment at /home/jni/miniconda3/envs/cf:
#
# Name Version Build Channel
adafruit-ampy 1.0.5 pypi_0 pypi
ads 0.12.3 pypi_0 pypi
affine 2.2.0 py_0 conda-forge
alabaster 0.7.11 pypi_0 pypi
altair 2.0.1 py_0 conda-forge
altgraph 0.15 py_0 conda-forge
appdirs 1.4.3 py_0 conda-forge
argh 0.26.2 pypi_0 pypi
asn1crypto 0.24.0 py36_0 conda-forge
astroid 2.0.4 py36_0 defaults
asv 0.3.dev1258+f1ec1c15 dev_0 <develop>
attrs 18.1.0 py_0 conda-forge
autopep8 1.4.3 pypi_0 pypi
babel 2.6.0 pypi_0 pypi
backcall 0.1.0 py_0 conda-forge
backports 1.0 py36_1 conda-forge
backports.weakref 1.0rc1 py36_1 conda-forge
beautifulsoup4 4.6.0 py36_0 conda-forge
binary 1.0.0 pypi_0 pypi
blas 1.1 openblas conda-forge
bleach 2.1.4 pypi_0 pypi
blinker 1.4 pypi_0 pypi
blosc 1.14.0 1 conda-forge
bokeh 1.0.1 py36_1000 conda-forge
boost 1.66.0 py36_1 conda-forge
boost-cpp 1.66.0 1 conda-forge
boto3 1.7.24 py_0 conda-forge
botocore 1.10.24 py_0 conda-forge
bottleneck 1.2.1 py36_1 conda-forge
branca 0.3.0 py_0 conda-forge
bs4 0.0.1 pypi_0 pypi
bzip2 1.0.6 1 conda-forge
ca-certificates 2018.11.29 ha4d7672_0 conda-forge
cachetools 2.1.0 pypi_0 pypi
cairo 1.14.12 h276e583_5 conda-forge
cartopy 0.16.0 py36_0 conda-forge
certifi 2018.11.29 py36_1000 conda-forge
cffi 1.11.5 py36_0 conda-forge
cftime 1.0.3.4 py36h3010b51_1000 conda-forge
chardet 3.0.4 py36_0 conda-forge
click 6.7 py_1 conda-forge
click-plugins 1.0.3 py36_0 conda-forge
cligj 0.4.0 py36_0 conda-forge
cloudpickle 0.6.1 pypi_0 pypi
cmarkgfm 0.4.2 pypi_0 pypi
colorcet 1.0.0 py_0 conda-forge
colorlog 3.1.4 pypi_0 pypi
conda 4.5.11 py36_0 conda-forge
conda-build 3.15.1 py36_0 conda-forge
conda-env 2.6.0 1 conda-forge
conda-forge-pinning 2018.10.01 0 conda-forge
conda-smithy 3.1.12 py_0 conda-forge
configparser 3.5.0 pypi_0 pypi
coverage 4.5.1 py36_0 conda-forge
cryptography 2.4.2 py36h1ba5d50_0 defaults
curl 7.62.0 hbc83047_0 defaults
cycler 0.10.0 py36_0 conda-forge
cython 0.29.5 py36hf484d3e_0 conda-forge
cytoolz 0.9.0.1 py36_0 conda-forge
dask 1.1.1 py_0 conda-forge
dask-core 1.1.1 py_0 conda-forge
dask-image 0.2.0+28.g67f8a8c.dirty dev_0 <develop>
datashader 0.6.2 py_0 conda-forge
datashape 0.5.4 py36_0 conda-forge
dbus 1.13.2 h714fa37_1 defaults
decorator 4.3.0 py_0 conda-forge
descartes 1.1.0 py_1 conda-forge
distributed 1.24.0 pypi_0 pypi
docutils 0.14 py36_0 conda-forge
entrypoints 0.2.3 py36_1 conda-forge
et_xmlfile 1.0.1 py36_0 conda-forge
expat 2.2.6 he6710b0_0 defaults
fastcache 1.0.2 py36_0 conda-forge
feedgenerator 1.9 pypi_0 pypi
fftw 3.3.7 0 conda-forge
filelock 3.0.4 py_1 conda-forge
fiona 1.7.12 py36_0 conda-forge
flake8 3.6.0 py36_0 defaults
flask 1.0.2 py_1 conda-forge
folium 0.5.0 py_0 conda-forge
fontconfig 2.13.1 h65d0f4c_0 conda-forge
freetype 2.9.1 h6debe1e_4 conda-forge
freexl 1.0.5 0 conda-forge
funcsigs 1.0.2 py_2 conda-forge
future 0.16.0 pypi_0 pypi
gala 0.5.dev0 dev_0 <develop>
gast 0.2.0 py_0 conda-forge
gdal 2.2.2 py36hc209d97_1 defaults
geopandas 0.3.0 py36_0 conda-forge
geos 3.6.2 1 conda-forge
geotiff 1.4.2 hfe6da40_1005 conda-forge
gettext 0.19.8.1 h5e8e0c9_1 conda-forge
gevent 1.4.0 pypi_0 pypi
giflib 5.1.4 0 conda-forge
gitdb2 2.0.4 py_0 conda-forge
gitpython 2.1.11 py_0 conda-forge
glib 2.56.2 h464dc38_0 conda-forge
glob2 0.6 py_0 conda-forge
gmp 6.1.2 0 conda-forge
gmpy2 2.0.8 py36_1 conda-forge
google-api-core 1.2.1 pypi_0 pypi
google-api-python-client 1.6.7 pypi_0 pypi
google-auth 1.5.0 pypi_0 pypi
google-cloud-bigquery 1.3.0 pypi_0 pypi
google-cloud-core 0.28.1 pypi_0 pypi
google-resumable-media 0.3.1 pypi_0 pypi
googleapis-common-protos 1.5.3 pypi_0 pypi
gosync 0.4 pypi_0 pypi
gputools 0.2.6 py36_0 talley
grader 0.1 dev_0 <develop>
graphite2 1.3.11 0 conda-forge
graphviz 2.38.0 h08bfae6_9 conda-forge
greenlet 0.4.15 pypi_0 pypi
gst-plugins-base 1.14.0 hbbd80ab_1 defaults
gstreamer 1.14.0 hb453b48_1 defaults
h5glance 0.4 pypi_0 pypi
h5netcdf 0.5.1 py_0 conda-forge
h5py 2.8.0 py36h3010b51_1003 conda-forge
harfbuzz 1.9.0 hee26f79_1 conda-forge
hdf4 4.2.13 0 conda-forge
hdf5 1.10.2 hc401514_3 conda-forge
heapdict 1.0.0 py36_0 conda-forge
holoviews 1.10.4 py_0 conda-forge
html5lib 1.0.1 pypi_0 pypi
htmlgen 1.2.2 pypi_0 pypi
httplib2 0.11.3 pypi_0 pypi
httpretty 0.8.10 pypi_0 pypi
hypothesis 3.56.9 py36_0 conda-forge
icu 58.2 0 conda-forge
idna 2.6 py36_1 conda-forge
imageio 2.3.0 py36_0 conda-forge
imagesize 1.1.0 pypi_0 pypi
ipdb 0.11 py36_0 conda-forge
ipykernel 4.8.2 py36_0 conda-forge
ipython 6.4.0 py36_0 conda-forge
ipython_genutils 0.2.0 py36_0 conda-forge
ipyvolume 0.4.5 py36_0 conda-forge
ipywebrtc 0.3.0 py36_0 conda-forge
ipywidgets 7.2.1 py36_1 conda-forge
isort 4.3.4 py36_0 defaults
itsdangerous 0.24 py_2 conda-forge
jdcal 1.4 py36_0 conda-forge
jedi 0.12.0 py36_0 conda-forge
jeepney 0.4 py36_0 defaults
jinja2 2.10 py36_0 conda-forge
jmespath 0.9.3 py36_0 conda-forge
jpeg 9c h470a237_1 conda-forge
json-c 0.12.1 0 conda-forge
jsonschema 2.6.0 py36_1 conda-forge
jupyter 1.0.0 py_1 conda-forge
jupyter_client 5.2.3 py36_0 conda-forge
jupyter_console 5.2.0 py36_0 conda-forge
jupyter_core 4.4.0 py_0 conda-forge
jupytercontrib 0.0.6 pypi_0 pypi
jupyterthemes 0.20.0 pypi_0 pypi
kealib 1.4.9 h0bee7d0_2 conda-forge
keyring 15.1.0 py36_0 defaults
kids-cache 0.0.7 pypi_0 pypi
kiwisolver 1.0.1 py36_1 conda-forge
krb5 1.14.6 0 conda-forge
lazy-object-proxy 1.3.1 py36h14c3975_2 defaults
lesscpy 0.13.0 pypi_0 pypi
libcurl 7.62.0 h20c2e04_0 defaults
libdap4 3.19.2 1 conda-forge
libedit 3.1.20170329 hf8c457e_1001 conda-forge
libffi 3.2.1 3 conda-forge
libgcc 7.2.0 h69d50b8_2 conda-forge
libgcc-ng 8.2.0 hdf63c60_1 defaults
libgdal 2.2.4 he036fc0_8 conda-forge
libgfortran 3.0.0 1 defaults
libiconv 1.15 0 conda-forge
libkml 1.3.0 6 conda-forge
libnetcdf 4.6.1 h628ed10_200 conda-forge
libpng 1.6.36 h84994c4_1000 conda-forge
libpq 9.5.3 1 conda-forge
libprotobuf 3.5.2 0 conda-forge
libsodium 1.0.16 0 conda-forge
libspatialindex 1.8.5 1 conda-forge
libspatialite 4.3.0a h72746d6_18 defaults
libssh2 1.8.0 1 conda-forge
libstdcxx-ng 8.2.0 hdf63c60_1 defaults
libtiff 4.0.9 0 conda-forge
libtool 2.4.6 0 conda-forge
libuuid 2.32.1 h470a237_2 conda-forge
libxcb 1.13 0 conda-forge
libxml2 2.9.8 0 conda-forge
libxslt 1.1.32 0 conda-forge
line_profiler 2.1.2 py36_0 conda-forge
llc 0.2.0 pypi_0 pypi
llvmlite 0.23.0 py36_1 conda-forge
locket 0.2.0 py36_1 conda-forge
lxml 4.2.1 py36_0 conda-forge
lzo 2.10 0 conda-forge
macholib 1.8 py_0 conda-forge
mako 1.0.7 pypi_0 pypi
markdown 2.6.11 py_0 conda-forge
markupsafe 1.0 py36_0 conda-forge
matplotlib 3.0.2 py36_1002 conda-forge
matplotlib-base 3.0.2 py36h167e16e_1002 conda-forge
mccabe 0.6.1 py36_1 defaults
memory_profiler 0.52.0 py36_0 conda-forge
microscopium 0.1.dev0 dev_0 <develop>
mistune 0.8.3 py36_1 conda-forge
mock 2.0.0 py36_0 conda-forge
more-itertools 4.1.0 py_0 conda-forge
mpc 1.1.0 4 conda-forge
mpfr 3.1.5 0 conda-forge
mpmath 1.0.0 py_0 conda-forge
msgpack-python 0.5.6 pypi_0 pypi
multipledispatch 0.5.0 py36_0 conda-forge
munch 2.3.2 py_0 conda-forge
mypy 0.650 py36_0 defaults
mypy_extensions 0.4.1 py36_0 defaults
napari 0.0.5.1+59.g425c4d3.dirty dev_0 <develop>
nbconvert 5.3.1 py_1 conda-forge
nbformat 4.4.0 py36_0 conda-forge
ncurses 6.1 hf484d3e_1002 conda-forge
netcdf4 1.4.1 py36ha292673_200 conda-forge
networkx 2.1 py36_0 conda-forge
notebook 5.7.4 pypi_0 pypi
notedown 1.5.1 pypi_0 pypi
numba 0.38.1 py36_0 conda-forge
numexpr 2.6.5 py36_0 conda-forge
numpy 1.14.3 pypi_0 pypi
numpydoc 0.8.0 pypi_0 pypi
oauth2client 4.1.2 pypi_0 pypi
ocl-icd 2.2.9 4 conda-forge
olefile 0.45.1 py36_0 conda-forge
openblas 0.3.3 ha44fe06_1 conda-forge
openjpeg 2.3.0 hf38bd82_1003 conda-forge
openpyxl 2.5.3 py36_0 conda-forge
openssl 1.1.1a h14c3975_1000 conda-forge
owslib 0.16.0 py_0 conda-forge
packaging 17.1 py_0 conda-forge
pandas 0.23.0 py36_0 conda-forge
pandoc 2.2.1 0 conda-forge
pandoc-attributes 0.1.7 pypi_0 pypi
pandocfilters 1.4.2 py36_0 conda-forge
pango 1.40.14 he752989_2 conda-forge
param 1.6.1 py_0 conda-forge
parso 0.2.0 py_0 conda-forge
partd 0.3.8 py36_0 conda-forge
patchelf 0.9 hfc679d8_2 conda-forge
pathtools 0.1.2 pypi_0 pypi
patsy 0.5.0 py36_0 conda-forge
pbr 4.0.2 py_0 conda-forge
pcre 8.42 h439df22_0 defaults
pelican 4.0.0 pypi_0 pypi
pelita 0.9.1 dev_0 <develop>
pexpect 4.5.0 py36_0 conda-forge
pickleshare 0.7.4 py36_0 conda-forge
pillow 5.3.0 py36hc736899_0 conda-forge
pims 0.4.1 pypi_0 pypi
pint 0.8.1 py36_0 conda-forge
pip 10.0.1 pypi_0 pypi
pipenv 2018.7.1 pypi_0 pypi
pixman 0.34.0 2 conda-forge
pkginfo 1.4.2 pypi_0 pypi
plotly 2.6.0 py36_0 conda-forge
pluggy 0.6.0 py_0 conda-forge
ply 3.11 pypi_0 pypi
poppler 0.67.0 h2fc8fa2_1002 conda-forge
poppler-data 0.4.9 0 conda-forge
proj4 4.9.3 5 conda-forge
prometheus-client 0.5.0 pypi_0 pypi
prompt_toolkit 1.0.15 py36_0 conda-forge
protobuf 3.5.2 py36_0 conda-forge
psutil 5.4.5 py36_0 conda-forge
psycopg2 2.6.2 py36_0 defaults
ptyprocess 0.5.2 py36_0 conda-forge
pudb 2018.1 py36_0 conda-forge
py 1.5.3 py_0 conda-forge
pyasn1 0.4.2 pypi_0 pypi
pyasn1-modules 0.2.1 pypi_0 pypi
pycodestyle 2.4.0 py36_0 defaults
pycosat 0.6.3 py36h470a237_1 conda-forge
pycparser 2.18 py36_0 conda-forge
pycrypto 2.6.1 py36_1 conda-forge
pydrive 1.3.1 pypi_0 pypi
pyepsg 0.3.2 py36_0 conda-forge
pyflakes 2.0.0 py36_0 defaults
pygithub 1.39 py36_0 conda-forge
pygments 2.2.0 py36_0 conda-forge
pyinstaller 3.3.1 py36_0 conda-forge
pyjwt 1.6.4 py_0 conda-forge
pylint 2.2.2 py36_0 defaults
pyopencl 2018.1.1 py36_2 conda-forge
pyopengl 3.1.1a1 py36_0 conda-forge
pyopenssl 18.0.0 py36_0 conda-forge
pyparsing 2.2.0 py36_0 conda-forge
pypinfo 14.0.0 pypi_0 pypi
pyproj 1.9.5.1 py36_0 conda-forge
pyqt 5.9.2 py36h05f1152_2 defaults
pyqt5 5.11.3 pypi_0 pypi
pyqt5-sip 4.19.13 pypi_0 pypi
pysal 1.14.3 py36_0 conda-forge
pyserial 3.4 pypi_0 pypi
pyshp 1.2.12 py_0 conda-forge
pysocks 1.6.8 py36_1 conda-forge
pytables 3.4.4 py36h4f72b40_1 conda-forge
pytest 3.5.1 py36_0 conda-forge
pytest-cov 2.5.1 py36_0 conda-forge
pytest-flake8 1.0.4 py36_0 conda-forge
pytest-runner 4.2 pypi_0 pypi
python 3.6.8 h0371630_0 defaults
python-dateutil 2.7.3 py_0 conda-forge
python-dotenv 0.8.2 pypi_0 pypi
python-graphviz 0.8.3 py36_0 conda-forge
pythran 0.8.5 py36_blas_openblash0eace8b_0 [blas_openblas] conda-forge
pytools 2018.4 py_0 conda-forge
pytz 2018.4 py_0 conda-forge
pyudev 0.21.0 pypi_0 pypi
pywavelets 0.5.2 py36_1 conda-forge
pyyaml 3.12 py36_1 conda-forge
pyzmq 17.0.0 py36_4 conda-forge
qt 5.9.7 h5867ecd_1 defaults
qtawesome 0.5.1 py36_1 defaults
qtconsole 4.3.1 py36_0 conda-forge
qtpy 1.5.1 py36_0 defaults
rasterio 0.36.0 py36_3 conda-forge
readline 7.0 hf8c457e_1001 conda-forge
readme-renderer 22.0 pypi_0 pypi
reikna 0.6.8 py36_0 conda-forge
requests 2.18.4 py36_1 conda-forge
requests-toolbelt 0.8.0 pypi_0 pypi
rope 0.11.0 py36_0 defaults
rsa 3.4.2 pypi_0 pypi
rshell 0.0.14 pypi_0 pypi
rtree 0.8.3 py36_0 conda-forge
ruamel.yaml 0.15.71 py36h470a237_0 conda-forge
ruamel_yaml 0.15.71 py36h470a237_0 conda-forge
s3transfer 0.1.13 py36_0 conda-forge
scikit-image 0.15.dev0 dev_0 <develop>
scikit-learn 0.20.0 py36_blas_openblash00c3548_201 [blas_openblas] conda-forge
scipy 1.1.0 py36_blas_openblashb06ca3d_202 [blas_openblas] conda-forge
seaborn 0.9.0 py_0 conda-forge
secretstorage 3.1.0 py36_0 defaults
send2trash 1.5.0 py_0 conda-forge
setuptools 39.1.0 py36_0 conda-forge
shapely 1.6.4 py36_0 conda-forge
simplegeneric 0.8.1 py36_0 conda-forge
sip 4.19.8 pypi_0 pypi
six 1.11.0 py36_1 conda-forge
skan 0.8.0.dev0 dev_0 <develop>
slicerator 0.9.8 pypi_0 pypi
smmap2 2.0.4 py_0 conda-forge
snakeviz 0.4.2 py36h8fadade_0 defaults
snowballstemmer 1.2.1 pypi_0 pypi
snuggs 1.4.1 py36_0 conda-forge
sortedcontainers 1.5.10 py36_0 conda-forge
sphinx 1.8.1 pypi_0 pypi
sphinx-copybutton 0.2.5 pypi_0 pypi
sphinx-gallery 0.2.0 pypi_0 pypi
sphinxcontrib 1.0 py36_1 defaults
sphinxcontrib-websupport 1.1.0 pypi_0 pypi
spyder 3.3.1 py36_1 defaults
spyder-kernels 0.2.6 py36_0 defaults
sqlalchemy 1.2.7 py36h65ede16_0 conda-forge
sqlite 3.26.0 h67949de_1000 conda-forge
statsmodels 0.8.0 py36_0 conda-forge
sympy 1.1.1 py36_0 conda-forge
tblib 1.3.2 py36_0 conda-forge
tensorflow 1.3.0 py36_0 conda-forge
terminado 0.8.1 py36_0 conda-forge
testpath 0.3.1 py36_0 conda-forge
tinydb 3.9.0.post1 pypi_0 pypi
tinyrecord 0.1.5 pypi_0 pypi
tk 8.6.9 h84994c4_1000 conda-forge
toolz 0.9.0 py_0 conda-forge
tornado 5.1.1 pypi_0 pypi
tqdm 4.26.0 py_0 conda-forge
traitlets 4.3.2 py36_0 conda-forge
traittypes 0.2.1 py36_0 conda-forge
twine 1.12.1 pypi_0 pypi
typed-ast 1.1.0 py36h14c3975_0 defaults
typing 3.6.4 py36_0 conda-forge
umap-learn 0.3.6 py36_1000 conda-forge
unidecode 1.0.23 pypi_0 pypi
uritemplate 3.0.0 pypi_0 pypi
urllib3 1.22 py36_0 conda-forge
urwid 1.3.1 py36_0 conda-forge
util-linux 2.21 0 defaults
vigra 1.11.1 py36hec99981_7 conda-forge
vincent 0.4.4 py36_0 conda-forge
viridis 0.4.2 pypi_0 pypi
virtualenv 16.0.0 pypi_0 pypi
virtualenv-clone 0.3.0 pypi_0 pypi
vispy 0.5.3 py36_0 conda-forge
visvis 1.11.1 py_0 conda-forge
watchdog 0.8.3 pypi_0 pypi
wcwidth 0.1.7 py36_0 conda-forge
webencodings 0.5 py36_0 conda-forge
werkzeug 0.14.1 py_0 conda-forge
wheel 0.31.0 py36_0 conda-forge
widgetsnbextension 3.2.1 py36_0 conda-forge
wrapt 1.10.11 py36h14c3975_2 defaults
xarray 0.10.4 py36_0 conda-forge
xerces-c 3.2.0 h5d6a6da_2 conda-forge
xgboost 0.71 py36_0 conda-forge
xlrd 1.1.0 py_2 conda-forge
xlwt 1.3.0 py36_0 conda-forge
xorg-kbproto 1.0.7 h470a237_2 conda-forge
xorg-libice 1.0.9 h470a237_4 conda-forge
xorg-libsm 1.2.2 h8c8a85c_6 conda-forge
xorg-libx11 1.6.6 h470a237_0 conda-forge
xorg-libxau 1.0.8 3 conda-forge
xorg-libxdmcp 1.1.2 3 conda-forge
xorg-libxext 1.3.3 h470a237_4 conda-forge
xorg-libxpm 3.5.12 h470a237_2 conda-forge
xorg-libxrender 0.9.10 h470a237_2 conda-forge
xorg-libxt 1.1.5 h470a237_2 conda-forge
xorg-renderproto 0.11.1 h470a237_2 conda-forge
xorg-xextproto 7.3.0 h470a237_2 conda-forge
xorg-xproto 7.0.31 h470a237_7 conda-forge
xz 5.2.4 h470a237_1 conda-forge
yaml 0.1.7 0 conda-forge
zeromq 4.2.5 1 conda-forge
zerorpc 0.6.1 pypi_0 pypi
zict 0.1.3 py_0 conda-forge
zlib 1.2.11 0 conda-forge
```
</p></details>
| Thanks for the detailed post. There have been a few others like this. Just to clarify: you have one or more pip-installed packages in there, but the ones that are flaking out are not just the pip-installed ones, right?
I will try to replicate this issue but given changing metadata over time it might be difficult to track down.
@jni Can you try running the update command with the `-vv` argument? That turns on debugging which could help explain what choices the solver is making.
Here is what is going on here:
Conda has determined that the environment is inconsistent because `pip` is not installed from a conda package. The `python` package has a dependency on `pip` due to the "add_pip_as_python_dependency: True" configuration. This dependency can only be met by conda packages and conda, seeing that pip has been installed from pypi, does not see this dependency as being met.
After conda determines the environment is inconsistent it determines a set of consistent packages, which does not include python, and then solves for this environment and the requested packages. In the view of the solver, python nor any of the python packages are installed so it is free to select any version of python. Since higher version numbers are preferred by the solver, it chooses python 3.7.1 which is the latest version in the conda-forge channel. There is no need to update or modify the other packages because in the view of the solver they are not installed.
Similar behavior can be seen in the following example on Linux of macOS:
```
conda create -y -n example python=3.6 psutil
conda remove -y -n example --force sqlite # intentionally break the environment
conda install -n example imagesize # This will upgrade python to 3.7 but not update psutil
```
There are a number of things that are going wrong here that should be fixed:
* Packages that have been overwritten by pip or a development install need to be included in the solver in some manner.
* Users should be warned an invalid environment is detected, currently debugging needs to be turned to even see any indication of this.
* When an invalid environment is detected, conda should try to preserve as many package are installed and try to fix the environment rather than solving for only the valid portion.
@jjhelmus I assume you no longer need the `-vv` output from me? And thank you very much for that explanation.
@jni No need for a the `-vv` output. Your report log was excellent and had the details needed to create some good tests cases to prevent these type of issue in the future. | 2019-03-24T22:55:56 |
conda/conda | 8,531 | conda__conda-8531 | [
"8530"
] | e5dfb6001b4b463ef5255cc136989abeec8e81d9 | diff --git a/conda/core/initialize.py b/conda/core/initialize.py
--- a/conda/core/initialize.py
+++ b/conda/core/initialize.py
@@ -81,6 +81,11 @@
r"([\s\S]*?)"
r"# <<< conda initialize <<<(?:\n|\r\n)?")
+CONDA_INITIALIZE_PS_RE_BLOCK = (
+ r"^#region conda initialize(?:\n|\r\n)"
+ r"([\s\S]*?)"
+ r"#endregion(?:\n|\r\n)?")
+
class Result:
NEEDS_SUDO = "needs sudo"
MODIFIED = "modified"
@@ -1371,7 +1376,7 @@ def init_powershell_user(target_path, conda_prefix, reverse):
# TODO: comment out old ipmos and Import-Modules.
if reverse:
- profile_content = re.sub(r"\s*\#region conda initialize.*\#endregion",
+ profile_content = re.sub(CONDA_INITIALIZE_PS_RE_BLOCK,
"",
profile_content,
count=1,
@@ -1384,7 +1389,7 @@ def init_powershell_user(target_path, conda_prefix, reverse):
if "#region conda initialize" not in profile_content:
profile_content += "\n{}\n".format(conda_initialize_content)
else:
- profile_content = re.sub(r"\#region conda initialize.*\#endregion",
+ profile_content = re.sub(CONDA_INITIALIZE_PS_RE_BLOCK,
"__CONDA_REPLACE_ME_123__",
profile_content,
count=1,
| conda init keeps modifying powershell profile
Repeated calls to conda init keep modifying profile.ps1 each time.
```
(base) wani@lenovo ~/h/conda ❯❯❯ conda init --all
...
modified /home/wani/.config/powershell/profile.ps1
...
(base) wani@lenovo ~/h/conda ❯❯❯ conda init --all
...
modified /home/wani/.config/powershell/profile.ps1
...
```
| 2019-04-09T16:00:14 |
||
conda/conda | 8,562 | conda__conda-8562 | [
"8561"
] | 4f152eed002ae8247cc7f0feac871dc35f322d73 | diff --git a/conda/_vendor/auxlib/compat.py b/conda/_vendor/auxlib/compat.py
--- a/conda/_vendor/auxlib/compat.py
+++ b/conda/_vendor/auxlib/compat.py
@@ -66,7 +66,7 @@ def Utf8NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",
if 'CONDA_TEST_SAVE_TEMPS' in os.environ:
delete = False
return codecs.getwriter('utf-8')(NamedTemporaryFile(mode=mode, bufsize=bufsize, suffix=suffix,
- prefix=template, dir=None, delete=delete))
+ prefix=template, dir=dir, delete=delete))
else:
def Utf8NamedTemporaryFile(mode='w+b', buffering=-1, newline=None,
suffix=None, prefix=None, dir=None, delete=True):
diff --git a/conda_env/pip_util.py b/conda_env/pip_util.py
--- a/conda_env/pip_util.py
+++ b/conda_env/pip_util.py
@@ -35,6 +35,8 @@ def pip_subprocess(args, prefix, cwd):
if rc != 0:
print("Pip subprocess error:")
print(stderr)
+ raise CondaEnvException("Pip failed")
+
# This will modify (break) Context. We have a context stack but need to verify it works
# stdout, stderr, rc = run_command(Commands.RUN, *run_args, stdout=None, stderr=None)
| Python2.7: pip requirements.txt recursive requirements files fail to install
## Current Behavior
Installing an environment that has pip requirements such as:
```yml
pip:
- -r requirements.txt
```
Where the `requirements.txt` file contains references to others:
```ini
# contents of requirements.txt
-r tools/requirements.txt
```
Yields an error resolving the referenced requirements files when running pip on the top file.
### Steps to Reproduce
Affects python2 only.
With the following repo structure:
```
myrepo
├── environment.yml
├── requirements.txt
└── tools
└── requirements.txt
```
And `myrepo/requirements.txt` containing a line:
```ini
-r tools/requirements.txt
```
Creating the conda environment will give an error:
```
❯ conda env update -f environment.yml
Collecting package metadata: done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Ran pip subprocess with arguments:
[u'/home/user/miniconda2/envs/Foo/bin/python', '-m', 'pip', 'install', '-r', '/tmp/tmpuQ5dFk.requirements.txt']
Pip subprocess output:
Pip subprocess error:
Could not open requirements file: [Errno 2] No such file or directory: '/tmp/tools/requirements.txt'
You are using pip version 9.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
#
# To activate this environment, use
#
# $ conda activate Foo
#
# To deactivate an active environment, use
#
# $ conda deactivate
```
Interestingly enough, it doesn't cause conda to return an error; it would seem prudent to raise the pip subprocess error too, since the result is a malformed environment.
## Expected Behavior
Recursive `requirements.txt` files should behave as normal.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
shell level : 0
user config file : /home/npendleton/.condarc
populated config files : /home/npendleton/.condarc
conda version : 4.6.12
conda-build version : 3.17.8
python version : 2.7.15.final.0
base environment : /home/npendleton/miniconda2 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/npendleton/miniconda2/pkgs
/home/npendleton/.conda/pkgs
envs directories : /home/npendleton/miniconda2/envs
/home/npendleton/.conda/envs
platform : linux-64
user-agent : conda/4.6.12 requests/2.18.4 CPython/2.7.15 Linux/4.18.0-17-generic ubuntu/18.10 glibc/2.28
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /home/npendleton/.condarc <==
changeps1: False
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /home/npendleton/miniconda2:
#
# Name Version Build Channel
asn1crypto 0.24.0 py27_0 defaults
backports 1.0 py27_1 defaults
backports.functools_lru_cache 1.5 py27_1 defaults
beautifulsoup4 4.7.1 py27_1 defaults
bzip2 1.0.6 h14c3975_5 defaults
ca-certificates 2019.1.23 0 defaults
certifi 2019.3.9 py27_0 defaults
cffi 1.11.5 py27h9745a5d_0 defaults
chardet 3.0.4 py27hfa10054_1 defaults
cli-authenticate 1.1.1 pypi_0 pypi
click 7.0 py27_0 defaults
conda 4.6.12 py27_1 defaults
conda-build 3.17.8 py27_0 defaults
conda-env 2.6.0 h36134e3_1 defaults
conda-verify 3.1.1 py27_0 defaults
contextlib2 0.5.5 py27hbf4c468_0 defaults
cryptography 2.5 py27h1ba5d50_0 defaults
enum34 1.1.6 py27h99a27e9_1 defaults
fb-site-query 0.0.4 pypi_0 pypi
filelock 3.0.10 py27_0 defaults
future 0.17.1 py27_0 defaults
futures 3.2.0 py27h7b459c0_0 defaults
glob2 0.6 py27_1 defaults
graphql-core 2.1 pypi_0 pypi
graphql-relay 0.4.5 pypi_0 pypi
icu 58.2 h9c2bf20_1 defaults
idna 2.6 py27h5722d68_1 defaults
invoke 1.2.0 pypi_0 pypi
ipaddress 1.0.22 py27_0 defaults
jinja2 2.10 py27_0 defaults
libarchive 3.3.3 h5d8350f_5 defaults
libedit 3.1.20181209 hc058e9b_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc-ng 8.2.0 hdf63c60_1 defaults
liblief 0.9.0 h7725739_2 defaults
libstdcxx-ng 8.2.0 hdf63c60_1 defaults
libxml2 2.9.9 he19cac6_0 defaults
lz4-c 1.8.1.2 h14c3975_0 defaults
lzo 2.10 h49e0be7_2 defaults
markupsafe 1.1.1 py27h7b6447c_0 defaults
ncurses 6.1 he6710b0_1 defaults
openssl 1.1.1b h7b6447c_1 defaults
patchelf 0.9 he6710b0_3 defaults
pip 19.0.3 py27_0 defaults
pkginfo 1.5.0.1 py27_0 defaults
promise 2.2.1 pypi_0 pypi
psutil 5.6.1 py27h7b6447c_0 defaults
py-lief 0.9.0 py27h7725739_2 defaults
pycosat 0.6.3 py27ha4109ae_0 defaults
pycparser 2.18 py27hefa08c5_1 defaults
pycryptodome 3.4.11+fb1 pypi_0 pypi
pyopenssl 17.5.0 py27hcee3be0_0 defaults
pyserial 3.4 pypi_0 pypi
pysocks 1.6.8 py27_0 defaults
python 2.7.15 h9bab390_6 defaults
python-libarchive-c 2.8 py27_6 defaults
pytz 2018.9 py27_0 defaults
pyyaml 3.13 py27h14c3975_0 defaults
readline 7.0 ha6073c6_4 defaults
requests 2.18.4 py27hc5b0589_1 defaults
ruamel_yaml 0.15.35 py27h14c3975_1 defaults
rx 1.6.1 pypi_0 pypi
scandir 1.10.0 py27h7b6447c_0 defaults
setuptools 39.0.1 py27_0 defaults
six 1.11.0 py27h5f960f1_1 defaults
soupsieve 1.7.1 py27_0 defaults
sqlite 3.26.0 h7b6447c_0 defaults
tar-client 1.0.0 pypi_0 pypi
tk 8.6.8 hbc83047_0 defaults
tqdm 4.31.1 py_0 defaults
typing 3.6.6 pypi_0 pypi
urllib3 1.22 py27ha55213b_0 defaults
wheel 0.31.0 py27_0 defaults
xz 5.2.4 h14c3975_4 defaults
yaml 0.1.7 had09818_2 defaults
zlib 1.2.11 ha838bed_2 defaults
zstd 1.3.7 h0b5b093_0 defaults
```
</p></details>
| 2019-04-15T20:08:23 |
||
conda/conda | 8,564 | conda__conda-8564 | [
"8566"
] | 4f152eed002ae8247cc7f0feac871dc35f322d73 | diff --git a/conda/activate.py b/conda/activate.py
--- a/conda/activate.py
+++ b/conda/activate.py
@@ -479,22 +479,21 @@ def _get_starting_path_list(self):
clean_paths[sys.platform] if sys.platform in clean_paths else
'/usr/bin')
path_split = path.split(os.pathsep)
- if on_win:
- # We used to prepend sys.prefix\Library\bin to PATH on startup but not anymore.
- # Instead, in conda 4.6 we add the full suite of entries. This is performed in
- # condabin\conda.bat and condabin\ _conda_activate.bat. However, we
- # need to ignore the stuff we add there, and only consider actual PATH entries.
- prefix_dirs = tuple(self._get_path_dirs(sys.prefix))
- start_index = 0
- while (start_index < len(prefix_dirs) and
- start_index < len(path_split) and
- paths_equal(path_split[start_index], prefix_dirs[start_index])):
- start_index += 1
- path_split = path_split[start_index:]
- library_bin_dir = self.path_conversion(
- self.sep.join((sys.prefix, 'Library', 'bin')))
- if paths_equal(path_split[0], library_bin_dir):
- path_split = path_split[1:]
+ # We used to prepend sys.prefix\Library\bin to PATH on startup but not anymore.
+ # Instead, in conda 4.6 we add the full suite of entries. This is performed in
+ # condabin\conda.bat and condabin\ _conda_activate.bat. However, we
+ # need to ignore the stuff we add there, and only consider actual PATH entries.
+ prefix_dirs = tuple(self._get_path_dirs(sys.prefix))
+ start_index = 0
+ while (start_index < len(prefix_dirs) and
+ start_index < len(path_split) and
+ paths_equal(path_split[start_index], prefix_dirs[start_index])):
+ start_index += 1
+ path_split = path_split[start_index:]
+ library_bin_dir = self.path_conversion(
+ self.sep.join((sys.prefix, 'Library', 'bin')))
+ if paths_equal(path_split[0], library_bin_dir):
+ path_split = path_split[1:]
return path_split
def _get_path_dirs(self, prefix, extra_library_bin=False):
@@ -682,11 +681,11 @@ def _translation(found_path): # NOQA
def path_identity(paths):
if isinstance(paths, string_types):
- return paths
+ return os.path.normpath(paths)
elif paths is None:
return None
else:
- return tuple(paths)
+ return tuple(os.path.normpath(_) for _ in paths)
class PosixActivator(_Activator):
| diff --git a/conda.recipe/run_test.bat b/conda.recipe/run_test.bat
new file mode 100644
--- /dev/null
+++ b/conda.recipe/run_test.bat
@@ -0,0 +1,30 @@
+@echo on
+SET CONDA_SHLVL=
+REM don't inherit these from the build env setup
+SET _CE_CONDA=
+SET _CE_M=
+SET _CONDA_EXE=
+SET
+REM CALL stuff is necessary because conda in condabin is a bat script
+REM running bat files within other bat files requires CALL or else
+REM the outer script (our test script) exits when the inner completes
+CALL %PREFIX%\condabin\conda_hook.bat
+CALL conda.bat activate base
+FOR /F "delims=" %%i IN ('python -c "import sys; print(sys.version_info[0])"') DO set "PYTHON_MAJOR_VERSION=%%i"
+SET TEST_PLATFORM=win
+FOR /F "delims=" %%i IN ('python -c "import random as r; print(r.randint(0,4294967296))"') DO set "PYTHONHASHSEED=%%i"
+where conda
+CALL conda info
+CALL conda create -y -p .\built-conda-test-env python=3.5
+CALL conda.bat activate .\built-conda-test-env
+ECHO %CONDA_PREFIX%
+IF NOT "%CONDA_PREFIX%"=="%CD%\built-conda-test-env" EXIT /B 1
+FOR /F "delims=" %%i IN ('python -c "import sys; print(sys.version_info[1])"') DO set "ENV_PYTHON_MINOR_VERSION=%%i"
+IF NOT "%ENV_PYTHON_MINOR_VERSION%" == "5" EXIT /B 1
+CALL conda deactivate
+SET MSYSTEM=MINGW%ARCH%
+SET MSYS2_PATH_TYPE=inherit
+SET CHERE_INVOKING=1
+FOR /F "delims=" %%i IN ('cygpath.exe -u "%PREFIX%"') DO set "PREFIXP=%%i"
+bash -lc "source %PREFIXP%/Scripts/activate"
+py.test tests -m "not integration and not installed" -vv
\ No newline at end of file
diff --git a/conda.recipe/run_test.sh b/conda.recipe/run_test.sh
new file mode 100644
--- /dev/null
+++ b/conda.recipe/run_test.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+set -x
+
+unset CONDA_SHLVL
+unset _CE_CONDA
+unset _CE_M
+unset CONDA_EXE
+eval "$(python -m conda shell.bash hook)"
+conda activate base
+export PYTHON_MAJOR_VERSION=$(python -c "import sys; print(sys.version_info[0])")
+export TEST_PLATFORM=$(python -c "import sys; print('win' if sys.platform.startswith('win') else 'unix')")
+export PYTHONHASHSEED=$(python -c "import random as r; print(r.randint(0,4294967296))") && echo "PYTHONHASHSEED=$PYTHONHASHSEED"
+env | sort
+conda info
+conda create -y -p ./built-conda-test-env python=3.5
+conda activate ./built-conda-test-env
+echo $CONDA_PREFIX
+[ "$CONDA_PREFIX" = "$PWD/built-conda-test-env" ] || exit 1
+[ $(python -c "import sys; print(sys.version_info[1])") = 5 ] || exit 1
+conda deactivate
+py.test tests -m "not integration and not installed" -vv
diff --git a/tests/test_activate.py b/tests/test_activate.py
--- a/tests/test_activate.py
+++ b/tests/test_activate.py
@@ -1238,8 +1238,9 @@ class InteractiveShell(object):
# 'init_command': 'env | sort && mount && which {0} && {0} -V && echo "$({0} -m conda shell.posix hook)" && eval "$({0} -m conda shell.posix hook)"'.format('/c/Users/rdonnelly/mc/python.exe'), # sys.executable.replace('\\', '/')),
# 'init_command': 'env | sort && echo "$({0} -m conda shell.posix hook)" && eval "$({0} -m conda shell.posix hook)"'.format(self.
# '/c/Users/rdonnelly/mc/python.exe'), # sys.executable.replace('\\', '/')),
- 'init_command': 'env | sort && echo "$({0} -m conda shell.posix hook {1})" && eval "$({0} -m conda shell.posix hook {1})" && env | sort'\
- .format(exe_quoted, dev_arg),
+ 'init_command': ('env | sort && echo "$({0} -m conda shell.posix hook {1})" && '
+ 'eval "$({0} -m conda shell.posix hook {1})" && env | sort'
+ .format(exe_quoted, dev_arg)),
'print_env_var': 'echo "$%s"',
},
@@ -1253,7 +1254,8 @@ class InteractiveShell(object):
},
'zsh': {
'base_shell': 'posix', # inheritance implemented in __init__
- 'init_command': 'env | sort && eval "$(python -m conda shell.zsh hook {0})"'.format(dev_arg),
+ 'init_command': ('env | sort && eval "$({0} -m conda shell.zsh hook {1})"'
+ .format(exe_quoted, dev_arg)),
},
# It should be noted here that we use the latest hook with whatever conda.exe is installed
# in sys.prefix (and we will activate all of those PATH entries). We will set PYTHONPATH
@@ -1296,7 +1298,7 @@ class InteractiveShell(object):
},
'fish': {
'activator': 'fish',
- 'init_command': 'eval (python -m conda shell.fish hook {0})'.format(dev_arg),
+ 'init_command': 'eval ({0} -m conda shell.fish hook {1})'.format(exe_quoted, dev_arg),
'print_env_var': 'echo $%s',
},
# We don't know if the PowerShell executable is called
@@ -1729,6 +1731,7 @@ def test_csh_basic_integration(self):
self.basic_csh(shell)
@pytest.mark.skipif(not which('tcsh'), reason='tcsh not installed')
+ @pytest.mark.xfail(reason="punting until we officially enable support for tcsh")
def test_tcsh_basic_integration(self):
with InteractiveShell('tcsh') as shell:
self.basic_csh(shell)
diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -1210,7 +1210,7 @@ def test_install_freeze_installed_flag(self):
assert package_is_installed(prefix, "bleach=2")
with pytest.raises(UnsatisfiableError):
run_command(Commands.INSTALL, prefix,
- "conda-forge::tensorflow>=1.4", "--dry-run", "--freeze-installed")
+ "conda-forge::tensorflow>=1.4,<1.12", "--dry-run", "--freeze-installed")
@pytest.mark.xfail(on_win, reason="nomkl not present on windows",
strict=True)
| Path exploding on Windows due to conda init
## Current Behavior
Every time I issue a conda command in powershell, the windows path gets extended with duplicate entries... eventutually becoming too long to set.
**BUG FIX**
Note the line below:
```
Write-Output Env:PATH is $Env:PATH;
```
It's a debug output that was never removed that's being added to the PATH and thus the system keeps adding to the PATH over and over and over...
### Steps to Reproduce
Do conda init powershell and then using commmands the path keeps growing. It appears to be happening in Conda.psm1:
```
<#
.SYNOPSIS
Adds the entries of sys.prefix to PATH and returns the old PATH.
.EXAMPLE
$OldPath = Add-Sys-Prefix-To-Path
#>
function Add-Sys-Prefix-To-Path() {
$OldPath = $Env:PATH;
if ($Env:_CE_CONDA -ne '' -And $Env:OS -eq 'Windows_NT') {
# Windows has a different layout for the python exe than other platforms.
$sysp = Split-Path $Env:CONDA_EXE -Parent;
} else {
$sysp = Split-Path $Env:CONDA_EXE -Parent;
$sysp = Split-Path $sysp -Parent;
}
if ($Env:OS -eq 'Windows_NT') {
$Env:PATH = $sysp + ';' +
$sysp + '\Library\mingw-w64\bin;' +
$sysp + '\Library\usr\bin;' +
$sysp + '\Library\bin;' +
$sysp + '\Scripts;' +
$sysp + '\bin;' + $Env:PATH;
} else {
$Env:PATH = $sysp + '/bin:' + $Env:PATH;
}
Write-Output Env:PATH is $Env:PATH;
return $OldPath;
}
```
## Expected Behavior
Path should not lengthen with duplicates
## Environment Information
| 2019-04-16T02:42:50 |
|
conda/conda | 8,611 | conda__conda-8611 | [
"8585"
] | a744d852e6364b8a31c10bc0c6b30020f9a85fcd | diff --git a/conda/utils.py b/conda/utils.py
--- a/conda/utils.py
+++ b/conda/utils.py
@@ -12,7 +12,7 @@
from ._vendor.auxlib.compat import shlex_split_unicode, string_types, Utf8NamedTemporaryFile
from .common.compat import on_win, isiterable
-from .common.path import win_path_to_unix
+from .common.path import win_path_to_unix, which
from .common.url import path_to_url
from os.path import abspath, join, isfile, basename
from os import environ
@@ -384,7 +384,10 @@ def wrap_subprocess_call(on_win, root_prefix, prefix, dev_mode, debug_wrapper_sc
script_caller = fh.name
command_args = [comspec, '/d', '/c', script_caller]
else:
- shell_path = 'sh' if 'bsd' in sys.platform else 'bash'
+ shell_path = which('bash') or which('sh')
+ if shell_path is None:
+ raise Exception("No compatible shell found!")
+
# During tests, we sometimes like to have a temp env with e.g. an old python in it
# and have it run tests against the very latest development sources. For that to
# work we need extra smarts here, we want it to be instead:
| Installing python noarch packages requires bash on unix as of conda 4.6.9
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
As of conda 4.6.9, installing python noarch packages on unix requires having bash on PATH. This is a regression, as the only shell requirement previous has been a POSIX-compliant `/bin/sh` (and then only for environment activation, which requires a shell anyway, since activation only happens within a shell).
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
FROM alpine:3.9
ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
# borrowed from https://github.com/frol/docker-alpine-glibc/blob/master/Dockerfile
RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \
ALPINE_GLIBC_PACKAGE_VERSION="2.29-r0" && \
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
echo \
"-----BEGIN PUBLIC KEY-----\
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\
1QIDAQAB\
-----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \
wget \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
apk add --no-cache \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
\
rm "/etc/apk/keys/sgerrand.rsa.pub" && \
/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true && \
echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \
\
apk del glibc-i18n && \
\
rm "/root/.wget-hsts" && \
apk del .build-dependencies && \
rm \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"
RUN \
wget https://repo.continuum.io/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh -O miniconda.sh \
&& sh miniconda.sh -bfp /miniconda \
&& rm miniconda.sh \
&& /miniconda/bin/conda create -p /conda conda=4.6.9 python=3.7 \
&& rm -rf /miniconda
RUN /conda/bin/conda install conda-forge::cachecontrol
```
Changing the conda version to `4.6.8` in the above Dockerfile lets the build finish successfully.
| 2019-04-29T07:44:32 |
||
conda/conda | 8,644 | conda__conda-8644 | [
"8274"
] | 239ea5f0a1a3d7f8efc5fbe8a4f1f0885d121e67 | diff --git a/conda/activate.py b/conda/activate.py
--- a/conda/activate.py
+++ b/conda/activate.py
@@ -838,7 +838,7 @@ def __init__(self, arguments=None):
self.sep = '/'
self.path_conversion = native_path_to_unix
self.script_extension = '.xsh'
- self.tempfile_extension = '.xsh'
+ self.tempfile_extension = None
self.command_join = '\n'
self.unset_var_tmpl = 'del $%s'
@@ -851,7 +851,7 @@ def __init__(self, arguments=None):
super(XonshActivator, self).__init__(arguments)
def _hook_preamble(self):
- return 'CONDA_EXE = "%s"' % context.conda_exe
+ return '$CONDA_EXE = "%s"' % context.conda_exe
class CmdExeActivator(_Activator):
diff --git a/conda/core/initialize.py b/conda/core/initialize.py
--- a/conda/core/initialize.py
+++ b/conda/core/initialize.py
@@ -414,7 +414,7 @@ def make_install_plan(conda_prefix):
plan.append({
'function': install_conda_xsh.__name__,
'kwargs': {
- 'target_path': join(site_packages_dir, 'xonsh', 'conda.xsh'),
+ 'target_path': join(site_packages_dir, 'xontrib', 'conda.xsh'),
'conda_prefix': conda_prefix,
},
})
@@ -493,6 +493,32 @@ def make_initialize_plan(conda_prefix, shells, for_user, for_system, anaconda_pr
},
})
+ if 'xonsh' in shells:
+ if for_user:
+ config_xonsh_path = expand(join('~', '.xonshrc'))
+ plan.append({
+ 'function': init_xonsh_user.__name__,
+ 'kwargs': {
+ 'target_path': config_xonsh_path,
+ 'conda_prefix': conda_prefix,
+ 'reverse': reverse,
+ },
+ })
+
+ if for_system:
+ if on_win:
+ config_xonsh_path = expand(join('%ALLUSERSPROFILE%', 'xonsh', 'xonshrc'))
+ else:
+ config_xonsh_path = '/etc/xonshrc'
+ plan.append({
+ 'function': init_xonsh_user.__name__,
+ 'kwargs': {
+ 'target_path': config_xonsh_path,
+ 'conda_prefix': conda_prefix,
+ 'reverse': reverse,
+ },
+ })
+
if 'tcsh' in shells and for_user:
tcshrc_path = expand(join('~', '.tcshrc'))
plan.append({
@@ -1066,6 +1092,91 @@ def init_fish_user(target_path, conda_prefix, reverse):
return Result.NO_CHANGE
+def _config_xonsh_content(conda_prefix):
+ if on_win:
+ from ..activate import native_path_to_unix
+ conda_exe = native_path_to_unix(join(conda_prefix, 'Scripts', 'conda.exe'))
+ else:
+ conda_exe = join(conda_prefix, 'bin', 'conda')
+ conda_initialize_content = dals("""
+ # >>> conda initialize >>>
+ # !! Contents within this block are managed by 'conda init' !!
+ import sys as _sys
+ from types import ModuleType as _ModuleType
+ _mod = _ModuleType("xontrib.conda",
+ "Autogenerated from $({conda_exe} shell.xonsh hook)")
+ __xonsh__.execer.exec($("{conda_exe}" "shell.xonsh" "hook"),
+ glbs=_mod.__dict__,
+ filename="$({conda_exe} shell.xonsh hook)")
+ _sys.modules["xontrib.conda"] = _mod
+ del _sys, _mod, _ModuleType
+ # <<< conda initialize <<<
+ """).format(conda_exe=conda_exe)
+ return conda_initialize_content
+
+
+def init_xonsh_user(target_path, conda_prefix, reverse):
+ # target_path: ~/.xonshrc
+ user_rc_path = target_path
+
+ try:
+ with open(user_rc_path) as fh:
+ rc_content = fh.read()
+ except FileNotFoundError:
+ rc_content = ''
+ except:
+ raise
+
+ rc_original_content = rc_content
+
+ conda_init_comment = "# commented out by conda initialize"
+ conda_initialize_content = _config_xonsh_content(conda_prefix)
+ if reverse:
+ # uncomment any lines that were commented by prior conda init run
+ rc_content = re.sub(
+ r"#\s(.*?)\s*{}".format(conda_init_comment),
+ r"\1",
+ rc_content,
+ flags=re.MULTILINE,
+ )
+
+ # remove any conda init sections added
+ rc_content = re.sub(
+ r"^\s*" + CONDA_INITIALIZE_RE_BLOCK,
+ "",
+ rc_content,
+ flags=re.DOTALL | re.MULTILINE
+ )
+ else:
+ replace_str = "__CONDA_REPLACE_ME_123__"
+ rc_content = re.sub(
+ CONDA_INITIALIZE_RE_BLOCK,
+ replace_str,
+ rc_content,
+ flags=re.MULTILINE,
+ )
+ # TODO: maybe remove all but last of replace_str, if there's more than one occurrence
+ rc_content = rc_content.replace(replace_str, conda_initialize_content)
+
+ if "# >>> conda initialize >>>" not in rc_content:
+ rc_content += '\n{0}\n'.format(conda_initialize_content)
+
+ if rc_content != rc_original_content:
+ if context.verbosity:
+ print('\n')
+ print(target_path)
+ print(make_diff(rc_original_content, rc_content))
+ if not context.dry_run:
+ # Make the directory if needed.
+ if not exists(dirname(user_rc_path)):
+ mkdir_p(dirname(user_rc_path))
+ with open(user_rc_path, 'w') as fh:
+ fh.write(rc_content)
+ return Result.MODIFIED
+ else:
+ return Result.NO_CHANGE
+
+
def _bashrc_content(conda_prefix, shell):
if on_win:
from ..activate import native_path_to_unix
| diff --git a/tests/core/test_initialize.py b/tests/core/test_initialize.py
--- a/tests/core/test_initialize.py
+++ b/tests/core/test_initialize.py
@@ -209,7 +209,7 @@ def test_make_install_plan(self):
"function": "install_conda_xsh",
"kwargs": {
"conda_prefix": "/darwin",
- "target_path": "/darwin/lib/python2.6/site-packages\\xonsh\\conda.xsh"
+ "target_path": "/darwin/lib/python2.6/site-packages\\xontrib\\conda.xsh"
}
},
{
@@ -295,7 +295,7 @@ def test_make_install_plan(self):
"function": "install_conda_xsh",
"kwargs": {
"conda_prefix": "/darwin",
- "target_path": "/darwin/lib/python2.6/site-packages/xonsh/conda.xsh"
+ "target_path": "/darwin/lib/python2.6/site-packages/xontrib/conda.xsh"
}
},
{
@@ -344,7 +344,7 @@ def test_make_entry_point(self):
assert ep_contents == dals("""
# -*- coding: utf-8 -*-
import sys
-
+
if __name__ == '__main__':
from conda.entry.point import run
sys.exit(run())
@@ -354,7 +354,7 @@ def test_make_entry_point(self):
#!%s/bin/python
# -*- coding: utf-8 -*-
import sys
-
+
if __name__ == '__main__':
from conda.entry.point import run
sys.exit(run())
@@ -444,9 +444,9 @@ def test_install_conda_xsh(self):
first_line, remainder = created_file_contents.split('\n', 1)
if on_win:
- assert first_line == 'CONDA_EXE = "%s"' % join(conda_prefix, 'Scripts', 'conda.exe')
+ assert first_line == '$CONDA_EXE = "%s"' % join(conda_prefix, 'Scripts', 'conda.exe')
else:
- assert first_line == 'CONDA_EXE = "%s"' % join(conda_prefix, 'bin', 'conda')
+ assert first_line == '$CONDA_EXE = "%s"' % join(conda_prefix, 'bin', 'conda')
with open(join(CONDA_PACKAGE_ROOT, 'shell', 'conda.xsh')) as fh:
original_contents = fh.read()
@@ -708,19 +708,19 @@ def test_init_sh_user_unix(self):
export PATH="/some/other/conda/bin:$PATH"
export PATH="%(prefix)s/bin:$PATH"
export PATH="%(prefix)s/bin:$PATH"
-
+
# >>> conda initialize >>>
__conda_setup="$('%(prefix)s/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
fi
unset __conda_setup
# <<< conda initialize <<<
-
+
. etc/profile.d/conda.sh
. etc/profile.d/coda.sh
. /somewhere/etc/profile.d/conda.sh
source /etc/profile.d/conda.sh
-
+
\t source %(prefix)s/etc/profile.d/conda.sh
""") % {
'prefix': win_path_backout(abspath(conda_temp_prefix)),
@@ -738,7 +738,7 @@ def test_init_sh_user_unix(self):
export PATH="/some/other/conda/bin:$PATH"
# export PATH="%(prefix)s/bin:$PATH" # commented out by conda initialize
# export PATH="%(prefix)s/bin:$PATH" # commented out by conda initialize
-
+
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('%(prefix)s/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
@@ -753,12 +753,12 @@ def test_init_sh_user_unix(self):
fi
unset __conda_setup
# <<< conda initialize <<<
-
+
# . etc/profile.d/conda.sh # commented out by conda initialize
. etc/profile.d/coda.sh
# . /somewhere/etc/profile.d/conda.sh # commented out by conda initialize
# source /etc/profile.d/conda.sh # commented out by conda initialize
-
+
# source %(prefix)s/etc/profile.d/conda.sh # commented out by conda initialize
""") % {
'prefix': win_path_backout(abspath(conda_temp_prefix)),
@@ -770,12 +770,12 @@ def test_init_sh_user_unix(self):
export PATH="/some/other/conda/bin:$PATH"
export PATH="%(prefix)s/bin:$PATH"
export PATH="%(prefix)s/bin:$PATH"
-
+
. etc/profile.d/conda.sh
. etc/profile.d/coda.sh
. /somewhere/etc/profile.d/conda.sh
source /etc/profile.d/conda.sh
-
+
source %(prefix)s/etc/profile.d/conda.sh
""") % {
'prefix': win_path_backout(abspath(conda_temp_prefix)),
@@ -850,12 +850,12 @@ def test_init_sh_user_windows(self):
expected_reversed_content = dals("""
source /c/conda/Scripts/activate root
. $(cygpath 'c:\\conda\\Scripts\\activate') root
-
+
. etc/profile.d/conda.sh
. etc/profile.d/coda.sh
. /somewhere/etc/profile.d/conda.sh
source /etc/profile.d/conda.sh
-
+
source %(prefix)s/etc/profile.d/conda.sh
""") % {
'prefix': win_path_ok(abspath(conda_prefix)),
diff --git a/tests/test_activate.py b/tests/test_activate.py
--- a/tests/test_activate.py
+++ b/tests/test_activate.py
@@ -981,11 +981,7 @@ def test_xonsh_basic(self):
rc = activate_main(['', 'shell.xonsh'] + activate_args + [self.prefix])
assert not c.stderr
assert rc == 0
- activate_result = c.stdout
-
- with open(activate_result) as fh:
- activate_data = fh.read()
- rm_rf(activate_result)
+ activate_data = c.stdout
new_path_parts = activator._add_prefix_to_path(self.prefix)
conda_exe_export, conda_exe_unset = activator.get_scripts_export_unset_vars()
@@ -1014,13 +1010,10 @@ def test_xonsh_basic(self):
}):
activator = XonshActivator()
with captured() as c:
- assert activate_main(['', 'shell.xonsh'] + reactivate_args) == 0
+ rc = activate_main(['', 'shell.xonsh'] + reactivate_args)
assert not c.stderr
- reactivate_result = c.stdout
-
- with open(reactivate_result) as fh:
- reactivate_data = fh.read()
- rm_rf(reactivate_result)
+ assert rc == 0
+ reactivate_data = c.stdout
new_path_parts = activator._replace_prefix_in_path(self.prefix, self.prefix)
e_reactivate_data = dals("""
@@ -1030,23 +1023,21 @@ def test_xonsh_basic(self):
$CONDA_PROMPT_MODIFIER = '(%(native_prefix)s) '
source "%(activate1)s"
""") % {
+ 'new_path': activator.pathsep_join(new_path_parts),
'activate1': activator.path_conversion(join(self.prefix, 'etc', 'conda', 'activate.d', 'activate1.xsh')),
'deactivate1': activator.path_conversion(join(self.prefix, 'etc', 'conda', 'deactivate.d', 'deactivate1.xsh')),
'native_prefix': self.prefix,
- 'new_path': activator.pathsep_join(new_path_parts),
}
assert reactivate_data == e_reactivate_data
with captured() as c:
- assert activate_main(['', 'shell.xonsh'] + deactivate_args) == 0
+ rc = activate_main(['', 'shell.xonsh'] + deactivate_args)
assert not c.stderr
- deactivate_result = c.stdout
-
- with open(deactivate_result) as fh:
- deactivate_data = fh.read()
- rm_rf(deactivate_result)
+ assert rc == 0
+ deactivate_data = c.stdout
new_path = activator.pathsep_join(activator._remove_prefix_from_path(self.prefix))
+ conda_exe_export, conda_exe_unset = activator.get_scripts_export_unset_vars()
e_deactivate_data = dals("""
$PATH = '%(new_path)s'
source "%(deactivate1)s"
| conda init does nothing for xonsh
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
I'm using xonsh on ubuntu. I first tried to `conda activate base` (or some other environment) in but then I get an error and suggestion to run `conda init`. Next I run `conda init` without error, but no change is reported and I cannot get `conda activate base` to work.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```xonsh
λ which conda
/home/pletnes/miniconda3/bin/conda
λ conda activate base
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
λ conda init xonsh
no change /home/pletnes/miniconda3/condabin/conda
no change /home/pletnes/miniconda3/bin/conda
no change /home/pletnes/miniconda3/bin/conda-env
no change /home/pletnes/miniconda3/bin/activate
no change /home/pletnes/miniconda3/bin/deactivate
no change /home/pletnes/miniconda3/etc/profile.d/conda.sh
no change /home/pletnes/miniconda3/etc/fish/conf.d/conda.fish
no change /home/pletnes/miniconda3/shell/condabin/Conda.psm1
no change /home/pletnes/miniconda3/shell/condabin/conda-hook.ps1
no change /home/pletnes/miniconda3/lib/python3.7/site-packages/xonsh/conda.xsh
no change /home/pletnes/miniconda3/etc/profile.d/conda.csh
λ conda activate base
xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
ModuleNotFoundError: No module named 'conda'
```
## Expected Behavior
<!-- What do you think should happen? -->
I hoped `conda init xonsh` would create the necessary PATH (or similar) settings in `~/.xonshrc` so that `conda activate <some-env>` works flawlessly.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : base
active env location : /home/pletnes/miniconda3
shell level : 1
user config file : /home/pletnes/.condarc
populated config files :
conda version : 4.6.3
conda-build version : not installed
python version : 3.7.1.final.0
base environment : /home/pletnes/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/pletnes/miniconda3/pkgs
/home/pletnes/.conda/pkgs
envs directories : /home/pletnes/miniconda3/envs
/home/pletnes/.conda/envs
platform : linux-64
user-agent : conda/4.6.3 requests/2.21.0 CPython/3.7.1 Linux/4.4.0-142-generic ubuntu/16.04.5 glibc/2.23
UID:GID : 3506278:17
netrc file : None
offline mode : False
```
And xonsh version:
```
$ xonsh --version
xonsh/0.8.10
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
$ conda config --show-sources
# this returned blank?
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
$ conda list --show-channel-urls
# packages in environment at /home/paul/miniconda3:
#
# Name Version Build Channel
asn1crypto 0.24.0 py37_0 defaults
ca-certificates 2019.1.23 0 defaults
certifi 2018.11.29 py37_0 defaults
cffi 1.11.5 py37he75722e_1 defaults
chardet 3.0.4 py37_1 defaults
conda 4.6.3 py37_0 defaults
conda-env 2.6.0 1 defaults
cryptography 2.4.2 py37h1ba5d50_0 defaults
idna 2.8 py37_0 defaults
libedit 3.1.20170329 h6b74fdf_2 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc-ng 8.2.0 hdf63c60_1 defaults
libstdcxx-ng 8.2.0 hdf63c60_1 defaults
ncurses 6.1 he6710b0_1 defaults
openssl 1.1.1a h7b6447c_0 defaults
pip 18.1 py37_0 defaults
pycosat 0.6.3 py37h14c3975_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 18.0.0 py37_0 defaults
pysocks 1.6.8 py37_0 defaults
python 3.7.1 h0371630_7 defaults
readline 7.0 h7b6447c_5 defaults
requests 2.21.0 py37_0 defaults
ruamel_yaml 0.15.46 py37h14c3975_0 defaults
setuptools 40.6.3 py37_0 defaults
six 1.12.0 py37_0 defaults
sqlite 3.26.0 h7b6447c_0 defaults
tk 8.6.8 hbc83047_0 defaults
urllib3 1.24.1 py37_0 defaults
wheel 0.32.3 py37_0 defaults
xz 5.2.4 h14c3975_4 defaults
yaml 0.1.7 had09818_2 defaults
zlib 1.2.11 h7b6447c_3 defaults
```
</p></details>
| 2019-05-08T20:45:11 |
|
conda/conda | 8,723 | conda__conda-8723 | [
"8697"
] | 0fd7941d545ef47930da10ea297b6c174050b1de | diff --git a/conda/base/context.py b/conda/base/context.py
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -237,6 +237,7 @@ class Context(Configuration):
report_errors = PrimitiveParameter(None, element_type=(bool, NoneType))
shortcuts = PrimitiveParameter(True)
_verbosity = PrimitiveParameter(0, aliases=('verbose', 'verbosity'), element_type=int)
+ use_only_tar_bz2 = PrimitiveParameter(False)
# ######################################################
# ## Solver Configuration ##
@@ -722,6 +723,7 @@ def category_map(self):
'allow_non_channel_urls',
'restore_free_channel',
'repodata_fn',
+ 'use_only_tar_bz2'
)),
('Basic Conda Configuration', ( # TODO: Is there a better category name here?
'envs_dirs',
@@ -1129,6 +1131,9 @@ def description_map(self):
allowed, along with the --use-local command line flag, be sure to include the
'local' channel in the list. If the list is empty or left undefined, no
channel exclusions will be enforced.
+ """),
+ 'use_only_tar_bz2': dals("""
+ A boolean indicating that only .tar.bz2 conda packages should be downloaded
""")
})
diff --git a/conda/cli/install.py b/conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -126,13 +126,14 @@ def get_revision(arg, json=False):
except ValueError:
raise CondaValueError("expected revision number, not: '%s'" % arg, json)
-
def install(args, parser, command='install'):
"""
conda install, conda update, and conda create
"""
context.validate_configuration()
check_non_admin()
+ if context.use_only_tar_bz2:
+ args.repodata_fn = 'repodata.json'
newenv = bool(command == 'create')
isupdate = bool(command == 'update')
diff --git a/conda/core/subdir_data.py b/conda/core/subdir_data.py
--- a/conda/core/subdir_data.py
+++ b/conda/core/subdir_data.py
@@ -382,7 +382,8 @@ def _process_raw_repodata_str(self, raw_repodata_str):
channel_url = self.url_w_credentials
legacy_packages = json_obj.get("packages", {})
- conda_packages = json_obj.get("packages.conda", {})
+ conda_packages = {} if context.use_only_tar_bz2 else json_obj.get("packages.conda", {})
+
_tar_bz2 = CONDA_PACKAGE_EXTENSION_V1
use_these_legacy_keys = set(iterkeys(legacy_packages)) - set(
k[:-6] + _tar_bz2 for k in iterkeys(conda_packages)
@@ -407,6 +408,7 @@ def _process_raw_repodata_str(self, raw_repodata_str):
log.debug("Ignoring record_version %d from %s",
info["record_version"], info['url'])
continue
+
package_record = PackageRecord(**info)
_package_records.append(package_record)
| diff --git a/tests/core/test_subdir_data.py b/tests/core/test_subdir_data.py
--- a/tests/core/test_subdir_data.py
+++ b/tests/core/test_subdir_data.py
@@ -188,6 +188,15 @@ def test_subdir_data_prefers_conda_to_tar_bz2():
precs = tuple(sd.query("zlib"))
assert precs[0].fn.endswith(".conda")
+
+def test_only_use_tar_bz2():
+ channel = Channel(join(dirname(__file__), "..", "data", "conda_format_repo", context.subdir))
+ context.use_only_tar_bz2 = True
+ sd = SubdirData(channel)
+ precs = tuple(sd.query("zlib"))
+ assert precs[0].fn.endswith(".tar.bz2")
+
+
# @pytest.mark.integration
# class SubdirDataTests(TestCase):
#
| Option to fall back to old file format
The rollout of the new file format has exposed some problems in conda-package-handling. Some/all packages are missing symlinks (at least to folders) which makes conda barf about missing content.
We need a way for users to get unstuck if the new format doesn't work for them for whatever reason.
| 2019-05-24T19:31:44 |
|
conda/conda | 8,775 | conda__conda-8775 | [
"8772"
] | 70a554fb2cc60ddb138ef7ae67bba4e009bd152f | diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -78,6 +78,7 @@ def __init__(self, prefix, channels, subdirs=(), specs_to_add=(), specs_to_remov
self._index = None
self._r = None
self._prepared = False
+ self._pool_cache = {}
def solve_for_transaction(self, update_modifier=NULL, deps_modifier=NULL, prune=NULL,
ignore_pinned=NULL, force_remove=NULL, force_reinstall=NULL):
@@ -388,9 +389,15 @@ def _find_inconsistent_packages(self, ssc):
return ssc
def _get_package_pool(self, ssc, specs):
- pool = ssc.r.get_reduced_index(specs)
- grouped_pool = groupby(lambda x: x.name, pool)
- return {k: set(v) for k, v in iteritems(grouped_pool)}
+ specs = frozenset(specs)
+ if specs in self._pool_cache:
+ pool = self._pool_cache[specs]
+ else:
+ pool = ssc.r.get_reduced_index(specs)
+ grouped_pool = groupby(lambda x: x.name, pool)
+ pool = {k: set(v) for k, v in iteritems(grouped_pool)}
+ self._pool_cache[specs] = pool
+ return pool
def _package_has_updates(self, ssc, spec, installed_pool):
installed_prec = installed_pool.get(spec.name)
@@ -403,6 +410,7 @@ def _should_freeze(self, ssc, target_prec, conflict_specs, explicit_pool, instal
# never, ever freeze anything if we have no history.
if not ssc.specs_from_history_map:
return False
+
pkg_name = target_prec.name
# if we are FREEZE_INSTALLED (first pass for install)
freeze = ssc.update_modifier == UpdateModifier.FREEZE_INSTALLED
@@ -418,7 +426,6 @@ def _should_freeze(self, ssc, target_prec, conflict_specs, explicit_pool, instal
if update_added:
spec_package_pool = self._get_package_pool(ssc, (target_prec.to_match_spec(), ))
for spec in self.specs_to_add_names:
-
new_explicit_pool = explicit_pool
ms = MatchSpec(spec)
updated_spec = self._package_has_updates(ssc, ms, installed_pool)
@@ -436,9 +443,22 @@ def _should_freeze(self, ssc, target_prec, conflict_specs, explicit_pool, instal
break
# if all package specs have overlapping package choices (satisfiable in at least one way)
- no_conflict = (freeze or update_added) and pkg_name not in conflict_specs
+ no_conflict = ((freeze or update_added) and
+ pkg_name not in conflict_specs and
+ (pkg_name not in explicit_pool or
+ target_prec in explicit_pool[pkg_name]) and
+ self._compare_pools(ssc, explicit_pool, target_prec.to_match_spec()))
return no_conflict
+ def _compare_pools(self, ssc, explicit_pool, ms):
+ other_pool = self._get_package_pool(ssc, (ms, ))
+ match = True
+ for k in set(other_pool.keys()) & set(explicit_pool.keys()):
+ if not bool(other_pool[k] & explicit_pool[k]):
+ match = False
+ break
+ return match
+
def _add_specs(self, ssc):
# For the remaining specs in specs_map, add target to each spec. `target` is a reference
# to the package currently existing in the environment. Setting target instructs the
@@ -462,6 +482,19 @@ def _add_specs(self, ssc):
for _ in ssc.prefix_data.iter_records())))) or []
conflict_specs = set(_.name for _ in conflict_specs)
+ for spec in ssc.specs_map.values():
+ ms = MatchSpec(spec)
+ if (ms.name in explicit_pool and
+ not bool(set(ssc.r.find_matches(ms)) & explicit_pool[ms.name])):
+ conflict_specs.add(ms.name)
+ # PrefixGraph here does a toposort, so that we're iterating from parents downward. This
+ # ensures that any conflict from an indirect child should also get picked up.
+ for prec in PrefixGraph(ssc.prefix_data.iter_records()).records:
+ if prec.name in conflict_specs:
+ continue
+ if any(MatchSpec(dep).name in conflict_specs for dep in prec.get("depends", [])):
+ conflict_specs.add(prec.name)
+
for pkg_name, spec in iteritems(ssc.specs_map):
matches_for_spec = tuple(prec for prec in ssc.solution_precs if spec.match(prec))
if matches_for_spec:
@@ -492,8 +525,8 @@ def _add_specs(self, ssc):
pin_overrides = set()
for s in ssc.pinned_specs:
if s.name in explicit_pool:
- if s.name not in self.specs_to_add_names:
- ssc.specs_map[s.name] = s
+ if s.name not in self.specs_to_add_names and not ssc.ignore_pinned:
+ ssc.specs_map[s.name] = MatchSpec(s, optional=False)
elif explicit_pool[s.name] & self._get_package_pool(ssc, [s])[s.name]:
ssc.specs_map[s.name] = MatchSpec(s, optional=False)
pin_overrides.add(s.name)
@@ -505,7 +538,13 @@ def _add_specs(self, ssc):
for prec in ssc.prefix_data.iter_records():
if prec.name not in ssc.specs_map:
if (prec.name not in conflict_specs and
- (prec.name not in explicit_pool or prec in explicit_pool[prec.name])):
+ (prec.name not in explicit_pool or
+ prec in explicit_pool[prec.name]) and
+ # because it's not just immediate deps, but also
+ # upstream things that matter, we must ensure
+ # overlap for dependencies of things that have
+ # otherwise passed our tests
+ self._compare_pools(ssc, explicit_pool, prec.to_match_spec())):
ssc.specs_map[prec.name] = prec.to_match_spec()
else:
ssc.specs_map[prec.name] = MatchSpec(
@@ -616,13 +655,18 @@ def _run_sat(self, ssc):
# track_features_specs or pinned_specs, which we should raise an error on.
specs_map_set = set(itervalues(ssc.specs_map))
grouped_specs = groupby(lambda s: s in specs_map_set, conflicting_specs)
- conflicting_pinned_specs = groupby(lambda s: s in ssc.pinned_specs, conflicting_specs)
+ # force optional to true. This is what it is originally in
+ # pinned_specs, but we override that in _add_specs to make it
+ # non-optional when there's a name match in the explicit package
+ # pool
+ conflicting_pinned_specs = groupby(lambda s: MatchSpec(s, optional=True)
+ in ssc.pinned_specs, conflicting_specs)
if conflicting_pinned_specs.get(True):
in_specs_map = grouped_specs.get(True, ())
pinned_conflicts = conflicting_pinned_specs.get(True, ())
in_specs_map_or_specs_to_add = ((set(in_specs_map) | set(self.specs_to_add))
- - set(ssc.pinned_specs))
+ - set(pinned_conflicts))
raise SpecsConfigurationConflictError(
sorted(s.__str__() for s in in_specs_map_or_specs_to_add),
diff --git a/conda/resolve.py b/conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -9,12 +9,13 @@
from ._vendor.auxlib.collection import frozendict
from ._vendor.auxlib.decorators import memoize, memoizemethod
-from ._vendor.toolz import concat, concatv, groupby
+from ._vendor.toolz import concat, groupby
from .base.constants import ChannelPriority, MAX_CHANNEL_PRIORITY, SatSolverChoice
from .base.context import context
from .common.compat import iteritems, iterkeys, itervalues, odict, on_win, text_type
from .common.io import time_recorder
-from .common.logic import Clauses, CryptoMiniSatSolver, PycoSatSolver, PySatSolver
+from .common.logic import (Clauses, CryptoMiniSatSolver, PycoSatSolver, PySatSolver,
+ minimal_unsatisfiable_subset)
from .common.toposort import toposort
from .exceptions import (CondaDependencyError, InvalidSpec, ResolvePackageNotFound,
UnsatisfiableError)
@@ -421,8 +422,8 @@ def find_conflicts(self, specs, specs_to_add=None, history_specs=None):
sdeps_with_dep = {k: v.get(dep) for k, v in sdeps.items() if dep in v.keys()}
if len(sdeps_with_dep) <= 1:
continue
- intersection = set.intersection(*sdeps_with_dep.values())
- if len(intersection) != 0:
+ # if the two pools overlap, we're good. Next dep.
+ if bool(set.intersection(*sdeps_with_dep.values())):
continue
filter = {}
for fkeys in sdeps_with_dep.values():
@@ -586,6 +587,18 @@ def filter_group(_specs):
reduced = filter_group([s])
if reduced:
slist.append(s)
+ elif reduced is None:
+ break
+ if reduced is None:
+ # This filter reset means that unsatisfiable indexes leak through.
+ filter_out = {prec: False if val else "feature not enabled"
+ for prec, val in iteritems(self.default_filter(features))}
+ # TODO: raise unsatisfiable exception here
+ # Messaging to users should be more descriptive.
+ # 1. Are there no direct matches?
+ # 2. Are there no matches for first-level dependencies?
+ # 3. Have the first level dependencies been invalidated?
+ break
# Determine all valid packages in the dependency graph
reduced_index2 = {prec: prec for prec in (make_feature_record(fstr) for fstr in features)}
@@ -983,31 +996,40 @@ def environment_is_consistent(self, installed):
solution = C.sat(constraints)
return bool(solution)
- def get_conflicting_specs(self, specs, original_specs=None):
+ def get_conflicting_specs(self, specs):
if not specs:
return ()
+ reduced_index = self.get_reduced_index(specs)
+
+ # Check if satisfiable
+ def mysat(specs, add_if=False):
+ constraints = r2.generate_spec_constraints(C, specs)
+ return C.sat(constraints, add_if)
- reduced_index = self.get_reduced_index(tuple(specs), sort_by_exactness=False)
r2 = Resolve(reduced_index, True, channels=self.channels)
- scp = context.channel_priority == ChannelPriority.STRICT
- unsat_specs = {s for s in specs if not r2.find_matches_with_strict(s, scp)}
- if not unsat_specs:
+ C = r2.gen_clauses()
+ solution = mysat(specs, True)
+ if solution:
return ()
-
- # This first result is just a single unsatisfiable core. There may be several.
- satisfiable_specs = set(specs) - set(unsat_specs)
-
- # In this loop, we test each unsatisfiable spec individually against the satisfiable
- # specs to ensure there are no other unsatisfiable specs in the set.
- final_unsat_specs = set()
- while unsat_specs:
- this_spec = unsat_specs.pop()
- final_unsat_specs.add(this_spec)
- test_specs = tuple(concatv((this_spec, ), satisfiable_specs))
- r2 = Resolve(self.get_reduced_index(test_specs), True, channels=self.channels)
- _unsat_specs = {s for s in specs if not r2.find_matches_with_strict(s, scp)}
- unsat_specs.update(_unsat_specs - final_unsat_specs)
- satisfiable_specs -= set(unsat_specs)
+ else:
+ # This first result is just a single unsatisfiable core. There may be several.
+ unsat_specs = list(minimal_unsatisfiable_subset(specs, sat=mysat))
+ satisfiable_specs = set(specs) - set(unsat_specs)
+
+ # In this loop, we test each unsatisfiable spec individually against the satisfiable
+ # specs to ensure there are no other unsatisfiable specs in the set.
+ final_unsat_specs = set()
+ while unsat_specs:
+ this_spec = unsat_specs.pop(0)
+ final_unsat_specs.add(this_spec)
+ test_specs = satisfiable_specs | {this_spec}
+ C = r2.gen_clauses() # TODO: wasteful call, but Clauses() needs refactored
+ solution = mysat(test_specs, True)
+ if not solution:
+ these_unsat = minimal_unsatisfiable_subset(test_specs, sat=mysat)
+ if len(these_unsat) > 1:
+ unsat_specs.extend(these_unsat)
+ satisfiable_specs -= set(unsat_specs)
return tuple(final_unsat_specs)
def bad_installed(self, installed, new_specs):
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -2778,6 +2778,18 @@ def test_legacy_repodata(self):
assert exists(join(prefix, PYTHON_BINARY))
assert package_is_installed(prefix, 'moto=1.3.7')
+ def test_cross_channel_incompatibility(self):
+ # regression test for https://github.com/conda/conda/issues/8772
+ # conda-forge puts a run_constrains on libboost, which they don't have on conda-forge.
+ # This is a way of forcing libboost to be removed. It's a way that they achieve
+ # mutual exclusivity with the boost from defaults that works differently.
+
+ # if this test passes, we'll hit the DryRunExit exception, instead of an UnsatisfiableError
+ with pytest.raises(DryRunExit):
+ stdout, stderr, _ = run_command(Commands.CREATE, "dummy_channel_incompat_test",
+ '--dry-run', '-c', 'conda-forge', 'python',
+ 'boost==1.70.0', 'boost-cpp==1.70.0')
+
@pytest.mark.skipif(True, reason="get the rest of Solve API worked out first")
@pytest.mark.integration
class PrivateEnvIntegrationTests(TestCase):
| Can't install Boost 1.70.0 from conda-forge in 4.7.2 (possible regression with `run_constrained`/`constrains`)
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
Conda 4.7.2 fails to create an environment with `python` and `boost 1.70.0`, when trying to create it as is described below. Note that the same command works in conda 4.6.14, but it has a slowdown problem, as described in https://github.com/conda-forge/boost-cpp-feedstock/issues/49.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
λ conda create -n boost_env -c conda-forge python boost==1.70.0 boost-cpp==1.70.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
- boost-cpp==1.70.0 -> libboost[version='<0']
- boost==1.70.0 -> boost-cpp=1.70.0 -> libboost[version='<0']
```
<details open><summary>If `boost` and `boost-cpp` are not pinned, it tries to install an older version (1.68.0):</summary><p>
```
λ conda create -n boost_env -c conda-forge python boost boost-cpp
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: W:\conda-canary\envs\boost_env
added / updated specs:
- boost
- boost-cpp
- python
The following packages will be downloaded:
package | build
---------------------------|-----------------
boost-1.68.0 |py37hf75dd32_1001 763 KB conda-forge
boost-cpp-1.68.0 | h6a4c333_1000 31.1 MB conda-forge
ca-certificates-2019.3.9 | hecc5488_0 184 KB conda-forge
certifi-2019.3.9 | py37_0 149 KB conda-forge
intel-openmp-2019.4 | 245 1.7 MB
libblas-3.8.0 | 8_mkl 3.5 MB conda-forge
libcblas-3.8.0 | 8_mkl 3.5 MB conda-forge
liblapack-3.8.0 | 8_mkl 3.5 MB conda-forge
mkl-2019.4 | 245 157.5 MB
numpy-1.15.4 |py37h8078771_1002 3.8 MB conda-forge
openssl-1.1.1b | hfa6e2cd_2 4.8 MB conda-forge
pip-19.1.1 | py37_0 1.8 MB conda-forge
python-3.7.3 | hb12ca83_0 17.8 MB conda-forge
setuptools-41.0.1 | py37_0 658 KB conda-forge
sqlite-3.28.0 | hfa6e2cd_0 985 KB conda-forge
vc-14.1 | h0510ff6_4 6 KB
vs2015_runtime-14.15.26706 | h3a45250_4 1.1 MB
wheel-0.33.4 | py37_0 52 KB conda-forge
wincertstore-0.2 | py37_1002 13 KB conda-forge
zlib-1.2.11 | h2fa13f4_1004 236 KB conda-forge
------------------------------------------------------------
Total: 233.3 MB
The following NEW packages will be INSTALLED:
boost conda-forge/win-64::boost-1.68.0-py37hf75dd32_1001
boost-cpp conda-forge/win-64::boost-cpp-1.68.0-h6a4c333_1000
ca-certificates conda-forge/win-64::ca-certificates-2019.3.9-hecc5488_0
certifi conda-forge/win-64::certifi-2019.3.9-py37_0
intel-openmp pkgs/main/win-64::intel-openmp-2019.4-245
libblas conda-forge/win-64::libblas-3.8.0-8_mkl
libcblas conda-forge/win-64::libcblas-3.8.0-8_mkl
liblapack conda-forge/win-64::liblapack-3.8.0-8_mkl
mkl pkgs/main/win-64::mkl-2019.4-245
numpy conda-forge/win-64::numpy-1.15.4-py37h8078771_1002
openssl conda-forge/win-64::openssl-1.1.1b-hfa6e2cd_2
pip conda-forge/win-64::pip-19.1.1-py37_0
python conda-forge/win-64::python-3.7.3-hb12ca83_0
setuptools conda-forge/win-64::setuptools-41.0.1-py37_0
sqlite conda-forge/win-64::sqlite-3.28.0-hfa6e2cd_0
vc pkgs/main/win-64::vc-14.1-h0510ff6_4
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.15.26706-h3a45250_4
wheel conda-forge/win-64::wheel-0.33.4-py37_0
wincertstore conda-forge/win-64::wincertstore-0.2-py37_1002
zlib conda-forge/win-64::zlib-1.2.11-h2fa13f4_1004
```
</p></details>
## Expected Behavior
It should create an env with `python`, `boost 1.70.0` and some dependencies.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
user config file : C:\Users\tadeu\.condarc
populated config files :
conda version : 4.7.2
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages : __cuda=9.2
base environment : W:\conda-canary (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : W:\conda-canary\pkgs
C:\Users\tadeu\.conda\pkgs
C:\Users\tadeu\AppData\Local\conda\conda\pkgs
envs directories : W:\conda-canary\envs
C:\Users\tadeu\.conda\envs
C:\Users\tadeu\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.7.2 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.17763
administrator : True
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
(empty)
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
λ conda list --show-channel-urls
# packages in environment at W:\conda-canary:
#
# Name Version Build Channel
asn1crypto 0.24.0 py37_0 defaults
bzip2 1.0.6 hfa6e2cd_5 defaults
ca-certificates 2019.5.15 0 defaults
certifi 2019.3.9 py37_0 defaults
cffi 1.12.2 py37h7a1dbc1_1 defaults
chardet 3.0.4 py37_1 defaults
conda 4.7.2 py37_0 conda-canary
conda-package-handling 1.3.0 py37_0 defaults
console_shortcut 0.1.1 3 defaults
cryptography 2.6.1 py37h7a1dbc1_0 defaults
idna 2.8 py37_0 defaults
libarchive 3.3.3 h0643e63_5 defaults
libiconv 1.15 h1df5818_7 defaults
libxml2 2.9.9 h464c3ec_0 defaults
lz4-c 1.8.1.2 h2fa13f4_0 defaults
lzo 2.10 h6df0209_2 defaults
menuinst 1.4.16 py37he774522_0 defaults
openssl 1.1.1c he774522_1 defaults
pip 19.0.3 py37_0 defaults
powershell_shortcut 0.0.1 2 defaults
pycosat 0.6.3 py37hfa6e2cd_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 19.0.0 py37_0 defaults
pysocks 1.6.8 py37_0 defaults
python 3.7.3 h8c8aaf0_0 defaults
python-libarchive-c 2.8 py37_6 defaults
pywin32 223 py37hfa6e2cd_1 defaults
requests 2.21.0 py37_0 defaults
ruamel_yaml 0.15.46 py37hfa6e2cd_0 defaults
setuptools 41.0.0 py37_0 defaults
six 1.12.0 py37_0 defaults
sqlite 3.27.2 he774522_0 defaults
tqdm 4.32.1 py_0 defaults
urllib3 1.24.1 py37_0 defaults
vc 14.1 h0510ff6_4 defaults
vs2015_runtime 14.15.26706 h3a45250_0 defaults
wheel 0.33.1 py37_0 defaults
win_inet_pton 1.1.0 py37_0 defaults
wincertstore 0.2 py37_0 defaults
xz 5.2.4 h2fa13f4_4 defaults
yaml 0.1.7 hc54c509_2 defaults
zlib 1.2.11 h62dcd97_3 defaults
zstd 1.3.7 h508b16e_0 defaults
```
</p></details>
| Note that this was also reported here: https://github.com/conda-forge/boost-cpp-feedstock/issues/51 (in case there's a particular fix for the package, although this looks more like a conda problem) | 2019-06-12T22:03:21 |
conda/conda | 8,819 | conda__conda-8819 | [
"8817"
] | 2ae1abc83521e6f908b9f25dd1606d8fa44ce863 | diff --git a/conda/resolve.py b/conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -449,13 +449,15 @@ def find_conflicts(self, specs, specs_to_add=None, history_specs=None):
raise UnsatisfiableError(bad_deps, strict=strict_channel_priority)
def _get_strict_channel(self, package_name):
+ channel_name = None
try:
channel_name = self._strict_channel_cache[package_name]
except KeyError:
- all_channel_names = set(prec.channel.name for prec in self.groups[package_name])
- by_cp = {self._channel_priorities_map.get(cn, 1): cn for cn in all_channel_names}
- highest_priority = sorted(by_cp)[0] # highest priority is the lowest number
- channel_name = self._strict_channel_cache[package_name] = by_cp[highest_priority]
+ if package_name in self.groups:
+ all_channel_names = set(prec.channel.name for prec in self.groups[package_name])
+ by_cp = {self._channel_priorities_map.get(cn, 1): cn for cn in all_channel_names}
+ highest_priority = sorted(by_cp)[0] # highest priority is the lowest number
+ channel_name = self._strict_channel_cache[package_name] = by_cp[highest_priority]
return channel_name
@memoizemethod
| Can no longer update, install, or remove
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
scopatz@artemis ~ $ conda remove conda-build
Collecting package metadata (repodata.json): | WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only using the old .tar.bz2 file format because you have conda-build installed, and it is <3.18.3. Update or remove conda-build to get smaller downloads and faster extractions.
done
Solving environment: failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/resolve.py", line 453, in _get_strict_channel
channel_name = self._strict_channel_cache[package_name]
KeyError: 'mistune'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/exceptions.py", line 1043, in __call__
return func(*args, **kwargs)
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/cli/main_remove.py", line 82, in execute
txn = solver.solve_for_transaction()
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/core/solve.py", line 111, in solve_for_transaction
force_remove, force_reinstall)
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/core/solve.py", line 149, in solve_for_diff
force_remove)
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/core/solve.py", line 244, in solve_final_state
ssc = self._add_specs(ssc)
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/core/solve.py", line 462, in _add_specs
for _ in ssc.prefix_data.iter_records())))) or []
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/resolve.py", line 993, in get_conflicting_specs
unsat_specs = {s for s in specs if not r2.find_matches_with_strict(s, scp)}
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/resolve.py", line 993, in <setcomp>
unsat_specs = {s for s in specs if not r2.find_matches_with_strict(s, scp)}
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/resolve.py", line 327, in find_matches_with_strict
sole_source_channel_name = self._get_strict_channel(ms.name)
File "/home/scopatz/miniconda/lib/python3.7/site-packages/conda/resolve.py", line 455, in _get_strict_channel
all_channel_names = set(prec.channel.name for prec in self.groups[package_name])
KeyError: 'mistune'
`$ /home/scopatz/miniconda/bin/conda remove conda-build`
environment variables:
CIO_TEST=<not set>
CONDA_ROOT=/home/scopatz/miniconda
DEFAULTS_PATH=/usr/share/gconf/awesome.default.path
MANDATORY_PATH=/usr/share/gconf/awesome.mandatory.path
PATH=/home/scopatz/.local/bin:/home/scopatz/miniconda/bin:/usr/local/cuda-1
0.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1:/usr/local/sbin:/usr
/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/
snap/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
WINDOWPATH=2
active environment : None
user config file : /home/scopatz/.condarc
populated config files : /home/scopatz/.condarc
conda version : 4.7.2
conda-build version : 3.18.2
python version : 3.7.1.final.0
virtual packages :
base environment : /home/scopatz/miniconda (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/scopatz/miniconda/pkgs
/home/scopatz/.conda/pkgs
envs directories : /home/scopatz/miniconda/envs
/home/scopatz/.conda/envs
platform : linux-64
user-agent : conda/4.7.2 requests/2.22.0 CPython/3.7.1 Linux/5.0.0-16-generic ubuntu/19.04 glibc/2.29
UID:GID : 1000:1000
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
Upload successful.
```
## Expected Behavior
<!-- What do you think should happen? -->
normal operation.
Let me know if you need anything else.
| 2019-06-24T19:03:38 |
||
conda/conda | 8,846 | conda__conda-8846 | [
"8843"
] | 0614e8108bf2ac392dcff2143d9b2e028a8623e9 | diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -501,7 +501,7 @@ def _add_specs(self, ssc):
if s.name in explicit_pool:
if s.name not in self.specs_to_add_names and not ssc.ignore_pinned:
ssc.specs_map[s.name] = MatchSpec(s, optional=False)
- elif explicit_pool[s.name] & ssc.r._get_package_pool([s])[s.name]:
+ elif explicit_pool[s.name] & ssc.r._get_package_pool([s]).get(s.name, set()):
ssc.specs_map[s.name] = MatchSpec(s, optional=False)
pin_overrides.add(s.name)
else:
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -1051,6 +1051,13 @@ def test_update_with_pinned_packages(self):
assert package_is_installed(prefix, "python=2.7")
assert not package_is_installed(prefix, "python=2.7.12")
+ def test_pinned_override_with_explicit_spec(self):
+ with make_temp_env("python=3.6") as prefix:
+ run_command(Commands.CONFIG, prefix,
+ "--add", "pinned_packages", "python=3.6.5")
+ run_command(Commands.INSTALL, prefix, "python=3.7", no_capture=True)
+ assert package_is_installed(prefix, "python=3.7")
+
def test_remove_all(self):
with make_temp_env("python") as prefix:
assert exists(join(prefix, PYTHON_BINARY))
| KeyError: 'python' when installing Python package.
## Current Behavior
### Steps to Reproduce
Our script does the following;
```
wget --no-verbose --continue https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod a+x Miniconda3-latest-Linux-x86_64.sh
# -p to specify the install location
# -b to enable batch mode (no prompts)
# -f to not return an error if the location specified by -p already exists
(
export HOME=$CONDA_DIR
./Miniconda3-latest-Linux-x86_64.sh -p $CONDA_DIR -b -f || exit 1
)
conda config --system --set always_yes yes
conda config --system --set changeps1 no
conda config --system --add envs_dirs $CONDA_DIR/envs
conda config --system --add pkgs_dirs $CONDA_DIR/pkgs
conda update -q conda
conda config --system --add channels timvideos
conda info
echo "python ==${PYTHON_VERSION}" > $CONDA_DIR/conda-meta/pinned # Make sure it stays at given version
conda install -y python=3.7
```
## Expected Behavior
conda installs Python 3.7
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
user config file : /home/travis/.condarc
populated config files : /home/travis/build/mithro/litex-buildenv/build/conda/.condarc
conda version : 4.7.5
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : /home/travis/build/mithro/litex-buildenv/build/conda (writable)
channel URLs : https://conda.anaconda.org/timvideos/linux-64
https://conda.anaconda.org/timvideos/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/travis/build/mithro/litex-buildenv/build/conda/pkgs
envs directories : /home/travis/build/mithro/litex-buildenv/build/conda/envs
/home/travis/build/mithro/litex-buildenv/build/conda/.conda/envs
platform : linux-64
user-agent : conda/4.7.5 requests/2.21.0 CPython/3.7.3 Linux/4.4.0-101-generic ubuntu/14.04.5 glibc/2.19
UID:GID : 2000:2000
netrc file : None
offline mode : False
Platform: arty
Target: net (default: net)
CPU: lm32 (default: lm32)
Installing python3.7
Collecting package metadata (current_repodata.json): done
Solving environment: failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1043, in __call__
return func(*args, **kwargs)
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/cli/main_install.py", line 20, in execute
install(args, parser, 'install')
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/cli/install.py", line 280, in install
force_reinstall=context.force_reinstall or context.force,
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/core/solve.py", line 112, in solve_for_transaction
force_remove, force_reinstall)
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/core/solve.py", line 150, in solve_for_diff
force_remove)
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/core/solve.py", line 245, in solve_final_state
ssc = self._add_specs(ssc)
File "/home/travis/build/mithro/litex-buildenv/build/conda/lib/python3.7/site-packages/conda/core/solve.py", line 515, in _add_specs
elif explicit_pool[s.name] & self._get_package_pool(ssc, [s])[s.name]:
KeyError: 'python'
`$ /home/travis/build/mithro/litex-buildenv/build/conda/bin/conda install -y python=3.7`
environment variables:
CIO_TEST=<not set>
CONDA_ROOT=/home/travis/build/mithro/litex-buildenv/build/conda
GEM_PATH=/home/travis/.rvm/gems/ruby-2.4.1:/home/travis/.rvm/gems/ruby-2.4.1@gl
obal
GOPATH=/home/travis/gopath
MANPATH=/home/travis/.nvm/versions/node/v8.9.1/share/man:/home/travis/.kiex/el
ixirs/elixir-1.4.5/man:/home/travis/.rvm/rubies/ruby-2.4.1/share/man:/
usr/local/man:/usr/local/cmake-3.9.2/man:/usr/local/clang-5.0.0/share/
man:/usr/local/share/man:/usr/share/man:/home/travis/.rvm/man
PATH=/home/travis/build/mithro/litex-buildenv/build/conda/bin:/home/travis/
bin:/home/travis/.local/bin:/opt/pyenv/shims:/home/travis/.phpenv/shim
s:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.9
.1/bin:/home/travis/.kiex/elixirs/elixir-1.4.5/bin:/home/travis/.kiex/
bin:/home/travis/.rvm/gems/ruby-2.4.1/bin:/home/travis/.rvm/gems/ruby-
2.4.1@global/bin:/home/travis/.rvm/rubies/ruby-2.4.1/bin:/home/travis/
gopath/bin:/home/travis/.gimme/versions/go1.7.4.linux.amd64/bin:/usr/l
ocal/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/us
r/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.
0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/tra
vis/.yarn/bin:/sbin
PYTHONHASHSEED=0
PYTHON_CFLAGS=-g -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security
PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs4 --with-wide-unicode --enable-shared --enable-
ipv6 --enable-loadable-sqlite-extensions --with-computed-gotos
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
TRAVIS_APT_PROXY=<set>
rvm_bin_path=/home/travis/.rvm/bin
rvm_path=/home/travis/.rvm
active environment : None
user config file : /home/travis/.condarc
populated config files : /home/travis/build/mithro/litex-buildenv/build/conda/.condarc
conda version : 4.7.5
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : /home/travis/build/mithro/litex-buildenv/build/conda (writable)
channel URLs : https://conda.anaconda.org/timvideos/linux-64
https://conda.anaconda.org/timvideos/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/travis/build/mithro/litex-buildenv/build/conda/pkgs
envs directories : /home/travis/build/mithro/litex-buildenv/build/conda/envs
/home/travis/build/mithro/litex-buildenv/build/conda/.conda/envs
platform : linux-64
user-agent : conda/4.7.5 requests/2.21.0 CPython/3.7.3 Linux/4.4.0-101-generic ubuntu/14.04.5 glibc/2.19
UID:GID : 2000:2000
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
```
</p></details>
| Example log output can be found at https://travis-ci.com/mithro/litex-buildenv/jobs/211878372 | 2019-06-29T00:41:57 |
conda/conda | 8,892 | conda__conda-8892 | [
"8824"
] | a0762bdd302e3a3bfb9a03ac23cf5d5035b1f9cf | diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -556,12 +556,13 @@ def _add_specs(self, ssc):
# As a business rule, we never want to update python beyond the current minor version,
# unless that's requested explicitly by the user (which we actively discourage).
- if (any(_.name == 'python' for _ in ssc.solution_precs)
- and not any(s.name == 'python' for s in self.specs_to_add)):
+ py_in_prefix = any(_.name == 'python' for _ in ssc.solution_precs)
+ py_requested_explicitly = any(s.name == 'python' for s in self.specs_to_add)
+ if py_in_prefix and not py_requested_explicitly:
python_prefix_rec = ssc.prefix_data.get('python')
- if ('python' not in conflict_specs and
- ssc.update_modifier == UpdateModifier.FREEZE_INSTALLED):
+ freeze_installed = ssc.update_modifier == UpdateModifier.FREEZE_INSTALLED
+ if 'python' not in conflict_specs and freeze_installed:
ssc.specs_map['python'] = python_prefix_rec.to_match_spec()
else:
# will our prefix record conflict with any explict spec? If so, don't add
@@ -593,13 +594,14 @@ def _add_specs(self, ssc):
if 'conda' in ssc.specs_map and paths_equal(self.prefix, context.conda_prefix):
conda_prefix_rec = ssc.prefix_data.get('conda')
if conda_prefix_rec:
+ version_req = ">=%s" % conda_prefix_rec.version
+ conda_requested_explicitly = any(s.name == 'conda' for s in self.specs_to_add)
conda_spec = ssc.specs_map['conda']
-
conda_in_specs_to_add_version = ssc.specs_map.get('conda', {}).get('version')
if not conda_in_specs_to_add_version:
- conda_spec = MatchSpec(conda_spec, version=">=%s" % conda_prefix_rec.version)
- if context.auto_update_conda:
- conda_spec = MatchSpec('conda', target=None)
+ conda_spec = MatchSpec(conda_spec, version=version_req)
+ if context.auto_update_conda and not conda_requested_explicitly:
+ conda_spec = MatchSpec('conda', version=version_req, target=None)
ssc.specs_map['conda'] = conda_spec
return ssc
| diff --git a/tests/core/test_solve.py b/tests/core/test_solve.py
--- a/tests/core/test_solve.py
+++ b/tests/core/test_solve.py
@@ -903,6 +903,92 @@ def test_auto_update_conda():
sys.prefix = saved_sys_prefix
+def test_explicit_conda_downgrade():
+ specs = MatchSpec("conda=1.5"),
+ with get_solver(specs) as solver:
+ final_state_1 = solver.solve_final_state()
+ # PrefixDag(final_state_1, specs).open_url()
+ print(convert_to_dist_str(final_state_1))
+ order = (
+ 'channel-1::openssl-1.0.1c-0',
+ 'channel-1::readline-6.2-0',
+ 'channel-1::sqlite-3.7.13-0',
+ 'channel-1::system-5.8-1',
+ 'channel-1::tk-8.5.13-0',
+ 'channel-1::yaml-0.1.4-0',
+ 'channel-1::zlib-1.2.7-0',
+ 'channel-1::python-2.7.5-0',
+ 'channel-1::pyyaml-3.10-py27_0',
+ 'channel-1::conda-1.5.2-py27_0',
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+ with env_vars({"CONDA_AUTO_UPDATE_CONDA": "yes"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
+ specs_to_add = MatchSpec("conda=1.3"),
+ with get_solver(specs_to_add, prefix_records=final_state_1, history_specs=specs) as solver:
+ final_state_2 = solver.solve_final_state()
+ # PrefixDag(final_state_2, specs).open_url()
+ print(convert_to_dist_str(final_state_2))
+ order = (
+ 'channel-1::openssl-1.0.1c-0',
+ 'channel-1::readline-6.2-0',
+ 'channel-1::sqlite-3.7.13-0',
+ 'channel-1::system-5.8-1',
+ 'channel-1::tk-8.5.13-0',
+ 'channel-1::yaml-0.1.4-0',
+ 'channel-1::zlib-1.2.7-0',
+ 'channel-1::python-2.7.5-0',
+ 'channel-1::pyyaml-3.10-py27_0',
+ 'channel-1::conda-1.3.5-py27_0',
+ )
+ assert convert_to_dist_str(final_state_2) == order
+
+ saved_sys_prefix = sys.prefix
+ try:
+ sys.prefix = TEST_PREFIX
+ with env_vars({"CONDA_AUTO_UPDATE_CONDA": "yes"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
+ specs_to_add = MatchSpec("conda=1.3"),
+ with get_solver(specs_to_add, prefix_records=final_state_1, history_specs=specs) as solver:
+ final_state_2 = solver.solve_final_state()
+ # PrefixDag(final_state_2, specs).open_url()
+ print(convert_to_dist_str(final_state_2))
+ order = (
+ 'channel-1::openssl-1.0.1c-0',
+ 'channel-1::readline-6.2-0',
+ 'channel-1::sqlite-3.7.13-0',
+ 'channel-1::system-5.8-1',
+ 'channel-1::tk-8.5.13-0',
+ 'channel-1::yaml-0.1.4-0',
+ 'channel-1::zlib-1.2.7-0',
+ 'channel-1::python-2.7.5-0',
+ 'channel-1::pyyaml-3.10-py27_0',
+ 'channel-1::conda-1.3.5-py27_0',
+ )
+ assert convert_to_dist_str(final_state_2) == order
+
+ with env_vars({"CONDA_AUTO_UPDATE_CONDA": "no"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
+ specs_to_add = MatchSpec("conda=1.3"),
+ with get_solver(specs_to_add, prefix_records=final_state_1, history_specs=specs) as solver:
+ final_state_2 = solver.solve_final_state()
+ # PrefixDag(final_state_2, specs).open_url()
+ print(convert_to_dist_str(final_state_2))
+ order = (
+ 'channel-1::openssl-1.0.1c-0',
+ 'channel-1::readline-6.2-0',
+ 'channel-1::sqlite-3.7.13-0',
+ 'channel-1::system-5.8-1',
+ 'channel-1::tk-8.5.13-0',
+ 'channel-1::yaml-0.1.4-0',
+ 'channel-1::zlib-1.2.7-0',
+ 'channel-1::python-2.7.5-0',
+ 'channel-1::pyyaml-3.10-py27_0',
+ 'channel-1::conda-1.3.5-py27_0',
+ )
+ assert convert_to_dist_str(final_state_2) == order
+ finally:
+ sys.prefix = saved_sys_prefix
+
+
def test_aggressive_update_packages():
def solve(prev_state, specs_to_add, order):
final_state_1, specs = prev_state
| Cannot downgrade conda from 4.7
## Current Behavior
After updating conda to 4.7.5, conda can no longer be downgraded to a previous version using a version spec such as `conda install conda=4.6`. This behavior can be changed if the `auto_update_conda` configuration parameter is set to false.
### Steps to Reproduce
```
[root@chi9 build_scripts]# conda --version
conda 4.6.14
[root@chi9 build_scripts]# conda update -y -q conda conda-build
Collecting package metadata: ...working... done
Solving environment: ...working... done
## Package Plan ##
environment location: /opt/conda
added / updated specs:
- conda
- conda-build
The following packages will be downloaded:
package | build
---------------------------|-----------------
certifi-2019.6.16 | py37_0 154 KB defaults
conda-4.7.5 | py37_0 3.0 MB defaults
conda-build-3.18.5 | py37_0 517 KB defaults
conda-package-handling-1.3.10| py37_0 259 KB defaults
------------------------------------------------------------
Total: 3.9 MB
The following NEW packages will be INSTALLED:
conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.3.10-py37_0
The following packages will be UPDATED:
certifi 2019.3.9-py37_0 --> 2019.6.16-py37_0
conda 4.6.14-py37_0 --> 4.7.5-py37_0
conda-build 3.17.8-py37_0 --> 3.18.5-py37_0
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
[root@chi9 build_scripts]# conda --version
conda 4.7.5
[root@chi9 build_scripts]# conda install conda=4.6
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: done
# All requested packages already installed.
```
Changing `auto_update_conda`:
```
root@chi9 build_scripts]# CONDA_AUTO_UPDATE_CONDA=0 conda install conda=4.6
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /opt/conda
added / updated specs:
- conda=4.6
The following packages will be DOWNGRADED:
conda 4.7.5-py37_0 --> 4.6.14-py37_0
Proceed ([y]/n)?
```
## Expected Behavior
Conda should allow the installation of a specific version when it is provided explicitly on the command line.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
[root@chi9 build_scripts]# conda inf
CommandNotFoundError: No command 'conda inf'.
Did you mean 'conda info'?
[root@chi9 build_scripts]# conda info
active environment : None
user config file : /root/.condarc
populated config files : /root/.condarc
conda version : 4.7.5
conda-build version : 3.18.5
python version : 3.7.3.final.0
virtual packages :
base environment : /opt/conda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/conda/pkgs
/root/.conda/pkgs
envs directories : /opt/conda/envs
/root/.conda/envs
platform : linux-64
user-agent : conda/4.7.5 requests/2.22.0 CPython/3.7.3 Linux/4.15.0-51-generic centos/6.9 glibc/2.12
UID:GID : 0:0
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
[root@chi9 build_scripts]# conda config --show-sources
==> /root/.condarc <==
add_pip_as_python_dependency: False
show_channel_urls: True
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
[root@chi9 build_scripts]# conda list --show-channel-urls
# packages in environment at /opt/conda:
#
# Name Version Build Channel
anaconda-client 1.7.2 py37_0 defaults
asn1crypto 0.24.0 py37_0 defaults
attrs 19.1.0 py37_1 defaults
beautifulsoup4 4.7.1 py37_1 defaults
binutils_impl_linux-64 2.31.1 h6176602_1 defaults
binutils_linux-64 2.31.1 h6176602_7 defaults
bzip2 1.0.6 h14c3975_5 defaults
ca-certificates 2019.5.15 0 defaults
certifi 2019.6.16 py37_0 defaults
cffi 1.12.3 py37h2e261b9_0 defaults
chardet 3.0.4 py37_1 defaults
clyent 1.2.2 py37_1 defaults
conda 4.7.5 py37_0 defaults
conda-build 3.18.5 py37_0 defaults
conda-concourse-ci 0.1.0 pypi_0 pypi
conda-package-handling 1.3.10 py37_0 defaults
cryptography 2.7 py37h1ba5d50_0 defaults
curl 7.64.1 hbc83047_0 defaults
decorator 4.4.0 py37_1 defaults
expat 2.2.6 he6710b0_0 defaults
filelock 3.0.10 py37_0 defaults
gcc_impl_linux-64 7.3.0 habb00fd_1 defaults
gcc_linux-64 7.3.0 h553295d_7 defaults
git 2.20.1 pl526hacde149_0 defaults
glob2 0.6 py37_1 defaults
gxx_impl_linux-64 7.3.0 hdf63c60_1 defaults
gxx_linux-64 7.3.0 h553295d_7 defaults
icu 58.2 h9c2bf20_1 defaults
idna 2.8 py37_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
jinja2 2.10.1 py37_0 defaults
jsonschema 3.0.1 py37_0 defaults
jupyter_core 4.4.0 py37_0 defaults
krb5 1.16.1 h173b8e3_7 defaults
libarchive 3.3.3 h5d8350f_5 defaults
libcurl 7.64.1 h20c2e04_0 defaults
libedit 3.1.20181209 hc058e9b_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc-ng 8.2.0 hdf63c60_1 defaults
liblief 0.9.0 h7725739_2 defaults
libssh2 1.8.2 h1ba5d50_0 defaults
libstdcxx-ng 8.2.0 hdf63c60_1 defaults
libxml2 2.9.9 he19cac6_0 defaults
lz4-c 1.8.1.2 h14c3975_0 defaults
lzo 2.10 h49e0be7_2 defaults
markupsafe 1.1.1 py37h7b6447c_0 defaults
nbformat 4.4.0 py37_0 defaults
ncurses 6.1 he6710b0_1 defaults
openssl 1.1.1c h7b6447c_1 defaults
patchelf 0.9 he6710b0_3 defaults
perl 5.26.2 h14c3975_0 defaults
pip 19.1.1 py37_0 defaults
pkginfo 1.5.0.1 py37_0 defaults
psutil 5.6.2 py37h7b6447c_0 defaults
py-lief 0.9.0 py37h7725739_2 defaults
pycosat 0.6.3 py37h14c3975_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 19.0.0 py37_0 defaults
pyrsistent 0.14.11 py37h7b6447c_0 defaults
pysocks 1.7.0 py37_0 defaults
python 3.7.3 h0371630_0 defaults
python-dateutil 2.8.0 py37_0 defaults
python-libarchive-c 2.8 py37_6 defaults
pytz 2019.1 py_0 defaults
pyyaml 5.1 py37h7b6447c_0 defaults
readline 7.0 h7b6447c_5 defaults
requests 2.22.0 py37_0 defaults
ruamel_yaml 0.15.46 py37h14c3975_0 defaults
setuptools 41.0.1 py37_0 defaults
six 1.12.0 py37_0 defaults
soupsieve 1.8 py37_0 defaults
sqlite 3.28.0 h7b6447c_0 defaults
tk 8.6.8 hbc83047_0 defaults
tqdm 4.31.1 py37_1 defaults
traitlets 4.3.2 py37_0 defaults
urllib3 1.24.2 py37_0 defaults
wheel 0.33.4 py37_0 defaults
xz 5.2.4 h14c3975_4 defaults
yaml 0.1.7 had09818_2 defaults
zlib 1.2.11 h7b6447c_3 defaults
zstd 1.3.7 h0b5b093_0 defaults
```
</p></details>
| @ocefpaf I believe you mentioned this bug on the conda-forge gitter channel. A workaround if you need to downgrade conda from 4.7 is to use `CONDA_AUTO_UPDATE_CONDA=0` or set the corresponding configuration value in .condarc.
Thanks! That worked nicely.
I just hit this problem as well (a "problem" because conda 4.7.5 seems several other bugs that required me to roll back). Another workaround (if you didn't start with 4.7.5) is to use `conda list --revisions` and `conda install --revision <rev>` to roll back to the environment just before you upgraded to 4.7.5. | 2019-07-09T18:46:53 |
conda/conda | 8,907 | conda__conda-8907 | [
"8906"
] | cd3d93406d1897127e57b0370d2a93189e544c0e | diff --git a/conda/common/io.py b/conda/common/io.py
--- a/conda/common/io.py
+++ b/conda/common/io.py
@@ -385,7 +385,7 @@ class Spinner(object):
# spinner_cycle = cycle("⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏")
spinner_cycle = cycle('/-\\|')
- def __init__(self, message, enabled=True, json=False):
+ def __init__(self, message, enabled=True, json=False, fail_message="failed\n"):
self.message = message
self.enabled = enabled
self.json = json
@@ -395,6 +395,7 @@ def __init__(self, message, enabled=True, json=False):
self._indicator_length = len(next(self.spinner_cycle)) + 1
self.fh = sys.stdout
self.show_spin = enabled and not json and hasattr(self.fh, "isatty") and self.fh.isatty()
+ self.fail_message = fail_message
def start(self):
if self.show_spin:
@@ -434,7 +435,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
if not self.json:
with swallow_broken_pipe:
if exc_type or exc_val:
- sys.stdout.write("failed\n")
+ sys.stdout.write(self.fail_message)
else:
sys.stdout.write("done\n")
sys.stdout.flush()
diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -239,8 +239,10 @@ def solve_final_state(self, update_modifier=NULL, deps_modifier=NULL, prune=NULL
context.json):
ssc = self._collect_all_metadata(ssc)
+ fail_message = ("failed\n" if self._repodata_fn == REPODATA_FN else "failed with %s, "
+ "will retry with next repodata source.\n" % self._repodata_fn)
with Spinner("Solving environment", not context.verbosity and not context.quiet,
- context.json):
+ context.json, fail_message=fail_message):
ssc = self._remove_specs(ssc)
ssc = self._add_specs(ssc)
solution_precs = copy.copy(ssc.solution_precs)
| Avoid text "failed" when solving environment fails
I recommend avoiding the term "failed" when we try `current_repodata.json` and then fall back to `repodata.json`. I wonder if this might be better replaced with "failed. Retrying" or something similar that says "we're going to try something else now instead"
```
(base) mrocklin@dgx15:~$ conda install cudatoolkit
Collecting package metadata (current_repodata.json): done
Solving environment: failed # <<<------ this might scare users
Collecting package metadata (repodata.json): done
Solving environment: /
```
Just a thought, please ignore if this isn't appropriate.
| user perception / UX is always appropriate. Thanks for the feedback. | 2019-07-11T16:05:41 |
|
conda/conda | 8,909 | conda__conda-8909 | [
"8908"
] | 25745cc9b7e3133074d4df1d149bf04001d766f5 | diff --git a/conda/common/path.py b/conda/common/path.py
--- a/conda/common/path.py
+++ b/conda/common/path.py
@@ -14,6 +14,7 @@
from .. import CondaError
from .._vendor.auxlib.decorators import memoize
from .._vendor.toolz import accumulate, concat, take
+from distutils.spawn import find_executable
try:
# Python 3
@@ -308,7 +309,6 @@ def _translation(found_path): # NOQA
def which(executable):
- from distutils.spawn import find_executable
return find_executable(executable)
| Can't downgrade python: "No module named 'distutils.spawn'"
Issue (conda-forge issue: https://github.com/conda-forge/conda-forge.github.io/issues/805)
I'm not sure whether it is a CF or conda issue, but it only occurs after running conda update --all with conda-forge channel added.
Here is a Dockerfile to reproduce:
```
FROM continuumio/miniconda3
RUN conda config --add channels conda-forge && \
conda config --set channel_priority strict && \
conda update --all
RUN conda install python=2.7
```
Fails with:
```
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
ERROR conda.core.link:_execute(637): An error occurred while installing package 'conda-forge::ipaddress-1.0.22-py_1'.
ModuleNotFoundError("No module named 'distutils.spawn'")
Attempting to roll back.
Rolling back transaction: ...working... done
ModuleNotFoundError("No module named 'distutils.spawn'")
()
```
The failing package varies based on the python version downgraded to, with python=3.6:
```
ERROR conda.core.link:_execute(637): An error occurred while installing package 'conda-forge::tqdm-4.32.2-py_0'.
ModuleNotFoundError("No module named 'distutils.spawn'")
Attempting to roll back.
Rolling back transaction: ...working... done
ModuleNotFoundError("No module named 'distutils.spawn'")
()
```
Tried both with and without conda config --set channel_priority strict, same outcome.
| 2019-07-11T16:21:20 |
||
conda/conda | 8,911 | conda__conda-8911 | [
"8842"
] | 25745cc9b7e3133074d4df1d149bf04001d766f5 | diff --git a/conda/history.py b/conda/history.py
--- a/conda/history.py
+++ b/conda/history.py
@@ -281,9 +281,8 @@ def get_requested_specs_map(self):
# Conda hasn't always been good about recording when specs have been removed from
# environments. If the package isn't installed in the current environment, then we
# shouldn't try to force it here.
- prefix_recs = tuple(PrefixData(self.prefix).iter_records())
- return dict((name, spec) for name, spec in iteritems(spec_map)
- if any(spec.match(dist) for dist in prefix_recs))
+ prefix_recs = set(_.name for _ in PrefixData(self.prefix).iter_records())
+ return dict((name, spec) for name, spec in iteritems(spec_map) if name in prefix_recs)
def construct_states(self):
"""
| Conda Deletes All Modules During Update
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
I attempt to do a `conda update --all` and it informs me that `conda` wants to remove nearly every module. This can't be correct.
```
conda update --all
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /anaconda3
The following packages will be downloaded:
package | build
---------------------------|-----------------
libtiff-4.0.10 | hcb84e12_1001 396 KB
------------------------------------------------------------
Total: 396 KB
The following packages will be REMOVED:
alabaster-0.7.12-py37_0
anaconda-custom-py37_0
anaconda-project-0.8.3-py_0
appscript-1.1.0-py37h1de35cc_0
astroid-2.2.5-py37_0
astropy-3.2.1-py37h1de35cc_0
atomicwrites-1.3.0-py37_1
babel-2.7.0-py_0
backports.os-0.1.1-py37_0
backports.shutil_get_terminal_size-1.0.0-py37_2
bitarray-0.9.3-py37h1de35cc_0
bkcharts-0.2-py37_0
blas-1.0-mkl
blosc-1.16.3-hd9629dc_0
bokeh-1.2.0-py37_0
boto-2.49.0-py37_0
bottleneck-1.2.1-py37h1d22016_1
cloudpickle-1.1.1-py_0
colorama-0.4.1-py37_0
contextlib2-0.5.5-py37_0
curl-7.64.1-ha441bb4_0
cycler-0.10.0-py37_0
cython-0.29.10-py37h0a44026_0
cytoolz-0.9.0.1-py37h1de35cc_1
dask-2.0.0-py_0
dask-core-2.0.0-py_0
distributed-2.0.1-py_0
docutils-0.14-py37_0
et_xmlfile-1.0.1-py37_0
fastcache-1.1.0-py37h1de35cc_0
flask-1.0.3-py37_0
get_terminal_size-1.0.0-h7520d66_0
gevent-1.4.0-py37h1de35cc_0
gmp-6.1.2-hb37e062_1
gmpy2-2.0.8-py37h6ef4df4_2
greenlet-0.4.15-py37h1de35cc_0
h5py-2.9.0-py37h3134771_0
hdf5-1.10.4-hfa1e0ec_0
heapdict-1.0.0-py37_2
html5lib-1.0.1-py37_0
imageio-2.5.0-py37_0
imagesize-1.1.0-py37_0
importlib_metadata-0.17-py37_1
intel-openmp-2019.4-233
isort-4.3.20-py37_0
itsdangerous-1.1.0-py37_0
jbig-2.1-h4d881f8_0
jdcal-1.4.1-py_0
joblib-0.13.2-py37_0
jupyter-1.0.0-py37_7
jupyter_console-6.0.0-py37_0
keyring-18.0.0-py37_0
kiwisolver-1.1.0-py37h0a44026_0
krb5-1.16.1-hddcf347_7
lazy-object-proxy-1.4.1-py37h1de35cc_0
libcurl-7.64.1-h051b688_0
libgfortran-3.0.1-h93005f0_2
libssh2-1.8.2-ha12b0ac_0
libxslt-1.1.33-h33a18ac_0
llvm-openmp-4.0.1-hcfea43d_1
llvmlite-0.29.0-py37h98b8051_0
locket-0.2.0-py37_1
lxml-4.3.3-py37hef8c89e_0
matplotlib-3.1.0-py37h54f8f79_0
mccabe-0.6.1-py37_1
mkl-2019.4-233
mkl-service-2.0.2-py37h1de35cc_0
mkl_fft-1.0.12-py37h5e564d8_0
mkl_random-1.0.2-py37h27c97d8_0
mock-3.0.5-py37_0
more-itertools-7.0.0-py37_0
mpc-1.1.0-h6ef4df4_1
mpfr-4.0.1-h3018a27_3
mpmath-1.1.0-py37_0
msgpack-python-0.6.1-py37h04f5b5a_1
multipledispatch-0.6.0-py37_0
networkx-2.3-py_0
nltk-3.4.1-py37_0
nose-1.3.7-py37_2
numba-0.44.1-py37h6440ff4_0
numexpr-2.6.9-py37h7413580_0
numpy-1.16.4-py37hacdab7b_0
numpy-base-1.16.4-py37h6575580_0
numpydoc-0.9.1-py_0
openpyxl-2.6.2-py_0
packaging-19.0-py37_0
pandas-0.24.2-py37h0a44026_0
partd-0.3.10-py37_1
path.py-12.0.1-py_0
pathlib2-2.3.3-py37_0
patsy-0.5.1-py37_0
pep8-1.7.1-py37_0
pluggy-0.12.0-py_0
ply-3.11-py37_0
py-1.8.0-py37_0
pycodestyle-2.5.0-py37_0
pycrypto-2.6.1-py37h1de35cc_9
pycurl-7.43.0.2-py37ha12b0ac_0
pyflakes-2.1.1-py37_0
pylint-2.3.1-py37_0
pyodbc-4.0.26-py37h0a44026_0
pyparsing-2.4.0-py_0
pytables-3.5.2-py37h5bccee9_1
pytest-4.6.2-py37_0
pytest-arraydiff-0.3-py37h39e3cac_0
pytest-astropy-0.5.0-py37_0
pytest-doctestplus-0.3.0-py37_0
pytest-openfiles-0.3.2-py37_0
pytest-remotedata-0.3.1-py37_0
pywavelets-1.0.3-py37h1d22016_1
qtawesome-0.5.7-py37_1
qtconsole-4.5.1-py_0
rope-0.14.0-py_0
scikit-image-0.15.0-py37h0a44026_0
scikit-learn-0.21.2-py37h27c97d8_0
scipy-1.2.1-py37h1410ff5_0
seaborn-0.9.0-py37_0
simplegeneric-0.8.1-py37_2
singledispatch-3.4.0.3-py37_0
snappy-1.1.7-he62c110_3
snowballstemmer-1.2.1-py37_0
sortedcollections-1.1.2-py37_0
sortedcontainers-2.1.0-py37_0
sphinx-2.1.0-py_0
sphinxcontrib-1.0-py37_1
sphinxcontrib-applehelp-1.0.1-py_0
sphinxcontrib-devhelp-1.0.1-py_0
sphinxcontrib-htmlhelp-1.0.2-py_0
sphinxcontrib-jsmath-1.0.1-py_0
sphinxcontrib-qthelp-1.0.2-py_0
sphinxcontrib-serializinghtml-1.1.3-py_0
sphinxcontrib-websupport-1.1.2-py_0
spyder-3.3.4-py37_0
spyder-kernels-0.5.0-py37_0
sqlalchemy-1.3.4-py37h1de35cc_0
statsmodels-0.9.0-py37h1d22016_0
sympy-1.4-py37_0
tblib-1.4.0-py_0
toolz-0.9.0-py37_0
unicodecsv-0.14.1-py37_0
unixodbc-2.3.7-h1de35cc_0
werkzeug-0.15.4-py_0
wrapt-1.11.1-py37h1de35cc_0
wurlitzer-1.0.2-py37_0
xlrd-1.2.0-py37_0
xlsxwriter-1.1.8-py_0
xlwings-0.15.8-py37_0
xlwt-1.3.0-py37_0
zict-0.1.4-py37_0
zipp-0.5.1-py_0
The following packages will be UPDATED:
libtiff 4.0.10-hcb84e12_2 --> 4.0.10-hcb84e12_1001
Proceed ([y]/n)? n
CondaSystemExit: Exiting.
```
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
conda update --all
```
## Expected Behavior
<!-- What do you think should happen? -->
I think `conda` should update whichever packages need updating.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
conda info
active environment : base
active env location : /anaconda3
shell level : 1
user config file : /Users/cgivre/.condarc
populated config files :
conda version : 4.7.5
conda-build version : 3.18.5
python version : 3.7.3.final.0
virtual packages :
base environment : /anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /anaconda3/pkgs
/Users/cgivre/.conda/pkgs
envs directories : /anaconda3/envs
/Users/cgivre/.conda/envs
platform : osx-64
user-agent : conda/4.7.5 requests/2.22.0 CPython/3.7.3 Darwin/18.6.0 OSX/10.14.5
UID:GID : 501:20
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
(no output)
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
conda list --show-channel-urls
# packages in environment at /anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0 defaults
alabaster 0.7.12 py37_0 defaults
anaconda custom py37_0 defaults
anaconda-client 1.7.2 py37_0 defaults
anaconda-navigator 1.9.7 py37_0 defaults
anaconda-project 0.8.3 py_0 defaults
appnope 0.1.0 py37_0 defaults
appscript 1.1.0 py37h1de35cc_0 defaults
asn1crypto 0.24.0 py37_0 defaults
astroid 2.2.5 py37_0 defaults
astropy 3.2.1 py37h1de35cc_0 defaults
atomicwrites 1.3.0 py37_1 defaults
attrs 19.1.0 py37_1 defaults
babel 2.7.0 py_0 defaults
backcall 0.1.0 py37_0 defaults
backports 1.0 py_2 defaults
backports.functools_lru_cache 1.5 py_2 defaults
backports.os 0.1.1 py37_0 defaults
backports.shutil_get_terminal_size 1.0.0 py37_2 defaults
backports.tempfile 1.0 py_1 defaults
backports.weakref 1.0.post1 py_1 defaults
beautifulsoup4 4.7.1 py37_1 defaults
bitarray 0.9.3 py37h1de35cc_0 defaults
bkcharts 0.2 py37_0 defaults
blas 1.0 mkl defaults
bleach 3.1.0 py37_0 defaults
blosc 1.16.3 hd9629dc_0 defaults
bokeh 1.2.0 py37_0 defaults
boto 2.49.0 py37_0 defaults
bottleneck 1.2.1 py37h1d22016_1 defaults
bzip2 1.0.6 h1de35cc_5 defaults
ca-certificates 2019.5.15 0 defaults
certifi 2019.6.16 py37_0 defaults
cffi 1.12.3 py37hb5b8e2f_0 defaults
chardet 3.0.4 py37_1 defaults
click 7.0 py37_0 defaults
cloudpickle 1.1.1 py_0 defaults
clyent 1.2.2 py37_1 defaults
colorama 0.4.1 py37_0 defaults
conda 4.7.5 py37_0 defaults
conda-build 3.18.5 py37_0 defaults
conda-env 2.6.0 1 defaults
conda-package-handling 1.3.10 py37_0 defaults
conda-verify 3.4.2 py_0 defaults
contextlib2 0.5.5 py37_0 defaults
cryptography 2.7 py37ha12b0ac_0 defaults
curl 7.64.1 ha441bb4_0 defaults
cycler 0.10.0 py37_0 defaults
cython 0.29.10 py37h0a44026_0 defaults
cytoolz 0.9.0.1 py37h1de35cc_1 defaults
dask 2.0.0 py_0 defaults
dask-core 2.0.0 py_0 defaults
dbus 1.13.6 h90a0687_0 defaults
decorator 4.4.0 py37_1 defaults
defusedxml 0.6.0 py_0 defaults
distributed 2.0.1 py_0 defaults
docutils 0.14 py37_0 defaults
entrypoints 0.3 py37_0 defaults
et_xmlfile 1.0.1 py37_0 defaults
expat 2.2.6 h0a44026_0 defaults
fastcache 1.1.0 py37h1de35cc_0 defaults
filelock 3.0.12 py_0 defaults
flask 1.0.3 py37_0 defaults
freetype 2.9.1 hb4e5f40_0 defaults
future 0.17.1 py37_0 defaults
get_terminal_size 1.0.0 h7520d66_0 defaults
gettext 0.19.8.1 h15daf44_3 defaults
gevent 1.4.0 py37h1de35cc_0 defaults
glib 2.56.2 hd9629dc_0 defaults
glob2 0.6 py37_1 defaults
gmp 6.1.2 hb37e062_1 defaults
gmpy2 2.0.8 py37h6ef4df4_2 defaults
greenlet 0.4.15 py37h1de35cc_0 defaults
h5py 2.9.0 py37h3134771_0 defaults
hdf5 1.10.4 hfa1e0ec_0 defaults
heapdict 1.0.0 py37_2 defaults
html5lib 1.0.1 py37_0 defaults
icu 58.2 h4b95b61_1 defaults
idna 2.8 py37_0 defaults
imageio 2.5.0 py37_0 defaults
imagesize 1.1.0 py37_0 defaults
importlib_metadata 0.17 py37_1 defaults
intel-openmp 2019.4 233 defaults
ipykernel 5.1.1 py37h39e3cac_0 defaults
ipython 7.5.0 py37h39e3cac_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
ipywidgets 7.4.2 py37_0 defaults
isort 4.3.20 py37_0 defaults
itsdangerous 1.1.0 py37_0 defaults
jbig 2.1 h4d881f8_0 defaults
jdcal 1.4.1 py_0 defaults
jedi 0.13.3 py37_0 defaults
jinja2 2.10.1 py37_0 defaults
joblib 0.13.2 py37_0 defaults
jpeg 9b he5867d9_2 defaults
jsonschema 3.0.1 py37_0 defaults
jupyter 1.0.0 py37_7 defaults
jupyter_client 5.2.4 py37_0 defaults
jupyter_console 6.0.0 py37_0 defaults
jupyter_core 4.4.0 py37_0 defaults
jupyterlab 0.35.5 py37hf63ae98_0 defaults
jupyterlab_server 0.2.0 py37_0 defaults
keyring 18.0.0 py37_0 defaults
kiwisolver 1.1.0 py37h0a44026_0 defaults
krb5 1.16.1 hddcf347_7 defaults
lazy-object-proxy 1.4.1 py37h1de35cc_0 defaults
libarchive 3.3.3 h786848e_5 defaults
libcurl 7.64.1 h051b688_0 defaults
libcxx 4.0.1 hcfea43d_1 defaults
libcxxabi 4.0.1 hcfea43d_1 defaults
libedit 3.1.20181209 hb402a30_0 defaults
libffi 3.2.1 h475c297_4 defaults
libgfortran 3.0.1 h93005f0_2 defaults
libiconv 1.15 hdd342a3_7 defaults
liblief 0.9.0 h2a1bed3_2 defaults
libpng 1.6.37 ha441bb4_0 defaults
libsodium 1.0.16 h3efe00b_0 defaults
libssh2 1.8.2 ha12b0ac_0 defaults
libtiff 4.0.10 hcb84e12_2 defaults
libxml2 2.9.9 hf6e021a_1 defaults
libxslt 1.1.33 h33a18ac_0 defaults
llvm-openmp 4.0.1 hcfea43d_1 defaults
llvmlite 0.29.0 py37h98b8051_0 defaults
locket 0.2.0 py37_1 defaults
lxml 4.3.3 py37hef8c89e_0 defaults
lz4-c 1.8.1.2 h1de35cc_0 defaults
lzo 2.10 h362108e_2 defaults
markupsafe 1.1.1 py37h1de35cc_0 defaults
matplotlib 3.1.0 py37h54f8f79_0 defaults
mccabe 0.6.1 py37_1 defaults
mistune 0.8.4 py37h1de35cc_0 defaults
mkl 2019.4 233 defaults
mkl-service 2.0.2 py37h1de35cc_0 defaults
mkl_fft 1.0.12 py37h5e564d8_0 defaults
mkl_random 1.0.2 py37h27c97d8_0 defaults
mock 3.0.5 py37_0 defaults
more-itertools 7.0.0 py37_0 defaults
mpc 1.1.0 h6ef4df4_1 defaults
mpfr 4.0.1 h3018a27_3 defaults
mpmath 1.1.0 py37_0 defaults
msgpack-python 0.6.1 py37h04f5b5a_1 defaults
multipledispatch 0.6.0 py37_0 defaults
navigator-updater 0.2.1 py37_0 defaults
nbconvert 5.5.0 py_0 defaults
nbformat 4.4.0 py37_0 defaults
ncurses 6.1 h0a44026_1 defaults
networkx 2.3 py_0 defaults
nltk 3.4.1 py37_0 defaults
nose 1.3.7 py37_2 defaults
notebook 5.7.8 py37_0 defaults
numba 0.44.1 py37h6440ff4_0 defaults
numexpr 2.6.9 py37h7413580_0 defaults
numpy 1.16.4 py37hacdab7b_0 defaults
numpy-base 1.16.4 py37h6575580_0 defaults
numpydoc 0.9.1 py_0 defaults
olefile 0.46 py37_0 defaults
openpyxl 2.6.2 py_0 defaults
openssl 1.1.1c h1de35cc_1 defaults
packaging 19.0 py37_0 defaults
pandas 0.24.2 py37h0a44026_0 defaults
pandoc 2.2.3.2 0 defaults
pandocfilters 1.4.2 py37_1 defaults
parso 0.4.0 py_0 defaults
partd 0.3.10 py37_1 defaults
path.py 12.0.1 py_0 defaults
pathlib2 2.3.3 py37_0 defaults
patsy 0.5.1 py37_0 defaults
pcre 8.43 h0a44026_0 defaults
pep8 1.7.1 py37_0 defaults
pexpect 4.7.0 py37_0 defaults
pickleshare 0.7.5 py37_0 defaults
pillow 6.0.0 py37hb68e598_0 defaults
pip 19.1.1 py37_0 defaults
pkginfo 1.5.0.1 py37_0 defaults
pluggy 0.12.0 py_0 defaults
ply 3.11 py37_0 defaults
prometheus_client 0.6.0 py37_0 defaults
prompt_toolkit 2.0.9 py37_0 defaults
psutil 5.6.2 py37h1de35cc_0 defaults
ptyprocess 0.6.0 py37_0 defaults
py 1.8.0 py37_0 defaults
py-lief 0.9.0 py37h1413db1_2 defaults
pycodestyle 2.5.0 py37_0 defaults
pycosat 0.6.3 py37h1de35cc_0 defaults
pycparser 2.19 py37_0 defaults
pycrypto 2.6.1 py37h1de35cc_9 defaults
pycurl 7.43.0.2 py37ha12b0ac_0 defaults
pyflakes 2.1.1 py37_0 defaults
pygments 2.4.2 py_0 defaults
pylint 2.3.1 py37_0 defaults
pyodbc 4.0.26 py37h0a44026_0 defaults
pyopenssl 19.0.0 py37_0 defaults
pyparsing 2.4.0 py_0 defaults
pyqt 5.9.2 py37h655552a_2 defaults
pyrsistent 0.14.11 py37h1de35cc_0 defaults
pysocks 1.7.0 py37_0 defaults
pytables 3.5.2 py37h5bccee9_1 defaults
pytest 4.6.2 py37_0 defaults
pytest-arraydiff 0.3 py37h39e3cac_0 defaults
pytest-astropy 0.5.0 py37_0 defaults
pytest-doctestplus 0.3.0 py37_0 defaults
pytest-openfiles 0.3.2 py37_0 defaults
pytest-remotedata 0.3.1 py37_0 defaults
python 3.7.3 h359304d_0 defaults
python-dateutil 2.8.0 py37_0 defaults
python-libarchive-c 2.8 py37_6 defaults
python.app 2 py37_9 defaults
pytz 2019.1 py_0 defaults
pywavelets 1.0.3 py37h1d22016_1 defaults
pyyaml 5.1 py37h1de35cc_0 defaults
pyzmq 18.0.0 py37h0a44026_0 defaults
qt 5.9.7 h468cd18_1 defaults
qtawesome 0.5.7 py37_1 defaults
qtconsole 4.5.1 py_0 defaults
qtpy 1.7.1 py_0 defaults
readline 7.0 h1de35cc_5 defaults
requests 2.22.0 py37_0 defaults
rope 0.14.0 py_0 defaults
ruamel_yaml 0.15.46 py37h1de35cc_0 defaults
scikit-image 0.15.0 py37h0a44026_0 defaults
scikit-learn 0.21.2 py37h27c97d8_0 defaults
scipy 1.2.1 py37h1410ff5_0 defaults
seaborn 0.9.0 py37_0 defaults
send2trash 1.5.0 py37_0 defaults
setuptools 41.0.1 py37_0 defaults
simplegeneric 0.8.1 py37_2 defaults
singledispatch 3.4.0.3 py37_0 defaults
sip 4.19.8 py37h0a44026_0 defaults
six 1.12.0 py37_0 defaults
snappy 1.1.7 he62c110_3 defaults
snowballstemmer 1.2.1 py37_0 defaults
sortedcollections 1.1.2 py37_0 defaults
sortedcontainers 2.1.0 py37_0 defaults
soupsieve 1.8 py37_0 defaults
sphinx 2.1.0 py_0 defaults
sphinxcontrib 1.0 py37_1 defaults
sphinxcontrib-applehelp 1.0.1 py_0 defaults
sphinxcontrib-devhelp 1.0.1 py_0 defaults
sphinxcontrib-htmlhelp 1.0.2 py_0 defaults
sphinxcontrib-jsmath 1.0.1 py_0 defaults
sphinxcontrib-qthelp 1.0.2 py_0 defaults
sphinxcontrib-serializinghtml 1.1.3 py_0 defaults
sphinxcontrib-websupport 1.1.2 py_0 defaults
spyder 3.3.4 py37_0 defaults
spyder-kernels 0.5.0 py37_0 defaults
sqlalchemy 1.3.4 py37h1de35cc_0 defaults
sqlite 3.28.0 ha441bb4_0 defaults
statsmodels 0.9.0 py37h1d22016_0 defaults
sympy 1.4 py37_0 defaults
tblib 1.4.0 py_0 defaults
terminado 0.8.2 py37_0 defaults
testpath 0.4.2 py37_0 defaults
tk 8.6.8 ha441bb4_0 defaults
toolz 0.9.0 py37_0 defaults
tornado 6.0.2 py37h1de35cc_0 defaults
tqdm 4.32.1 py_0 defaults
traitlets 4.3.2 py37_0 defaults
unicodecsv 0.14.1 py37_0 defaults
unixodbc 2.3.7 h1de35cc_0 defaults
urllib3 1.24.2 py37_0 defaults
virtualenv 16.6.1 pypi_0 pypi
wcwidth 0.1.7 py37_0 defaults
webencodings 0.5.1 py37_1 defaults
werkzeug 0.15.4 py_0 defaults
wheel 0.33.4 py37_0 defaults
widgetsnbextension 3.4.2 py37_0 defaults
wrapt 1.11.1 py37h1de35cc_0 defaults
wurlitzer 1.0.2 py37_0 defaults
xlrd 1.2.0 py37_0 defaults
xlsxwriter 1.1.8 py_0 defaults
xlwings 0.15.8 py37_0 defaults
xlwt 1.3.0 py37_0 defaults
xz 5.2.4 h1de35cc_4 defaults
yaml 0.1.7 hc338f04_2 defaults
zeromq 4.3.1 h0a44026_3 defaults
zict 0.1.4 py37_0 defaults
zipp 0.5.1 py_0 defaults
zlib 1.2.11 h1de35cc_3 defaults
zstd 1.3.7 h5bba6e5_0 defaults
```
</p></details>
| It's exactly the same on Linux.
The likely reason for this is that update --all frees up all of your constraints to be optional (as they were not explicitly specs) and they get cleaned up. It's definitely a bug. I'd avoid update --all until we can get to the bottom of this.
So I get that this is a bug, but I am not clear on where the issue happened. There was a new version of `conda-build` published in 4.7.5 that was supposed to solve the environment faster. Were users supposed to follow some kind of upgrade instructions to install the new `conda-build` or other packages? Did we users install something out of order? I found this issue when I did a `conda update --all` and then the anaconda 4.7.5 got installed. So I can't tell where I as a user was to upgrade in a certain way, didn't do that, and then the bug appeared. Or if there was no defined upgrade path and the bug was somewhere in the conda-build or other package.
What's happening here is this:
1. anaconda is a metapackage. Each version consists of a set of versions that have all gone through QA together as a set. If you change any version of any package in that collection, you no longer have that metapackage, because you have strayed from that known set. There is a special version of that metapackage, custom, that is meant to handle this relaxation of constraints. The "custom" version depends only on a particular version of python - it removes the constraints on all other packages.
2. conda 4.7 builds up its candidates for addition differently from earlier conda versions. It starts with specs from the history, and tries to constrain things where it can, to speed up the solve. When conda finds the anaconda metapackage with the "custom" version, it keeps it, but all of those other dependencies are now orphaned. This is why conda is removing them - they have no spec in the history that tells conda to keep them.
You can restore these by running ``conda install --only-deps anaconda``. From then on, all of those packages are considered part of your explicit history, and you won't have further problems like this.
Thanks everyone. I'm glad that everything is restorable, though I wish I had known that before re-installing anaconda. I'm still not clear as to the correct procedure for updating my system. I ran the
`conda install --only-deps anaconda` command. From this point forward, do I periodically run `conda update --all`?
Yes, that should be fine going forward. The behavior with the metapackage is very undesirable, and we'll be trying to help other people not have that issue in the future. You should be all set, though.
actually , i had the same issue on MacOS mojave , and when i tried to use conda install --only-deps anaconda it still wants to remove lots of packages
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /anaconda3
added / updated specs:
- anaconda
The following packages will be REMOVED:
anaconda-project-0.8.3-py_0
astropy-3.2.1-py37h1de35cc_0
babel-2.7.0-py_0
bitarray-0.9.3-py37h1de35cc_0
blosc-1.16.3-hd9629dc_0
bokeh-1.2.0-py37_0
cloudpickle-1.1.1-py_0
cython-0.29.10-py37h0a44026_0
dask-2.0.0-py_0
dask-core-2.0.0-py_0
distributed-2.0.1-py_0
fastcache-1.1.0-py37h1de35cc_0
flask-1.0.3-py37_0
importlib_metadata-0.17-py37_1
jdcal-1.4.1-py_0
llvmlite-0.29.0-py37h98b8051_0
lxml-4.3.3-py37hef8c89e_0
mkl-service-2.0.2-py37h1de35cc_0
more-itertools-7.0.0-py37_0
networkx-2.3-py_0
nltk-3.4.1-py37_0
numba-0.44.1-py37h6440ff4_0
numpydoc-0.9.1-py_0
openpyxl-2.6.2-py_0
path.py-12.0.1-py_0
pluggy-0.12.0-py_0
pytables-3.5.2-py37h5bccee9_1
pytest-4.6.2-py37_0
pytest-arraydiff-0.3-py37h39e3cac_0
pytest-astropy-0.5.0-py37_0
pytest-doctestplus-0.3.0-py37_0
pytest-openfiles-0.3.2-py37_0
pytest-remotedata-0.3.1-py37_0
pywavelets-1.0.3-py37h1d22016_1
rope-0.14.0-py_0
scikit-image-0.15.0-py37h0a44026_0
scikit-learn-0.21.2-py37h27c97d8_0
sphinx-2.1.0-py_0
sphinxcontrib-websupport-1.1.2-py_0
spyder-3.3.4-py37_0
spyder-kernels-0.5.0-py37_0
sqlalchemy-1.3.4-py37h1de35cc_0
sympy-1.4-py37_0
tblib-1.4.0-py_0
werkzeug-0.15.4-py_0
xlsxwriter-1.1.8-py_0
xlwings-0.15.8-py37_0
zipp-0.5.1-py_0
Apparently I have a related issue, have been recommended to post here what happened.
I work with three different machines, a Linux Mint 19.1 64 bits laptop, a Windows 10 64 bits laptop and a Windows 7 64 bits desktop. I have Anaconda installed on all three machines (base environment only) and I keep them updated. You can find what I did in here (https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/1PxQi3Q_4WQ), I am pasting below just the (partial) error I could retrieve from my console while doing a simple "conda update conda" on the third machine mentioned above (edited username for privacy):
"""
tqdm pkgs/main/win-64::tqdm-4.31.1-py37_1 --> pkgs/main/noarch
::tqdm-4.32.1-py_0
urllib3 1.24.1-py37_0 --> 1.24.2-py37_0
vs2015_runtime 14.15.26706-h3a45250_0 --> 14.15.26706-h3a4
5250_4
wheel 0.33.1-py37_0 --> 0.33.4-py37_0
Proceed ([y]/n)?
Downloading and Extracting Packages
sphinxcontrib-htmlhe | 28 KB | #################################### | 100%
sphinxcontrib-jsmath | 8 KB | #################################### | 100%
psutil-5.6.2 | 350 KB | #################################### | 100%
cffi-1.12.3 | 225 KB | #################################### | 100%
wheel-0.33.4 | 57 KB | #################################### | 100%
babel-2.7.0 | 5.8 MB | #################################### | 100%
tqdm-4.32.1 | 48 KB | #################################### | 100%
jinja2-2.10.1 | 188 KB | #################################### | 100%
pillow-6.0.0 | 689 KB | #################################### | 100%
cryptography-2.7 | 564 KB | #################################### | 100%
sphinxcontrib-qthelp | 26 KB | #################################### | 100%
qtpy-1.7.1 | 35 KB | #################################### | 100%
defusedxml-0.6.0 | 23 KB | #################################### | 100%
vs2015_runtime-14.15 | 2.4 MB | #################################### | 100%
sqlite-3.28.0 | 945 KB | #################################### | 100%
numpydoc-0.9.1 | 31 KB | #################################### | 100%
filelock-3.0.12 | 12 KB | #################################### | 100%
rope-0.14.0 | 113 KB | #################################### | 100%
sphinxcontrib-devhel | 23 KB | #################################### | 100%
lazy-object-proxy-1. | 31 KB | #################################### | 100%
pysocks-1.7.0 | 30 KB | #################################### | 100%
pygments-2.4.2 | 664 KB | #################################### | 100%
sphinxcontrib-serial | 24 KB | #################################### | 100%
terminado-0.8.2 | 22 KB | #################################### | 100%
sphinxcontrib-appleh | 29 KB | #################################### | 100%
urllib3-1.24.2 | 153 KB | #################################### | 100%
ipython-7.5.0 | 1.1 MB | #################################### | 100%
libpng-1.6.37 | 598 KB | #################################### | 100%
setuptools-41.0.1 | 680 KB | #################################### | 100%
pyparsing-2.4.0 | 58 KB | #################################### | 100%
isort-4.3.20 | 86 KB | #################################### | 100%
pip-19.1.1 | 1.8 MB | #################################### | 100%
conda-build-3.18.5 | 550 KB | #################################### | 100%
cloudpickle-1.1.1 | 23 KB | #################################### | 100%
pytz-2019.1 | 236 KB | #################################### | 100%
parso-0.4.0 | 66 KB | #################################### | 100%
sphinx-2.1.0 | 1.4 MB | #################################### | 100%
ipykernel-5.1.1 | 163 KB | #################################### | 100%
nbconvert-5.5.0 | 381 KB | #################################### | 100%
requests-2.22.0 | 90 KB | #################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: | DEBUG menuinst_win32:__init__(199): Menu: name: 'Anacon
da${PY_VER} ${PLATFORM}', prefix: 'C:\Users\---\AppData\Local\Continuum\an
aconda3', env_name: 'None', mode: 'user', used_mode: 'user'
DEBUG menuinst_win32:create(323): Shortcut cmd is %windir%\System32\WindowsPower
Shell\v1.0\powershell.exe, args are ['-ExecutionPolicy', 'ByPass', '-NoExit', '-
Command', '"& \'C:\\Users\\---\\AppData\\Local\\Continuum\\anaconda3\\shel
l\\condabin\\conda-hook.ps1\' ; conda activate \'C:\\Users\\---\\AppData\\
Local\\Continuum\\anaconda3\' "']
\ DEBUG menuinst_win32:__init__(199): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}
', prefix: 'C:\Users\---\AppData\Local\Continuum\anaconda3', env_name: 'No
ne', mode: 'user', used_mode: 'user'
DEBUG menuinst_win32:create(323): Shortcut cmd is %windir%\System32\cmd.exe, arg
s are ['"/K"', 'C:\\Users\\---\\AppData\\Local\\Continuum\\anaconda3\\Scri
pts\\activate.bat', 'C:\\Users\\---\\AppData\\Local\\Continuum\\anaconda3'
]
done
(base) C:\Users\--->
"""
And my response from that mailing list post:
You have 2 things coming together to ruin your day. One is definitely the issue that I pointed you to. That is causing removal of the console_shortcut package, which takes away your start menu anaconda prompt shortcut. The next is this: https://github.com/conda/conda/issues/8835
The simplest way to recover is:
* open a cmd shell
* run ``call "path\to\anaconda\root\Scripts\activate"`` - this is what the "anaconda prompt" does
``conda install --only-deps anaconda=2019``
This should restore everything, including your start menu shortcuts. Future updates will not mess up, because the explicit dependencies will be in the history now.
We are working on fixing the Anaconda metapackage to account for this change in behavior. The change in behavior is expected and desired, but the side effect here with the anaconda metapackage in particular is not.
I ran "conda install --only-deps anaconda" but the apps shortcuts are still not displayed on the navigator. I am using a MacOS 10.10.5.
Also, I can only create new environments in python2.7.
Hi,
I can confirm that on my Linux Mint 19.1 64 bits laptop all the apps also
disappeared from the Anaconda Navigator (but not on the Windows machines).
At this point I am taking a conservative approach and after having to
reinstall Anaconda on all machines (both Linux and Windows) I am not
performing a "conda update conda" until further notice.
BR,
Paulo
Evangelos Constantinou <[email protected]> escreveu no dia quarta,
3/07/2019 à(s) 01:00:
> I ran "conda install --only-deps anaconda" but the apps shortcuts are
> still not displayed on the navigator. I am using a MacOS 10.10.5.
>
> Also, I can only create new environments in python2.7.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8842?email_source=notifications&email_token=ACXPIV2Y4VQTM6C5TDT2UC3P5PT3RA5CNFSM4H4G6BNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZC33FY#issuecomment-507886999>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ACXPIV6NGIF5WHPOKB2WNHLP5PT3RANCNFSM4H4G6BNA>
> .
>
--
Paulo Xavier Candeias
I also had the same problem: [https://github.com/ContinuumIO/anaconda-issues/issues/11073#issuecomment-508009172](url)
`conda install --only-deps anaconda` gave me an error when I reopened Spyder.
`conda install --only-deps anaconda=2019` fixed it for me for now. This changes the version from Spyder 3.5.5 to Spyder 3.3.3.
There are testing packages that will replace the existing anaconda "custom" metapackages up on the c3i_test2 channel:
conda install -c c3i_test2 anaconda
We are testing these ourselves, and will move them to defaults later today or tomorrow.
I am kind of newbie still to this (ana)conda world, but... what if you do not have any longer the metapackage installed? I needed to remove it to update python because of https://github.com/ContinuumIO/anaconda-issues/issues/10822 and if I try to update, the process says it will delete all those packages as well.
The new metapackage is uploaded. Further updates might allow updates of more than you expect, but they should no longer go crazy removing things.
```
conda update anaconda
```
if you don't have it installed, you can just install it:
```
conda install anaconda
```
Sorry for our clumsiness on this one, and thank you for your patience. We'll be writing up a post-mortem next week. If you continue having issues, please post here.
@msarahan i still have the same problems, any ideas ?
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /anaconda3
added / updated specs:
- anaconda
The following packages will be downloaded:
package | build
---------------------------|-----------------
glob2-0.7 | py_0 14 KB
ipython-7.6.0 | py37h39e3cac_0 1.1 MB
jupyter_core-4.5.0 | py_0 48 KB
parso-0.5.0 | py_0 67 KB
prometheus_client-0.7.1 | py_0 42 KB
psutil-5.6.3 | py37h1de35cc_0 333 KB
python-libarchive-c-2.8 | py37_8 22 KB
pyyaml-5.1.1 | py37h1de35cc_0 170 KB
qtpy-1.8.0 | py_0 38 KB
tornado-6.0.3 | py37h1de35cc_0 644 KB
------------------------------------------------------------
Total: 2.5 MB
The following packages will be REMOVED:
alabaster-0.7.12-py37_0
anaconda-project-0.8.3-py_0
appscript-1.1.0-py37h1de35cc_0
astroid-2.2.5-py37_0
astropy-3.2.1-py37h1de35cc_0
atomicwrites-1.3.0-py37_1
babel-2.7.0-py_0
backports.os-0.1.1-py37_0
backports.shutil_get_terminal_size-1.0.0-py37_2
bitarray-0.9.3-py37h1de35cc_0
bkcharts-0.2-py37_0
blas-1.0-mkl
blosc-1.16.3-hd9629dc_0
bokeh-1.2.0-py37_0
boto-2.49.0-py37_0
bottleneck-1.2.1-py37h1d22016_1
cloudpickle-1.1.1-py_0
colorama-0.4.1-py37_0
contextlib2-0.5.5-py37_0
cycler-0.10.0-py37_0
cython-0.29.10-py37h0a44026_0
cytoolz-0.9.0.1-py37h1de35cc_1
dask-2.0.0-py_0
dask-core-2.0.0-py_0
distributed-2.0.1-py_0
docutils-0.14-py37_0
et_xmlfile-1.0.1-py37_0
fastcache-1.1.0-py37h1de35cc_0
flask-1.0.3-py37_0
get_terminal_size-1.0.0-h7520d66_0
gevent-1.4.0-py37h1de35cc_0
gmp-6.1.2-hb37e062_1
gmpy2-2.0.8-py37h6ef4df4_2
greenlet-0.4.15-py37h1de35cc_0
h5py-2.9.0-py37h3134771_0
hdf5-1.10.4-hfa1e0ec_0
heapdict-1.0.0-py37_2
html5lib-1.0.1-py37_0
imageio-2.5.0-py37_0
imagesize-1.1.0-py37_0
importlib_metadata-0.17-py37_1
intel-openmp-2019.4-233
isort-4.3.20-py37_0
itsdangerous-1.1.0-py37_0
jbig-2.1-h4d881f8_0
jdcal-1.4.1-py_0
joblib-0.13.2-py37_0
jupyter-1.0.0-py37_7
jupyter_console-6.0.0-py37_0
keyring-18.0.0-py37_0
kiwisolver-1.1.0-py37h0a44026_0
lazy-object-proxy-1.4.1-py37h1de35cc_0
libxslt-1.1.33-h33a18ac_0
llvmlite-0.29.0-py37h98b8051_0
locket-0.2.0-py37_1
lxml-4.3.3-py37hef8c89e_0
matplotlib-3.1.0-py37h54f8f79_0
mccabe-0.6.1-py37_1
mkl-2019.4-233
mkl-service-2.0.2-py37h1de35cc_0
mkl_fft-1.0.12-py37h5e564d8_0
mkl_random-1.0.2-py37h27c97d8_0
mock-3.0.5-py37_0
more-itertools-7.0.0-py37_0
mpc-1.1.0-h6ef4df4_1
mpfr-4.0.1-h3018a27_3
mpmath-1.1.0-py37_0
msgpack-python-0.6.1-py37h04f5b5a_1
multipledispatch-0.6.0-py37_0
networkx-2.3-py_0
nltk-3.4.1-py37_0
nose-1.3.7-py37_2
numba-0.44.1-py37h6440ff4_0
numexpr-2.6.9-py37h7413580_0
numpy-1.16.4-py37hacdab7b_0
numpy-base-1.16.4-py37h6575580_0
numpydoc-0.9.1-py_0
openpyxl-2.6.2-py_0
packaging-19.0-py37_0
pandas-0.24.2-py37h0a44026_0
partd-0.3.10-py37_1
path.py-12.0.1-py_0
pathlib2-2.3.3-py37_0
patsy-0.5.1-py37_0
pep8-1.7.1-py37_0
pluggy-0.12.0-py_0
ply-3.11-py37_0
py-1.8.0-py37_0
pycodestyle-2.5.0-py37_0
pycrypto-2.6.1-py37h1de35cc_9
pycurl-7.43.0.2-py37ha12b0ac_0
pyflakes-2.1.1-py37_0
pylint-2.3.1-py37_0
pyodbc-4.0.26-py37h0a44026_0
pyparsing-2.4.0-py_0
pytables-3.5.2-py37h5bccee9_1
pytest-4.6.2-py37_0
pytest-arraydiff-0.3-py37h39e3cac_0
pytest-astropy-0.5.0-py37_0
pytest-doctestplus-0.3.0-py37_0
pytest-openfiles-0.3.2-py37_0
pytest-remotedata-0.3.1-py37_0
pywavelets-1.0.3-py37h1d22016_1
qtawesome-0.5.7-py37_1
qtconsole-4.5.1-py_0
rope-0.14.0-py_0
scikit-image-0.15.0-py37h0a44026_0
scikit-learn-0.21.2-py37h27c97d8_0
scipy-1.2.1-py37h1410ff5_0
seaborn-0.9.0-py37_0
simplegeneric-0.8.1-py37_2
singledispatch-3.4.0.3-py37_0
snappy-1.1.7-he62c110_3
snowballstemmer-1.2.1-py37_0
sortedcollections-1.1.2-py37_0
sortedcontainers-2.1.0-py37_0
sphinx-2.1.0-py_0
sphinxcontrib-1.0-py37_1
sphinxcontrib-applehelp-1.0.1-py_0
sphinxcontrib-devhelp-1.0.1-py_0
sphinxcontrib-htmlhelp-1.0.2-py_0
sphinxcontrib-jsmath-1.0.1-py_0
sphinxcontrib-qthelp-1.0.2-py_0
sphinxcontrib-serializinghtml-1.1.3-py_0
sphinxcontrib-websupport-1.1.2-py_0
spyder-3.3.4-py37_0
spyder-kernels-0.5.0-py37_0
sqlalchemy-1.3.4-py37h1de35cc_0
statsmodels-0.9.0-py37h1d22016_0
sympy-1.4-py37_0
tblib-1.4.0-py_0
toolz-0.9.0-py37_0
unicodecsv-0.14.1-py37_0
werkzeug-0.15.4-py_0
wrapt-1.11.1-py37h1de35cc_0
wurlitzer-1.0.2-py37_0
xlrd-1.2.0-py37_0
xlsxwriter-1.1.8-py_0
xlwings-0.15.8-py37_0
xlwt-1.3.0-py37_0
zict-0.1.4-py37_0
zipp-0.5.1-py_0
The following packages will be UPDATED:
glob2 pkgs/main/osx-64::glob2-0.6-py37_1 --> pkgs/main/noarch::glob2-0.7-py_0
ipython 7.5.0-py37h39e3cac_0 --> 7.6.0-py37h39e3cac_0
jupyter_core pkgs/main/osx-64::jupyter_core-4.4.0-~ --> pkgs/main/noarch::jupyter_core-4.5.0-py_0
parso 0.4.0-py_0 --> 0.5.0-py_0
prometheus_client pkgs/main/osx-64::prometheus_client-0~ --> pkgs/main/noarch::prometheus_client-0.7.1-py_0
psutil 5.6.2-py37h1de35cc_0 --> 5.6.3-py37h1de35cc_0
python-libarchive~ 2.8-py37_6 --> 2.8-py37_8
pyyaml 5.1-py37h1de35cc_0 --> 5.1.1-py37h1de35cc_0
qtpy 1.7.1-py_0 --> 1.8.0-py_0
tornado 6.0.2-py37h1de35cc_0 --> 6.0.3-py37h1de35cc_0
I think I was able to resolve by first doing ```conda install -c c3i_test2 anaconda``` and then updating.
@eltabbal, have you tried that?
@aakhmetz yeah that is working fine now, what is the c3i-test3 metapackage ?. thanks a lot anyhow
@eltabbal it was a temporary solution proposed in the thread above
I had this too after the update. But then i did conda update conda first to get to 4.7.5. Then it worked just fine.
Sent from my iPhone
> On 6 Jul 2019, at 08:07, eltabbal <[email protected]> wrote:
>
> @msarahan i still have the same problems, any ideas ?
> Collecting package metadata (current_repodata.json): done
> Solving environment: done
>
> Package Plan
>
> environment location: /anaconda3
>
> added / updated specs:
> - anaconda
>
> The following packages will be downloaded:
>
> package | build
> ---------------------------|-----------------
> glob2-0.7 | py_0 14 KB
> ipython-7.6.0 | py37h39e3cac_0 1.1 MB
> jupyter_core-4.5.0 | py_0 48 KB
> parso-0.5.0 | py_0 67 KB
> prometheus_client-0.7.1 | py_0 42 KB
> psutil-5.6.3 | py37h1de35cc_0 333 KB
> python-libarchive-c-2.8 | py37_8 22 KB
> pyyaml-5.1.1 | py37h1de35cc_0 170 KB
> qtpy-1.8.0 | py_0 38 KB
> tornado-6.0.3 | py37h1de35cc_0 644 KB
> ------------------------------------------------------------
> Total: 2.5 MB
> The following packages will be REMOVED:
>
> alabaster-0.7.12-py37_0
> anaconda-project-0.8.3-py_0
> appscript-1.1.0-py37h1de35cc_0
> astroid-2.2.5-py37_0
> astropy-3.2.1-py37h1de35cc_0
> atomicwrites-1.3.0-py37_1
> babel-2.7.0-py_0
> backports.os-0.1.1-py37_0
> backports.shutil_get_terminal_size-1.0.0-py37_2
> bitarray-0.9.3-py37h1de35cc_0
> bkcharts-0.2-py37_0
> blas-1.0-mkl
> blosc-1.16.3-hd9629dc_0
> bokeh-1.2.0-py37_0
> boto-2.49.0-py37_0
> bottleneck-1.2.1-py37h1d22016_1
> cloudpickle-1.1.1-py_0
> colorama-0.4.1-py37_0
> contextlib2-0.5.5-py37_0
> cycler-0.10.0-py37_0
> cython-0.29.10-py37h0a44026_0
> cytoolz-0.9.0.1-py37h1de35cc_1
> dask-2.0.0-py_0
> dask-core-2.0.0-py_0
> distributed-2.0.1-py_0
> docutils-0.14-py37_0
> et_xmlfile-1.0.1-py37_0
> fastcache-1.1.0-py37h1de35cc_0
> flask-1.0.3-py37_0
> get_terminal_size-1.0.0-h7520d66_0
> gevent-1.4.0-py37h1de35cc_0
> gmp-6.1.2-hb37e062_1
> gmpy2-2.0.8-py37h6ef4df4_2
> greenlet-0.4.15-py37h1de35cc_0
> h5py-2.9.0-py37h3134771_0
> hdf5-1.10.4-hfa1e0ec_0
> heapdict-1.0.0-py37_2
> html5lib-1.0.1-py37_0
> imageio-2.5.0-py37_0
> imagesize-1.1.0-py37_0
> importlib_metadata-0.17-py37_1
> intel-openmp-2019.4-233
> isort-4.3.20-py37_0
> itsdangerous-1.1.0-py37_0
> jbig-2.1-h4d881f8_0
> jdcal-1.4.1-py_0
> joblib-0.13.2-py37_0
> jupyter-1.0.0-py37_7
> jupyter_console-6.0.0-py37_0
> keyring-18.0.0-py37_0
> kiwisolver-1.1.0-py37h0a44026_0
> lazy-object-proxy-1.4.1-py37h1de35cc_0
> libxslt-1.1.33-h33a18ac_0
> llvmlite-0.29.0-py37h98b8051_0
> locket-0.2.0-py37_1
> lxml-4.3.3-py37hef8c89e_0
> matplotlib-3.1.0-py37h54f8f79_0
> mccabe-0.6.1-py37_1
> mkl-2019.4-233
> mkl-service-2.0.2-py37h1de35cc_0
> mkl_fft-1.0.12-py37h5e564d8_0
> mkl_random-1.0.2-py37h27c97d8_0
> mock-3.0.5-py37_0
> more-itertools-7.0.0-py37_0
> mpc-1.1.0-h6ef4df4_1
> mpfr-4.0.1-h3018a27_3
> mpmath-1.1.0-py37_0
> msgpack-python-0.6.1-py37h04f5b5a_1
> multipledispatch-0.6.0-py37_0
> networkx-2.3-py_0
> nltk-3.4.1-py37_0
> nose-1.3.7-py37_2
> numba-0.44.1-py37h6440ff4_0
> numexpr-2.6.9-py37h7413580_0
> numpy-1.16.4-py37hacdab7b_0
> numpy-base-1.16.4-py37h6575580_0
> numpydoc-0.9.1-py_0
> openpyxl-2.6.2-py_0
> packaging-19.0-py37_0
> pandas-0.24.2-py37h0a44026_0
> partd-0.3.10-py37_1
> path.py-12.0.1-py_0
> pathlib2-2.3.3-py37_0
> patsy-0.5.1-py37_0
> pep8-1.7.1-py37_0
> pluggy-0.12.0-py_0
> ply-3.11-py37_0
> py-1.8.0-py37_0
> pycodestyle-2.5.0-py37_0
> pycrypto-2.6.1-py37h1de35cc_9
> pycurl-7.43.0.2-py37ha12b0ac_0
> pyflakes-2.1.1-py37_0
> pylint-2.3.1-py37_0
> pyodbc-4.0.26-py37h0a44026_0
> pyparsing-2.4.0-py_0
> pytables-3.5.2-py37h5bccee9_1
> pytest-4.6.2-py37_0
> pytest-arraydiff-0.3-py37h39e3cac_0
> pytest-astropy-0.5.0-py37_0
> pytest-doctestplus-0.3.0-py37_0
> pytest-openfiles-0.3.2-py37_0
> pytest-remotedata-0.3.1-py37_0
> pywavelets-1.0.3-py37h1d22016_1
> qtawesome-0.5.7-py37_1
> qtconsole-4.5.1-py_0
> rope-0.14.0-py_0
> scikit-image-0.15.0-py37h0a44026_0
> scikit-learn-0.21.2-py37h27c97d8_0
> scipy-1.2.1-py37h1410ff5_0
> seaborn-0.9.0-py37_0
> simplegeneric-0.8.1-py37_2
> singledispatch-3.4.0.3-py37_0
> snappy-1.1.7-he62c110_3
> snowballstemmer-1.2.1-py37_0
> sortedcollections-1.1.2-py37_0
> sortedcontainers-2.1.0-py37_0
> sphinx-2.1.0-py_0
> sphinxcontrib-1.0-py37_1
> sphinxcontrib-applehelp-1.0.1-py_0
> sphinxcontrib-devhelp-1.0.1-py_0
> sphinxcontrib-htmlhelp-1.0.2-py_0
> sphinxcontrib-jsmath-1.0.1-py_0
> sphinxcontrib-qthelp-1.0.2-py_0
> sphinxcontrib-serializinghtml-1.1.3-py_0
> sphinxcontrib-websupport-1.1.2-py_0
> spyder-3.3.4-py37_0
> spyder-kernels-0.5.0-py37_0
> sqlalchemy-1.3.4-py37h1de35cc_0
> statsmodels-0.9.0-py37h1d22016_0
> sympy-1.4-py37_0
> tblib-1.4.0-py_0
> toolz-0.9.0-py37_0
> unicodecsv-0.14.1-py37_0
> werkzeug-0.15.4-py_0
> wrapt-1.11.1-py37h1de35cc_0
> wurlitzer-1.0.2-py37_0
> xlrd-1.2.0-py37_0
> xlsxwriter-1.1.8-py_0
> xlwings-0.15.8-py37_0
> xlwt-1.3.0-py37_0
> zict-0.1.4-py37_0
> zipp-0.5.1-py_0
>
> The following packages will be UPDATED:
>
> glob2 pkgs/main/osx-64::glob2-0.6-py37_1 --> pkgs/main/noarch::glob2-0.7-py_0
> ipython 7.5.0-py37h39e3cac_0 --> 7.6.0-py37h39e3cac_0
> jupyter_core pkgs/main/osx-64::jupyter_core-4.4.0-~ --> pkgs/main/noarch::jupyter_core-4.5.0-py_0
> parso 0.4.0-py_0 --> 0.5.0-py_0
> prometheus_client pkgs/main/osx-64::prometheus_client-0~ --> pkgs/main/noarch::prometheus_client-0.7.1-py_0
> psutil 5.6.2-py37h1de35cc_0 --> 5.6.3-py37h1de35cc_0
> python-libarchive~ 2.8-py37_6 --> 2.8-py37_8
> pyyaml 5.1-py37h1de35cc_0 --> 5.1.1-py37h1de35cc_0
> qtpy 1.7.1-py_0 --> 1.8.0-py_0
> tornado 6.0.2-py37h1de35cc_0 --> 6.0.3-py37h1de35cc_0
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
Hi,
I am sorry to say but I think we are not there yet, now all the apps
disappeared from Anaconda Navigator. Or maybe this is an unrelated bug, I
do not know.
BR,
Paulo
A sábado, 6/07/2019, 11:25, esvhd <[email protected]> escreveu:
> I had this too after the update. But then i did conda update conda first
> to get to 4.7.5. Then it worked just fine.
>
> Sent from my iPhone
>
> > On 6 Jul 2019, at 08:07, eltabbal <[email protected]> wrote:
> >
> > @msarahan i still have the same problems, any ideas ?
> > Collecting package metadata (current_repodata.json): done
> > Solving environment: done
> >
> > Package Plan
> >
> > environment location: /anaconda3
> >
> > added / updated specs:
> > - anaconda
> >
> > The following packages will be downloaded:
> >
> > package | build
> > ---------------------------|-----------------
> > glob2-0.7 | py_0 14 KB
> > ipython-7.6.0 | py37h39e3cac_0 1.1 MB
> > jupyter_core-4.5.0 | py_0 48 KB
> > parso-0.5.0 | py_0 67 KB
> > prometheus_client-0.7.1 | py_0 42 KB
> > psutil-5.6.3 | py37h1de35cc_0 333 KB
> > python-libarchive-c-2.8 | py37_8 22 KB
> > pyyaml-5.1.1 | py37h1de35cc_0 170 KB
> > qtpy-1.8.0 | py_0 38 KB
> > tornado-6.0.3 | py37h1de35cc_0 644 KB
> > ------------------------------------------------------------
> > Total: 2.5 MB
> > The following packages will be REMOVED:
> >
> > alabaster-0.7.12-py37_0
> > anaconda-project-0.8.3-py_0
> > appscript-1.1.0-py37h1de35cc_0
> > astroid-2.2.5-py37_0
> > astropy-3.2.1-py37h1de35cc_0
> > atomicwrites-1.3.0-py37_1
> > babel-2.7.0-py_0
> > backports.os-0.1.1-py37_0
> > backports.shutil_get_terminal_size-1.0.0-py37_2
> > bitarray-0.9.3-py37h1de35cc_0
> > bkcharts-0.2-py37_0
> > blas-1.0-mkl
> > blosc-1.16.3-hd9629dc_0
> > bokeh-1.2.0-py37_0
> > boto-2.49.0-py37_0
> > bottleneck-1.2.1-py37h1d22016_1
> > cloudpickle-1.1.1-py_0
> > colorama-0.4.1-py37_0
> > contextlib2-0.5.5-py37_0
> > cycler-0.10.0-py37_0
> > cython-0.29.10-py37h0a44026_0
> > cytoolz-0.9.0.1-py37h1de35cc_1
> > dask-2.0.0-py_0
> > dask-core-2.0.0-py_0
> > distributed-2.0.1-py_0
> > docutils-0.14-py37_0
> > et_xmlfile-1.0.1-py37_0
> > fastcache-1.1.0-py37h1de35cc_0
> > flask-1.0.3-py37_0
> > get_terminal_size-1.0.0-h7520d66_0
> > gevent-1.4.0-py37h1de35cc_0
> > gmp-6.1.2-hb37e062_1
> > gmpy2-2.0.8-py37h6ef4df4_2
> > greenlet-0.4.15-py37h1de35cc_0
> > h5py-2.9.0-py37h3134771_0
> > hdf5-1.10.4-hfa1e0ec_0
> > heapdict-1.0.0-py37_2
> > html5lib-1.0.1-py37_0
> > imageio-2.5.0-py37_0
> > imagesize-1.1.0-py37_0
> > importlib_metadata-0.17-py37_1
> > intel-openmp-2019.4-233
> > isort-4.3.20-py37_0
> > itsdangerous-1.1.0-py37_0
> > jbig-2.1-h4d881f8_0
> > jdcal-1.4.1-py_0
> > joblib-0.13.2-py37_0
> > jupyter-1.0.0-py37_7
> > jupyter_console-6.0.0-py37_0
> > keyring-18.0.0-py37_0
> > kiwisolver-1.1.0-py37h0a44026_0
> > lazy-object-proxy-1.4.1-py37h1de35cc_0
> > libxslt-1.1.33-h33a18ac_0
> > llvmlite-0.29.0-py37h98b8051_0
> > locket-0.2.0-py37_1
> > lxml-4.3.3-py37hef8c89e_0
> > matplotlib-3.1.0-py37h54f8f79_0
> > mccabe-0.6.1-py37_1
> > mkl-2019.4-233
> > mkl-service-2.0.2-py37h1de35cc_0
> > mkl_fft-1.0.12-py37h5e564d8_0
> > mkl_random-1.0.2-py37h27c97d8_0
> > mock-3.0.5-py37_0
> > more-itertools-7.0.0-py37_0
> > mpc-1.1.0-h6ef4df4_1
> > mpfr-4.0.1-h3018a27_3
> > mpmath-1.1.0-py37_0
> > msgpack-python-0.6.1-py37h04f5b5a_1
> > multipledispatch-0.6.0-py37_0
> > networkx-2.3-py_0
> > nltk-3.4.1-py37_0
> > nose-1.3.7-py37_2
> > numba-0.44.1-py37h6440ff4_0
> > numexpr-2.6.9-py37h7413580_0
> > numpy-1.16.4-py37hacdab7b_0
> > numpy-base-1.16.4-py37h6575580_0
> > numpydoc-0.9.1-py_0
> > openpyxl-2.6.2-py_0
> > packaging-19.0-py37_0
> > pandas-0.24.2-py37h0a44026_0
> > partd-0.3.10-py37_1
> > path.py-12.0.1-py_0
> > pathlib2-2.3.3-py37_0
> > patsy-0.5.1-py37_0
> > pep8-1.7.1-py37_0
> > pluggy-0.12.0-py_0
> > ply-3.11-py37_0
> > py-1.8.0-py37_0
> > pycodestyle-2.5.0-py37_0
> > pycrypto-2.6.1-py37h1de35cc_9
> > pycurl-7.43.0.2-py37ha12b0ac_0
> > pyflakes-2.1.1-py37_0
> > pylint-2.3.1-py37_0
> > pyodbc-4.0.26-py37h0a44026_0
> > pyparsing-2.4.0-py_0
> > pytables-3.5.2-py37h5bccee9_1
> > pytest-4.6.2-py37_0
> > pytest-arraydiff-0.3-py37h39e3cac_0
> > pytest-astropy-0.5.0-py37_0
> > pytest-doctestplus-0.3.0-py37_0
> > pytest-openfiles-0.3.2-py37_0
> > pytest-remotedata-0.3.1-py37_0
> > pywavelets-1.0.3-py37h1d22016_1
> > qtawesome-0.5.7-py37_1
> > qtconsole-4.5.1-py_0
> > rope-0.14.0-py_0
> > scikit-image-0.15.0-py37h0a44026_0
> > scikit-learn-0.21.2-py37h27c97d8_0
> > scipy-1.2.1-py37h1410ff5_0
> > seaborn-0.9.0-py37_0
> > simplegeneric-0.8.1-py37_2
> > singledispatch-3.4.0.3-py37_0
> > snappy-1.1.7-he62c110_3
> > snowballstemmer-1.2.1-py37_0
> > sortedcollections-1.1.2-py37_0
> > sortedcontainers-2.1.0-py37_0
> > sphinx-2.1.0-py_0
> > sphinxcontrib-1.0-py37_1
> > sphinxcontrib-applehelp-1.0.1-py_0
> > sphinxcontrib-devhelp-1.0.1-py_0
> > sphinxcontrib-htmlhelp-1.0.2-py_0
> > sphinxcontrib-jsmath-1.0.1-py_0
> > sphinxcontrib-qthelp-1.0.2-py_0
> > sphinxcontrib-serializinghtml-1.1.3-py_0
> > sphinxcontrib-websupport-1.1.2-py_0
> > spyder-3.3.4-py37_0
> > spyder-kernels-0.5.0-py37_0
> > sqlalchemy-1.3.4-py37h1de35cc_0
> > statsmodels-0.9.0-py37h1d22016_0
> > sympy-1.4-py37_0
> > tblib-1.4.0-py_0
> > toolz-0.9.0-py37_0
> > unicodecsv-0.14.1-py37_0
> > werkzeug-0.15.4-py_0
> > wrapt-1.11.1-py37h1de35cc_0
> > wurlitzer-1.0.2-py37_0
> > xlrd-1.2.0-py37_0
> > xlsxwriter-1.1.8-py_0
> > xlwings-0.15.8-py37_0
> > xlwt-1.3.0-py37_0
> > zict-0.1.4-py37_0
> > zipp-0.5.1-py_0
> >
> > The following packages will be UPDATED:
> >
> > glob2 pkgs/main/osx-64::glob2-0.6-py37_1 -->
> pkgs/main/noarch::glob2-0.7-py_0
> > ipython 7.5.0-py37h39e3cac_0 --> 7.6.0-py37h39e3cac_0
> > jupyter_core pkgs/main/osx-64::jupyter_core-4.4.0-~ -->
> pkgs/main/noarch::jupyter_core-4.5.0-py_0
> > parso 0.4.0-py_0 --> 0.5.0-py_0
> > prometheus_client pkgs/main/osx-64::prometheus_client-0~ -->
> pkgs/main/noarch::prometheus_client-0.7.1-py_0
> > psutil 5.6.2-py37h1de35cc_0 --> 5.6.3-py37h1de35cc_0
> > python-libarchive~ 2.8-py37_6 --> 2.8-py37_8
> > pyyaml 5.1-py37h1de35cc_0 --> 5.1.1-py37h1de35cc_0
> > qtpy 1.7.1-py_0 --> 1.8.0-py_0
> > tornado 6.0.2-py37h1de35cc_0 --> 6.0.3-py37h1de35cc_0
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub, or mute the thread.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8842?email_source=notifications&email_token=ACXPIV6BN5Y2YBFQ77AVNOLP6BXI5A5CNFSM4H4G6BNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKW3DY#issuecomment-508915087>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ACXPIV55DARJREBMJ3QNYG3P6BXI5ANCNFSM4H4G6BNA>
> .
>
> I think I was able to resolve by first doing `conda install -c c3i_test2 anaconda` and then updating.
> @eltabbal, have you tried that?
Running conda install -c c3i_test2 anaconda and then conda update anaconda worked for me. All the app shortcuts are back on the navigator, and I can also create new environments in not only Python 3.7
Hi,
I missed that part, sorry about that. Indeed, the apps are back in Anaconda
Navigator but now I get a warning message when using conda update conda
referrig to higher priority channels (superseded channels). Is it safe? Am
I OK with using them when compared to the standard channels?
BR,
Paulo
Evangelos Constantinou <[email protected]> escreveu no dia sábado,
6/07/2019 à(s) 23:23:
> I think I was able to resolve by first doing conda install -c c3i_test2
> anaconda and then updating.
> @eltabbal <https://github.com/eltabbal>, have you tried that?
>
> Running conda install -c c3i_test2 anaconda and then conda update anaconda
> worked for me. All the app shortcuts are back on the navigator, and I can
> also create new environments in not only Python 3.7
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8842?email_source=notifications&email_token=ACXPIV4T3Y2XFJWRP6BGQC3P6ELNLA5CNFSM4H4G6BNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZLBGJI#issuecomment-508957477>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ACXPIV57LX6HBLBDAUCNBSDP6ELNLANCNFSM4H4G6BNA>
> .
>
--
Paulo Xavier Candeias
Hi, again,
this what I ended up doing:
1. uninstall Anaconda;
2. reinstall Anaconda;
3. "conda update conda" -> here I get a warning message about outdated
conda-build
4. "conda update conda-build"
5. "conda update anaconda"
Now everything seems to be working properly.
BR,
Paulo
Paulo Candeias <[email protected]> escreveu no dia domingo, 7/07/2019
à(s) 16:53:
> Hi,
>
> I missed that part, sorry about that. Indeed, the apps are back in
> Anaconda Navigator but now I get a warning message when using conda update
> conda referrig to higher priority channels (superseded channels). Is it
> safe? Am I OK with using them when compared to the standard channels?
>
> BR,
> Paulo
>
>
> Evangelos Constantinou <[email protected]> escreveu no dia sábado,
> 6/07/2019 à(s) 23:23:
>
>> I think I was able to resolve by first doing conda install -c c3i_test2
>> anaconda and then updating.
>> @eltabbal <https://github.com/eltabbal>, have you tried that?
>>
>> Running conda install -c c3i_test2 anaconda and then conda update
>> anaconda worked for me. All the app shortcuts are back on the navigator,
>> and I can also create new environments in not only Python 3.7
>>
>> —
>> You are receiving this because you commented.
>> Reply to this email directly, view it on GitHub
>> <https://github.com/conda/conda/issues/8842?email_source=notifications&email_token=ACXPIV4T3Y2XFJWRP6BGQC3P6ELNLA5CNFSM4H4G6BNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZLBGJI#issuecomment-508957477>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/ACXPIV57LX6HBLBDAUCNBSDP6ELNLANCNFSM4H4G6BNA>
>> .
>>
>
>
> --
> Paulo Xavier Candeias
>
--
Paulo Xavier Candeias
@msarahan I tried the `conda update anaconda` command, but I am getting some Assertion errors and then the update gets rolled back. Am I doing something wrong? I am running on Ubuntu 18.04 LTS. Is it okay to track this problem under this existing issue, or should this be a new issue?
```
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(637): An error occurred while installing package 'None'.
AssertionError()
Attempting to roll back.
Rolling back transaction: done
AssertionError()
()
AssertionError()
```
Hi. I'm looking for a fix that works for Miniconda also - I don't want to install the full Anaconda.
From a fresh install of Miniconda3 4.6.14 (Python 3.7.3 64-bit) on both Windows 10 and Window 7 machines, then running `conda update conda` gives the following:
```
The following NEW packages will be INSTALLED:
bzip2 pkgs/main/win-64::bzip2-1.0.7-he774522_0
conda-package-han~ pkgs/main/win-64::conda-package-handling-1.3.10-py37_0
libarchive pkgs/main/win-64::libarchive-3.3.3-h0643e63_5
libiconv pkgs/main/win-64::libiconv-1.15-h1df5818_7
libxml2 pkgs/main/win-64::libxml2-2.9.9-h464c3ec_0
lz4-c pkgs/main/win-64::lz4-c-1.8.1.2-h2fa13f4_0
lzo pkgs/main/win-64::lzo-2.10-h6df0209_2
python-libarchive~ pkgs/main/win-64::python-libarchive-c-2.8-py37_9
tqdm pkgs/main/noarch::tqdm-4.32.1-py_0
xz pkgs/main/win-64::xz-5.2.4-h2fa13f4_4
zlib pkgs/main/win-64::zlib-1.2.11-h62dcd97_3
zstd pkgs/main/win-64::zstd-1.3.7-h508b16e_0
The following packages will be UPDATED:
ca-certificates 2019.1.23-0 --> 2019.5.15-0
certifi 2019.3.9-py37_0 --> 2019.6.16-py37_0
conda 4.6.14-py37_0 --> 4.7.5-py37_0
openssl 1.1.1b-he774522_1 --> 1.1.1c-he774522_1
Proceed ([y]/n)? y
```
After proceeding, `conda update --all` gives:
```
The following packages will be REMOVED:
console_shortcut-0.1.1-3
powershell_shortcut-0.0.1-2
The following packages will be UPDATED:
cffi 1.12.2-py37h7a1dbc1_1 --> 1.12.3-py37h7a1dbc1_0
cryptography 2.6.1-py37h7a1dbc1_0 --> 2.7-py37h7a1dbc1_0
pip 19.0.3-py37_0 --> 19.1.1-py37_0
pysocks 1.6.8-py37_0 --> 1.7.0-py37_0
python 3.7.3-h8c8aaf0_0 --> 3.7.3-h8c8aaf0_1
requests 2.21.0-py37_0 --> 2.22.0-py37_0
setuptools 41.0.0-py37_0 --> 41.0.1-py37_0
sqlite 3.27.2-he774522_0 --> 3.28.0-he774522_0
urllib3 1.24.1-py37_0 --> 1.24.2-py37_0
vs2015_runtime 14.15.26706-h3a45250_0 --> 14.15.26706-h3a45250_4
wheel 0.33.1-py37_0 --> 0.33.4-py37_0
Proceed ([y]/n)? n
```
I don't think I want to remove the console and powershell shortcuts? Or should I not be updating all in Miniconda anyway?
Thanks!
Hi,
I would like to add some more information after my unintsall/resintall
sequence. Working on a Linux Mint 19.1 64 bits laptop, after the sequence
1. conda update conda
2. conda update conda-build
3. conda update anaconda
previously reported, I went forward and updated two apps in Anaconda
Navigator (Jupyterlab and Spyder). I noticed on the bottom of the window a
few messages about updating the conda environment so I decided to go back
to the bash console and issue a new "conda update conda". I got a long list
of updates to apply, which I didn't accept, but what I found most strange
was the change, on all of them, of architecture from linux to noarch, like
this one:
pkgs/main/linux-64::zipp-0.3.3-py37_1 --> pkgs/main/noarch::zipp-0.5.1-py_0
All the versions are in fact more recent than the ones I have but is it
supposed to change architectures?
BR,
Paulo
dfostr <[email protected]> escreveu no dia segunda, 8/07/2019 à(s)
08:25:
> Hi. I'm looking for a fix that works for Miniconda also - I don't want to
> install the full Anaconda.
>
> From a fresh install of Miniconda3 4.6.14 (Python 3.7.3 64-bit) on both
> Windows 10 and Window 7 machines, then running conda update conda gives
> the following:
>
> The following NEW packages will be INSTALLED:
>
> bzip2 pkgs/main/win-64::bzip2-1.0.7-he774522_0
> conda-package-han~ pkgs/main/win-64::conda-package-handling-1.3.10-py37_0
> libarchive pkgs/main/win-64::libarchive-3.3.3-h0643e63_5
> libiconv pkgs/main/win-64::libiconv-1.15-h1df5818_7
> libxml2 pkgs/main/win-64::libxml2-2.9.9-h464c3ec_0
> lz4-c pkgs/main/win-64::lz4-c-1.8.1.2-h2fa13f4_0
> lzo pkgs/main/win-64::lzo-2.10-h6df0209_2
> python-libarchive~ pkgs/main/win-64::python-libarchive-c-2.8-py37_9
> tqdm pkgs/main/noarch::tqdm-4.32.1-py_0
> xz pkgs/main/win-64::xz-5.2.4-h2fa13f4_4
> zlib pkgs/main/win-64::zlib-1.2.11-h62dcd97_3
> zstd pkgs/main/win-64::zstd-1.3.7-h508b16e_0
>
> The following packages will be UPDATED:
>
> ca-certificates 2019.1.23-0 --> 2019.5.15-0
> certifi 2019.3.9-py37_0 --> 2019.6.16-py37_0
> conda 4.6.14-py37_0 --> 4.7.5-py37_0
> openssl 1.1.1b-he774522_1 --> 1.1.1c-he774522_1
>
>
> Proceed ([y]/n)? y
>
> But then conda update --all gives:
>
> The following packages will be REMOVED:
>
> console_shortcut-0.1.1-3
> powershell_shortcut-0.0.1-2
>
> The following packages will be UPDATED:
>
> cffi 1.12.2-py37h7a1dbc1_1 --> 1.12.3-py37h7a1dbc1_0
> cryptography 2.6.1-py37h7a1dbc1_0 --> 2.7-py37h7a1dbc1_0
> pip 19.0.3-py37_0 --> 19.1.1-py37_0
> pysocks 1.6.8-py37_0 --> 1.7.0-py37_0
> python 3.7.3-h8c8aaf0_0 --> 3.7.3-h8c8aaf0_1
> requests 2.21.0-py37_0 --> 2.22.0-py37_0
> setuptools 41.0.0-py37_0 --> 41.0.1-py37_0
> sqlite 3.27.2-he774522_0 --> 3.28.0-he774522_0
> urllib3 1.24.1-py37_0 --> 1.24.2-py37_0
> vs2015_runtime 14.15.26706-h3a45250_0 --> 14.15.26706-h3a45250_4
> wheel 0.33.1-py37_0 --> 0.33.4-py37_0
>
>
> Proceed ([y]/n)? n
>
> I don't think I want to remove the console and powershell shortcuts? Or
> should I not be updating all in Miniconda anyway?
>
> Thanks!
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8842?email_source=notifications&email_token=ACXPIV4WLHFWLCI663BHQLTP6LTW7A5CNFSM4H4G6BNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZMGX2I#issuecomment-509111273>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ACXPIVYWVFRXGFJYNDNM6QLP6LTW7ANCNFSM4H4G6BNA>
> .
>
--
Paulo Xavier Candeias
Noarch means it can be used on any platform. It's fine.
Hi Mike,
Thank you. I will then proceed with the updates.
BR,
Paulo
Mike Sarahan <[email protected]> escreveu em seg, 8/07/2019 às 14:09
:
> Noarch means it can be used on any platform. It's fine.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8842?email_source=notifications&email_token=ACXPIVYBANQQEKSFZPEFQNLP6M4BPA5CNFSM4H4G6BNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZNA4IQ#issuecomment-509218338>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ACXPIV25CFIB64QBVG6GQW3P6M4BPANCNFSM4H4G6BNA>
> .
>
--
Paulo Xavier Candeias
When will it be safe to do a complete reinstall of Anaconda and then do "conda upgrade --all" as usual? In other words, when will the bugs be squashed definitively? Already? Next week? Never?
The problems with the anaconda metapackage should be gone. The undesired removal of powershell_shortcut and console_shortcut will be fixed in the next conda release, 4.7.6. `conda update --all` should be fine for most people now. If you are someone who installs packages only to immediately remove them, so that you get that package's dependencies, then you need to adapt to using `conda install --only-deps` instead of the install-then-remove dance.
Sorry, msarahan, but this problem is not gone. I did a clean install of 2019.03, then did conda upgrade --all and then did conda upgrade --all again. The following is what happened. This is on an iMac running MacOS Mojave 10.14.5.
108-211-183-124:~ ojohns$ conda upgrade --all
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: /Users/ojohns/anaconda3
The following packages will be downloaded:
package | build
---------------------------|-----------------
_anaconda_depends-2019.03 | py37_0 5 KB
anaconda-custom | py37_1 3 KB
anaconda-project-0.8.3 | py_0 212 KB
astropy-3.2.1 | py37h1de35cc_0 6.9 MB
babel-2.7.0 | py_0 5.8 MB
backports-1.0 | py_2 139 KB
backports.functools_lru_cache-1.5| py_2 9 KB
backports.tempfile-1.0 | py_1 12 KB
backports.weakref-1.0.post1| py_1 7 KB
bitarray-0.9.3 | py37h1de35cc_0 59 KB
blosc-1.16.3 | hd9629dc_0 64 KB
bokeh-1.2.0 | py37_0 3.9 MB
bzip2-1.0.7 | h1de35cc_0 104 KB
ca-certificates-2019.5.15 | 0 133 KB
certifi-2019.6.16 | py37_0 154 KB
cffi-1.12.3 | py37hb5b8e2f_0 214 KB
cloudpickle-1.2.1 | py_0 28 KB
conda-4.7.5 | py37_0 3.0 MB
conda-build-3.18.7 | py37_0 528 KB
conda-package-handling-1.3.11| py37_0 260 KB
conda-verify-3.4.2 | py_0 25 KB
cryptography-2.7 | py37ha12b0ac_0 571 KB
curl-7.64.1 | ha441bb4_0 131 KB
cython-0.29.11 | py37h0a44026_0 2.0 MB
dask-2.1.0 | py_0 11 KB
dask-core-2.1.0 | py_0 578 KB
defusedxml-0.6.0 | py_0 23 KB
distributed-2.1.0 | py_0 369 KB
fastcache-1.1.0 | py37h1de35cc_0 29 KB
filelock-3.0.12 | py_0 12 KB
flask-1.0.3 | py37_0 123 KB
glob2-0.7 | py_0 14 KB
importlib_metadata-0.17 | py37_1 39 KB
intel-openmp-2019.4 | 233 1.1 MB
ipykernel-5.1.1 | py37h39e3cac_0 162 KB
ipython-7.6.1 | py37h39e3cac_0 1.1 MB
isort-4.3.21 | py37_0 68 KB
jdcal-1.4.1 | py_0 11 KB
jinja2-2.10.1 | py37_0 188 KB
joblib-0.13.2 | py37_0 367 KB
jupyter_core-4.5.0 | py_0 48 KB
jupyterlab-0.35.5 | py37hf63ae98_0 10.6 MB
kiwisolver-1.1.0 | py37h0a44026_0 60 KB
lazy-object-proxy-1.4.1 | py37h1de35cc_0 28 KB
libcurl-7.64.1 | h051b688_0 546 KB
libpng-1.6.37 | ha441bb4_0 325 KB
libssh2-1.8.2 | ha12b0ac_0 221 KB
libxml2-2.9.9 | hf6e021a_1 1.9 MB
llvm-openmp-4.0.1 | hcfea43d_1 454 KB
llvmlite-0.29.0 | py37h98b8051_0 13.7 MB
lxml-4.3.4 | py37hef8c89e_0 1.3 MB
matplotlib-3.1.0 | py37h54f8f79_0 6.6 MB
mkl-2019.4 | 233 155.2 MB
mkl-service-2.0.2 | py37h1de35cc_0 51 KB
mkl_fft-1.0.12 | py37h5e564d8_0 155 KB
mock-3.0.5 | py37_0 47 KB
more-itertools-7.0.0 | py37_0 93 KB
nbconvert-5.5.0 | py_0 381 KB
networkx-2.3 | py_0 1.1 MB
nltk-3.4.3 | py37_0 2.1 MB
numba-0.44.1 | py37h6440ff4_0 2.8 MB
numpy-1.16.4 | py37hacdab7b_0 49 KB
numpy-base-1.16.4 | py37h6575580_0 4.2 MB
numpydoc-0.9.1 | py_0 31 KB
openpyxl-2.6.2 | py_0 157 KB
openssl-1.1.1c | h1de35cc_1 3.4 MB
parso-0.5.0 | py_0 67 KB
partd-1.0.0 | py_0 19 KB
path.py-12.0.1 | py_0 23 KB
pathlib2-2.3.4 | py37_0 36 KB
pexpect-4.7.0 | py37_0 82 KB
pillow-6.0.0 | py37hb68e598_0 579 KB
pip-19.1.1 | py37_0 1.8 MB
pluggy-0.12.0 | py_0 20 KB
prometheus_client-0.7.1 | py_0 42 KB
psutil-5.6.3 | py37h1de35cc_0 333 KB
pycurl-7.43.0.3 | py37ha12b0ac_0 71 KB
pygments-2.4.2 | py_0 664 KB
pyparsing-2.4.0 | py_0 58 KB
pysocks-1.7.0 | py37_0 29 KB
pytables-3.5.2 | py37h5bccee9_1 1.4 MB
pytest-5.0.0 | py37_0 358 KB
python-libarchive-c-2.8 | py37_10 22 KB
pytz-2019.1 | py_0 236 KB
pywavelets-1.0.3 | py37h1d22016_1 4.2 MB
pyyaml-5.1.1 | py37h1de35cc_0 170 KB
qtconsole-4.5.1 | py_0 92 KB
qtpy-1.8.0 | py_0 38 KB
requests-2.22.0 | py37_0 89 KB
rope-0.14.0 | py_0 113 KB
scikit-image-0.15.0 | py37h0a44026_0 27.6 MB
scikit-learn-0.21.2 | py37h27c97d8_0 5.9 MB
setuptools-41.0.1 | py37_0 635 KB
snowballstemmer-1.9.0 | py_0 53 KB
sphinx-2.1.2 | py_0 1.4 MB
sphinxcontrib-applehelp-1.0.1| py_0 29 KB
sphinxcontrib-devhelp-1.0.1| py_0 23 KB
sphinxcontrib-htmlhelp-1.0.2| py_0 28 KB
sphinxcontrib-jsmath-1.0.1 | py_0 8 KB
sphinxcontrib-qthelp-1.0.2 | py_0 26 KB
sphinxcontrib-serializinghtml-1.1.3| py_0 24 KB
sphinxcontrib-websupport-1.1.2| py_0 35 KB
spyder-3.3.5 | py37_0 2.5 MB
spyder-kernels-0.5.0 | py37_0 69 KB
sqlalchemy-1.3.5 | py37h1de35cc_0 1.7 MB
sqlite-3.28.0 | ha441bb4_0 2.3 MB
statsmodels-0.10.0 | py37h1d22016_0 8.8 MB
sympy-1.4 | py37_0 9.7 MB
tblib-1.4.0 | py_0 14 KB
terminado-0.8.2 | py37_0 22 KB
tornado-6.0.3 | py37h1de35cc_0 644 KB
tqdm-4.32.1 | py_0 48 KB
urllib3-1.24.2 | py37_0 152 KB
werkzeug-0.15.4 | py_0 262 KB
wheel-0.33.4 | py37_0 39 KB
wrapt-1.11.2 | py37h1de35cc_0 44 KB
xlsxwriter-1.1.8 | py_0 105 KB
xlwings-0.15.8 | py37_0 464 KB
zict-1.0.0 | py_0 12 KB
zipp-0.5.1 | py_0 8 KB
------------------------------------------------------------
Total: 307.1 MB
The following NEW packages will be INSTALLED:
_anaconda_depends pkgs/main/osx-64::_anaconda_depends-2019.03-py37_0
backports.functoo~ pkgs/main/noarch::backports.functools_lru_cache-1.5-py_2
backports.tempfile pkgs/main/noarch::backports.tempfile-1.0-py_1
backports.weakref pkgs/main/noarch::backports.weakref-1.0.post1-py_1
conda-package-han~ pkgs/main/osx-64::conda-package-handling-1.3.11-py37_0
joblib pkgs/main/osx-64::joblib-0.13.2-py37_0
llvm-openmp pkgs/main/osx-64::llvm-openmp-4.0.1-hcfea43d_1
mock pkgs/main/osx-64::mock-3.0.5-py37_0
sphinxcontrib-app~ pkgs/main/noarch::sphinxcontrib-applehelp-1.0.1-py_0
sphinxcontrib-dev~ pkgs/main/noarch::sphinxcontrib-devhelp-1.0.1-py_0
sphinxcontrib-htm~ pkgs/main/noarch::sphinxcontrib-htmlhelp-1.0.2-py_0
sphinxcontrib-jsm~ pkgs/main/noarch::sphinxcontrib-jsmath-1.0.1-py_0
sphinxcontrib-qth~ pkgs/main/noarch::sphinxcontrib-qthelp-1.0.2-py_0
sphinxcontrib-ser~ pkgs/main/noarch::sphinxcontrib-serializinghtml-1.1.3-py_0
The following packages will be UPDATED:
anaconda-project pkgs/main/osx-64::anaconda-project-0.~ --> pkgs/main/noarch::anaconda-project-0.8.3-py_0
astropy 3.1.2-py37h1de35cc_0 --> 3.2.1-py37h1de35cc_0
babel pkgs/main/osx-64::babel-2.6.0-py37_0 --> pkgs/main/noarch::babel-2.7.0-py_0
backports pkgs/main/osx-64::backports-1.0-py37_1 --> pkgs/main/noarch::backports-1.0-py_2
bitarray 0.8.3-py37h1de35cc_0 --> 0.9.3-py37h1de35cc_0
blosc 1.15.0-hd9629dc_0 --> 1.16.3-hd9629dc_0
bokeh 1.0.4-py37_0 --> 1.2.0-py37_0
bzip2 1.0.6-h1de35cc_5 --> 1.0.7-h1de35cc_0
ca-certificates 2019.1.23-0 --> 2019.5.15-0
certifi 2019.3.9-py37_0 --> 2019.6.16-py37_0
cffi 1.12.2-py37hb5b8e2f_1 --> 1.12.3-py37hb5b8e2f_0
cloudpickle pkgs/main/osx-64::cloudpickle-0.8.0-p~ --> pkgs/main/noarch::cloudpickle-1.2.1-py_0
conda 4.6.11-py37_0 --> 4.7.5-py37_0
conda-build 3.17.8-py37_0 --> 3.18.7-py37_0
conda-verify pkgs/main/osx-64::conda-verify-3.1.1-~ --> pkgs/main/noarch::conda-verify-3.4.2-py_0
cryptography 2.6.1-py37ha12b0ac_0 --> 2.7-py37ha12b0ac_0
curl 7.64.0-ha441bb4_2 --> 7.64.1-ha441bb4_0
cython 0.29.6-py37h0a44026_0 --> 0.29.11-py37h0a44026_0
dask pkgs/main/osx-64::dask-1.1.4-py37_1 --> pkgs/main/noarch::dask-2.1.0-py_0
dask-core pkgs/main/osx-64::dask-core-1.1.4-py3~ --> pkgs/main/noarch::dask-core-2.1.0-py_0
defusedxml pkgs/main/osx-64::defusedxml-0.5.0-py~ --> pkgs/main/noarch::defusedxml-0.6.0-py_0
distributed pkgs/main/osx-64::distributed-1.26.0-~ --> pkgs/main/noarch::distributed-2.1.0-py_0
fastcache 1.0.2-py37h1de35cc_2 --> 1.1.0-py37h1de35cc_0
filelock pkgs/main/osx-64::filelock-3.0.10-py3~ --> pkgs/main/noarch::filelock-3.0.12-py_0
flask 1.0.2-py37_1 --> 1.0.3-py37_0
glob2 pkgs/main/osx-64::glob2-0.6-py37_1 --> pkgs/main/noarch::glob2-0.7-py_0
importlib_metadata 0.8-py37_0 --> 0.17-py37_1
intel-openmp 2019.3-199 --> 2019.4-233
ipykernel 5.1.0-py37h39e3cac_0 --> 5.1.1-py37h39e3cac_0
ipython 7.4.0-py37h39e3cac_0 --> 7.6.1-py37h39e3cac_0
isort 4.3.16-py37_0 --> 4.3.21-py37_0
jdcal pkgs/main/osx-64::jdcal-1.4-py37_0 --> pkgs/main/noarch::jdcal-1.4.1-py_0
jinja2 2.10-py37_0 --> 2.10.1-py37_0
jupyter_core pkgs/main/osx-64::jupyter_core-4.4.0-~ --> pkgs/main/noarch::jupyter_core-4.5.0-py_0
jupyterlab 0.35.4-py37hf63ae98_0 --> 0.35.5-py37hf63ae98_0
kiwisolver 1.0.1-py37h0a44026_0 --> 1.1.0-py37h0a44026_0
lazy-object-proxy 1.3.1-py37h1de35cc_2 --> 1.4.1-py37h1de35cc_0
libcurl 7.64.0-h051b688_2 --> 7.64.1-h051b688_0
libpng 1.6.36-ha441bb4_0 --> 1.6.37-ha441bb4_0
libssh2 1.8.0-ha12b0ac_4 --> 1.8.2-ha12b0ac_0
libxml2 2.9.9-hab757c2_0 --> 2.9.9-hf6e021a_1
llvmlite 0.28.0-py37h8c7ce04_0 --> 0.29.0-py37h98b8051_0
lxml 4.3.2-py37hef8c89e_0 --> 4.3.4-py37hef8c89e_0
matplotlib 3.0.3-py37h54f8f79_0 --> 3.1.0-py37h54f8f79_0
mkl 2019.3-199 --> 2019.4-233
mkl-service 1.1.2-py37hfbe908c_5 --> 2.0.2-py37h1de35cc_0
mkl_fft 1.0.10-py37h5e564d8_0 --> 1.0.12-py37h5e564d8_0
more-itertools 6.0.0-py37_0 --> 7.0.0-py37_0
nbconvert pkgs/main/osx-64::nbconvert-5.4.1-py3~ --> pkgs/main/noarch::nbconvert-5.5.0-py_0
networkx pkgs/main/osx-64::networkx-2.2-py37_1 --> pkgs/main/noarch::networkx-2.3-py_0
nltk 3.4-py37_1 --> 3.4.3-py37_0
numba 0.43.1-py37h6440ff4_0 --> 0.44.1-py37h6440ff4_0
numpy 1.16.2-py37hacdab7b_0 --> 1.16.4-py37hacdab7b_0
numpy-base 1.16.2-py37h6575580_0 --> 1.16.4-py37h6575580_0
numpydoc pkgs/main/osx-64::numpydoc-0.8.0-py37~ --> pkgs/main/noarch::numpydoc-0.9.1-py_0
openpyxl pkgs/main/osx-64::openpyxl-2.6.1-py37~ --> pkgs/main/noarch::openpyxl-2.6.2-py_0
openssl 1.1.1b-h1de35cc_1 --> 1.1.1c-h1de35cc_1
parso pkgs/main/osx-64::parso-0.3.4-py37_0 --> pkgs/main/noarch::parso-0.5.0-py_0
partd pkgs/main/osx-64::partd-0.3.10-py37_1 --> pkgs/main/noarch::partd-1.0.0-py_0
path.py pkgs/main/osx-64::path.py-11.5.0-py37~ --> pkgs/main/noarch::path.py-12.0.1-py_0
pathlib2 2.3.3-py37_0 --> 2.3.4-py37_0
pexpect 4.6.0-py37_0 --> 4.7.0-py37_0
pillow 5.4.1-py37hb68e598_0 --> 6.0.0-py37hb68e598_0
pip 19.0.3-py37_0 --> 19.1.1-py37_0
pluggy pkgs/main/osx-64::pluggy-0.9.0-py37_0 --> pkgs/main/noarch::pluggy-0.12.0-py_0
prometheus_client pkgs/main/osx-64::prometheus_client-0~ --> pkgs/main/noarch::prometheus_client-0.7.1-py_0
psutil 5.6.1-py37h1de35cc_0 --> 5.6.3-py37h1de35cc_0
pycurl 7.43.0.2-py37ha12b0ac_0 --> 7.43.0.3-py37ha12b0ac_0
pygments pkgs/main/osx-64::pygments-2.3.1-py37~ --> pkgs/main/noarch::pygments-2.4.2-py_0
pyparsing pkgs/main/osx-64::pyparsing-2.3.1-py3~ --> pkgs/main/noarch::pyparsing-2.4.0-py_0
pysocks 1.6.8-py37_0 --> 1.7.0-py37_0
pytables 3.5.1-py37h5bccee9_0 --> 3.5.2-py37h5bccee9_1
pytest 4.3.1-py37_0 --> 5.0.0-py37_0
python-libarchive~ 2.8-py37_6 --> 2.8-py37_10
pytz pkgs/main/osx-64::pytz-2018.9-py37_0 --> pkgs/main/noarch::pytz-2019.1-py_0
pywavelets 1.0.2-py37h1d22016_0 --> 1.0.3-py37h1d22016_1
pyyaml 5.1-py37h1de35cc_0 --> 5.1.1-py37h1de35cc_0
qtconsole pkgs/main/osx-64::qtconsole-4.4.3-py3~ --> pkgs/main/noarch::qtconsole-4.5.1-py_0
qtpy pkgs/main/osx-64::qtpy-1.7.0-py37_1 --> pkgs/main/noarch::qtpy-1.8.0-py_0
requests 2.21.0-py37_0 --> 2.22.0-py37_0
rope pkgs/main/osx-64::rope-0.12.0-py37_0 --> pkgs/main/noarch::rope-0.14.0-py_0
scikit-image 0.14.2-py37h0a44026_0 --> 0.15.0-py37h0a44026_0
scikit-learn 0.20.3-py37h27c97d8_0 --> 0.21.2-py37h27c97d8_0
setuptools 40.8.0-py37_0 --> 41.0.1-py37_0
snowballstemmer pkgs/main/osx-64::snowballstemmer-1.2~ --> pkgs/main/noarch::snowballstemmer-1.9.0-py_0
sphinx pkgs/main/osx-64::sphinx-1.8.5-py37_0 --> pkgs/main/noarch::sphinx-2.1.2-py_0
sphinxcontrib-web~ pkgs/main/osx-64::sphinxcontrib-websu~ --> pkgs/main/noarch::sphinxcontrib-websupport-1.1.2-py_0
spyder 3.3.3-py37_0 --> 3.3.5-py37_0
spyder-kernels 0.4.2-py37_0 --> 0.5.0-py37_0
sqlalchemy 1.3.1-py37h1de35cc_0 --> 1.3.5-py37h1de35cc_0
sqlite 3.27.2-ha441bb4_0 --> 3.28.0-ha441bb4_0
statsmodels 0.9.0-py37h1d22016_0 --> 0.10.0-py37h1d22016_0
sympy 1.3-py37_0 --> 1.4-py37_0
tblib pkgs/main/osx-64::tblib-1.3.2-py37_0 --> pkgs/main/noarch::tblib-1.4.0-py_0
terminado 0.8.1-py37_1 --> 0.8.2-py37_0
tornado 6.0.2-py37h1de35cc_0 --> 6.0.3-py37h1de35cc_0
tqdm pkgs/main/osx-64::tqdm-4.31.1-py37_1 --> pkgs/main/noarch::tqdm-4.32.1-py_0
urllib3 1.24.1-py37_0 --> 1.24.2-py37_0
werkzeug pkgs/main/osx-64::werkzeug-0.14.1-py3~ --> pkgs/main/noarch::werkzeug-0.15.4-py_0
wheel 0.33.1-py37_0 --> 0.33.4-py37_0
wrapt 1.11.1-py37h1de35cc_0 --> 1.11.2-py37h1de35cc_0
xlsxwriter pkgs/main/osx-64::xlsxwriter-1.1.5-py~ --> pkgs/main/noarch::xlsxwriter-1.1.8-py_0
xlwings 0.15.4-py37_0 --> 0.15.8-py37_0
zict pkgs/main/osx-64::zict-0.1.4-py37_0 --> pkgs/main/noarch::zict-1.0.0-py_0
zipp pkgs/main/osx-64::zipp-0.3.3-py37_1 --> pkgs/main/noarch::zipp-0.5.1-py_0
The following packages will be DOWNGRADED:
anaconda 2019.03-py37_0 --> custom-py37_1
Proceed ([y]/n)? y
Downloading and Extracting Packages
conda-verify-3.4.2 | 25 KB | ######################################################################################################################################### | 100%
kiwisolver-1.1.0 | 60 KB | ######################################################################################################################################### | 100%
sphinxcontrib-appleh | 29 KB | ######################################################################################################################################### | 100%
openpyxl-2.6.2 | 157 KB | ######################################################################################################################################### | 100%
libxml2-2.9.9 | 1.9 MB | ######################################################################################################################################### | 100%
flask-1.0.3 | 123 KB | ######################################################################################################################################### | 100%
cython-0.29.11 | 2.0 MB | ######################################################################################################################################### | 100%
libssh2-1.8.2 | 221 KB | ######################################################################################################################################### | 100%
tblib-1.4.0 | 14 KB | ######################################################################################################################################### | 100%
statsmodels-0.10.0 | 8.8 MB | ######################################################################################################################################### | 100%
tornado-6.0.3 | 644 KB | ######################################################################################################################################### | 100%
bitarray-0.9.3 | 59 KB | ######################################################################################################################################### | 100%
sphinxcontrib-htmlhe | 28 KB | ######################################################################################################################################### | 100%
sphinxcontrib-jsmath | 8 KB | ######################################################################################################################################### | 100%
sphinxcontrib-qthelp | 26 KB | ######################################################################################################################################### | 100%
libcurl-7.64.1 | 546 KB | ######################################################################################################################################### | 100%
bzip2-1.0.7 | 104 KB | ######################################################################################################################################### | 100%
pysocks-1.7.0 | 29 KB | ######################################################################################################################################### | 100%
conda-4.7.5 | 3.0 MB | ######################################################################################################################################### | 100%
qtpy-1.8.0 | 38 KB | ######################################################################################################################################### | 100%
isort-4.3.21 | 68 KB | ######################################################################################################################################### | 100%
lazy-object-proxy-1. | 28 KB | ######################################################################################################################################### | 100%
path.py-12.0.1 | 23 KB | ######################################################################################################################################### | 100%
partd-1.0.0 | 19 KB | ######################################################################################################################################### | 100%
pip-19.1.1 | 1.8 MB | ######################################################################################################################################### | 100%
scikit-image-0.15.0 | 27.6 MB | ######################################################################################################################################### | 100%
psutil-5.6.3 | 333 KB | ######################################################################################################################################### | 100%
pathlib2-2.3.4 | 36 KB | ######################################################################################################################################### | 100%
ca-certificates-2019 | 133 KB | ######################################################################################################################################### | 100%
pyparsing-2.4.0 | 58 KB | ######################################################################################################################################### | 100%
pluggy-0.12.0 | 20 KB | ######################################################################################################################################### | 100%
setuptools-41.0.1 | 635 KB | ######################################################################################################################################### | 100%
jinja2-2.10.1 | 188 KB | ######################################################################################################################################### | 100%
babel-2.7.0 | 5.8 MB | ######################################################################################################################################### | 100%
conda-package-handli | 260 KB | ######################################################################################################################################### | 100%
sympy-1.4 | 9.7 MB | ######################################################################################################################################### | 100%
bokeh-1.2.0 | 3.9 MB | ######################################################################################################################################### | 100%
mkl-2019.4 | 155.2 MB | ######################################################################################################################################### | 100%
numpy-1.16.4 | 49 KB | ######################################################################################################################################### | 100%
anaconda-custom | 3 KB | ######################################################################################################################################### | 100%
jdcal-1.4.1 | 11 KB | ######################################################################################################################################### | 100%
distributed-2.1.0 | 369 KB | ######################################################################################################################################### | 100%
xlsxwriter-1.1.8 | 105 KB | ######################################################################################################################################### | 100%
urllib3-1.24.2 | 152 KB | ######################################################################################################################################### | 100%
terminado-0.8.2 | 22 KB | ######################################################################################################################################### | 100%
cloudpickle-1.2.1 | 28 KB | ######################################################################################################################################### | 100%
nltk-3.4.3 | 2.1 MB | ######################################################################################################################################### | 100%
jupyterlab-0.35.5 | 10.6 MB | ######################################################################################################################################### | 100%
openssl-1.1.1c | 3.4 MB | ######################################################################################################################################### | 100%
pexpect-4.7.0 | 82 KB | ######################################################################################################################################### | 100%
matplotlib-3.1.0 | 6.6 MB | ######################################################################################################################################### | 100%
wrapt-1.11.2 | 44 KB | ######################################################################################################################################### | 100%
numpy-base-1.16.4 | 4.2 MB | ######################################################################################################################################### | 100%
parso-0.5.0 | 67 KB | ######################################################################################################################################### | 100%
backports.tempfile-1 | 12 KB | ######################################################################################################################################### | 100%
pillow-6.0.0 | 579 KB | ######################################################################################################################################### | 100%
backports-1.0 | 139 KB | ######################################################################################################################################### | 100%
spyder-kernels-0.5.0 | 69 KB | ######################################################################################################################################### | 100%
numpydoc-0.9.1 | 31 KB | ######################################################################################################################################### | 100%
blosc-1.16.3 | 64 KB | ######################################################################################################################################### | 100%
pyyaml-5.1.1 | 170 KB | ######################################################################################################################################### | 100%
llvm-openmp-4.0.1 | 454 KB | ######################################################################################################################################### | 100%
pytest-5.0.0 | 358 KB | ######################################################################################################################################### | 100%
glob2-0.7 | 14 KB | ######################################################################################################################################### | 100%
joblib-0.13.2 | 367 KB | ######################################################################################################################################### | 100%
sqlalchemy-1.3.5 | 1.7 MB | ######################################################################################################################################### | 100%
wheel-0.33.4 | 39 KB | ######################################################################################################################################### | 100%
cryptography-2.7 | 571 KB | ######################################################################################################################################### | 100%
sphinxcontrib-websup | 35 KB | ######################################################################################################################################### | 100%
ipykernel-5.1.1 | 162 KB | ######################################################################################################################################### | 100%
pycurl-7.43.0.3 | 71 KB | ######################################################################################################################################### | 100%
mkl-service-2.0.2 | 51 KB | ######################################################################################################################################### | 100%
zict-1.0.0 | 12 KB | ######################################################################################################################################### | 100%
backports.weakref-1. | 7 KB | ######################################################################################################################################### | 100%
spyder-3.3.5 | 2.5 MB | ######################################################################################################################################### | 100%
numba-0.44.1 | 2.8 MB | ######################################################################################################################################### | 100%
astropy-3.2.1 | 6.9 MB | ######################################################################################################################################### | 100%
qtconsole-4.5.1 | 92 KB | ######################################################################################################################################### | 100%
anaconda-project-0.8 | 212 KB | ######################################################################################################################################### | 100%
prometheus_client-0. | 42 KB | ######################################################################################################################################### | 100%
mock-3.0.5 | 47 KB | ######################################################################################################################################### | 100%
werkzeug-0.15.4 | 262 KB | ######################################################################################################################################### | 100%
conda-build-3.18.7 | 528 KB | ######################################################################################################################################### | 100%
nbconvert-5.5.0 | 381 KB | ######################################################################################################################################### | 100%
ipython-7.6.1 | 1.1 MB | ######################################################################################################################################### | 100%
sqlite-3.28.0 | 2.3 MB | ######################################################################################################################################### | 100%
dask-core-2.1.0 | 578 KB | ######################################################################################################################################### | 100%
llvmlite-0.29.0 | 13.7 MB | ######################################################################################################################################### | 100%
libpng-1.6.37 | 325 KB | ######################################################################################################################################### | 100%
python-libarchive-c- | 22 KB | ######################################################################################################################################### | 100%
dask-2.1.0 | 11 KB | ######################################################################################################################################### | 100%
xlwings-0.15.8 | 464 KB | ######################################################################################################################################### | 100%
backports.functools_ | 9 KB | ######################################################################################################################################### | 100%
fastcache-1.1.0 | 29 KB | ######################################################################################################################################### | 100%
cffi-1.12.3 | 214 KB | ######################################################################################################################################### | 100%
zipp-0.5.1 | 8 KB | ######################################################################################################################################### | 100%
pytables-3.5.2 | 1.4 MB | ######################################################################################################################################### | 100%
pygments-2.4.2 | 664 KB | ######################################################################################################################################### | 100%
pywavelets-1.0.3 | 4.2 MB | ######################################################################################################################################### | 100%
certifi-2019.6.16 | 154 KB | ######################################################################################################################################### | 100%
networkx-2.3 | 1.1 MB | ######################################################################################################################################### | 100%
defusedxml-0.6.0 | 23 KB | ######################################################################################################################################### | 100%
pytz-2019.1 | 236 KB | ######################################################################################################################################### | 100%
scikit-learn-0.21.2 | 5.9 MB | ######################################################################################################################################### | 100%
rope-0.14.0 | 113 KB | ######################################################################################################################################### | 100%
_anaconda_depends-20 | 5 KB | ######################################################################################################################################### | 100%
requests-2.22.0 | 89 KB | ######################################################################################################################################### | 100%
filelock-3.0.12 | 12 KB | ######################################################################################################################################### | 100%
intel-openmp-2019.4 | 1.1 MB | ######################################################################################################################################### | 100%
tqdm-4.32.1 | 48 KB | ######################################################################################################################################### | 100%
snowballstemmer-1.9. | 53 KB | ######################################################################################################################################### | 100%
importlib_metadata-0 | 39 KB | ######################################################################################################################################### | 100%
jupyter_core-4.5.0 | 48 KB | ######################################################################################################################################### | 100%
sphinxcontrib-devhel | 23 KB | ######################################################################################################################################### | 100%
mkl_fft-1.0.12 | 155 KB | ######################################################################################################################################### | 100%
curl-7.64.1 | 131 KB | ######################################################################################################################################### | 100%
lxml-4.3.4 | 1.3 MB | ######################################################################################################################################### | 100%
more-itertools-7.0.0 | 93 KB | ######################################################################################################################################### | 100%
sphinxcontrib-serial | 24 KB | ######################################################################################################################################### | 100%
sphinx-2.1.2 | 1.4 MB | ######################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
108-211-183-124:~ ojohns$ conda upgrade --all
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /Users/ojohns/anaconda3
The following packages will be REMOVED:
_anaconda_depends-2019.03-py37_0
alabaster-0.7.12-py37_0
anaconda-custom-py37_1
anaconda-project-0.8.3-py_0
appscript-1.1.0-py37h1de35cc_0
astroid-2.2.5-py37_0
astropy-3.2.1-py37h1de35cc_0
atomicwrites-1.3.0-py37_1
babel-2.7.0-py_0
backports.os-0.1.1-py37_0
backports.shutil_get_terminal_size-1.0.0-py37_2
bitarray-0.9.3-py37h1de35cc_0
bkcharts-0.2-py37_0
blas-1.0-mkl
blosc-1.16.3-hd9629dc_0
bokeh-1.2.0-py37_0
boto-2.49.0-py37_0
bottleneck-1.2.1-py37h1d22016_1
cloudpickle-1.2.1-py_0
colorama-0.4.1-py37_0
contextlib2-0.5.5-py37_0
curl-7.64.1-ha441bb4_0
cycler-0.10.0-py37_0
cython-0.29.11-py37h0a44026_0
cytoolz-0.9.0.1-py37h1de35cc_1
dask-2.1.0-py_0
dask-core-2.1.0-py_0
distributed-2.1.0-py_0
docutils-0.14-py37_0
et_xmlfile-1.0.1-py37_0
fastcache-1.1.0-py37h1de35cc_0
flask-1.0.3-py37_0
get_terminal_size-1.0.0-h7520d66_0
gevent-1.4.0-py37h1de35cc_0
gmp-6.1.2-hb37e062_1
gmpy2-2.0.8-py37h6ef4df4_2
greenlet-0.4.15-py37h1de35cc_0
h5py-2.9.0-py37h3134771_0
hdf5-1.10.4-hfa1e0ec_0
heapdict-1.0.0-py37_2
html5lib-1.0.1-py37_0
imageio-2.5.0-py37_0
imagesize-1.1.0-py37_0
importlib_metadata-0.17-py37_1
intel-openmp-2019.4-233
isort-4.3.21-py37_0
itsdangerous-1.1.0-py37_0
jbig-2.1-h4d881f8_0
jdcal-1.4.1-py_0
joblib-0.13.2-py37_0
jupyter-1.0.0-py37_7
jupyter_console-6.0.0-py37_0
keyring-18.0.0-py37_0
kiwisolver-1.1.0-py37h0a44026_0
krb5-1.16.1-hddcf347_7
lazy-object-proxy-1.4.1-py37h1de35cc_0
libcurl-7.64.1-h051b688_0
libgfortran-3.0.1-h93005f0_2
libssh2-1.8.2-ha12b0ac_0
libxslt-1.1.33-h33a18ac_0
llvm-openmp-4.0.1-hcfea43d_1
llvmlite-0.29.0-py37h98b8051_0
locket-0.2.0-py37_1
lxml-4.3.4-py37hef8c89e_0
matplotlib-3.1.0-py37h54f8f79_0
mccabe-0.6.1-py37_1
mkl-2019.4-233
mkl-service-2.0.2-py37h1de35cc_0
mkl_fft-1.0.12-py37h5e564d8_0
mkl_random-1.0.2-py37h27c97d8_0
mock-3.0.5-py37_0
more-itertools-7.0.0-py37_0
mpc-1.1.0-h6ef4df4_1
mpfr-4.0.1-h3018a27_3
mpmath-1.1.0-py37_0
msgpack-python-0.6.1-py37h04f5b5a_1
multipledispatch-0.6.0-py37_0
networkx-2.3-py_0
nltk-3.4.3-py37_0
nose-1.3.7-py37_2
numba-0.44.1-py37h6440ff4_0
numexpr-2.6.9-py37h7413580_0
numpy-1.16.4-py37hacdab7b_0
numpy-base-1.16.4-py37h6575580_0
numpydoc-0.9.1-py_0
openpyxl-2.6.2-py_0
packaging-19.0-py37_0
pandas-0.24.2-py37h0a44026_0
partd-1.0.0-py_0
path.py-12.0.1-py_0
pathlib2-2.3.4-py37_0
patsy-0.5.1-py37_0
pep8-1.7.1-py37_0
pluggy-0.12.0-py_0
ply-3.11-py37_0
py-1.8.0-py37_0
pycodestyle-2.5.0-py37_0
pycrypto-2.6.1-py37h1de35cc_9
pycurl-7.43.0.3-py37ha12b0ac_0
pyflakes-2.1.1-py37_0
pylint-2.3.1-py37_0
pyodbc-4.0.26-py37h0a44026_0
pyparsing-2.4.0-py_0
pytables-3.5.2-py37h5bccee9_1
pytest-5.0.0-py37_0
pytest-arraydiff-0.3-py37h39e3cac_0
pytest-astropy-0.5.0-py37_0
pytest-doctestplus-0.3.0-py37_0
pytest-openfiles-0.3.2-py37_0
pytest-remotedata-0.3.1-py37_0
pywavelets-1.0.3-py37h1d22016_1
qtawesome-0.5.7-py37_1
qtconsole-4.5.1-py_0
rope-0.14.0-py_0
scikit-image-0.15.0-py37h0a44026_0
scikit-learn-0.21.2-py37h27c97d8_0
scipy-1.2.1-py37h1410ff5_0
seaborn-0.9.0-py37_0
simplegeneric-0.8.1-py37_2
singledispatch-3.4.0.3-py37_0
snappy-1.1.7-he62c110_3
snowballstemmer-1.9.0-py_0
sortedcollections-1.1.2-py37_0
sortedcontainers-2.1.0-py37_0
sphinx-2.1.2-py_0
sphinxcontrib-1.0-py37_1
sphinxcontrib-applehelp-1.0.1-py_0
sphinxcontrib-devhelp-1.0.1-py_0
sphinxcontrib-htmlhelp-1.0.2-py_0
sphinxcontrib-jsmath-1.0.1-py_0
sphinxcontrib-qthelp-1.0.2-py_0
sphinxcontrib-serializinghtml-1.1.3-py_0
sphinxcontrib-websupport-1.1.2-py_0
spyder-3.3.5-py37_0
spyder-kernels-0.5.0-py37_0
sqlalchemy-1.3.5-py37h1de35cc_0
statsmodels-0.10.0-py37h1d22016_0
sympy-1.4-py37_0
tblib-1.4.0-py_0
toolz-0.9.0-py37_0
unicodecsv-0.14.1-py37_0
unixodbc-2.3.7-h1de35cc_0
werkzeug-0.15.4-py_0
wrapt-1.11.2-py37h1de35cc_0
wurlitzer-1.0.2-py37_0
xlrd-1.2.0-py37_0
xlsxwriter-1.1.8-py_0
xlwings-0.15.8-py37_0
xlwt-1.3.0-py37_0
zict-1.0.0-py_0
zipp-0.5.1-py_0
Proceed ([y]/n)? n
CondaSystemExit: Exiting.
Thanks for your patience. We have reproduced it and are looking into it.
On Thu, Jul 11, 2019 at 11:27 AM o12johns <[email protected]> wrote:
> Sorry, msarahan, but this problem is not gone. I did a clean install of
> 2019.03, then did conda upgrade --all and then did conda upgrade --all
> again. The following is what happened. This is on an iMac running MacOS
> Mojave 10.14.5.
>
> 108-211-183-124:~ ojohns$ conda upgrade --all
> WARNING: The conda.compat module is deprecated and will be removed in a
> future release.
> Collecting package metadata: done
> Solving environment: done
> Package Plan
>
> environment location: /Users/ojohns/anaconda3
> The following packages will be downloaded:
>
> package | build
> ---------------------------|-----------------
> _anaconda_depends-2019.03 | py37_0 5 KB
> anaconda-custom | py37_1 3 KB
> anaconda-project-0.8.3 | py_0 212 KB
> astropy-3.2.1 | py37h1de35cc_0 6.9 MB
> babel-2.7.0 | py_0 5.8 MB
> backports-1.0 | py_2 139 KB
> backports.functools_lru_cache-1.5| py_2 9 KB
> backports.tempfile-1.0 | py_1 12 KB
> backports.weakref-1.0.post1| py_1 7 KB
> bitarray-0.9.3 | py37h1de35cc_0 59 KB
> blosc-1.16.3 | hd9629dc_0 64 KB
> bokeh-1.2.0 | py37_0 3.9 MB
> bzip2-1.0.7 | h1de35cc_0 104 KB
> ca-certificates-2019.5.15 | 0 133 KB
> certifi-2019.6.16 | py37_0 154 KB
> cffi-1.12.3 | py37hb5b8e2f_0 214 KB
> cloudpickle-1.2.1 | py_0 28 KB
> conda-4.7.5 | py37_0 3.0 MB
> conda-build-3.18.7 | py37_0 528 KB
> conda-package-handling-1.3.11| py37_0 260 KB
> conda-verify-3.4.2 | py_0 25 KB
> cryptography-2.7 | py37ha12b0ac_0 571 KB
> curl-7.64.1 | ha441bb4_0 131 KB
> cython-0.29.11 | py37h0a44026_0 2.0 MB
> dask-2.1.0 | py_0 11 KB
> dask-core-2.1.0 | py_0 578 KB
> defusedxml-0.6.0 | py_0 23 KB
> distributed-2.1.0 | py_0 369 KB
> fastcache-1.1.0 | py37h1de35cc_0 29 KB
> filelock-3.0.12 | py_0 12 KB
> flask-1.0.3 | py37_0 123 KB
> glob2-0.7 | py_0 14 KB
> importlib_metadata-0.17 | py37_1 39 KB
> intel-openmp-2019.4 | 233 1.1 MB
> ipykernel-5.1.1 | py37h39e3cac_0 162 KB
> ipython-7.6.1 | py37h39e3cac_0 1.1 MB
> isort-4.3.21 | py37_0 68 KB
> jdcal-1.4.1 | py_0 11 KB
> jinja2-2.10.1 | py37_0 188 KB
> joblib-0.13.2 | py37_0 367 KB
> jupyter_core-4.5.0 | py_0 48 KB
> jupyterlab-0.35.5 | py37hf63ae98_0 10.6 MB
> kiwisolver-1.1.0 | py37h0a44026_0 60 KB
> lazy-object-proxy-1.4.1 | py37h1de35cc_0 28 KB
> libcurl-7.64.1 | h051b688_0 546 KB
> libpng-1.6.37 | ha441bb4_0 325 KB
> libssh2-1.8.2 | ha12b0ac_0 221 KB
> libxml2-2.9.9 | hf6e021a_1 1.9 MB
> llvm-openmp-4.0.1 | hcfea43d_1 454 KB
> llvmlite-0.29.0 | py37h98b8051_0 13.7 MB
> lxml-4.3.4 | py37hef8c89e_0 1.3 MB
> matplotlib-3.1.0 | py37h54f8f79_0 6.6 MB
> mkl-2019.4 | 233 155.2 MB
> mkl-service-2.0.2 | py37h1de35cc_0 51 KB
> mkl_fft-1.0.12 | py37h5e564d8_0 155 KB
> mock-3.0.5 | py37_0 47 KB
> more-itertools-7.0.0 | py37_0 93 KB
> nbconvert-5.5.0 | py_0 381 KB
> networkx-2.3 | py_0 1.1 MB
> nltk-3.4.3 | py37_0 2.1 MB
> numba-0.44.1 | py37h6440ff4_0 2.8 MB
> numpy-1.16.4 | py37hacdab7b_0 49 KB
> numpy-base-1.16.4 | py37h6575580_0 4.2 MB
> numpydoc-0.9.1 | py_0 31 KB
> openpyxl-2.6.2 | py_0 157 KB
> openssl-1.1.1c | h1de35cc_1 3.4 MB
> parso-0.5.0 | py_0 67 KB
> partd-1.0.0 | py_0 19 KB
> path.py-12.0.1 | py_0 23 KB
> pathlib2-2.3.4 | py37_0 36 KB
> pexpect-4.7.0 | py37_0 82 KB
> pillow-6.0.0 | py37hb68e598_0 579 KB
> pip-19.1.1 | py37_0 1.8 MB
> pluggy-0.12.0 | py_0 20 KB
> prometheus_client-0.7.1 | py_0 42 KB
> psutil-5.6.3 | py37h1de35cc_0 333 KB
> pycurl-7.43.0.3 | py37ha12b0ac_0 71 KB
> pygments-2.4.2 | py_0 664 KB
> pyparsing-2.4.0 | py_0 58 KB
> pysocks-1.7.0 | py37_0 29 KB
> pytables-3.5.2 | py37h5bccee9_1 1.4 MB
> pytest-5.0.0 | py37_0 358 KB
> python-libarchive-c-2.8 | py37_10 22 KB
> pytz-2019.1 | py_0 236 KB
> pywavelets-1.0.3 | py37h1d22016_1 4.2 MB
> pyyaml-5.1.1 | py37h1de35cc_0 170 KB
> qtconsole-4.5.1 | py_0 92 KB
> qtpy-1.8.0 | py_0 38 KB
> requests-2.22.0 | py37_0 89 KB
> rope-0.14.0 | py_0 113 KB
> scikit-image-0.15.0 | py37h0a44026_0 27.6 MB
> scikit-learn-0.21.2 | py37h27c97d8_0 5.9 MB
> setuptools-41.0.1 | py37_0 635 KB
> snowballstemmer-1.9.0 | py_0 53 KB
> sphinx-2.1.2 | py_0 1.4 MB
> sphinxcontrib-applehelp-1.0.1| py_0 29 KB
> sphinxcontrib-devhelp-1.0.1| py_0 23 KB
> sphinxcontrib-htmlhelp-1.0.2| py_0 28 KB
> sphinxcontrib-jsmath-1.0.1 | py_0 8 KB
> sphinxcontrib-qthelp-1.0.2 | py_0 26 KB
> sphinxcontrib-serializinghtml-1.1.3| py_0 24 KB
> sphinxcontrib-websupport-1.1.2| py_0 35 KB
> spyder-3.3.5 | py37_0 2.5 MB
> spyder-kernels-0.5.0 | py37_0 69 KB
> sqlalchemy-1.3.5 | py37h1de35cc_0 1.7 MB
> sqlite-3.28.0 | ha441bb4_0 2.3 MB
> statsmodels-0.10.0 | py37h1d22016_0 8.8 MB
> sympy-1.4 | py37_0 9.7 MB
> tblib-1.4.0 | py_0 14 KB
> terminado-0.8.2 | py37_0 22 KB
> tornado-6.0.3 | py37h1de35cc_0 644 KB
> tqdm-4.32.1 | py_0 48 KB
> urllib3-1.24.2 | py37_0 152 KB
> werkzeug-0.15.4 | py_0 262 KB
> wheel-0.33.4 | py37_0 39 KB
> wrapt-1.11.2 | py37h1de35cc_0 44 KB
> xlsxwriter-1.1.8 | py_0 105 KB
> xlwings-0.15.8 | py37_0 464 KB
> zict-1.0.0 | py_0 12 KB
> zipp-0.5.1 | py_0 8 KB
> ------------------------------------------------------------
> Total: 307.1 MB
>
> The following NEW packages will be INSTALLED:
>
> _anaconda_depends pkgs/main/osx-64::_anaconda_depends-2019.03-py37_0
> backports.functoo~ pkgs/main/noarch::backports.functools_lru_cache-1.5-py_2
> backports.tempfile pkgs/main/noarch::backports.tempfile-1.0-py_1
> backports.weakref pkgs/main/noarch::backports.weakref-1.0.post1-py_1
> conda-package-han~ pkgs/main/osx-64::conda-package-handling-1.3.11-py37_0
> joblib pkgs/main/osx-64::joblib-0.13.2-py37_0
> llvm-openmp pkgs/main/osx-64::llvm-openmp-4.0.1-hcfea43d_1
> mock pkgs/main/osx-64::mock-3.0.5-py37_0
> sphinxcontrib-app~ pkgs/main/noarch::sphinxcontrib-applehelp-1.0.1-py_0
> sphinxcontrib-dev~ pkgs/main/noarch::sphinxcontrib-devhelp-1.0.1-py_0
> sphinxcontrib-htm~ pkgs/main/noarch::sphinxcontrib-htmlhelp-1.0.2-py_0
> sphinxcontrib-jsm~ pkgs/main/noarch::sphinxcontrib-jsmath-1.0.1-py_0
> sphinxcontrib-qth~ pkgs/main/noarch::sphinxcontrib-qthelp-1.0.2-py_0
> sphinxcontrib-ser~
> pkgs/main/noarch::sphinxcontrib-serializinghtml-1.1.3-py_0
>
> The following packages will be UPDATED:
>
> anaconda-project pkgs/main/osx-64::anaconda-project-0.~ -->
> pkgs/main/noarch::anaconda-project-0.8.3-py_0
> astropy 3.1.2-py37h1de35cc_0 --> 3.2.1-py37h1de35cc_0
> babel pkgs/main/osx-64::babel-2.6.0-py37_0 -->
> pkgs/main/noarch::babel-2.7.0-py_0
> backports pkgs/main/osx-64::backports-1.0-py37_1 -->
> pkgs/main/noarch::backports-1.0-py_2
> bitarray 0.8.3-py37h1de35cc_0 --> 0.9.3-py37h1de35cc_0
> blosc 1.15.0-hd9629dc_0 --> 1.16.3-hd9629dc_0
> bokeh 1.0.4-py37_0 --> 1.2.0-py37_0
> bzip2 1.0.6-h1de35cc_5 --> 1.0.7-h1de35cc_0
> ca-certificates 2019.1.23-0 --> 2019.5.15-0
> certifi 2019.3.9-py37_0 --> 2019.6.16-py37_0
> cffi 1.12.2-py37hb5b8e2f_1 --> 1.12.3-py37hb5b8e2f_0
> cloudpickle pkgs/main/osx-64::cloudpickle-0.8.0-p~ -->
> pkgs/main/noarch::cloudpickle-1.2.1-py_0
> conda 4.6.11-py37_0 --> 4.7.5-py37_0
> conda-build 3.17.8-py37_0 --> 3.18.7-py37_0
> conda-verify pkgs/main/osx-64::conda-verify-3.1.1-~ -->
> pkgs/main/noarch::conda-verify-3.4.2-py_0
> cryptography 2.6.1-py37ha12b0ac_0 --> 2.7-py37ha12b0ac_0
> curl 7.64.0-ha441bb4_2 --> 7.64.1-ha441bb4_0
> cython 0.29.6-py37h0a44026_0 --> 0.29.11-py37h0a44026_0
> dask pkgs/main/osx-64::dask-1.1.4-py37_1 -->
> pkgs/main/noarch::dask-2.1.0-py_0
> dask-core pkgs/main/osx-64::dask-core-1.1.4-py3~ -->
> pkgs/main/noarch::dask-core-2.1.0-py_0
> defusedxml pkgs/main/osx-64::defusedxml-0.5.0-py~ -->
> pkgs/main/noarch::defusedxml-0.6.0-py_0
> distributed pkgs/main/osx-64::distributed-1.26.0-~ -->
> pkgs/main/noarch::distributed-2.1.0-py_0
> fastcache 1.0.2-py37h1de35cc_2 --> 1.1.0-py37h1de35cc_0
> filelock pkgs/main/osx-64::filelock-3.0.10-py3~ -->
> pkgs/main/noarch::filelock-3.0.12-py_0
> flask 1.0.2-py37_1 --> 1.0.3-py37_0
> glob2 pkgs/main/osx-64::glob2-0.6-py37_1 -->
> pkgs/main/noarch::glob2-0.7-py_0
> importlib_metadata 0.8-py37_0 --> 0.17-py37_1
> intel-openmp 2019.3-199 --> 2019.4-233
> ipykernel 5.1.0-py37h39e3cac_0 --> 5.1.1-py37h39e3cac_0
> ipython 7.4.0-py37h39e3cac_0 --> 7.6.1-py37h39e3cac_0
> isort 4.3.16-py37_0 --> 4.3.21-py37_0
> jdcal pkgs/main/osx-64::jdcal-1.4-py37_0 -->
> pkgs/main/noarch::jdcal-1.4.1-py_0
> jinja2 2.10-py37_0 --> 2.10.1-py37_0
> jupyter_core pkgs/main/osx-64::jupyter_core-4.4.0-~ -->
> pkgs/main/noarch::jupyter_core-4.5.0-py_0
> jupyterlab 0.35.4-py37hf63ae98_0 --> 0.35.5-py37hf63ae98_0
> kiwisolver 1.0.1-py37h0a44026_0 --> 1.1.0-py37h0a44026_0
> lazy-object-proxy 1.3.1-py37h1de35cc_2 --> 1.4.1-py37h1de35cc_0
> libcurl 7.64.0-h051b688_2 --> 7.64.1-h051b688_0
> libpng 1.6.36-ha441bb4_0 --> 1.6.37-ha441bb4_0
> libssh2 1.8.0-ha12b0ac_4 --> 1.8.2-ha12b0ac_0
> libxml2 2.9.9-hab757c2_0 --> 2.9.9-hf6e021a_1
> llvmlite 0.28.0-py37h8c7ce04_0 --> 0.29.0-py37h98b8051_0
> lxml 4.3.2-py37hef8c89e_0 --> 4.3.4-py37hef8c89e_0
> matplotlib 3.0.3-py37h54f8f79_0 --> 3.1.0-py37h54f8f79_0
> mkl 2019.3-199 --> 2019.4-233
> mkl-service 1.1.2-py37hfbe908c_5 --> 2.0.2-py37h1de35cc_0
> mkl_fft 1.0.10-py37h5e564d8_0 --> 1.0.12-py37h5e564d8_0
> more-itertools 6.0.0-py37_0 --> 7.0.0-py37_0
> nbconvert pkgs/main/osx-64::nbconvert-5.4.1-py3~ -->
> pkgs/main/noarch::nbconvert-5.5.0-py_0
> networkx pkgs/main/osx-64::networkx-2.2-py37_1 -->
> pkgs/main/noarch::networkx-2.3-py_0
> nltk 3.4-py37_1 --> 3.4.3-py37_0
> numba 0.43.1-py37h6440ff4_0 --> 0.44.1-py37h6440ff4_0
> numpy 1.16.2-py37hacdab7b_0 --> 1.16.4-py37hacdab7b_0
> numpy-base 1.16.2-py37h6575580_0 --> 1.16.4-py37h6575580_0
> numpydoc pkgs/main/osx-64::numpydoc-0.8.0-py37~ -->
> pkgs/main/noarch::numpydoc-0.9.1-py_0
> openpyxl pkgs/main/osx-64::openpyxl-2.6.1-py37~ -->
> pkgs/main/noarch::openpyxl-2.6.2-py_0
> openssl 1.1.1b-h1de35cc_1 --> 1.1.1c-h1de35cc_1
> parso pkgs/main/osx-64::parso-0.3.4-py37_0 -->
> pkgs/main/noarch::parso-0.5.0-py_0
> partd pkgs/main/osx-64::partd-0.3.10-py37_1 -->
> pkgs/main/noarch::partd-1.0.0-py_0
> path.py pkgs/main/osx-64::path.py-11.5.0-py37~ -->
> pkgs/main/noarch::path.py-12.0.1-py_0
> pathlib2 2.3.3-py37_0 --> 2.3.4-py37_0
> pexpect 4.6.0-py37_0 --> 4.7.0-py37_0
> pillow 5.4.1-py37hb68e598_0 --> 6.0.0-py37hb68e598_0
> pip 19.0.3-py37_0 --> 19.1.1-py37_0
> pluggy pkgs/main/osx-64::pluggy-0.9.0-py37_0 -->
> pkgs/main/noarch::pluggy-0.12.0-py_0
> prometheus_client pkgs/main/osx-64::prometheus_client-0~ -->
> pkgs/main/noarch::prometheus_client-0.7.1-py_0
> psutil 5.6.1-py37h1de35cc_0 --> 5.6.3-py37h1de35cc_0
> pycurl 7.43.0.2-py37ha12b0ac_0 --> 7.43.0.3-py37ha12b0ac_0
> pygments pkgs/main/osx-64::pygments-2.3.1-py37~ -->
> pkgs/main/noarch::pygments-2.4.2-py_0
> pyparsing pkgs/main/osx-64::pyparsing-2.3.1-py3~ -->
> pkgs/main/noarch::pyparsing-2.4.0-py_0
> pysocks 1.6.8-py37_0 --> 1.7.0-py37_0
> pytables 3.5.1-py37h5bccee9_0 --> 3.5.2-py37h5bccee9_1
> pytest 4.3.1-py37_0 --> 5.0.0-py37_0
> python-libarchive~ 2.8-py37_6 --> 2.8-py37_10
> pytz pkgs/main/osx-64::pytz-2018.9-py37_0 -->
> pkgs/main/noarch::pytz-2019.1-py_0
> pywavelets 1.0.2-py37h1d22016_0 --> 1.0.3-py37h1d22016_1
> pyyaml 5.1-py37h1de35cc_0 --> 5.1.1-py37h1de35cc_0
> qtconsole pkgs/main/osx-64::qtconsole-4.4.3-py3~ -->
> pkgs/main/noarch::qtconsole-4.5.1-py_0
> qtpy pkgs/main/osx-64::qtpy-1.7.0-py37_1 -->
> pkgs/main/noarch::qtpy-1.8.0-py_0
> requests 2.21.0-py37_0 --> 2.22.0-py37_0
> rope pkgs/main/osx-64::rope-0.12.0-py37_0 -->
> pkgs/main/noarch::rope-0.14.0-py_0
> scikit-image 0.14.2-py37h0a44026_0 --> 0.15.0-py37h0a44026_0
> scikit-learn 0.20.3-py37h27c97d8_0 --> 0.21.2-py37h27c97d8_0
> setuptools 40.8.0-py37_0 --> 41.0.1-py37_0
> snowballstemmer pkgs/main/osx-64::snowballstemmer-1.2~ -->
> pkgs/main/noarch::snowballstemmer-1.9.0-py_0
> sphinx pkgs/main/osx-64::sphinx-1.8.5-py37_0 -->
> pkgs/main/noarch::sphinx-2.1.2-py_0
> sphinxcontrib-web~ pkgs/main/osx-64::sphinxcontrib-websu~ -->
> pkgs/main/noarch::sphinxcontrib-websupport-1.1.2-py_0
> spyder 3.3.3-py37_0 --> 3.3.5-py37_0
> spyder-kernels 0.4.2-py37_0 --> 0.5.0-py37_0
> sqlalchemy 1.3.1-py37h1de35cc_0 --> 1.3.5-py37h1de35cc_0
> sqlite 3.27.2-ha441bb4_0 --> 3.28.0-ha441bb4_0
> statsmodels 0.9.0-py37h1d22016_0 --> 0.10.0-py37h1d22016_0
> sympy 1.3-py37_0 --> 1.4-py37_0
> tblib pkgs/main/osx-64::tblib-1.3.2-py37_0 -->
> pkgs/main/noarch::tblib-1.4.0-py_0
> terminado 0.8.1-py37_1 --> 0.8.2-py37_0
> tornado 6.0.2-py37h1de35cc_0 --> 6.0.3-py37h1de35cc_0
> tqdm pkgs/main/osx-64::tqdm-4.31.1-py37_1 -->
> pkgs/main/noarch::tqdm-4.32.1-py_0
> urllib3 1.24.1-py37_0 --> 1.24.2-py37_0
> werkzeug pkgs/main/osx-64::werkzeug-0.14.1-py3~ -->
> pkgs/main/noarch::werkzeug-0.15.4-py_0
> wheel 0.33.1-py37_0 --> 0.33.4-py37_0
> wrapt 1.11.1-py37h1de35cc_0 --> 1.11.2-py37h1de35cc_0
> xlsxwriter pkgs/main/osx-64::xlsxwriter-1.1.5-py~ -->
> pkgs/main/noarch::xlsxwriter-1.1.8-py_0
> xlwings 0.15.4-py37_0 --> 0.15.8-py37_0
> zict pkgs/main/osx-64::zict-0.1.4-py37_0 -->
> pkgs/main/noarch::zict-1.0.0-py_0
> zipp pkgs/main/osx-64::zipp-0.3.3-py37_1 -->
> pkgs/main/noarch::zipp-0.5.1-py_0
>
> The following packages will be DOWNGRADED:
>
> anaconda 2019.03-py37_0 --> custom-py37_1
>
> Proceed ([y]/n)? y
>
> Downloading and Extracting Packages
> conda-verify-3.4.2 | 25 KB |
> #########################################################################################################################################
> | 100%
> kiwisolver-1.1.0 | 60 KB |
> #########################################################################################################################################
> | 100%
> sphinxcontrib-appleh | 29 KB |
> #########################################################################################################################################
> | 100%
> openpyxl-2.6.2 | 157 KB |
> #########################################################################################################################################
> | 100%
> libxml2-2.9.9 | 1.9 MB |
> #########################################################################################################################################
> | 100%
> flask-1.0.3 | 123 KB |
> #########################################################################################################################################
> | 100%
> cython-0.29.11 | 2.0 MB |
> #########################################################################################################################################
> | 100%
> libssh2-1.8.2 | 221 KB |
> #########################################################################################################################################
> | 100%
> tblib-1.4.0 | 14 KB |
> #########################################################################################################################################
> | 100%
> statsmodels-0.10.0 | 8.8 MB |
> #########################################################################################################################################
> | 100%
> tornado-6.0.3 | 644 KB |
> #########################################################################################################################################
> | 100%
> bitarray-0.9.3 | 59 KB |
> #########################################################################################################################################
> | 100%
> sphinxcontrib-htmlhe | 28 KB |
> #########################################################################################################################################
> | 100%
> sphinxcontrib-jsmath | 8 KB |
> #########################################################################################################################################
> | 100%
> sphinxcontrib-qthelp | 26 KB |
> #########################################################################################################################################
> | 100%
> libcurl-7.64.1 | 546 KB |
> #########################################################################################################################################
> | 100%
> bzip2-1.0.7 | 104 KB |
> #########################################################################################################################################
> | 100%
> pysocks-1.7.0 | 29 KB |
> #########################################################################################################################################
> | 100%
> conda-4.7.5 | 3.0 MB |
> #########################################################################################################################################
> | 100%
> qtpy-1.8.0 | 38 KB |
> #########################################################################################################################################
> | 100%
> isort-4.3.21 | 68 KB |
> #########################################################################################################################################
> | 100%
> lazy-object-proxy-1. | 28 KB |
> #########################################################################################################################################
> | 100%
> path.py-12.0.1 | 23 KB |
> #########################################################################################################################################
> | 100%
> partd-1.0.0 | 19 KB |
> #########################################################################################################################################
> | 100%
> pip-19.1.1 | 1.8 MB |
> #########################################################################################################################################
> | 100%
> scikit-image-0.15.0 | 27.6 MB |
> #########################################################################################################################################
> | 100%
> psutil-5.6.3 | 333 KB |
> #########################################################################################################################################
> | 100%
> pathlib2-2.3.4 | 36 KB |
> #########################################################################################################################################
> | 100%
> ca-certificates-2019 | 133 KB |
> #########################################################################################################################################
> | 100%
> pyparsing-2.4.0 | 58 KB |
> #########################################################################################################################################
> | 100%
> pluggy-0.12.0 | 20 KB |
> #########################################################################################################################################
> | 100%
> setuptools-41.0.1 | 635 KB |
> #########################################################################################################################################
> | 100%
> jinja2-2.10.1 | 188 KB |
> #########################################################################################################################################
> | 100%
> babel-2.7.0 | 5.8 MB |
> #########################################################################################################################################
> | 100%
> conda-package-handli | 260 KB |
> #########################################################################################################################################
> | 100%
> sympy-1.4 | 9.7 MB |
> #########################################################################################################################################
> | 100%
> bokeh-1.2.0 | 3.9 MB |
> #########################################################################################################################################
> | 100%
> mkl-2019.4 | 155.2 MB |
> #########################################################################################################################################
> | 100%
> numpy-1.16.4 | 49 KB |
> #########################################################################################################################################
> | 100%
> anaconda-custom | 3 KB |
> #########################################################################################################################################
> | 100%
> jdcal-1.4.1 | 11 KB |
> #########################################################################################################################################
> | 100%
> distributed-2.1.0 | 369 KB |
> #########################################################################################################################################
> | 100%
> xlsxwriter-1.1.8 | 105 KB |
> #########################################################################################################################################
> | 100%
> urllib3-1.24.2 | 152 KB |
> #########################################################################################################################################
> | 100%
> terminado-0.8.2 | 22 KB |
> #########################################################################################################################################
> | 100%
> cloudpickle-1.2.1 | 28 KB |
> #########################################################################################################################################
> | 100%
> nltk-3.4.3 | 2.1 MB |
> #########################################################################################################################################
> | 100%
> jupyterlab-0.35.5 | 10.6 MB |
> #########################################################################################################################################
> | 100%
> openssl-1.1.1c | 3.4 MB |
> #########################################################################################################################################
> | 100%
> pexpect-4.7.0 | 82 KB |
> #########################################################################################################################################
> | 100%
> matplotlib-3.1.0 | 6.6 MB |
> #########################################################################################################################################
> | 100%
> wrapt-1.11.2 | 44 KB |
> #########################################################################################################################################
> | 100%
> numpy-base-1.16.4 | 4.2 MB |
> #########################################################################################################################################
> | 100%
> parso-0.5.0 | 67 KB |
> #########################################################################################################################################
> | 100%
> backports.tempfile-1 | 12 KB |
> #########################################################################################################################################
> | 100%
> pillow-6.0.0 | 579 KB |
> #########################################################################################################################################
> | 100%
> backports-1.0 | 139 KB |
> #########################################################################################################################################
> | 100%
> spyder-kernels-0.5.0 | 69 KB |
> #########################################################################################################################################
> | 100%
> numpydoc-0.9.1 | 31 KB |
> #########################################################################################################################################
> | 100%
> blosc-1.16.3 | 64 KB |
> #########################################################################################################################################
> | 100%
> pyyaml-5.1.1 | 170 KB |
> #########################################################################################################################################
> | 100%
> llvm-openmp-4.0.1 | 454 KB |
> #########################################################################################################################################
> | 100%
> pytest-5.0.0 | 358 KB |
> #########################################################################################################################################
> | 100%
> glob2-0.7 | 14 KB |
> #########################################################################################################################################
> | 100%
> joblib-0.13.2 | 367 KB |
> #########################################################################################################################################
> | 100%
> sqlalchemy-1.3.5 | 1.7 MB |
> #########################################################################################################################################
> | 100%
> wheel-0.33.4 | 39 KB |
> #########################################################################################################################################
> | 100%
> cryptography-2.7 | 571 KB |
> #########################################################################################################################################
> | 100%
> sphinxcontrib-websup | 35 KB |
> #########################################################################################################################################
> | 100%
> ipykernel-5.1.1 | 162 KB |
> #########################################################################################################################################
> | 100%
> pycurl-7.43.0.3 | 71 KB |
> #########################################################################################################################################
> | 100%
> mkl-service-2.0.2 | 51 KB |
> #########################################################################################################################################
> | 100%
> zict-1.0.0 | 12 KB |
> #########################################################################################################################################
> | 100%
> backports.weakref-1. | 7 KB |
> #########################################################################################################################################
> | 100%
> spyder-3.3.5 | 2.5 MB |
> #########################################################################################################################################
> | 100%
> numba-0.44.1 | 2.8 MB |
> #########################################################################################################################################
> | 100%
> astropy-3.2.1 | 6.9 MB |
> #########################################################################################################################################
> | 100%
> qtconsole-4.5.1 | 92 KB |
> #########################################################################################################################################
> | 100%
> anaconda-project-0.8 | 212 KB |
> #########################################################################################################################################
> | 100%
> prometheus_client-0. | 42 KB |
> #########################################################################################################################################
> | 100%
> mock-3.0.5 | 47 KB |
> #########################################################################################################################################
> | 100%
> werkzeug-0.15.4 | 262 KB |
> #########################################################################################################################################
> | 100%
> conda-build-3.18.7 | 528 KB |
> #########################################################################################################################################
> | 100%
> nbconvert-5.5.0 | 381 KB |
> #########################################################################################################################################
> | 100%
> ipython-7.6.1 | 1.1 MB |
> #########################################################################################################################################
> | 100%
> sqlite-3.28.0 | 2.3 MB |
> #########################################################################################################################################
> | 100%
> dask-core-2.1.0 | 578 KB |
> #########################################################################################################################################
> | 100%
> llvmlite-0.29.0 | 13.7 MB |
> #########################################################################################################################################
> | 100%
> libpng-1.6.37 | 325 KB |
> #########################################################################################################################################
> | 100%
> python-libarchive-c- | 22 KB |
> #########################################################################################################################################
> | 100%
> dask-2.1.0 | 11 KB |
> #########################################################################################################################################
> | 100%
> xlwings-0.15.8 | 464 KB |
> #########################################################################################################################################
> | 100%
> backports.functools_ | 9 KB |
> #########################################################################################################################################
> | 100%
> fastcache-1.1.0 | 29 KB |
> #########################################################################################################################################
> | 100%
> cffi-1.12.3 | 214 KB |
> #########################################################################################################################################
> | 100%
> zipp-0.5.1 | 8 KB |
> #########################################################################################################################################
> | 100%
> pytables-3.5.2 | 1.4 MB |
> #########################################################################################################################################
> | 100%
> pygments-2.4.2 | 664 KB |
> #########################################################################################################################################
> | 100%
> pywavelets-1.0.3 | 4.2 MB |
> #########################################################################################################################################
> | 100%
> certifi-2019.6.16 | 154 KB |
> #########################################################################################################################################
> | 100%
> networkx-2.3 | 1.1 MB |
> #########################################################################################################################################
> | 100%
> defusedxml-0.6.0 | 23 KB |
> #########################################################################################################################################
> | 100%
> pytz-2019.1 | 236 KB |
> #########################################################################################################################################
> | 100%
> scikit-learn-0.21.2 | 5.9 MB |
> #########################################################################################################################################
> | 100%
> rope-0.14.0 | 113 KB |
> #########################################################################################################################################
> | 100%
> _anaconda_depends-20 | 5 KB |
> #########################################################################################################################################
> | 100%
> requests-2.22.0 | 89 KB |
> #########################################################################################################################################
> | 100%
> filelock-3.0.12 | 12 KB |
> #########################################################################################################################################
> | 100%
> intel-openmp-2019.4 | 1.1 MB |
> #########################################################################################################################################
> | 100%
> tqdm-4.32.1 | 48 KB |
> #########################################################################################################################################
> | 100%
> snowballstemmer-1.9. | 53 KB |
> #########################################################################################################################################
> | 100%
> importlib_metadata-0 | 39 KB |
> #########################################################################################################################################
> | 100%
> jupyter_core-4.5.0 | 48 KB |
> #########################################################################################################################################
> | 100%
> sphinxcontrib-devhel | 23 KB |
> #########################################################################################################################################
> | 100%
> mkl_fft-1.0.12 | 155 KB |
> #########################################################################################################################################
> | 100%
> curl-7.64.1 | 131 KB |
> #########################################################################################################################################
> | 100%
> lxml-4.3.4 | 1.3 MB |
> #########################################################################################################################################
> | 100%
> more-itertools-7.0.0 | 93 KB |
> #########################################################################################################################################
> | 100%
> sphinxcontrib-serial | 24 KB |
> #########################################################################################################################################
> | 100%
> sphinx-2.1.2 | 1.4 MB |
> #########################################################################################################################################
> | 100%
> Preparing transaction: done
> Verifying transaction: done
> Executing transaction: done
>
> 108-211-183-124:~ ojohns$ conda upgrade --all
> Collecting package metadata (current_repodata.json): done
> Solving environment: done
> Package Plan
>
> environment location: /Users/ojohns/anaconda3
> The following packages will be REMOVED:
> _anaconda_depends-2019.03-py37_0
> alabaster-0.7.12-py37_0
> anaconda-custom-py37_1
> anaconda-project-0.8.3-py_0
> appscript-1.1.0-py37h1de35cc_0
> astroid-2.2.5-py37_0
> astropy-3.2.1-py37h1de35cc_0
> atomicwrites-1.3.0-py37_1
> babel-2.7.0-py_0
> backports.os-0.1.1-py37_0
> backports.shutil_get_terminal_size-1.0.0-py37_2
> bitarray-0.9.3-py37h1de35cc_0
> bkcharts-0.2-py37_0
> blas-1.0-mkl
> blosc-1.16.3-hd9629dc_0
> bokeh-1.2.0-py37_0
> boto-2.49.0-py37_0
> bottleneck-1.2.1-py37h1d22016_1
> cloudpickle-1.2.1-py_0
> colorama-0.4.1-py37_0
> contextlib2-0.5.5-py37_0
> curl-7.64.1-ha441bb4_0
> cycler-0.10.0-py37_0
> cython-0.29.11-py37h0a44026_0
> cytoolz-0.9.0.1-py37h1de35cc_1
> dask-2.1.0-py_0
> dask-core-2.1.0-py_0
> distributed-2.1.0-py_0
> docutils-0.14-py37_0
> et_xmlfile-1.0.1-py37_0
> fastcache-1.1.0-py37h1de35cc_0
> flask-1.0.3-py37_0
> get_terminal_size-1.0.0-h7520d66_0
> gevent-1.4.0-py37h1de35cc_0
> gmp-6.1.2-hb37e062_1
> gmpy2-2.0.8-py37h6ef4df4_2
> greenlet-0.4.15-py37h1de35cc_0
> h5py-2.9.0-py37h3134771_0
> hdf5-1.10.4-hfa1e0ec_0
> heapdict-1.0.0-py37_2
> html5lib-1.0.1-py37_0
> imageio-2.5.0-py37_0
> imagesize-1.1.0-py37_0
> importlib_metadata-0.17-py37_1
> intel-openmp-2019.4-233
> isort-4.3.21-py37_0
> itsdangerous-1.1.0-py37_0
> jbig-2.1-h4d881f8_0
> jdcal-1.4.1-py_0
> joblib-0.13.2-py37_0
> jupyter-1.0.0-py37_7
> jupyter_console-6.0.0-py37_0
> keyring-18.0.0-py37_0
> kiwisolver-1.1.0-py37h0a44026_0
> krb5-1.16.1-hddcf347_7
> lazy-object-proxy-1.4.1-py37h1de35cc_0
> libcurl-7.64.1-h051b688_0
> libgfortran-3.0.1-h93005f0_2
> libssh2-1.8.2-ha12b0ac_0
> libxslt-1.1.33-h33a18ac_0
> llvm-openmp-4.0.1-hcfea43d_1
> llvmlite-0.29.0-py37h98b8051_0
> locket-0.2.0-py37_1
> lxml-4.3.4-py37hef8c89e_0
> matplotlib-3.1.0-py37h54f8f79_0
> mccabe-0.6.1-py37_1
> mkl-2019.4-233
> mkl-service-2.0.2-py37h1de35cc_0
> mkl_fft-1.0.12-py37h5e564d8_0
> mkl_random-1.0.2-py37h27c97d8_0
> mock-3.0.5-py37_0
> more-itertools-7.0.0-py37_0
> mpc-1.1.0-h6ef4df4_1
> mpfr-4.0.1-h3018a27_3
> mpmath-1.1.0-py37_0
> msgpack-python-0.6.1-py37h04f5b5a_1
> multipledispatch-0.6.0-py37_0
> networkx-2.3-py_0
> nltk-3.4.3-py37_0
> nose-1.3.7-py37_2
> numba-0.44.1-py37h6440ff4_0
> numexpr-2.6.9-py37h7413580_0
> numpy-1.16.4-py37hacdab7b_0
> numpy-base-1.16.4-py37h6575580_0
> numpydoc-0.9.1-py_0
> openpyxl-2.6.2-py_0
> packaging-19.0-py37_0
> pandas-0.24.2-py37h0a44026_0
> partd-1.0.0-py_0
> path.py-12.0.1-py_0
> pathlib2-2.3.4-py37_0
> patsy-0.5.1-py37_0
> pep8-1.7.1-py37_0
> pluggy-0.12.0-py_0
> ply-3.11-py37_0
> py-1.8.0-py37_0
> pycodestyle-2.5.0-py37_0
> pycrypto-2.6.1-py37h1de35cc_9
> pycurl-7.43.0.3-py37ha12b0ac_0
> pyflakes-2.1.1-py37_0
> pylint-2.3.1-py37_0
> pyodbc-4.0.26-py37h0a44026_0
> pyparsing-2.4.0-py_0
> pytables-3.5.2-py37h5bccee9_1
> pytest-5.0.0-py37_0
> pytest-arraydiff-0.3-py37h39e3cac_0
> pytest-astropy-0.5.0-py37_0
> pytest-doctestplus-0.3.0-py37_0
> pytest-openfiles-0.3.2-py37_0
> pytest-remotedata-0.3.1-py37_0
> pywavelets-1.0.3-py37h1d22016_1
> qtawesome-0.5.7-py37_1
> qtconsole-4.5.1-py_0
> rope-0.14.0-py_0
> scikit-image-0.15.0-py37h0a44026_0
> scikit-learn-0.21.2-py37h27c97d8_0
> scipy-1.2.1-py37h1410ff5_0
> seaborn-0.9.0-py37_0
> simplegeneric-0.8.1-py37_2
> singledispatch-3.4.0.3-py37_0
> snappy-1.1.7-he62c110_3
> snowballstemmer-1.9.0-py_0
> sortedcollections-1.1.2-py37_0
> sortedcontainers-2.1.0-py37_0
> sphinx-2.1.2-py_0
> sphinxcontrib-1.0-py37_1
> sphinxcontrib-applehelp-1.0.1-py_0
> sphinxcontrib-devhelp-1.0.1-py_0
> sphinxcontrib-htmlhelp-1.0.2-py_0
> sphinxcontrib-jsmath-1.0.1-py_0
> sphinxcontrib-qthelp-1.0.2-py_0
> sphinxcontrib-serializinghtml-1.1.3-py_0
> sphinxcontrib-websupport-1.1.2-py_0
> spyder-3.3.5-py37_0
> spyder-kernels-0.5.0-py37_0
> sqlalchemy-1.3.5-py37h1de35cc_0
> statsmodels-0.10.0-py37h1d22016_0
> sympy-1.4-py37_0
> tblib-1.4.0-py_0
> toolz-0.9.0-py37_0
> unicodecsv-0.14.1-py37_0
> unixodbc-2.3.7-h1de35cc_0
> werkzeug-0.15.4-py_0
> wrapt-1.11.2-py37h1de35cc_0
> wurlitzer-1.0.2-py37_0
> xlrd-1.2.0-py37_0
> xlsxwriter-1.1.8-py_0
> xlwings-0.15.8-py37_0
> xlwt-1.3.0-py37_0
> zict-1.0.0-py_0
> zipp-0.5.1-py_0
>
> Proceed ([y]/n)? n
> CondaSystemExit: Exiting.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8842?email_source=notifications&email_token=AAAJL6OSTKBNLUGDU7NDQA3P65NN5A5CNFSM4H4G6BNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZXH4ZY#issuecomment-510557799>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAAJL6NHW2CYUOW2F365D7TP65NN5ANCNFSM4H4G6BNA>
> .
>
| 2019-07-11T18:46:08 |
|
conda/conda | 8,912 | conda__conda-8912 | [
"8858"
] | 25745cc9b7e3133074d4df1d149bf04001d766f5 | diff --git a/conda/cli/conda_argparse.py b/conda/cli/conda_argparse.py
--- a/conda/cli/conda_argparse.py
+++ b/conda/cli/conda_argparse.py
@@ -1542,6 +1542,14 @@ def add_parser_update_modifiers(solver_mode_options):
help="Update all installed packages in the environment.",
default=NULL,
)
+ update_modifiers.add_argument(
+ "--update-specs",
+ action="store_const",
+ const=UpdateModifier.UPDATE_SPECS,
+ dest="update_modifier",
+ help="Update based on provided specifications.",
+ default=NULL,
+ )
def add_parser_prune(p):
diff --git a/conda/cli/install.py b/conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -295,12 +295,27 @@ def install(args, parser, command='install'):
raise PackagesNotFoundError(e._formatted_chains, channels_urls)
except (UnsatisfiableError, SystemExit, SpecsConfigurationConflictError) as e:
- # end of the line. Raise the exception
- if repodata_fn == repodata_fns[-1]:
- # Unsatisfiable package specifications/no such revision/import error
- if e.args and 'could not import' in e.args[0]:
- raise CondaImportError(text_type(e))
- raise
+ # Quick solve with frozen env failed. Try again without that.
+ if isinstall and args.update_modifier == NULL:
+ try:
+ log.info("Initial quick solve with frozen env failed. "
+ "Unfreezing env and trying again.")
+ unlink_link_transaction = solver.solve_for_transaction(
+ deps_modifier=deps_modifier,
+ update_modifier=UpdateModifier.UPDATE_SPECS,
+ force_reinstall=context.force_reinstall or context.force,
+ )
+ except (UnsatisfiableError, SystemExit, SpecsConfigurationConflictError) as e:
+ # Unsatisfiable package specifications/no such revision/import error
+ if e.args and 'could not import' in e.args[0]:
+ raise CondaImportError(text_type(e))
+ else:
+ # end of the line. Raise the exception
+ if repodata_fn == repodata_fns[-1]:
+ # Unsatisfiable package specifications/no such revision/import error
+ if e.args and 'could not import' in e.args[0]:
+ raise CondaImportError(text_type(e))
+ raise
handle_txn(unlink_link_transaction, prefix, args, newenv)
diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -25,8 +25,7 @@
from ..common.constants import NULL
from ..common.io import Spinner, dashlist, time_recorder
from ..common.path import get_major_minor_version, paths_equal
-from ..exceptions import (PackagesNotFoundError, SpecsConfigurationConflictError,
- ResolvePackageNotFound)
+from ..exceptions import PackagesNotFoundError, SpecsConfigurationConflictError
from ..history import History
from ..models.channel import Channel
from ..models.enums import NoarchType
@@ -400,41 +399,13 @@ def _should_freeze(self, ssc, target_prec, conflict_specs, explicit_pool, instal
# never, ever freeze anything if we have no history.
if not ssc.specs_from_history_map:
return False
-
- pkg_name = target_prec.name
- # if we are FREEZE_INSTALLED (first pass for install)
- freeze = ssc.update_modifier == UpdateModifier.FREEZE_INSTALLED
-
- if not freeze:
- # we are UPDATE_SPECS (solve_for_diff or update specs),
- # AND the spec is not an explicit spec
- update_added = (ssc.update_modifier == UpdateModifier.UPDATE_SPECS and
- pkg_name not in self.specs_to_add_names)
- # more expensive, but better check. If anything in the package pool for this spec
- # overlaps with the explicit package pool (by name), but they don't share any
- # actual records, then this target_prec conflicts and should not be pinned
- if update_added:
- spec_package_pool = ssc.r._get_package_pool((target_prec.to_match_spec(), ))
- for spec in self.specs_to_add_names:
- new_explicit_pool = explicit_pool
- ms = MatchSpec(spec)
- updated_spec = self._package_has_updates(ssc, ms, installed_pool)
- if updated_spec:
- try:
- new_explicit_pool = ssc.r._get_package_pool((updated_spec, ))
- except ResolvePackageNotFound:
- update_added = False
- break
-
- if ms.name in spec_package_pool:
- update_added &= bool(spec_package_pool[ms.name] &
- new_explicit_pool[ms.name])
- if not update_added:
- break
+ # never freeze if not in FREEZE_INSTALLED mode
+ if ssc.update_modifier != UpdateModifier.FREEZE_INSTALLED:
+ return False
# if all package specs have overlapping package choices (satisfiable in at least one way)
- no_conflict = ((freeze or update_added) and
- pkg_name not in conflict_specs and
+ pkg_name = target_prec.name
+ no_conflict = (pkg_name not in conflict_specs and
(pkg_name not in explicit_pool or
target_prec in explicit_pool[pkg_name]) and
self._compare_pools(ssc, explicit_pool, target_prec.to_match_spec()))
| diff --git a/tests/core/test_solve.py b/tests/core/test_solve.py
--- a/tests/core/test_solve.py
+++ b/tests/core/test_solve.py
@@ -23,7 +23,7 @@
from conda.models.records import PrefixRecord
from conda.resolve import MatchSpec
from ..helpers import get_index_r_1, get_index_r_2, get_index_r_4, \
- get_index_r_5, get_index_cuda
+ get_index_r_5, get_index_cuda, get_index_must_unfreeze
from conda.common.compat import iteritems
@@ -116,6 +116,19 @@ def get_solver_aggregate_2(specs_to_add=(), specs_to_remove=(), prefix_records=(
yield solver
+@contextmanager
+def get_solver_must_unfreeze(specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=()):
+ PrefixData._cache_.clear()
+ pd = PrefixData(TEST_PREFIX)
+ pd._PrefixData__prefix_records = {rec.name: PrefixRecord.from_objects(rec) for rec in prefix_records}
+ spec_map = {spec.name: spec for spec in history_specs}
+ get_index_must_unfreeze(context.subdir)
+ with patch.object(History, 'get_requested_specs_map', return_value=spec_map):
+ solver = Solver(TEST_PREFIX, (Channel('channel-freeze'),), (context.subdir,),
+ specs_to_add=specs_to_add, specs_to_remove=specs_to_remove)
+ yield solver
+
+
@contextmanager
def get_solver_cuda(specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=()):
PrefixData._cache_.clear()
@@ -266,15 +279,24 @@ def test_prune_1():
pprint(convert_to_dist_str(link_precs))
unlink_order = (
'channel-1::accelerate-1.1.0-np16py27_p0',
+ 'channel-1::mkl-11.0-np16py27_p0',
+ 'channel-1::scikit-learn-0.13.1-np16py27_p0',
'channel-1::numbapro-0.11.0-np16py27_p0',
+ 'channel-1::scipy-0.12.0-np16py27_p0',
+ 'channel-1::numexpr-2.1-np16py27_p0',
'channel-1::numba-0.8.1-np16py27_0',
+ 'channel-1::numpy-1.6.2-py27_p4',
+ 'channel-1::mkl-service-1.0.0-py27_p0',
'channel-1::meta-0.4.2.dev-py27_0',
'channel-1::llvmpy-0.11.2-py27_0',
'channel-1::bitarray-0.8.1-py27_0',
'channel-1::llvm-3.2-0',
+ 'channel-1::mkl-rt-11.0-p0',
'channel-1::libnvvm-1.0-p0',
)
- link_order = tuple()
+ link_order = (
+ 'channel-1::numpy-1.6.2-py27_4',
+ )
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -814,6 +836,62 @@ def test_conda_downgrade():
sys.prefix = saved_sys_prefix
+def test_unfreeze_when_required():
+ # The available packages are:
+ # libfoo 1.0, 2.0
+ # libbar 1.0, 2.0
+ # foobar 1.0 : depends on libfoo 1.0, libbar 2.0
+ # foobar 2.0 : depends on libfoo 2.0, libbar 2.0
+ # qux 1.0: depends on libfoo 1.0, libbar 2.0
+ # qux 2.0: depends on libfoo 2.0, libbar 1.0
+ #
+ # qux 1.0 and foobar 1.0 can be installed at the same time but
+ # if foobar is installed first it must be downgraded from 2.0.
+ # If foobar is frozen then no solution exists.
+
+ specs = [MatchSpec("foobar"), MatchSpec('qux')]
+ with get_solver_must_unfreeze(specs) as solver:
+ final_state_1 = solver.solve_final_state()
+ print(convert_to_dist_str(final_state_1))
+ order = (
+ 'channel-freeze::libbar-2.0-0',
+ 'channel-freeze::libfoo-1.0-0',
+ 'channel-freeze::foobar-1.0-0',
+ 'channel-freeze::qux-1.0-0',
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+ specs = MatchSpec("foobar"),
+ with get_solver_must_unfreeze(specs) as solver:
+ final_state_1 = solver.solve_final_state()
+ print(convert_to_dist_str(final_state_1))
+ order = (
+ 'channel-freeze::libbar-2.0-0',
+ 'channel-freeze::libfoo-2.0-0',
+ 'channel-freeze::foobar-2.0-0',
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+ # When frozen there is no solution
+ specs_to_add = MatchSpec("qux"),
+ with get_solver_must_unfreeze(specs_to_add, prefix_records=final_state_1, history_specs=specs) as solver:
+ with pytest.raises(UnsatisfiableError):
+ solver.solve_final_state(update_modifier=UpdateModifier.FREEZE_INSTALLED)
+
+ specs_to_add = MatchSpec("qux"),
+ with get_solver_must_unfreeze(specs_to_add, prefix_records=final_state_1, history_specs=specs) as solver:
+ final_state_2 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_SPECS)
+ # PrefixDag(final_state_2, specs).open_url()
+ print(convert_to_dist_str(final_state_2))
+ order = (
+ 'channel-freeze::libbar-2.0-0',
+ 'channel-freeze::libfoo-1.0-0',
+ 'channel-freeze::foobar-1.0-0',
+ 'channel-freeze::qux-1.0-0',
+ )
+ assert convert_to_dist_str(final_state_2) == order
+
+
def test_auto_update_conda():
specs = MatchSpec("conda=1.3"),
with get_solver(specs) as solver:
@@ -1346,12 +1424,18 @@ def test_fast_update_with_update_modifier_not_set():
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
unlink_order = (
+ 'channel-4::python-2.7.14-h89e7a4a_22',
'channel-4::sqlite-3.21.0-h1bed415_2',
+ 'channel-4::libedit-3.1-heed3624_0',
'channel-4::openssl-1.0.2l-h077ae2c_5',
+ 'channel-4::ncurses-6.0-h9df7e31_2',
)
link_order = (
+ 'channel-4::ncurses-6.1-hf484d3e_0',
'channel-4::openssl-1.0.2p-h14c3975_0',
- 'channel-4::sqlite-3.23.1-he433501_0',
+ 'channel-4::libedit-3.1.20170329-h6b74fdf_2',
+ 'channel-4::sqlite-3.24.0-h84994c4_0', # sqlite is upgraded
+ 'channel-4::python-2.7.15-h1571d57_0', # python is not upgraded
)
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
diff --git a/tests/helpers.py b/tests/helpers.py
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -259,6 +259,116 @@ def get_index_r_5(subdir=context.subdir):
return index, r
+@memoize
+def get_index_must_unfreeze(subdir=context.subdir):
+ repodata = {
+ "info": {
+ "subdir": subdir,
+ "arch": context.arch_name,
+ "platform": context.platform,
+ },
+ "packages": {
+ "foobar-1.0-0.tar.bz2": {
+ "build": "0",
+ "build_number": 0,
+ "depends": [
+ "libbar 2.0.*",
+ "libfoo 1.0.*"
+ ],
+ "md5": "11ec1194bcc56b9a53c127142a272772",
+ "name": "foobar",
+ "timestamp": 1562861325613,
+ "version": "1.0"
+ },
+ "foobar-2.0-0.tar.bz2": {
+ "build": "0",
+ "build_number": 0,
+ "depends": [
+ "libbar 2.0.*",
+ "libfoo 2.0.*"
+ ],
+ "md5": "f8eb5a7fa1ff6dead4e360631a6cd048",
+ "name": "foobar",
+ "version": "2.0"
+ },
+
+ "libbar-1.0-0.tar.bz2": {
+ "build": "0",
+ "build_number": 0,
+ "depends": [],
+ "md5": "f51f4d48a541b7105b5e343704114f0f",
+ "name": "libbar",
+ "timestamp": 1562858881022,
+ "version": "1.0"
+ },
+ "libbar-2.0-0.tar.bz2": {
+ "build": "0",
+ "build_number": 0,
+ "depends": [],
+ "md5": "27f4e717ed263f909074f64d9cbf935d",
+ "name": "libbar",
+ "timestamp": 1562858881748,
+ "version": "2.0"
+ },
+
+ "libfoo-1.0-0.tar.bz2": {
+ "build": "0",
+ "build_number": 0,
+ "depends": [],
+ "md5": "ad7c088566ffe2389958daedf8ff312c",
+ "name": "libfoo",
+ "timestamp": 1562858763881,
+ "version": "1.0"
+ },
+ "libfoo-2.0-0.tar.bz2": {
+ "build": "0",
+ "build_number": 0,
+ "depends": [],
+ "md5": "daf7af7086d8f22be49ae11bdc41f332",
+ "name": "libfoo",
+ "timestamp": 1562858836924,
+ "version": "2.0"
+ },
+
+ "qux-1.0-0.tar.bz2": {
+ "build": "0",
+ "build_number": 0,
+ "depends": [
+ "libbar 2.0.*",
+ "libfoo 1.0.*"
+ ],
+ "md5": "18604cbe4f789fe853232eef4babd4f9",
+ "name": "qux",
+ "timestamp": 1562861393808,
+ "version": "1.0"
+ },
+ "qux-2.0-0.tar.bz2": {
+ "build": "0",
+ "build_number": 0,
+ "depends": [
+ "libbar 1.0.*",
+ "libfoo 2.0.*"
+ ],
+ "md5": "892aa4b9ec64b67045a46866ef1ea488",
+ "name": "qux",
+ "timestamp": 1562861394828,
+ "version": "2.0"
+ }
+ }
+ }
+ channel = Channel('https://conda.anaconda.org/channel-freeze/%s' % subdir)
+ sd = SubdirData(channel)
+ with env_var("CONDA_ADD_PIP_AS_PYTHON_DEPENDENCY", "false", stack_callback=conda_tests_ctxt_mgmt_def_pol):
+ sd._process_raw_repodata_str(json.dumps(repodata))
+ sd._loaded = True
+ SubdirData._cache_[channel.url(with_credentials=True)] = sd
+
+ index = {prec: prec for prec in sd._package_records}
+ r = Resolve(index, channels=(channel,))
+
+ return index, r
+
+
# Do not memoize this get_index to allow different CUDA versions to be detected
def get_index_cuda(subdir=context.subdir):
with open(join(dirname(__file__), 'data', 'index.json')) as fi:
@@ -283,4 +393,4 @@ def get_index_cuda(subdir=context.subdir):
add_feature_records_legacy(index)
r = Resolve(index, channels=(channel,))
- return index, r
\ No newline at end of file
+ return index, r
| conda 4.7 does not find a solution when installing two packages separately.
When creating an environment with `libpysal` and then installing `geopandas`,
```shell
conda create --name TEST libpysal --yes
conda activate TEST
conda install geopandas --yes
```
`conda 4.7` returns `UnsatisfiableError` b/c it refuses to downgrade a `python` build number to get a version with `readline 7`.
This is probably an edge case that will go away once the `readline 8` migration on `conda-forge` is complete. But CIs will be broken every migration that touches a `python` dependency.
Note that creating the environment in a single go like: `conda create --name TEST libpysal geopandas --yes`, or downgrading to `conda 4.6` works as expected.
| While I understand that `conda 4.7` make it harder to downgrade the `python` version I guess that, b/c we are using build number to provide variants, a smaller build number is not a downgrade.
I do not believe the issue here is with the Python dowgrade since the following works:
```
conda create -c conda-forge --name TEST libpysal --yes
source activate TEST
conda install -c conda-forge readline=7
```
Odd, the following works as well:
```
conda create -c conda-forge --name TEST libpysal --yes
source activate TEST
conda install -c conda-forge readline=7 --yes
conda install -c conda-forge geopandas --yes
```
Can you confirm that
```
conda create -c conda-forge --name TEST libpysal --yes
source activate TEST
conda install -c conda-forge geopandas --yes
```
works? I forgot to mention but I'm using `strict`.
```
conda create -c conda-forge --name TEST libpysal --yes
source activate TEST
conda install -c conda-forge geopandas --yes
```
Does not work, I need to add `conda install -c conda-forge readline=7 --yes` before the install of `geopandas`. This command should not be required, conda should find the solution without it.
I'll look into this. The freezing is probably being a little aggressive. A better way to say it is actually "the conflict finding is not working well enough" because conda tries to not freeze anything that has a conflict.
conda on master doesn't show this problem anymore. I don't understand why - I'm not sure that we've changed anything. Perhaps the CF readline migration has just gotten far enough that it isn't an issue anymore?
> Perhaps the CF readline migration has just gotten far enough that it isn't an issue anymore?
Yep. I was unable to reproduce it a few days ago with the current release of conda. The bug is still there, we just don't have an easy way to reproduce it :smile:
I think this issue has to do with the change to using `FREEZE_INSTALLED` as the default for the solver's update handling in 4.7. After the environment with `libpysal` is created those packages are frozen unless a conflict is found. If certain packages are frozen the solver is unable to find a solution.
Here is an example using some simple packages:
```
(base) ~$ conda --version
conda 4.7.5
(base) ~$ conda create -n test -c jjhelmus foobar qux -y --dry-run
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/jhelmus/conda/envs/test
added / updated specs:
- foobar
- qux
The following NEW packages will be INSTALLED:
foobar jjhelmus/linux-64::foobar-1.0-0
libbar jjhelmus/linux-64::libbar-1.0-0
libfoo jjhelmus/linux-64::libfoo-2.0-0
qux jjhelmus/linux-64::qux-2.0-0
DryRunExit: Dry run. Exiting.
(base) ~$ conda create -n test -c jjhelmus foobar -y
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/jhelmus/conda/envs/test
added / updated specs:
- foobar
The following NEW packages will be INSTALLED:
foobar jjhelmus/linux-64::foobar-2.0-0
libbar jjhelmus/linux-64::libbar-2.0-0
libfoo jjhelmus/linux-64::libfoo-2.0-0
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate test
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) ~$ conda install qux -c jjhelmus -n test
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
- jjhelmus/linux-64::foobar==2.0=0
- jjhelmus/linux-64::libbar==2.0=0
- jjhelmus/linux-64::libfoo==2.0=0
- qux
```
This issue here is that the `foobar` package already installed in the environment is frozen when installing `qux` and therefore cannot be downgraded to version 1.0 which is needed for a solution. Adding a fallback to the solver when satisfiability is not possible with FREEZE_INSTALL will address this problem. | 2019-07-11T19:24:10 |
conda/conda | 8,917 | conda__conda-8917 | [
"8916"
] | 296a67dd74c1c6c78058c1b94d6aeec33691fe3b | diff --git a/conda/resolve.py b/conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -113,7 +113,8 @@ def __init__(self, index, processed=False, channels=()):
self._pool_cache = {}
self._strict_channel_cache = {}
- self._system_precs = {_ for _ in index if _.package_type == PackageType.VIRTUAL_SYSTEM}
+ self._system_precs = {_ for _ in index if (
+ hasattr(_, 'package_type') and _.package_type == PackageType.VIRTUAL_SYSTEM)}
# sorting these in reverse order is effectively prioritizing
# contstraint behavior from newer packages. It is applying broadening
| Errors with conda 4.7.6 on conda-forge builds: AttributeError: 'Dist' object has no attribute 'package_type'
It seems that the conda 4.7.6 or conda-build 3.17.8 upgrade is causing errors on all recent conda-forge builds: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49363&view=logs&jobId=10bda42a-d420-5c28-a43f-bc4e66405e5c&taskId=bef775d0-a1a2-55a3-9721-17147029baf0&lineStart=256&lineEnd=274&colStart=1&colEnd=62
```
+ xargs -n1 cat
+ xargs -r /usr/bin/sudo -n yum install -y
+ find /home/conda/conda-recipes -mindepth 2 -maxdepth 2 -type f -name yum_requirements.txt
+ grep -v -e '^#' -e '^$'
+ test 1 == 1
+ python /home/conda/.ci_support/build_all.py /home/conda/conda-recipes
Building ipymidicontrols with conda-forge/label/main
Traceback (most recent call last):
File "/home/conda/.ci_support/build_all.py", line 131, in <module>
build_all(args.recipes_dir, args.arch)
File "/home/conda/.ci_support/build_all.py", line 68, in build_all
build_folders(recipes_dir, new_comp_folders, arch, channel_urls)
File "/home/conda/.ci_support/build_all.py", line 94, in build_folders
conda_resolve = conda_build.conda_interface.Resolve(index)
File "/opt/conda/lib/python3.7/site-packages/conda/resolve.py", line 116, in __init__
self._system_precs = {_ for _ in index if _.package_type == PackageType.VIRTUAL_SYSTEM}
File "/opt/conda/lib/python3.7/site-packages/conda/resolve.py", line 116, in <setcomp>
self._system_precs = {_ for _ in index if _.package_type == PackageType.VIRTUAL_SYSTEM}
AttributeError: 'Dist' object has no attribute 'package_type'
```
Some examples of builds having this error, all having conda 4.7.6, conda-build 3.18.7:
* https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49404&view=logs&jobId=10bda42a-d420-5c28-a43f-bc4e66405e5c&taskId=bef775d0-a1a2-55a3-9721-17147029baf0&lineStart=183&lineEnd=185&colStart=1&colEnd=1
* https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49419&view=logs&jobId=10bda42a-d420-5c28-a43f-bc4e66405e5c&taskId=bef775d0-a1a2-55a3-9721-17147029baf0&lineStart=183&lineEnd=185&colStart=1&colEnd=1
* https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49420&view=logs&jobId=10bda42a-d420-5c28-a43f-bc4e66405e5c&taskId=bef775d0-a1a2-55a3-9721-17147029baf0&lineStart=183&lineEnd=185&colStart=1&colEnd=1
Examples of successful builds just before these, all having conda 4.7.5, conda-build 3.17.8:
* https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49197&view=logs&jobId=240f1fee-52bc-5498-a14a-8361bde76ba0&taskId=2fb5b0a7-737c-5f5c-8f3f-f6db6174bacf&lineStart=99&lineEnd=101&colStart=1&colEnd=1
* https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49327&view=logs&jobId=10bda42a-d420-5c28-a43f-bc4e66405e5c&taskId=bef775d0-a1a2-55a3-9721-17147029baf0&lineStart=183&lineEnd=185&colStart=1&colEnd=1
* https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49127&view=logs&jobId=10bda42a-d420-5c28-a43f-bc4e66405e5c&taskId=bef775d0-a1a2-55a3-9721-17147029baf0&lineStart=183&lineEnd=185&colStart=1&colEnd=1
| 2019-07-12T14:20:14 |
||
conda/conda | 8,924 | conda__conda-8924 | [
"8898"
] | 3cf5819a2ee04abf3dcdc094f4d27e1696bc43c7 | diff --git a/conda/resolve.py b/conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -396,8 +396,7 @@ def find_conflicts(self, specs, specs_to_add=None, history_specs=None):
# should start with `spec` and end with the first encountered conflict. A
# conflict is something that is either not available at all, or is present in
# more than one pool, but those pools do not all overlap.
-
- g = GeneralGraph(records)
+ g = GeneralGraph((r for r in records if isinstance(r, PackageRecord)))
spec_order = sorted(sdeps_with_dep.keys(),
key=lambda x: list(g.graph_by_name.keys()).index(x.name))
for spec in spec_order:
| TypeError: '<' not supported between instances of 'PrefixRecord' and 'PackageRecord'
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
Run `conda update --all` or `conda update conda`, get
first exception
```
Traceback (most recent call last): File "C:\Anaconda\lib\site-packages\conda\models\prefix_graph.py", line 252, in _topo_sort_handle_cycles value = next(t) File "C:\Anaconda\lib\site-packages\conda\models\prefix_graph.py", line 230, in _toposort_raise_on_cycles raise CyclicalDependencyError(tuple(graph)) conda.exceptions.CyclicalDependencyError: Cyclic dependencies exist among these items:
```
and then final exception
```
...
File "C:\Anaconda\lib\site-packages\conda\models\prefix_graph.py", line 259, in _topo_sort_handle_cycles
yield cls._toposort_pop_key(graph)
File "C:\Anaconda\lib\site-packages\conda\models\prefix_graph.py", line 274, in _toposort_pop_key
(len(parents), node.name, node) for node, parents in iteritems(graph)
TypeError: '<' not supported between instances of 'PrefixRecord' and 'PackageRecord'
```
### Steps to Reproduce
```
conda update --all
```
## Expected Behavior
Update suceeds
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
user config file : C:\Users\kevin\.condarc
populated config files : C:\Users\kevin\.condarc
conda version : 4.7.5
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : C:\Anaconda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Anaconda\pkgs
C:\Users\kevin\.conda\pkgs
C:\Users\kevin\AppData\Local\conda\conda\pkgs
envs directories : C:\Anaconda\envs
C:\Users\kevin\.conda\envs
C:\Users\kevin\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.7.5 requests/2.22.0 CPython/3.7.3 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
report_errors: False
anaconda_upload: True
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at C:\Anaconda:
#
# Name Version Build Channel
alabaster 0.7.12 py37_0 defaults
apipkg 1.5 py37_0 defaults
arch 4.8.1+21.g9e6d614.dirty dev_0 <develop>
asn1crypto 0.24.0 py37_0 defaults
astroid 2.2.5 py37_0 defaults
atomicwrites 1.3.0 py37_1 defaults
attrs 19.1.0 py37_1 defaults
babel 2.7.0 py_0 defaults
backcall 0.1.0 py37_0 defaults
blas 1.0 mkl defaults
bleach 3.1.0 py37_0 defaults
blosc 1.16.3 h7bd577a_0 defaults
bzip2 1.0.6 hfa6e2cd_5 defaults
ca-certificates 2019.5.15 0 defaults
cached-property 1.5.1 pypi_0 pypi
certifi 2019.6.16 py37_0 defaults
cffi 1.12.3 py37h7a1dbc1_0 defaults
chardet 3.0.4 py37_1 defaults
colorama 0.4.1 py37_0 defaults
conda 4.7.5 py37_0 defaults
conda-env 2.6.0 1 defaults
conda-package-handling 1.3.10 py37_0 defaults
console_shortcut 0.1.1 3 defaults
coverage 4.5.3 py37he774522_0 defaults
cryptography 2.7 py37h7a1dbc1_0 defaults
cvxopt 1.2.0 py37hdc3235a_0 defaults
cycler 0.10.0 py37_0 defaults
cython 0.29.10 py37ha925a31_0 defaults
decorator 4.4.0 py37_1 defaults
defusedxml 0.6.0 py_0 defaults
deprecated 1.2.5 pypi_0 pypi
docutils 0.14 py37_0 defaults
entrypoints 0.3 py37_0 defaults
et_xmlfile 1.0.1 py37_0 defaults
execnet 1.6.0 py_0 defaults
flake8 3.7.7 py37_0 defaults
freetype 2.9.1 ha9979f8_1 defaults
garp 1.0 dev_0 <develop>
glpk 4.65 hdc00fd2_2 defaults
gsl 2.4 hfa6e2cd_4 defaults
guzzle-sphinx-theme 0.7.11 pypi_0 pypi
hdf5 1.10.4 h7ebc959_0 defaults
hypothesis 4.23.6 py37_0 defaults
icc_rt 2019.0.0 h0cc432a_1 defaults
icu 58.2 ha66f8fd_1 defaults
idna 2.8 py37_0 defaults
imagesize 1.1.0 py37_0 defaults
importlib_metadata 0.17 py37_1 defaults
intel-openmp 2019.4 245 defaults
ipykernel 5.1.1 py37h39e3cac_0 defaults
ipython 7.5.0 py37h39e3cac_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
ipywidgets 7.4.2 py37_0 defaults
isort 4.3.20 py37_0 defaults
jdcal 1.4.1 py_0 defaults
jedi 0.13.3 py37_0 defaults
jinja2 2.10.1 py37_0 defaults
joblib 0.13.2 py37_0 defaults
jpeg 9b hb83a4c4_2 defaults
jsonschema 3.0.1 py37_0 defaults
jupyter 1.0.0 py37_7 defaults
jupyter_client 5.2.4 py37_0 defaults
jupyter_console 6.0.0 py37_0 defaults
jupyter_core 4.4.0 py37_0 defaults
kiwisolver 1.1.0 py37ha925a31_0 defaults
lazy-object-proxy 1.4.1 py37he774522_0 defaults
lets-be-rational 1.0.9 pypi_0 pypi
libarchive 3.3.3 h0643e63_5 defaults
libiconv 1.15 h1df5818_7 defaults
libpng 1.6.37 h2a8f88b_0 defaults
libsodium 1.0.16 h9d3ae62_0 defaults
libxml2 2.9.9 h464c3ec_0 defaults
linearmodels 4.12+12.gafae51d dev_0 <develop>
llvmlite 0.29.0 py37ha925a31_0 defaults
lz4-c 1.8.1.2 h2fa13f4_0 defaults
lzo 2.10 h6df0209_2 defaults
m2w64-gcc-libgfortran 5.3.0 6 defaults
m2w64-gcc-libs 5.3.0 7 defaults
m2w64-gcc-libs-core 5.3.0 7 defaults
m2w64-gmp 6.1.0 2 defaults
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 defaults
markupsafe 1.1.1 py37he774522_0 defaults
matplotlib 3.1.0 py37hc8f65d3_0 defaults
mccabe 0.6.1 py37_1 defaults
menuinst 1.4.16 py37he774522_0 defaults
mfe 1.0 dev_0 <develop>
mistune 0.8.4 py37he774522_0 defaults
mkl 2019.4 245 defaults
mkl-service 2.0.2 py37he774522_0 defaults
mkl_fft 1.0.12 py37h14836fe_0 defaults
mkl_random 1.0.2 py37h343c172_0 defaults
mock 3.0.5 py37_0 defaults
more-itertools 7.0.0 py37_0 defaults
msys2-conda-epoch 20160418 1 defaults
mypy 0.700 pypi_0 pypi
mypy-extensions 0.4.1 pypi_0 pypi
nbconvert 5.5.0 py_0 defaults
nbformat 4.4.0 py37_0 defaults
nbsphinx 0.4.2 pypi_0 pypi
notebook 5.7.8 py37_0 defaults
numba 0.44.1 py37hf9181ef_0 defaults
numexpr 2.6.9 py37hdce8814_0 defaults
numpy 1.17.0.dev0+7ee800c dev_0 <develop>
numpy-base 1.16.4 py37hc3f5095_0 defaults
numpydoc 0.8.0 pypi_0 pypi
openpyxl 2.6.2 py_0 defaults
openssl 1.1.1c he774522_1 defaults
packaging 19.0 py37_0 defaults
palettable 3.1.1 pypi_0 pypi
pandas 0.25.0.dev0+354.gf90f4aad4 dev_0 <develop>
pandoc 2.2.3.2 0 defaults
pandocfilters 1.4.2 py37_1 defaults
parso 0.4.0 py_0 defaults
patsy 0.5.1 py37_0 defaults
pickleshare 0.7.5 py37_0 defaults
pip 19.1.1 py37_0 defaults
pluggy 0.12.0 py_0 defaults
prometheus_client 0.6.0 py37_0 defaults
prompt_toolkit 2.0.9 py37_0 defaults
py 1.8.0 py37_0 defaults
pycodestyle 2.5.0 py37_0 defaults
pycosat 0.6.3 py37hfa6e2cd_0 defaults
pycparser 2.19 py37_0 defaults
pyfin 1.0.0a1 pypi_0 pypi
pyflakes 2.1.1 py37_0 defaults
pygithub 1.43.7 pypi_0 pypi
pygments 2.4.2 py_0 defaults
pyjwt 1.7.1 pypi_0 pypi
pylint 2.3.1 py37_0 defaults
pyopenssl 19.0.0 py37_0 defaults
pypandoc 1.4 py37_1 defaults
pyparsing 2.4.0 py_0 defaults
pyqt 5.9.2 py37h6538335_2 defaults
pyrsistent 0.14.11 py37he774522_0 defaults
pysocks 1.7.0 py37_0 defaults
pytables 3.5.2 py37h1da0976_1 defaults
pytest 4.6.2 py37_0 defaults
pytest-cov 2.7.1 py_0 defaults
pytest-forked 1.0.2 py37_0 defaults
pytest-xdist 1.28.0 py_0 defaults
python 3.7.3 h8c8aaf0_1 defaults
python-dateutil 2.8.0 py37_0 defaults
python-libarchive-c 2.8 py37_6 defaults
pytz 2019.1 py_0 defaults
pywin32 223 py37hfa6e2cd_1 defaults
pywinpty 0.5.5 py37_1000 defaults
pyzmq 18.0.0 py37ha925a31_0 defaults
qt 5.9.7 vc14h73c81de_0 defaults
qtconsole 4.5.1 py_0 defaults
randomgen 1.17.0.dev0+147.gd5e398cc.dirty dev_0 <develop>
requests 2.22.0 py37_0 defaults
ruamel_yaml 0.15.46 py37hfa6e2cd_0 defaults
scikit-learn 0.21.2 py37h6288b17_0 defaults
scipy 1.2.1 py37h29ff71c_0 defaults
seaborn 0.9.0 py37_0 defaults
send2trash 1.5.0 py37_0 defaults
setuptools 41.0.1 py37_0 defaults
simplejson 3.16.0 pypi_0 pypi
sip 4.19.8 py37h6538335_0 defaults
six 1.12.0 py37_0 defaults
snappy 1.1.7 h777316e_3 defaults
snowballstemmer 1.2.1 py37_0 defaults
sphinx 2.1.0 py_0 defaults
sphinx-autodoc-typehints 1.6.0 pypi_0 pypi
sphinxcontrib 1.0 py37_1 defaults
sphinxcontrib-applehelp 1.0.1 py_0 defaults
sphinxcontrib-devhelp 1.0.1 py_0 defaults
sphinxcontrib-htmlhelp 1.0.2 py_0 defaults
sphinxcontrib-jsmath 1.0.1 py_0 defaults
sphinxcontrib-qthelp 1.0.2 py_0 defaults
sphinxcontrib-serializinghtml 1.1.3 py_0 defaults
sphinxcontrib-websupport 1.1.2 py_0 defaults
sqlite 3.28.0 he774522_0 defaults
statsmodels 0.10.0rc2+8.g551671aa1 dev_0 <develop>
swig 3.0.12 h047fa9f_3 defaults
tabulate 0.8.2 pypi_0 pypi
terminado 0.8.2 py37_0 defaults
testpath 0.4.2 py37_0 defaults toml 0.10.0 pypi_0 pypi tornado 6.0.2 py37he774522_0 defaults tqdm 4.32.1 py_0 defaults traitlets 4.3.2 py37_0 defaults typed-ast 1.3.1 pypi_0 pypi urllib3 1.24.2 py37_0 defaults vboxapi 1.0 pypi_0 pypi vc 14.1 h0510ff6_4 defaults vollib 0.1.5 pypi_0 pypi vs2015_runtime 14.15.26706 h3a45250_4 defaults wcwidth 0.1.7 py37_0 defaults webencodings 0.5.1 py37_1 defaults
wheel 0.33.4 py37_0 defaults widgetsnbextension 3.4.2 py37_0 defaults win_inet_pton 1.1.0 py37_0 defaults wincertstore 0.2 py37_0 defaults winpty 0.4.3 4 defaults wrapt 1.11.1 py37he774522_0 defaults xarray 0.12.1 py_0 defaults xlrd 1.2.0 py37_0 defaults xlwt 1.3.0 py37_0 defaults xxhash 1.3.0 pypi_0 pypi xz 5.2.4 h2fa13f4_4 defaults yaml 0.1.7 hc54c509_2 defaults zeromq 4.3.1 h33f27b4_3 defaults zipp 0.5.1 py_0 defaults zlib 1.2.11 h62dcd97_3 defaults zstd 1.3.7 h508b16e_0 defaults
```
</p></details>
| I am also getting the same error/stacktrace (on linux) after having upgraded conda to 4.7.5 and then running `conda update --all`
I fixed mine by removing the package that showed up as conflicting and then
updating and finally reinstalling the removed packages. I think this is
related to the recent changes in the channels.
On Fri, Jul 12, 2019, 19:36 Daniel Himmelstein <[email protected]>
wrote:
> I am also getting the same error/stacktrace (on linux) after having
> upgraded conda to 4.7.5 and then running conda update --all
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/8898?email_source=notifications&email_token=ABKTSRJTFT7DWILLNF3PFWLP7DFJVA5CNFSM4H7YVQFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ2RKZY#issuecomment-510989671>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABKTSRPOVI5B5WO4X2PBK7DP7DFJVANCNFSM4H7YVQFA>
> .
>
| 2019-07-12T22:52:01 |
|
conda/conda | 8,925 | conda__conda-8925 | [
"8914"
] | 3cf5819a2ee04abf3dcdc094f4d27e1696bc43c7 | diff --git a/conda/core/link.py b/conda/core/link.py
--- a/conda/core/link.py
+++ b/conda/core/link.py
@@ -602,6 +602,11 @@ def _execute(self, all_action_groups):
if exc:
exceptions.append(exc)
+ # post link scripts may employ entry points. Do them before post-link.
+ if install_side:
+ for axngroup in entry_point_actions:
+ UnlinkLinkTransaction._execute_actions(axngroup)
+
# Run post-link or post-unlink scripts and registering AFTER link/unlink,
# because they may depend on files in the prefix. Additionally, run
# them serially, just in case order matters (hopefully not)
@@ -613,10 +618,6 @@ def _execute(self, all_action_groups):
# parallel block 2:
futures = []
if install_side:
- futures.extend(
- self.executor.submit(UnlinkLinkTransaction._execute_actions, axngroup)
- for axngroup in entry_point_actions)
-
# consolidate compile actions into one big'un for better efficiency
individual_actions = [axn for ag in compile_actions for axn in ag.actions]
if individual_actions:
| post-link scripts are unable to call entrypoints
Using the latest combination of conda and conda-build packages fail to execute anything under bin/ (this folder doesn't exist in this phase). See https://github.com/conda-forge/jupyterlab_code_formatter-feedstock/pull/2 with build log https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49083&view=logs&jobId=1bf226d3-0e2f-52d8-fa93-7d9e633347b3 for example failure.
Going through the changelog of both, the only possible PR affecting this could be https://github.com/conda/conda/pull/8833/files
`conda-info`:
```
active environment : base
active env location : /Users/uwe/miniconda3
shell level : 1
user config file : /Users/uwe/.condarc
populated config files : /Users/uwe/.condarc
conda version : 4.7.6
conda-build version : 3.18.7
python version : 3.7.3.final.0
virtual packages :
base environment : /Users/uwe/miniconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/osx-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/uwe/miniconda3/pkgs
/Users/uwe/.conda/pkgs
envs directories : /Users/uwe/miniconda3/envs
/Users/uwe/.conda/envs
platform : osx-64
user-agent : conda/4.7.6 requests/2.22.0 CPython/3.7.3 Darwin/18.6.0 OSX/10.14.5
UID:GID : 501:20
netrc file : None
offline mode : False
```
| 2019-07-12T23:01:23 |
||
conda/conda | 8,938 | conda__conda-8938 | [
"8302"
] | 3ca57b16effb02f961631305fcd941d96cd856eb | diff --git a/conda/core/index.py b/conda/core/index.py
--- a/conda/core/index.py
+++ b/conda/core/index.py
@@ -90,14 +90,26 @@ def _supplement_index_with_prefix(index, prefix):
assert prefix
for prefix_record in PrefixData(prefix).iter_records():
if prefix_record in index:
- # The downloaded repodata takes priority, so we do not overwrite.
- # We do, however, copy the link information so that the solver (i.e. resolve)
- # knows this package is installed.
current_record = index[prefix_record]
- link = prefix_record.get('link') or EMPTY_LINK
- index[prefix_record] = PrefixRecord.from_objects(
- current_record, prefix_record, link=link
- )
+ if current_record.channel == prefix_record.channel:
+ # The downloaded repodata takes priority, so we do not overwrite.
+ # We do, however, copy the link information so that the solver (i.e. resolve)
+ # knows this package is installed.
+ link = prefix_record.get('link') or EMPTY_LINK
+ index[prefix_record] = PrefixRecord.from_objects(
+ current_record, prefix_record, link=link
+ )
+ else:
+ # If the local packages channel information does not agree with
+ # the channel information in the index then they are most
+ # likely referring to different packages. This can occur if a
+ # multi-channel changes configuration, e.g. defaults with and
+ # without the free channel. In this case we need to fake the
+ # channel data for the existing package.
+ prefix_channel = prefix_record.channel
+ prefix_channel._Channel__canonical_name = prefix_channel.url()
+ del prefix_record._PackageRecord__pkey
+ index[prefix_record] = prefix_record
else:
# If the package is not in the repodata, use the local data.
# If the channel is known but the package is not in the index, it
| Similar packages in pkgs/main and pkgs/free are considered the same package
If `pkgs/main` and `pkgs/free` contain a package with the same subdir, name, version, build_number and build [conda considers](https://github.com/conda/conda/blob/4.6.6/conda/models/records.py#L253-L266) these packages identical and will not respect the sub-channel priority (main > free).
A good example of this is the blas=1.0=mkl packages for the linux-64 platform.
Additionally packages in `pkgs/free` and `pkg/main` with the [same name, version and build](https://github.com/conda/conda/blob/4.6.6/conda/models/records.py#L272-L273) will be considered by the [solver](https://github.com/conda/conda/blob/4.6.6/conda/resolve.py#L612-L620) to be the same even if they have a different build_number. This occurs with the blas=1.0=openblas packages for the linux-ppc64le platform which makes them un-installable.
cf: #8301 #8236
| 2019-07-15T21:10:36 |
||
conda/conda | 8,998 | conda__conda-8998 | [
"8996"
] | 3a77f1ba53e2b17150e4f1cbc0b0a570f14b9246 | diff --git a/conda/cli/install.py b/conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -225,8 +225,8 @@ def install(args, parser, command='install'):
repodata_fns = args.repodata_fns
if not repodata_fns:
- repodata_fns = ["current_repodata.json", "repodata.json"]
- elif REPODATA_FN not in repodata_fns:
+ repodata_fns = context.repodata_fns
+ if REPODATA_FN not in repodata_fns:
repodata_fns.append(REPODATA_FN)
for repodata_fn in repodata_fns:
| Conda <=4.7.10 does not respect repodata_fns condarc setting
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
Setting ``repodata_fns`` in condarc has no effect on conda's behavior
```
repodata_fns:
- repodata.json
```
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
```
## Expected Behavior
<!-- What do you think should happen? -->
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
```
</p></details>
| 2019-07-25T18:52:17 |
||
conda/conda | 8,999 | conda__conda-8999 | [
"9004"
] | a4f8a776d78e47d3665e0adcf175139d718d1a5a | diff --git a/conda/cli/install.py b/conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -229,6 +229,8 @@ def install(args, parser, command='install'):
elif REPODATA_FN not in repodata_fns:
repodata_fns.append(REPODATA_FN)
+ args_set_update_modifier = hasattr(args, "update_modifier") and args.update_modifier != NULL
+
for repodata_fn in repodata_fns:
try:
update_modifier = context.update_modifier
@@ -281,9 +283,12 @@ def install(args, parser, command='install'):
if not hasattr(args, 'update_modifier'):
if repodata_fn == repodata_fns[-1]:
raise e
- elif args.update_modifier == NULL:
+ elif not args_set_update_modifier or args.update_modifier not in (
+ UpdateModifier.FREEZE_INSTALLED,
+ UpdateModifier.UPDATE_SPECS):
try:
- if not args.json:
+ if not args.json and (not args_set_update_modifier or
+ args.update_modifier == UpdateModifier.FREEZE_INSTALLED):
print("Initial quick solve with frozen env failed. "
"Unfreezing env and trying again.")
unlink_link_transaction = solver.solve_for_transaction(
diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -195,8 +195,10 @@ def solve_final_state(self, update_modifier=NULL, deps_modifier=NULL, prune=NULL
the solved state of the environment.
"""
+ update_modifier_set = True
if update_modifier is NULL:
update_modifier = context.update_modifier
+ update_modifier_set = False
else:
update_modifier = UpdateModifier(text_type(update_modifier).lower())
if deps_modifier is NULL:
@@ -248,8 +250,14 @@ def solve_final_state(self, update_modifier=NULL, deps_modifier=NULL, prune=NULL
context.json):
ssc = self._collect_all_metadata(ssc)
- fail_message = ("failed\n" if self._repodata_fn == REPODATA_FN else "failed with %s, "
- "will retry with next repodata source.\n" % self._repodata_fn)
+ if not update_modifier_set or update_modifier != UpdateModifier.UPDATE_SPECS:
+ fail_message = "failed with initial frozen solve. Retrying with flexible solve.\n"
+ elif self._repodata_fn != REPODATA_FN:
+ fail_message = ("failed with repodata from %s, will retry with next repodata"
+ " source.\n" % self._repodata_fn)
+ else:
+ fail_message = "failed\n"
+
with Spinner("Solving environment", not context.verbosity and not context.quiet,
context.json, fail_message=fail_message):
ssc = self._remove_specs(ssc)
| Solving environment: failed with current_repodata.json, will retry with next repodata source. UnsatisfiableError:
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
Cannot install or update packages when conda-forge is added
### Steps to Reproduce
<!-- If the current behaviour is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
1. Install Anaconda3-2019.07-Windows-x86_64.exe (https://repo.continuum.io/archive/Anaconda3-2019.07-Windows-x86_64.exe)
2. Enable conda-forge
```
conda config --add channels conda-forge
conda config --set channel_priority strict
```
Here's what happens:
```
blim09@DESKTOP-J3L8E29:C:\Windows\system32 $ conda update --all
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
UnsatisfiableError:
blim09@DESKTOP-J3L8E29:C:\Windows\system32 $
```
```
blim09@DESKTOP-J3L8E29:C:\Windows\system32 $ conda update --all --verbose
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with current_repodata.json, will retry with next repodata source.
Traceback (most recent call last):
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\exceptions.py", line 1062, in __call__
return func(*args, **kwargs)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\cli\main_update.py", line 20, in execute
install(args, parser, 'update')
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\cli\install.py", line 307, in install
raise e
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\cli\install.py", line 256, in install
force_reinstall=context.force_reinstall or context.force,
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\core\solve.py", line 112, in solve_for_transaction
force_remove, force_reinstall)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\core\solve.py", line 150, in solve_for_diff
force_remove)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\core\solve.py", line 262, in solve_final_state
ssc = self._run_sat(ssc)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\core\solve.py", line 780, in _run_sat
repodata_fn=self._repodata_fn)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\Users\blim09\Anaconda3\lib\site-packages\conda\resolve.py", line 1219, in solve
raise UnsatisfiableError({})
conda.exceptions.UnsatisfiableError
blim09@DESKTOP-J3L8E29:C:\Windows\system32 $
```
Everything works correctly when conda-forge is removed
## Expected Behavior
<!-- What do you think should happen? -->
Packages should install or update normally
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment: None
user config file : C:\Users\blim09\.condarc
populated config files : C:\Users\blim09\.condarc
conda version : 4.7.10
conda-build version : 3.18.9
python version : 3.7.3.final.0
virtual packages :
base environment : C:\Users\blim09\Anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/win-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\blim09\Anaconda3\pkgs
C:\Users\blim09\.conda\pkgs
C:\Users\blim09\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\blim09\Anaconda3\envs
C:\Users\blim09\.conda\envs
C:\Users\blim09\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Windows/10 Windows/10.0.18362
administrator : True
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> C:\Users\blim09\.condarc <==
channel_priority: strict
channels:
- conda-forge
- defaults
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at C:\Users\blim09\Anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0 defaults
alabaster 0.7.12 py37_0 defaults
anaconda 2019.07 py37_0 defaults
anaconda-client 1.7.2 py37_0 defaults
anaconda-navigator 1.9.7 py37_0 defaults
anaconda-project 0.8.3 py_0 defaults
asn1crypto 0.24.0 py37_0 defaults
astroid 2.2.5 py37_0 defaults
astropy 3.2.1 py37he774522_0 defaults
atomicwrites 1.3.0 py37_1 defaults
attrs 19.1.0 py37_1 defaults
babel 2.7.0 py_0 defaults
backcall 0.1.0 py37_0 defaults
backports 1.0 py_2 defaults
backports.functools_lru_cache 1.5 py_2 defaults
backports.os 0.1.1 py37_0 defaults
backports.shutil_get_terminal_size 1.0.0 py37_2 defaults
backports.tempfile 1.0 py_1 defaults
backports.weakref 1.0.post1 py_1 defaults
beautifulsoup4 4.7.1 py37_1 defaults
bitarray 0.9.3 py37he774522_0 defaults
bkcharts 0.2 py37_0 defaults
blas 1.0 mkl defaults
bleach 3.1.0 py37_0 defaults
blosc 1.16.3 h7bd577a_0 defaults
bokeh 1.2.0 py37_0 defaults
boto 2.49.0 py37_0 defaults
bottleneck 1.2.1 py37h452e1ab_1 defaults
bzip2 1.0.8 he774522_0 defaults
ca-certificates 2019.5.15 0 defaults
certifi 2019.6.16 py37_0 defaults
cffi 1.12.3 py37h7a1dbc1_0 defaults
chardet 3.0.4 py37_1 defaults
click 7.0 py37_0 defaults
cloudpickle 1.2.1 py_0 defaults
clyent 1.2.2 py37_1 defaults
colorama 0.4.1 py37_0 defaults
comtypes 1.1.7 py37_0 defaults
conda 4.7.10 py37_0 defaults
conda-build 3.18.9 py37_0 defaults
conda-env 2.6.0 1 defaults
conda-package-handling 1.3.11 py37_0 defaults
conda-verify 3.4.2 py_1 defaults
console_shortcut 0.1.1 3 defaults
contextlib2 0.5.5 py37_0 defaults
cryptography 2.7 py37h7a1dbc1_0 defaults
curl 7.65.2 h2a8f88b_0 defaults
cycler 0.10.0 py37_0 defaults
cython 0.29.12 py37ha925a31_0 defaults
cytoolz 0.10.0 py37he774522_0 defaults
dask 2.1.0 py_0 defaults
dask-core 2.1.0 py_0 defaults
decorator 4.4.0 py37_1 defaults
defusedxml 0.6.0 py_0 defaults
distributed 2.1.0 py_0 defaults
docutils 0.14 py37_0 defaults
entrypoints 0.3 py37_0 defaults
et_xmlfile 1.0.1 py37_0 defaults
fastcache 1.1.0 py37he774522_0 defaults
filelock 3.0.12 py_0 defaults
flask 1.1.1 py_0 defaults
freetype 2.9.1 ha9979f8_1 defaults
future 0.17.1 py37_0 defaults
get_terminal_size 1.0.0 h38e98db_0 defaults
gevent 1.4.0 py37he774522_0 defaults
glob2 0.7 py_0 defaults
greenlet 0.4.15 py37hfa6e2cd_0 defaults
h5py 2.9.0 py37h5e291fa_0 defaults
hdf5 1.10.4 h7ebc959_0 defaults
heapdict 1.0.0 py37_2 defaults
html5lib 1.0.1 py37_0 defaults
icc_rt 2019.0.0 h0cc432a_1 defaults
icu 58.2 ha66f8fd_1 defaults
idna 2.8 py37_0 defaults
imageio 2.5.0 py37_0 defaults
imagesize 1.1.0 py37_0 defaults
importlib_metadata 0.17 py37_1 defaults
intel-openmp 2019.4 245 defaults
ipykernel 5.1.1 py37h39e3cac_0 defaults
ipython 7.6.1 py37h39e3cac_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
ipywidgets 7.5.0 py_0 defaults
isort 4.3.21 py37_0 defaults
itsdangerous 1.1.0 py37_0 defaults
jdcal 1.4.1 py_0 defaults
jedi 0.13.3 py37_0 defaults
jinja2 2.10.1 py37_0 defaults
joblib 0.13.2 py37_0 defaults
jpeg 9b hb83a4c4_2 defaults
json5 0.8.4 py_0 defaults
jsonschema 3.0.1 py37_0 defaults
jupyter 1.0.0 py37_7 defaults
jupyter_client 5.3.1 py_0 defaults
jupyter_console 6.0.0 py37_0 defaults
jupyter_core 4.5.0 py_0 defaults
jupyterlab 1.0.2 py37hf63ae98_0 defaults
jupyterlab_server 1.0.0 py_0 defaults
keyring 18.0.0 py37_0 defaults
kiwisolver 1.1.0 py37ha925a31_0 defaults
krb5 1.16.1 hc04afaa_7 defaults
lazy-object-proxy 1.4.1 py37he774522_0 defaults
libarchive 3.3.3 h0643e63_5 defaults
libcurl 7.65.2 h2a8f88b_0 defaults
libiconv 1.15 h1df5818_7 defaults
liblief 0.9.0 ha925a31_2 defaults
libpng 1.6.37 h2a8f88b_0 defaults
libsodium 1.0.16 h9d3ae62_0 defaults
libssh2 1.8.2 h7a1dbc1_0 defaults
libtiff 4.0.10 hb898794_2 defaults
libxml2 2.9.9 h464c3ec_0 defaults
libxslt 1.1.33 h579f668_0 defaults
llvmlite 0.29.0 py37ha925a31_0 defaults
locket 0.2.0 py37_1 defaults
lxml 4.3.4 py37h1350720_0 defaults
lz4-c 1.8.1.2 h2fa13f4_0 defaults
lzo 2.10 h6df0209_2 defaults
m2w64-gcc-libgfortran 5.3.0 6 defaults
m2w64-gcc-libs 5.3.0 7 defaults
m2w64-gcc-libs-core 5.3.0 7 defaults
m2w64-gmp 6.1.0 2 defaults
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 defaults
markupsafe 1.1.1 py37he774522_0 defaults
matplotlib 3.1.0 py37hc8f65d3_0 defaults
mccabe 0.6.1 py37_1 defaults
menuinst 1.4.16 py37he774522_0 defaults
mistune 0.8.4 py37he774522_0 defaults
mkl 2019.4 245 defaults
mkl-service 2.0.2 py37he774522_0 defaults
mkl_fft 1.0.12 py37h14836fe_0 defaults
mkl_random 1.0.2 py37h343c172_0 defaults
mock 3.0.5 py37_0 defaults
more-itertools 7.0.0 py37_0 defaults
mpmath 1.1.0 py37_0 defaults
msgpack-python 0.6.1 py37h74a9793_1 defaults
msys2-conda-epoch 20160418 1 defaults
multipledispatch 0.6.0 py37_0 defaults
navigator-updater 0.2.1 py37_0 defaults
nbconvert 5.5.0 py_0 defaults
nbformat 4.4.0 py37_0 defaults
networkx 2.3 py_0 defaults
nltk 3.4.4 py37_0 defaults
nose 1.3.7 py37_2 defaults
notebook 6.0.0 py37_0 defaults
numba 0.44.1 py37hf9181ef_0 defaults
numexpr 2.6.9 py37hdce8814_0 defaults
numpy 1.16.4 py37h19fb1c0_0 defaults
numpy-base 1.16.4 py37hc3f5095_0 defaults
numpydoc 0.9.1 py_0 defaults
olefile 0.46 py37_0 defaults
openpyxl 2.6.2 py_0 defaults
openssl 1.1.1c he774522_1 defaults
packaging 19.0 py37_0 defaults
pandas 0.24.2 py37ha925a31_0 defaults
pandoc 2.2.3.2 0 defaults
pandocfilters 1.4.2 py37_1 defaults
parso 0.5.0 py_0 defaults
partd 1.0.0 py_0 defaults
path.py 12.0.1 py_0 defaults
pathlib2 2.3.4 py37_0 defaults
patsy 0.5.1 py37_0 defaults
pep8 1.7.1 py37_0 defaults
pickleshare 0.7.5 py37_0 defaults
pillow 6.1.0 py37hdc69c19_0 defaults
pip 19.1.1 py37_0 defaults
pkginfo 1.5.0.1 py37_0 defaults
pluggy 0.12.0 py_0 defaults
ply 3.11 py37_0 defaults
powershell_shortcut 0.0.1 2 defaults
prometheus_client 0.7.1 py_0 defaults
prompt_toolkit 2.0.9 py37_0 defaults
psutil 5.6.3 py37he774522_0 defaults
py 1.8.0 py37_0 defaults
py-lief 0.9.0 py37ha925a31_2 defaults
pycodestyle 2.5.0 py37_0 defaults
pycosat 0.6.3 py37hfa6e2cd_0 defaults
pycparser 2.19 py37_0 defaults
pycrypto 2.6.1 py37hfa6e2cd_9 defaults
pycurl 7.43.0.3 py37h7a1dbc1_0 defaults
pyflakes 2.1.1 py37_0 defaults
pygments 2.4.2 py_0 defaults
pylint 2.3.1 py37_0 defaults
pyodbc 4.0.26 py37ha925a31_0 defaults
pyopenssl 19.0.0 py37_0 defaults
pyparsing 2.4.0 py_0 defaults
pyqt 5.9.2 py37h6538335_2 defaults
pyreadline 2.1 py37_1 defaults
pyrsistent 0.14.11 py37he774522_0 defaults
pysocks 1.7.0 py37_0 defaults
pytables 3.5.2 py37h1da0976_1 defaults
pytest 5.0.1 py37_0 defaults
pytest-arraydiff 0.3 py37h39e3cac_0 defaults
pytest-astropy 0.5.0 py37_0 defaults
pytest-doctestplus 0.3.0 py37_0 defaults
pytest-openfiles 0.3.2 py37_0 defaults
pytest-remotedata 0.3.1 py37_0 defaults
python 3.7.3 h8c8aaf0_1 defaults
python-dateutil 2.8.0 py37_0 defaults
python-libarchive-c 2.8 py37_11 defaults
pytz 2019.1 py_0 defaults
pywavelets 1.0.3 py37h8c2d366_1 defaults
pywin32 223 py37hfa6e2cd_1 defaults
pywinpty 0.5.5 py37_1000 defaults
pyyaml 5.1.1 py37he774522_0 defaults
pyzmq 18.0.0 py37ha925a31_0 defaults
qt 5.9.7 vc14h73c81de_0 defaults
qtawesome 0.5.7 py37_1 defaults
qtconsole 4.5.1 py_0 defaults
qtpy 1.8.0 py_0 defaults
requests 2.22.0 py37_0 defaults
rope 0.14.0 py_0 defaults
ruamel_yaml 0.15.46 py37hfa6e2cd_0 defaults
scikit-image 0.15.0 py37ha925a31_0 defaults
scikit-learn 0.21.2 py37h6288b17_0 defaults
scipy 1.2.1 py37h29ff71c_0 defaults
seaborn 0.9.0 py37_0 defaults
send2trash 1.5.0 py37_0 defaults
setuptools 41.0.1 py37_0 defaults
simplegeneric 0.8.1 py37_2 defaults
singledispatch 3.4.0.3 py37_0 defaults
sip 4.19.8 py37h6538335_0 defaults
six 1.12.0 py37_0 defaults
snappy 1.1.7 h777316e_3 defaults
snowballstemmer 1.9.0 py_0 defaults
sortedcollections 1.1.2 py37_0 defaults
sortedcontainers 2.1.0 py37_0 defaults
soupsieve 1.8 py37_0 defaults
sphinx 2.1.2 py_0 defaults
sphinxcontrib 1.0 py37_1 defaults
sphinxcontrib-applehelp 1.0.1 py_0 defaults
sphinxcontrib-devhelp 1.0.1 py_0 defaults
sphinxcontrib-htmlhelp 1.0.2 py_0 defaults
sphinxcontrib-jsmath 1.0.1 py_0 defaults
sphinxcontrib-qthelp 1.0.2 py_0 defaults
sphinxcontrib-serializinghtml 1.1.3 py_0 defaults
sphinxcontrib-websupport 1.1.2 py_0 defaults
spyder 3.3.6 py37_0 defaults
spyder-kernels 0.5.1 py37_0 defaults
sqlalchemy 1.3.5 py37he774522_0 defaults
sqlite 3.29.0 he774522_0 defaults
statsmodels 0.10.0 py37h8c2d366_0 defaults
sympy 1.4 py37_0 defaults
tblib 1.4.0 py_0 defaults
terminado 0.8.2 py37_0 defaults
testpath 0.4.2 py37_0 defaults
tk 8.6.8 hfa6e2cd_0 defaults
toolz 0.10.0 py_0 defaults
tornado 6.0.3 py37he774522_0 defaults
tqdm 4.32.1 py_0 defaults
traitlets 4.3.2 py37_0 defaults
unicodecsv 0.14.1 py37_0 defaults
urllib3 1.24.2 py37_0 defaults
vc 14.1 h0510ff6_4 defaults
vs2015_runtime 14.15.26706 h3a45250_4 defaults
wcwidth 0.1.7 py37_0 defaults
webencodings 0.5.1 py37_1 defaults
werkzeug 0.15.4 py_0 defaults
wheel 0.33.4 py37_0 defaults
widgetsnbextension 3.5.0 py37_0 defaults
win_inet_pton 1.1.0 py37_0 defaults
win_unicode_console 0.5 py37_0 defaults
wincertstore 0.2 py37_0 defaults
winpty 0.4.3 4 defaults
wrapt 1.11.2 py37he774522_0 defaults
xlrd 1.2.0 py37_0 defaults
xlsxwriter 1.1.8 py_0 defaults
xlwings 0.15.8 py37_0 defaults
xlwt 1.3.0 py37_0 defaults
xz 5.2.4 h2fa13f4_4 defaults
yaml 0.1.7 hc54c509_2 defaults
zeromq 4.3.1 h33f27b4_3 defaults
zict 1.0.0 py_0 defaults
zipp 0.5.1 py_0 defaults
zlib 1.2.11 h62dcd97_3 defaults
zstd 1.3.7 h508b16e_0 defaults
```
</p></details>
| 2019-07-25T19:47:35 |
||
conda/conda | 9,045 | conda__conda-9045 | [
"8948"
] | 8bef991e3c23658435aa2e1fc90c62ac01d3a461 | diff --git a/conda/common/pkg_formats/python.py b/conda/common/pkg_formats/python.py
--- a/conda/common/pkg_formats/python.py
+++ b/conda/common/pkg_formats/python.py
@@ -17,6 +17,7 @@
import sys
import warnings
+from ... import CondaError
from ..compat import PY2, StringIO, itervalues, odict, open, string_types
from ..path import (
get_python_site_packages_short_path, pyc_path, win_path_ok, get_major_minor_version,
@@ -913,7 +914,14 @@ def get_dist_file_from_egg_link(egg_link_file, prefix_path):
egg_info_fnames = ()
if egg_info_fnames:
- assert len(egg_info_fnames) == 1, (egg_link_file, egg_info_fnames)
+ if len(egg_info_fnames) != 1:
+ raise CondaError(
+ "Expected exactly one `egg-info` directory in '{}', via egg-link '{}'."
+ " Instead found: {}. These are often left over from "
+ "legacy operations that did not clean up correctly. Please "
+ "remove all but one of these.".format(egg_link_contents,
+ egg_link_file, egg_info_fnames))
+
egg_info_full_path = join(egg_link_contents, egg_info_fnames[0])
if isdir(egg_info_full_path):
| conda list error if package installed with --editable
I have package installed via `pip install -U --editable .`
### Current Behavior
AssertionError: ('lib/python3.6/site-packages/ocli-sarpy.egg-link', ['ocli.sarpy.egg-info', 'ocli_sarpy.egg-info'])
### Steps to Reproduce
```
pip install -U --editable .
conda list
```
## Expected Behavior
should not raise exception, should output installed packages
## Environment Information
<details><summary><code>`conda info`</code></summary><p>
```
active environment : ocli
active env location : /home/vlz/miniconda3/envs/ocli
shell level : 1
user config file : /home/vlz/.condarc
populated config files : /home/vlz/.condarc
conda version : 4.7.5
conda-build version : not installed
python version : 3.6.7.final.0
virtual packages :
base environment : /home/vlz/miniconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/vlz/miniconda3/pkgs
/home/vlz/.conda/pkgs
envs directories : /home/vlz/miniconda3/envs
/home/vlz/.conda/envs
platform : linux-64
user-agent : conda/4.7.5 requests/2.22.0 CPython/3.6.7 Linux/4.4.0-18362-Microsoft ubuntu/18.04.2 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
```
==> /home/vlz/.condarc <==
auto_update_conda: False
auto_activate_base: False
channels:
- conda-forge
- defaults
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
```
AssertionError: ('lib/python3.6/site-packages/ocli-sarpy.egg-link', ['ocli.sarpy.egg-info', 'ocli_sarpy.egg-info'])
```
</p></details>
| Looks like there is a problem with how conda is reading pip installs for older versions of pip. Could you provide a more complete traceback for the issue?
```bash
(ocli) ➜ sarpy pip --version
pip 19.1.1 from /home/vlz/miniconda3/envs/ocli/lib/python3.6/site-packages/pip (python 3.6)
```
```
pip install --upgrade-strategy=only-if-needed --editable .
```
```sh
(ocli) ➜ sarpy conda list
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1043, in __call__
return func(*args, **kwargs)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/cli/main_list.py", line 142, in execute
show_channel_urls=context.show_channel_urls)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/cli/main_list.py", line 80, in print_packages
show_channel_urls=show_channel_urls)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/cli/main_list.py", line 45, in list_packages
installed = sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(),
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/core/prefix_data.py", line 130, in iter_records
return itervalues(self._prefix_records)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/core/prefix_data.py", line 159, in _prefix_records
return self.__prefix_records or self.load() or self.__prefix_records
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 88, in decorated
return f(*args, **kwds)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/core/prefix_data.py", line 72, in load
self._load_site_packages()
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/core/prefix_data.py", line 274, in _load_site_packages
python_record = read_python_record(self.prefix_path, af, python_pkg_record.version)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/gateways/disk/read.py", line 249, in read_python_record
pydist = PythonDistribution.init(prefix_path, anchor_file, python_version)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/common/pkg_formats/python.py", line 76, in init
return PythonEggLinkDistribution(prefix_path, anchor_file, python_version)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/common/pkg_formats/python.py", line 416, in __init__
anchor_full_path = get_dist_file_from_egg_link(anchor_file, prefix_path)
File "/home/vlz/miniconda3/lib/python3.6/site-packages/conda/common/pkg_formats/python.py", line 916, in get_dist_file_from_egg_link
assert len(egg_info_fnames) == 1, (egg_link_file, egg_info_fnames)
AssertionError: ('lib/python3.6/site-packages/ocli-sarpy.egg-link', ['ocli.sarpy.egg-info', 'ocli_sarpy.egg-info'])
`$ /home/vlz/miniconda3/bin/conda list`
environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=ocli
CONDA_EXE=/home/vlz/miniconda3/bin/conda
CONDA_PREFIX=/home/vlz/miniconda3/envs/ocli
CONDA_PROMPT_MODIFIER=(ocli)
CONDA_PYTHON_EXE=/home/vlz/miniconda3/bin/python
CONDA_ROOT=/home/vlz/miniconda3
CONDA_SHLVL=1
PATH=/home/vlz/miniconda3/bin:/home/vlz/miniconda3/envs/ocli/bin:/home/vlz/
miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:
/sbin:/bin:/usr/games:/usr/local/games:/c/Program Files/Far
Manager/ConEmu/Scripts:/c/Program Files/Far Manager:/c/Program
Files/Far Manager/ConEmu:/c/Program Files (x86)/Common
Files/Oracle/Java/javapath:/c/ProgramData/DockerDesktop/version-
bin:/c/Program Files/Docker/Docker/Resources/bin:/c/Program
Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin:/c/Program
Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/libnvvp:/c/ProgramData/O
racle/Java/javapath:/c/Program Files/Intel/iCLS Client:/c/WINDOWS/syst
em32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPo
werShell/v1.0:/c/VLZ/work/Ampps/php:/c/Program Files (x86)/Windows
Live/Shared:/c/Program Files/R/R-3.2.5/bin:/c/Program Files
(x86)/Zillya Antivirus:/c/WINDOWS/System32/OpenSSH:/c/ProgramData/choc
olatey/bin:/c/Program Files/IBM/Cloud/bin:/c/Program Files
(x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files/Git/cmd:/c/Stra
wberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/WIN
DOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/
WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/ProgramData/nvm:
/c/Program Files/nodejs:/c/Program Files/dotnet:/c/Go/bin:/c/Program
Files (x86)/Yarn/bin:/c/Program Files/Microsoft VS Code/bin:/c/VLZ/Pyt
hon36/Scripts:/c/VLZ/Python36:/c/VLZ/Python36/Library/bin:/c/Program F
iles/Java/jdk1.8.0_40/bin:/c/WINDOWS/system32:/c/Users/VLZ/AppData/Roa
ming:/c/Users/VLZ/AppData/Local/hyper/app-2.0.0/resources/bin:/c/Progr
am Files/snap/bin:/c/Users/VLZ/AppData/Local/Microsoft/WindowsApps:/c/
Users/VLZ/go/bin:/c/Users/VLZ/AppData/Local/Yarn/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : ocli
active env location : /home/vlz/miniconda3/envs/ocli
shell level : 1
user config file : /home/vlz/.condarc
populated config files : /home/vlz/.condarc
conda version : 4.7.5
conda-build version : not installed
python version : 3.6.7.final.0
virtual packages :
base environment : /home/vlz/miniconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/vlz/miniconda3/pkgs
/home/vlz/.conda/pkgs
envs directories : /home/vlz/miniconda3/envs
/home/vlz/.conda/envs
platform : linux-64
user-agent : conda/4.7.5 requests/2.22.0 CPython/3.6.7 Linux/4.4.0-18362-Microsoft ubuntu/18.04.2 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
IMHO conda searches eggs in ` AssertionError: ('lib/python3.6/site-packages/ocli-sarpy.egg-link', ['ocli.sarpy.egg-info', 'ocli_sarpy.egg-info'])
`
but pip made them locally,
```
(ocli) ➜ sarpy pwd
/c/VLZ/oDesk/taras/src/IBM/sarpy
(ocli) ➜ sarpy ll
total 4.0K
drwxr-xr-x 1 vlz vlz 512 Jul 15 15:20 ocli
drwxrwxrwx 1 vlz vlz 512 Jul 5 17:03 ocli.sarpy.egg-info
drwxrwxrwx 1 vlz vlz 512 Jul 18 12:37 ocli_sarpy.egg-info
-rwxr--r-- 1 vlz vlz 468 Jul 5 14:35 sarpy.iml
-rwxr--r-- 1 vlz vlz 1.4K Jul 16 01:55 setup.py
-rwxr--r-- 1 vlz vlz 383 Jul 6 00:46 test.sh
```
important note - I'm using Windows-10 and conda runs in WSL
```shell
(ocli) ➜ sarpy ll /home/vlz/miniconda3/envs/ocli/lib/python3.6/site-packages/ocli-sarpy.egg-link
-rw-rw-rw- 1 vlz vlz 34 Jul 18 12:37 /home/vlz/miniconda3/envs/ocli/lib/python3.6/site-packages/ocli-sarpy.egg-link
(ocli) ➜ sarpy cat /home/vlz/miniconda3/envs/ocli/lib/python3.6/site-packages/ocli-sarpy.egg-link
/c/VLZ/oDesk/taras/src/IBM/sarpy
.%
```
updating conda to `conda version : 4.7.8` doesn't helps
I also have this problem on Mac with conda 4.7.7.
I had this on 4.7.8, seems to be gone with 4.7.10.
I have this issue with conda 4.7.10 on Linux. In my case, the packages are my own local ones, installed via `python setup.py develop`. This places an egg-link in the `site-packages` directory which points to my working directory.
Also not fixed by updating (4.7.5 -> 4.7.10). But AFAICT my situation was the same as https://github.com/conda/conda/issues/8948#issuecomment-512743235: multiple left-over `*.egg-info` directories in the target of the `egg-link`. Debugging steps if someone wants to dig in and verify. This is w/ conda 4.7.10
- make a backup copy to be restored, so conda doesn't complain about hashes later
```
cp $CONDA_BASE/lib/python3.7/site-packages/conda/common/pkg_formats/python.py $CONDA_BASE/lib/python3.7/site-packages/conda/common/pkg_formats/python.py.bk
```
- set a breakpoint
```
diff $CONDA_BASE/lib/python3.7/site-packages/conda/common/pkg_formats/python.py $CONDA_BASE/lib/python3.7/site-packages/conda/common/pkg_formats/python.py.bk
914,915c914
<
< import pdb; pdb.set_trace()
---
>
```
- run `conda list`
- print the relevant variables
```
conda list
> /Users/inorton/mc3/lib/python3.7/site-packages/conda/common/pkg_formats/python.py(916)get_dist_file_from_egg_link()
-> if egg_info_fnames:
(Pdb) list
911 egg_info_fnames = fnmatch_filter(listdir(egg_link_contents), '*.egg-info')
912 else:
913 egg_info_fnames = ()
914
915 import pdb; pdb.set_trace()
916 -> if egg_info_fnames:
917 assert len(egg_info_fnames) == 1, (egg_link_file, egg_info_fnames)
918 egg_info_full_path = join(egg_link_contents, egg_info_fnames[0])
919
920 if isdir(egg_info_full_path):
921 egg_info_full_path = join(egg_info_full_path, "PKG-INFO")
(Pdb) p egg_info_fnames
['tiledb.egg-info', 'tiledb_py.egg-info']
(Pdb) p egg_link_contents
'/Users/inorton/work/git/TileDB-Py'
(Pdb)
```
- contents of that directory (`ls`) included
```
...
tiledb.egg-info
tiledb_py.egg-info
...
```
(due to some `setup.py` mods I had been testing on a branch and forgot to clean the directory)
- removing `tiledb_py.egg-info` resolved the issue reported above.
So ... not really a conda problem, as in both my case and https://github.com/conda/conda/issues/8948#issuecomment-512743235 we were both violating the `egg-link`/`egg-info` protocol by having multiple `egg-info`s in one directory.
Conda could print a more helpful error if the assertion is violated, but that's probably about it...
(don't forget to restore the .bk file above, and/or remove the pdb line) | 2019-08-03T03:22:43 |
|
conda/conda | 9,135 | conda__conda-9135 | [
"9128"
] | 3ac7898ee41188659418685c5f4e38c227af8e3d | diff --git a/conda_env/cli/main_export.py b/conda_env/cli/main_export.py
--- a/conda_env/cli/main_export.py
+++ b/conda_env/cli/main_export.py
@@ -94,7 +94,11 @@ def execute(args, parser):
* Re-run this command inside an activated conda environment.""").lstrip()
# TODO Add json support
raise CondaEnvException(msg)
- args.name = name
+ if os.sep in name:
+ # assume "names" with a path seperator are actually paths
+ args.prefix = name
+ else:
+ args.name = name
else:
name = args.name
prefix = get_prefix(args)
| Conda cannot properly export current environment via `conda env export` (without extra args)
## Current Behavior
`conda env export` (without any extra args) is supposed to export the current environment as a yaml. But it does not seem to work well if the current environment's prefix directory is in a custom location. This seems to work only if the parent directory of the prefix is a directory named `envs` . For example -
This works:
```
conda activate /tmp/envs/sf_clone
conda env export
```
This fails.
```
conda activate /tmp/foo/sf_clone
conda env export
```
This is very similar to #1935 . Im creating a new bug because the old one is closed without giving any reason.
I would also like to know if it is okay to rely on the fact that envs created under directories like `/something/something_else/envs` dont have this problem.
### Steps to Reproduce
<details> <p>
```sh
(base) >02:01:27 devbox:~$ conda create --clone snowflakes -p /tmp/envs/sf_clone
Source: /home/sai.suram/anaconda3/envs/snowflakes
Destination: /tmp/envs/sf_clone
Packages: 30
Files: 0
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate /tmp/envs/sf_clone
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) >02:02:08 devbox:~$ conda create --clone snowflakes -p /tmp/foo/sf_clone
Source: /home/sai.suram/anaconda3/envs/snowflakes
Destination: /tmp/foo/sf_clone
Packages: 30
Files: 0
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate /tmp/foo/sf_clone
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) >02:02:27 devbox:~$ conda activate /tmp/foo/sf_clone
(/tmp/foo/sf_clone) >02:02:34 devbox:~$ conda env export
CondaValueError: Invalid environment name: '/tmp/foo/sf_clone'
Characters not allowed: ('/', ' ', ':', '#')
(/tmp/foo/sf_clone) >02:02:43 devbox:~$ conda activate /tmp/envs/sf_clone
(sf_clone) >02:02:50 devbox:~$ conda env export
name: sf_clone
channels:
- defaults
prefix: /home/sai.suram/anaconda3/envs/sf_clone
```
</p></details>
## Expected Behavior
`conda env export` should work for all environments.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
shell level : 0
user config file : /home/sai.suram/.condarc
populated config files :
conda version : 4.7.11
conda-build version : 3.18.8
python version : 3.7.3.final.0
virtual packages :
base environment : /home/sai.suram/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/sai.suram/anaconda3/pkgs
/home/sai.suram/.conda/pkgs
envs directories : /home/sai.suram/anaconda3/envs
/home/sai.suram/.conda/envs
platform : linux-64
user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.3 Linux/4.15.0-58-generic ubuntu/16.04.4 glibc/2.23
UID:GID : 1000:1000
netrc file : /home/sai.suram/.netrc
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
(empty)
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /home/sai.suram/anaconda3/envs/snowflakes:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main defaults
argcomplete 1.10.0 py37_0 defaults
biopython 1.74 py37h7b6447c_0 defaults
blas 1.0 mkl defaults
ca-certificates 2019.5.15 1 defaults
certifi 2019.6.16 py37_1 defaults
intel-openmp 2019.4 243 defaults
libedit 3.1.20181209 hc058e9b_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc-ng 9.1.0 hdf63c60_0 defaults
libgfortran-ng 7.3.0 hdf63c60_0 defaults
libstdcxx-ng 9.1.0 hdf63c60_0 defaults
mkl 2019.4 243 defaults
mkl-service 2.0.2 py37h7b6447c_0 defaults
mkl_fft 1.0.14 py37ha843d7b_0 defaults
mkl_random 1.0.2 py37hd81dba3_0 defaults
ncurses 6.1 he6710b0_1 defaults
numpy 1.16.4 py37h7e9f1db_0 defaults
numpy-base 1.16.4 py37hde5b4d6_0 defaults
openssl 1.1.1c h7b6447c_1 defaults
pip 19.2.2 py37_0 defaults
python 3.7.4 h265db76_1 defaults
readline 7.0 h7b6447c_5 defaults
setuptools 41.0.1 py37_0 defaults
six 1.12.0 py37_0 defaults
sqlite 3.29.0 h7b6447c_0 defaults
tk 8.6.8 hbc83047_0 defaults
wheel 0.33.4 py37_0 defaults
xz 5.2.4 h14c3975_4 defaults
zlib 1.2.11 h7b6447c_3 defaults
```
</p></details>
| It appears that `conda env export` does not detect when the activate environment is a full path to the prefix rather than a named environment. Until this is fixed the `-p` argument needs to be passed to export command.
Hey, Thanks for the response :)
Before the bug is fixed can we bank on the assumption that if the parent directory is `envs` conda env export works without the -p argument?
> Before the bug is fixed can we bank on the assumption that if the parent directory is `envs` conda env export works without the -p argument?
It "works" but the resulting `prefix` entry in the yaml is incorrect, it will start with the main conda environment directory rather than the directory.
```
(base) ~/workspace/conda$ conda create -p /home/jhelmus/envs/sample_env
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/jhelmus/envs/sample_env
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate /home/jhelmus/envs/sample_env
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) ~/workspace/conda$ conda activate /home/jhelmus/envs/sample_env
(sample_env) ~/workspace/conda$ conda env export
name: sample_env
channels:
- defaults
prefix: /home/jhelmus/conda/envs/sample_env
```
Notice that the prefix is /home/jhelmus/conda/env/sample_env whereas the actual prefix is /home/jhelmus/env/sample_env (missing the conda). | 2019-08-23T21:41:52 |
|
conda/conda | 9,166 | conda__conda-9166 | [
"9165"
] | b9a7c17eb13f4e32c25ba0dce2fbabb0ee1bfcd2 | diff --git a/conda/core/envs_manager.py b/conda/core/envs_manager.py
--- a/conda/core/envs_manager.py
+++ b/conda/core/envs_manager.py
@@ -11,6 +11,7 @@
from .prefix_data import PrefixData
from ..base.context import context
from ..common.compat import ensure_text_type, on_win, open
+from ..common._os import is_admin
from ..common.path import expand
from ..gateways.disk.read import yield_lines
from ..gateways.disk.test import is_conda_environment
@@ -63,23 +64,21 @@ def unregister_env(location):
def list_all_known_prefixes():
all_env_paths = set()
- if on_win:
- home_dir_dir = dirname(expand('~'))
- for home_dir in listdir(home_dir_dir):
- environments_txt_file = get_user_environments_txt_file(join(home_dir_dir, home_dir))
- if isfile(environments_txt_file):
- all_env_paths.update(_clean_environments_txt(environments_txt_file))
- else:
- from os import geteuid
- from pwd import getpwall
- if geteuid() == 0:
- search_dirs = tuple(pwentry.pw_dir for pwentry in getpwall()) or (expand('~'),)
+ # If the user is an admin, load environments from all user home directories
+ if is_admin():
+ if on_win:
+ home_dir_dir = dirname(expand('~'))
+ search_dirs = tuple(join(home_dir_dir, d) for d in listdir(home_dir_dir))
else:
- search_dirs = (expand('~'),)
- for home_dir in search_dirs:
- environments_txt_file = get_user_environments_txt_file(home_dir)
- if isfile(environments_txt_file):
- all_env_paths.update(_clean_environments_txt(environments_txt_file))
+ from pwd import getpwall
+ search_dirs = tuple(pwentry.pw_dir for pwentry in getpwall()) or (expand('~'),)
+ else:
+ search_dirs = (expand('~'),)
+ for home_dir in search_dirs:
+ environments_txt_file = get_user_environments_txt_file(home_dir)
+ if isfile(environments_txt_file):
+ all_env_paths.update(_clean_environments_txt(environments_txt_file))
+
# in case environments.txt files aren't complete, also add all known conda environments in
# all envs_dirs
| conda env list behavior is inconsistent between Linux/macOS and Windows
## Current Behavior
On UNIX-family operating systems (Linux and macOS), `conda env list` generates a list of all environments belonging to the current user. This behavior changes if `conda` is executed with UID 0, in which case `conda` attempts to find all user home directories on the system and list all environments belonging to all users.
This is not consistent with the behavior on Windows. On Windows, `conda env list` always attempts to find all user home directories on the system, and displays all environments belonging to all users. This occurs whether or not the current user is an administrator.
This behavior is not documented in the Conda user guide, which just says that `conda env list` is used "to see a list of all your environments." https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#viewing-a-list-of-your-environments
### Steps to Reproduce
On macOS/Linux, this will list the current user's environments only:
```
conda env list
```
Running this command with `sudo` will list all environments on the system:
```
sudo conda env list
```
On Windows, running this command from either a standard prompt or from an administrative prompts with elevated permissions will list all environments on the system (as long as the executing user can read the environment configuration file for the user that actually owns the environment):
```
conda env list
```
## Expected Behavior
I would expect one of the two following behaviors:
1. `conda env list` only lists the current user's environment on any operating system.
2. `conda env list` only lists the current user's environment, unless it is executed as an administrator. This behavior should be consistent between Windows and macOS.
The current behavior on Windows (all users) and macOS/Linux (admins) should only be executed for administrators, if at all. In particular, the current Windows code finds all sibling directories of the current user's home folder and tries to check each one of them for an environment configuration file. In environments where Windows home directories are redirected onto a common network share, this may result in `conda env list` firing off a large number of I/O operations as it tries to access all home directories on the network share.
| 2019-09-02T18:04:57 |
||
conda/conda | 9,261 | conda__conda-9261 | [
"9116"
] | a0ae1898a00423d504bf204f8cde664ecdfd30d0 | diff --git a/conda/models/match_spec.py b/conda/models/match_spec.py
--- a/conda/models/match_spec.py
+++ b/conda/models/match_spec.py
@@ -181,8 +181,16 @@ def from_dist_str(cls, dist_str):
if dist_str.endswith(CONDA_PACKAGE_EXTENSION_V1):
dist_str = dist_str[:-len(CONDA_PACKAGE_EXTENSION_V1)]
if '::' in dist_str:
- channel_str, dist_str = dist_str.split("::", 1)
- parts['channel'] = channel_str
+ channel_subdir_str, dist_str = dist_str.split("::", 1)
+ if '/' in channel_subdir_str:
+ channel_str, subdir = channel_subdir_str.split('/', 2)
+ parts.update({
+ 'channel': channel_str,
+ 'subdir': subdir,
+ })
+ else:
+ parts['channel'] = channel_subdir_str
+
name, version, build = dist_str.rsplit('-', 2)
parts.update({
'name': name,
diff --git a/conda/models/records.py b/conda/models/records.py
--- a/conda/models/records.py
+++ b/conda/models/records.py
@@ -281,7 +281,7 @@ def __eq__(self, other):
return self._pkey == other._pkey
def dist_str(self):
- return "%s::%s-%s-%s" % (self.channel.canonical_name, self.name, self.version, self.build)
+ return "%s%s::%s-%s-%s" % (self.channel.canonical_name, ("/" + self.subdir) if self.subdir else "", self.name, self.version, self.build)
def dist_fields_dump(self):
return {
| diff --git a/tests/core/test_solve.py b/tests/core/test_solve.py
--- a/tests/core/test_solve.py
+++ b/tests/core/test_solve.py
@@ -24,7 +24,7 @@
from conda.models.records import PrefixRecord
from conda.models.enums import PackageType
from conda.resolve import MatchSpec
-from ..helpers import get_index_r_1, get_index_r_2, get_index_r_4, \
+from ..helpers import add_subdir_to_iter, get_index_r_1, get_index_r_2, get_index_r_4, \
get_index_r_5, get_index_cuda, get_index_must_unfreeze
from conda.common.compat import iteritems
@@ -154,7 +154,7 @@ def test_solve_1():
with get_solver(specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -163,7 +163,7 @@ def test_solve_1():
'channel-1::zlib-1.2.7-0',
'channel-1::python-3.3.2-0',
'channel-1::numpy-1.7.1-py33_0',
- )
+ ))
assert convert_to_dist_str(final_state) == order
specs_to_add = MatchSpec("python=2"),
@@ -171,7 +171,7 @@ def test_solve_1():
prefix_records=final_state, history_specs=specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -180,7 +180,7 @@ def test_solve_1():
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
'channel-1::numpy-1.7.1-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state) == order
@@ -190,7 +190,7 @@ def test_solve_2():
with get_solver_aggregate_1(specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::openssl-1.0.2l-0',
'channel-2::readline-6.2-2',
@@ -200,7 +200,7 @@ def test_solve_2():
'channel-2::zlib-1.2.11-0',
'channel-2::python-3.6.2-0',
'channel-2::numpy-1.13.1-py36_0'
- )
+ ))
assert convert_to_dist_str(final_state) == order
specs_to_add = MatchSpec("channel-4::numpy"),
@@ -242,9 +242,9 @@ def test_cuda_1():
with get_solver_cuda(specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-1::cudatoolkit-9.0-0',
- )
+ ))
assert convert_to_dist_str(final_state) == order
@@ -255,9 +255,9 @@ def test_cuda_2():
with get_solver_cuda(specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-1::cudatoolkit-10.0-0',
- )
+ ))
assert convert_to_dist_str(final_state) == order
@@ -298,7 +298,7 @@ def test_prune_1():
with get_solver(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::libnvvm-1.0-p0',
'channel-1::mkl-rt-11.0-p0',
'channel-1::openssl-1.0.1c-0',
@@ -321,7 +321,7 @@ def test_prune_1():
'channel-1::scikit-learn-0.13.1-np16py27_p0',
'channel-1::mkl-11.0-np16py27_p0',
'channel-1::accelerate-1.1.0-np16py27_p0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_remove = MatchSpec("numbapro"),
@@ -330,7 +330,7 @@ def test_prune_1():
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-1::accelerate-1.1.0-np16py27_p0',
'channel-1::mkl-11.0-np16py27_p0',
'channel-1::scikit-learn-0.13.1-np16py27_p0',
@@ -346,10 +346,10 @@ def test_prune_1():
'channel-1::llvm-3.2-0',
'channel-1::mkl-rt-11.0-p0',
'channel-1::libnvvm-1.0-p0',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-1::numpy-1.6.2-py27_4',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -360,7 +360,7 @@ def test_force_remove_1():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -369,7 +369,7 @@ def test_force_remove_1():
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
'channel-1::numpy-1.7.1-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
# without force_remove, taking out python takes out everything that depends on it, too,
@@ -382,10 +382,9 @@ def test_force_remove_1():
print(convert_to_dist_str(final_state_2))
# openssl remains because it is in the aggressive_update_packages set,
# but everything else gets removed
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
-
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# with force remove, we remove only the explicit specs that we provide
@@ -396,7 +395,7 @@ def test_force_remove_1():
final_state_2 = solver.solve_final_state(force_remove=True)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
@@ -404,7 +403,7 @@ def test_force_remove_1():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# re-solving restores order
@@ -412,7 +411,7 @@ def test_force_remove_1():
final_state_3 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -421,7 +420,7 @@ def test_force_remove_1():
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
'channel-1::numpy-1.7.1-py27_0'
- )
+ ))
assert convert_to_dist_str(final_state_3) == order
@@ -431,7 +430,7 @@ def test_no_deps_1():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -439,7 +438,7 @@ def test_no_deps_1():
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("numba"),
@@ -447,7 +446,7 @@ def test_no_deps_1():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -460,7 +459,7 @@ def test_no_deps_1():
'channel-1::meta-0.4.2.dev-py27_0',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::numba-0.8.1-np17py27_0'
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
specs_to_add = MatchSpec("numba"),
@@ -468,7 +467,7 @@ def test_no_deps_1():
final_state_2 = solver.solve_final_state(deps_modifier='NO_DEPS')
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -477,7 +476,7 @@ def test_no_deps_1():
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
'channel-1::numba-0.8.1-np17py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -487,7 +486,7 @@ def test_only_deps_1():
final_state_1 = solver.solve_final_state(deps_modifier=DepsModifier.ONLY_DEPS)
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -499,7 +498,7 @@ def test_only_deps_1():
'channel-1::llvmpy-0.11.2-py27_0',
'channel-1::meta-0.4.2.dev-py27_0',
'channel-1::numpy-1.7.1-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
@@ -509,7 +508,7 @@ def test_only_deps_2():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -518,7 +517,7 @@ def test_only_deps_2():
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.3-7',
'channel-1::numpy-1.5.1-py27_4',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("numba=0.5"),
@@ -526,7 +525,7 @@ def test_only_deps_2():
final_state_2 = solver.solve_final_state(deps_modifier=DepsModifier.ONLY_DEPS)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -540,7 +539,7 @@ def test_only_deps_2():
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.1-py27_0',
# 'channel-1::numba-0.5.0-np17py27_0', # not in the order because only_deps
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# fails because numpy=1.5 is in our history as an explicit spec
@@ -554,7 +553,7 @@ def test_only_deps_2():
final_state_2 = solver.solve_final_state(deps_modifier=DepsModifier.ONLY_DEPS)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -568,7 +567,7 @@ def test_only_deps_2():
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.1-py27_0',
# 'channel-1::numba-0.5.0-np17py27_0', # not in the order because only_deps
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -578,7 +577,7 @@ def test_update_all_1():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -587,7 +586,7 @@ def test_update_all_1():
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.6.8-6',
'channel-1::numpy-1.5.1-py26_4',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("numba=0.6"), MatchSpec("numpy")
@@ -595,7 +594,7 @@ def test_update_all_1():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -608,7 +607,7 @@ def test_update_all_1():
'channel-1::nose-1.3.0-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.6.0-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
specs_to_add = MatchSpec("numba=0.6"),
@@ -616,7 +615,7 @@ def test_update_all_1():
final_state_2 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_ALL)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -629,7 +628,7 @@ def test_update_all_1():
'channel-1::nose-1.3.0-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.6.0-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -639,7 +638,7 @@ def test_broken_install():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order_original = (
+ order_original = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -653,7 +652,7 @@ def test_broken_install():
'channel-1::dateutil-2.1-py27_1',
'channel-1::scipy-0.12.0-np16py27_0',
'channel-1::pandas-0.11.0-np16py27_1',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order_original
assert solver._r.environment_is_consistent(final_state_1)
@@ -669,7 +668,7 @@ def test_broken_install():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
"channel-1::numpy-1.7.1-py33_p0",
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
@@ -686,7 +685,7 @@ def test_broken_install():
'channel-1::dateutil-2.1-py27_1',
'channel-1::flask-0.9-py27_0',
'channel-1::pandas-0.11.0-np16py27_1'
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
assert not solver._r.environment_is_consistent(final_state_2)
@@ -696,7 +695,7 @@ def test_broken_install():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -713,7 +712,7 @@ def test_broken_install():
'channel-1::flask-0.9-py27_0',
'channel-1::scipy-0.12.0-np16py27_0',
'channel-1::pandas-0.11.0-np16py27_1',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
assert solver._r.environment_is_consistent(final_state_2)
@@ -731,7 +730,7 @@ def test_conda_downgrade():
with get_solver_aggregate_1(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-2::conda-env-2.6.0-0',
'channel-2::libffi-3.2.1-1',
@@ -774,7 +773,7 @@ def test_conda_downgrade():
'channel-4::requests-2.19.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
'channel-4::conda-build-3.12.1-py37_0'
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("itsdangerous"), # MatchSpec("conda"),
@@ -789,9 +788,9 @@ def test_conda_downgrade():
unlink_order = (
# no conda downgrade
)
- link_order = (
+ link_order = add_subdir_to_iter((
'channel-2::itsdangerous-0.24-py_0',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -810,7 +809,7 @@ def test_conda_downgrade():
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
# now conda gets downgraded
'channel-4::conda-build-3.12.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
@@ -847,8 +846,8 @@ def test_conda_downgrade():
'channel-4::tk-8.6.7-hc745277_3',
'channel-4::openssl-1.0.2p-h14c3975_0',
'channel-4::ncurses-6.1-hf484d3e_0',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-2::openssl-1.0.2l-0',
'channel-2::readline-6.2-2',
'channel-2::sqlite-3.13.0-0',
@@ -882,7 +881,7 @@ def test_conda_downgrade():
'channel-2::pyopenssl-17.0.0-py36_0',
'channel-2::conda-4.3.30-py36h5d9f9f4_0',
'channel-4::conda-build-3.12.1-py36_0'
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
finally:
@@ -906,23 +905,23 @@ def test_unfreeze_when_required():
with get_solver_must_unfreeze(specs) as solver:
final_state_1 = solver.solve_final_state()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-freeze::libbar-2.0-0',
'channel-freeze::libfoo-1.0-0',
'channel-freeze::foobar-1.0-0',
'channel-freeze::qux-1.0-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs = MatchSpec("foobar"),
with get_solver_must_unfreeze(specs) as solver:
final_state_1 = solver.solve_final_state()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-freeze::libbar-2.0-0',
'channel-freeze::libfoo-2.0-0',
'channel-freeze::foobar-2.0-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
# When frozen there is no solution - but conda tries really hard to not freeze things that conflict
@@ -937,12 +936,12 @@ def test_unfreeze_when_required():
final_state_2 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_SPECS)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-freeze::libbar-2.0-0',
'channel-freeze::libfoo-1.0-0',
'channel-freeze::foobar-1.0-0',
'channel-freeze::qux-1.0-0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -952,7 +951,7 @@ def test_auto_update_conda():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -963,7 +962,7 @@ def test_auto_update_conda():
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_vars({"CONDA_AUTO_UPDATE_CONDA": "yes"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -972,7 +971,7 @@ def test_auto_update_conda():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -984,7 +983,7 @@ def test_auto_update_conda():
'channel-1::pytz-2013b-py27_0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
saved_sys_prefix = sys.prefix
@@ -996,7 +995,7 @@ def test_auto_update_conda():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1008,7 +1007,7 @@ def test_auto_update_conda():
'channel-1::pytz-2013b-py27_0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.5.2-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
with env_vars({"CONDA_AUTO_UPDATE_CONDA": "no"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1017,7 +1016,7 @@ def test_auto_update_conda():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1029,7 +1028,7 @@ def test_auto_update_conda():
'channel-1::pytz-2013b-py27_0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
finally:
sys.prefix = saved_sys_prefix
@@ -1041,7 +1040,7 @@ def test_explicit_conda_downgrade():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1052,7 +1051,7 @@ def test_explicit_conda_downgrade():
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.5.2-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_vars({"CONDA_AUTO_UPDATE_CONDA": "yes"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1061,7 +1060,7 @@ def test_explicit_conda_downgrade():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1072,7 +1071,7 @@ def test_explicit_conda_downgrade():
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
saved_sys_prefix = sys.prefix
@@ -1084,7 +1083,7 @@ def test_explicit_conda_downgrade():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1095,7 +1094,7 @@ def test_explicit_conda_downgrade():
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
with env_vars({"CONDA_AUTO_UPDATE_CONDA": "no"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1104,7 +1103,7 @@ def test_explicit_conda_downgrade():
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1115,7 +1114,7 @@ def test_explicit_conda_downgrade():
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
finally:
sys.prefix = saved_sys_prefix
@@ -1137,9 +1136,9 @@ def solve(prev_state, specs_to_add, order):
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": ""}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
base_state = solve(
empty_state, ["libpng=1.2"],
- (
+ add_subdir_to_iter((
'channel-1::libpng-1.2.50-0',
- ))
+ )))
# # ~~has "libpng" restricted to "=1.2" by history_specs~~ NOPE!
# In conda 4.6 making aggressive_update *more* aggressive, making it override history specs.
@@ -1147,48 +1146,48 @@ def solve(prev_state, specs_to_add, order):
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": "libpng"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
solve(
state_1, ["cmake=2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.9-0',
'channel-1::libpng-1.5.13-1',
- ))
+ )))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": ""}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
state_1_2 = solve(
state_1, ["cmake=2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.9-0',
'channel-1::libpng-1.2.50-0',
- ))
+ )))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": "libpng"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
solve(
state_1_2, ["cmake>2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.10.2-0',
'channel-1::libpng-1.5.13-1',
- ))
+ )))
# use new history_specs to remove "libpng" version restriction
state_2 = (base_state[0], (MatchSpec("libpng"),))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": "libpng"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
solve(
state_2, ["cmake=2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.9-0',
'channel-1::libpng-1.5.13-1',
- ))
+ )))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": ""}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
state_2_2 = solve(
state_2, ["cmake=2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.9-0',
'channel-1::libpng-1.2.50-0',
- ))
+ )))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": "libpng"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
solve(
state_2_2, ["cmake>2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.10.2-0',
'channel-1::libpng-1.5.13-1',
- ))
+ )))
def test_python2_update():
@@ -1198,7 +1197,7 @@ def test_python2_update():
with get_solver_4(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order1 = (
+ order1 = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::conda-env-2.6.0-1',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
@@ -1232,14 +1231,14 @@ def test_python2_update():
'channel-4::urllib3-1.23-py27_0',
'channel-4::requests-2.19.1-py27_0',
'channel-4::conda-4.5.10-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order1
specs_to_add = MatchSpec("python=3"),
with get_solver_4(specs_to_add, prefix_records=final_state_1, history_specs=specs) as solver:
final_state_2 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::conda-env-2.6.0-1',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
@@ -1271,7 +1270,7 @@ def test_python2_update():
'channel-4::urllib3-1.23-py37_0',
'channel-4::requests-2.19.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -1281,7 +1280,7 @@ def test_update_deps_1():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
# print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1289,14 +1288,14 @@ def test_update_deps_1():
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs2 = MatchSpec("numpy=1.7.0"), MatchSpec("python=2.7.3")
with get_solver(specs2, prefix_records=final_state_1, history_specs=specs) as solver:
final_state_2 = solver.solve_final_state()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1306,14 +1305,14 @@ def test_update_deps_1():
'channel-1::python-2.7.3-7',
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.0-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
specs_to_add = MatchSpec("iopro"),
with get_solver(specs_to_add, prefix_records=final_state_2, history_specs=specs2) as solver:
final_state_3a = solver.solve_final_state()
print(convert_to_dist_str(final_state_3a))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1325,14 +1324,14 @@ def test_update_deps_1():
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.0-py27_0',
'channel-1::iopro-1.5.0-np17py27_p0',
- )
+ ))
assert convert_to_dist_str(final_state_3a) == order
specs_to_add = MatchSpec("iopro"),
with get_solver(specs_to_add, prefix_records=final_state_2, history_specs=specs2) as solver:
final_state_3 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_DEPS)
pprint(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1344,7 +1343,7 @@ def test_update_deps_1():
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.1-py27_0', # with update_deps, numpy should switch from 1.7.0 to 1.7.1
'channel-1::iopro-1.5.0-np17py27_p0',
- )
+ ))
assert convert_to_dist_str(final_state_3) == order
specs_to_add = MatchSpec("iopro"),
@@ -1352,7 +1351,7 @@ def test_update_deps_1():
final_state_3 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_DEPS,
deps_modifier=DepsModifier.ONLY_DEPS)
pprint(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-1::unixodbc-2.3.1-0',
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
@@ -1364,7 +1363,7 @@ def test_update_deps_1():
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.1-py27_0', # with update_deps, numpy should switch from 1.7.0 to 1.7.1
# 'channel-1::iopro-1.5.0-np17py27_p0',
- )
+ ))
assert convert_to_dist_str(final_state_3) == order
@@ -1373,7 +1372,7 @@ def test_update_deps_2():
with get_solver_aggregate_2(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order1 = (
+ order1 = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
'channel-4::libstdcxx-ng-8.2.0-hdf63c60_0',
@@ -1395,7 +1394,7 @@ def test_update_deps_2():
'channel-4::setuptools-40.0.0-py36_0',
'channel-2::jinja2-2.8-py36_1',
'channel-2::flask-0.12-py36_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order1
# The "conda update flask" case is held back by the jinja2==2.8 user-requested spec.
@@ -1404,12 +1403,12 @@ def test_update_deps_2():
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-2::flask-0.12-py36_0',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-4::flask-0.12.2-py36hb24657c_0',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -1419,14 +1418,14 @@ def test_update_deps_2():
unlink_precs, link_precs = solver.solve_for_diff(update_modifier=UpdateModifier.UPDATE_DEPS)
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-2::flask-0.12-py36_0',
'channel-2::jinja2-2.8-py36_1',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-4::jinja2-2.10-py36_0',
'channel-4::flask-1.0.2-py36_1',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -1436,7 +1435,7 @@ def test_fast_update_with_update_modifier_not_set():
with get_solver_4(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order1 = (
+ order1 = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
'channel-4::libstdcxx-ng-8.2.0-hdf63c60_0',
@@ -1449,7 +1448,7 @@ def test_fast_update_with_update_modifier_not_set():
'channel-4::readline-7.0-ha6073c6_4',
'channel-4::sqlite-3.21.0-h1bed415_2',
'channel-4::python-2.7.14-h89e7a4a_22',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order1
specs_to_add = MatchSpec("python"),
@@ -1457,19 +1456,19 @@ def test_fast_update_with_update_modifier_not_set():
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-4::python-2.7.14-h89e7a4a_22',
'channel-4::libedit-3.1-heed3624_0',
'channel-4::openssl-1.0.2l-h077ae2c_5',
'channel-4::ncurses-6.0-h9df7e31_2'
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-4::ncurses-6.1-hf484d3e_0',
'channel-4::openssl-1.0.2p-h14c3975_0',
'channel-4::xz-5.2.4-h14c3975_4',
'channel-4::libedit-3.1.20170329-h6b74fdf_2',
'channel-4::python-3.6.4-hc3d631a_1', # python is upgraded
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -1478,20 +1477,20 @@ def test_fast_update_with_update_modifier_not_set():
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-4::python-2.7.14-h89e7a4a_22',
'channel-4::sqlite-3.21.0-h1bed415_2',
'channel-4::libedit-3.1-heed3624_0',
'channel-4::openssl-1.0.2l-h077ae2c_5',
'channel-4::ncurses-6.0-h9df7e31_2',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-4::ncurses-6.1-hf484d3e_0',
'channel-4::openssl-1.0.2p-h14c3975_0',
'channel-4::libedit-3.1.20170329-h6b74fdf_2',
'channel-4::sqlite-3.24.0-h84994c4_0', # sqlite is upgraded
'channel-4::python-2.7.15-h1571d57_0', # python is not upgraded
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -1509,7 +1508,7 @@ def test_pinned_1():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1518,7 +1517,7 @@ def test_pinned_1():
'channel-1::zlib-1.2.7-0',
'channel-1::python-3.3.2-0',
'channel-1::numpy-1.7.1-py33_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_var("CONDA_PINNED_PACKAGES", "python=2.6&iopro<=1.4.2", stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1527,9 +1526,9 @@ def test_pinned_1():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::system-5.8-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
# ignore_pinned=True
@@ -1539,7 +1538,7 @@ def test_pinned_1():
final_state_2 = solver.solve_final_state(ignore_pinned=True)
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1547,7 +1546,7 @@ def test_pinned_1():
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-3.3.2-0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# ignore_pinned=False
@@ -1557,7 +1556,7 @@ def test_pinned_1():
final_state_2 = solver.solve_final_state(ignore_pinned=False)
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1565,7 +1564,7 @@ def test_pinned_1():
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.6.8-6',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# incompatible CLI and configured specs
@@ -1585,7 +1584,7 @@ def test_pinned_1():
final_state_3 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1598,7 +1597,7 @@ def test_pinned_1():
'channel-1::llvmpy-0.11.2-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.8.1-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_3) == order
specs_to_add = MatchSpec("python"),
@@ -1608,7 +1607,7 @@ def test_pinned_1():
final_state_4 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_DEPS)
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_4))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1621,7 +1620,7 @@ def test_pinned_1():
'channel-1::llvmpy-0.11.2-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.8.1-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_4) == order
specs_to_add = MatchSpec("python"),
@@ -1631,7 +1630,7 @@ def test_pinned_1():
final_state_5 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_ALL)
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_5))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1644,7 +1643,7 @@ def test_pinned_1():
'channel-1::llvmpy-0.11.2-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.8.1-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_5) == order
# now update without pinning
@@ -1655,7 +1654,7 @@ def test_pinned_1():
final_state_5 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_ALL)
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_5))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1667,7 +1666,7 @@ def test_pinned_1():
'channel-1::llvmpy-0.11.2-py33_0',
'channel-1::numpy-1.7.1-py33_0',
'channel-1::numba-0.8.1-np17py33_0',
- )
+ ))
assert convert_to_dist_str(final_state_5) == order
@@ -1680,7 +1679,7 @@ def test_no_update_deps_1(): # i.e. FREEZE_DEPS
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1688,7 +1687,7 @@ def test_no_update_deps_1(): # i.e. FREEZE_DEPS
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("zope.interface"),
@@ -1696,7 +1695,7 @@ def test_no_update_deps_1(): # i.e. FREEZE_DEPS
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1706,7 +1705,7 @@ def test_no_update_deps_1(): # i.e. FREEZE_DEPS
'channel-1::python-2.7.5-0',
'channel-1::nose-1.3.0-py27_0',
'channel-1::zope.interface-4.0.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
specs_to_add = MatchSpec("zope.interface>4.1"),
@@ -1720,7 +1719,7 @@ def test_no_update_deps_1(): # i.e. FREEZE_DEPS
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1730,7 +1729,7 @@ def test_no_update_deps_1(): # i.e. FREEZE_DEPS
'channel-1::python-3.3.2-0',
'channel-1::nose-1.3.0-py33_0',
'channel-1::zope.interface-4.1.1.1-py33_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -1740,7 +1739,7 @@ def test_force_reinstall_1():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1748,7 +1747,7 @@ def test_force_reinstall_1():
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = specs
@@ -1773,7 +1772,7 @@ def test_force_reinstall_2():
assert not unlink_dists
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(link_dists))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1781,7 +1780,7 @@ def test_force_reinstall_2():
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(link_dists) == order
@@ -1791,7 +1790,7 @@ def test_timestamps_1():
unlink_dists, link_dists = solver.solve_for_diff(force_reinstall=True)
assert not unlink_dists
pprint(convert_to_dist_str(link_dists))
- order = (
+ order = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
'channel-4::libstdcxx-ng-8.2.0-hdf63c60_0',
@@ -1806,7 +1805,7 @@ def test_timestamps_1():
'channel-4::sqlite-3.23.1-he433501_0',
'channel-4::python-3.6.2-hca45abc_19', # this package has a later timestamp but lower hash value
# than the alternate 'channel-4::python-3.6.2-hda45abc_19'
- )
+ ))
assert convert_to_dist_str(link_dists) == order
def test_channel_priority_churn_minimized():
@@ -1836,7 +1835,7 @@ def test_remove_with_constrained_dependencies():
assert not unlink_dists_1
pprint(convert_to_dist_str(link_dists_1))
assert not unlink_dists_1
- order = (
+ order = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::conda-env-2.6.0-1',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
@@ -1879,7 +1878,7 @@ def test_remove_with_constrained_dependencies():
'channel-4::requests-2.19.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
'channel-4::conda-build-3.12.1-py37_0',
- )
+ ))
assert convert_to_dist_str(link_dists_1) == order
specs_to_remove = MatchSpec("pycosat"),
@@ -1887,11 +1886,11 @@ def test_remove_with_constrained_dependencies():
unlink_dists_2, link_dists_2 = solver.solve_for_diff()
assert not link_dists_2
pprint(convert_to_dist_str(unlink_dists_2))
- order = (
+ order = add_subdir_to_iter((
'channel-4::conda-build-3.12.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
'channel-4::pycosat-0.6.3-py37h14c3975_0',
- )
+ ))
for spec in order:
assert spec in convert_to_dist_str(unlink_dists_2)
@@ -1903,7 +1902,7 @@ def test_priority_1():
with get_solver_aggregate_1(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::openssl-1.0.2l-0',
'channel-2::readline-6.2-2',
@@ -1916,7 +1915,7 @@ def test_priority_1():
'channel-2::six-1.10.0-py27_0',
'channel-2::python-dateutil-2.6.1-py27_0',
'channel-2::pandas-0.20.3-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_var("CONDA_CHANNEL_PRIORITY", "False", stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1926,10 +1925,10 @@ def test_priority_1():
pprint(convert_to_dist_str(final_state_2))
# python and pandas will be updated as they are explicit specs. Other stuff may or may not,
# as required to satisfy python and pandas
- order = (
+ order = add_subdir_to_iter((
'channel-4::python-2.7.15-h1571d57_0',
'channel-4::pandas-0.23.4-py27h04863e7_0',
- )
+ ))
for spec in order:
assert spec in convert_to_dist_str(final_state_2)
@@ -1940,10 +1939,10 @@ def test_priority_1():
history_specs=specs) as solver:
final_state_3 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-2::python-2.7.13-0',
'channel-2::pandas-0.20.3-py27_0',
- )
+ ))
for spec in order:
assert spec in convert_to_dist_str(final_state_3)
@@ -1953,10 +1952,10 @@ def test_priority_1():
prefix_records=final_state_3, history_specs=specs) as solver:
final_state_4 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_4))
- order = (
+ order = add_subdir_to_iter((
'channel-2::python-2.7.13-0',
'channel-2::six-1.9.0-py27_0',
- )
+ ))
for spec in order:
assert spec in convert_to_dist_str(final_state_4)
assert 'pandas' not in convert_to_dist_str(final_state_4)
@@ -1971,7 +1970,7 @@ def test_features_solve_1():
with get_solver_aggregate_1(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-2::nomkl-1.0-0',
'channel-2::libgfortran-3.0.0-1',
'channel-2::openssl-1.0.2l-0',
@@ -1982,14 +1981,14 @@ def test_features_solve_1():
'channel-2::openblas-0.2.19-0',
'channel-2::python-2.7.13-0',
'channel-2::numpy-1.13.1-py27_nomkl_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_var("CONDA_CHANNEL_PRIORITY", "False", stack_callback=conda_tests_ctxt_mgmt_def_pol):
with get_solver_aggregate_1(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-4::blas-1.0-openblas',
'channel-4::ca-certificates-2018.03.07-0',
'channel-2::libffi-3.2.1-1',
@@ -2008,7 +2007,7 @@ def test_features_solve_1():
'channel-4::python-2.7.15-h1571d57_0',
'channel-4::numpy-base-1.15.0-py27h7cdd4dd_0',
'channel-4::numpy-1.15.0-py27h2aefc1b_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
@@ -2018,7 +2017,7 @@ def test_freeze_deps_1():
with get_solver_2(specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-2::openssl-1.0.2l-0',
'channel-2::readline-6.2-2',
'channel-2::sqlite-3.13.0-0',
@@ -2027,7 +2026,7 @@ def test_freeze_deps_1():
'channel-2::zlib-1.2.11-0',
'channel-2::python-3.4.5-0',
'channel-2::six-1.7.3-py34_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("bokeh"),
@@ -2036,7 +2035,7 @@ def test_freeze_deps_1():
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
unlink_order = ()
- link_order = (
+ link_order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::yaml-0.1.6-0',
'channel-2::backports_abc-0.5-py34_0',
@@ -2049,7 +2048,7 @@ def test_freeze_deps_1():
'channel-2::python-dateutil-2.6.1-py34_0',
'channel-2::tornado-4.4.2-py34_0',
'channel-2::bokeh-0.12.4-py34_0',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -2061,7 +2060,7 @@ def test_freeze_deps_1():
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
unlink_order = ()
- link_order = (
+ link_order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::yaml-0.1.6-0',
'channel-2::backports_abc-0.5-py34_0',
@@ -2074,7 +2073,7 @@ def test_freeze_deps_1():
'channel-2::python-dateutil-2.6.1-py34_0',
'channel-2::tornado-4.4.2-py34_0',
'channel-2::bokeh-0.12.4-py34_0',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -2095,12 +2094,12 @@ def test_freeze_deps_1():
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-2::six-1.7.3-py34_0',
'channel-2::python-3.4.5-0',
'channel-2::xz-5.2.3-0',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::yaml-0.1.6-0',
'channel-2::python-2.7.13-0',
@@ -2120,7 +2119,7 @@ def test_freeze_deps_1():
'channel-2::jinja2-2.9.6-py27_0',
'channel-2::tornado-4.5.2-py27_0',
'channel-2::bokeh-0.12.5-py27_1',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -2243,7 +2242,7 @@ def test_downgrade_python_prevented_with_sane_message():
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -2251,7 +2250,7 @@ def test_downgrade_python_prevented_with_sane_message():
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.6.8-6',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
# incompatible CLI and configured specs
diff --git a/tests/helpers.py b/tests/helpers.py
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -111,6 +111,25 @@ def run_inprocess_conda_command(command, disallow_stderr=True):
return c.stdout, c.stderr, exit_code
+def add_subdir(dist_string):
+ channel_str, package_str = dist_string.split('::')
+ channel_str = channel_str + '/' + context.subdir
+ return '::'.join([channel_str, package_str])
+
+
+def add_subdir_to_iter(iterable):
+ if isinstance(iterable, dict):
+ return {add_subdir(k) : v for k, v in iterable.items()}
+ elif isinstance(iterable, list):
+ return list(map(add_subdir, iterable))
+ elif isinstance(iterable, set):
+ return set(map(add_subdir, iterable))
+ elif isinstance(iterable, tuple):
+ return tuple(map(add_subdir, iterable))
+ else:
+ raise Exception("Unable to add subdir to object of unknown type.")
+
+
@contextmanager
def tempdir():
tempdirdir = gettempdir()
diff --git a/tests/models/test_prefix_graph.py b/tests/models/test_prefix_graph.py
--- a/tests/models/test_prefix_graph.py
+++ b/tests/models/test_prefix_graph.py
@@ -13,6 +13,7 @@
from conda.models.records import PackageRecord
import pytest
from tests.core.test_solve import get_solver_4, get_solver_5
+from tests.helpers import add_subdir_to_iter
try:
from unittest.mock import Mock, patch
@@ -218,17 +219,17 @@ def test_prefix_graph_1():
)
assert nodes == order
- spec_matches = {
+ spec_matches = add_subdir_to_iter({
'channel-4::intel-openmp-2018.0.3-0': {'intel-openmp'},
- }
+ })
assert {node.dist_str(): set(str(ms) for ms in specs) for node, specs in graph.spec_matches.items()} == spec_matches
removed_nodes = graph.prune()
nodes = tuple(rec.dist_str() for rec in graph.records)
pprint(nodes)
- order = (
+ order = add_subdir_to_iter((
'channel-4::intel-openmp-2018.0.3-0',
- )
+ ))
assert nodes == order
removed_nodes = tuple(rec.name for rec in removed_nodes)
diff --git a/tests/test_resolve.py b/tests/test_resolve.py
--- a/tests/test_resolve.py
+++ b/tests/test_resolve.py
@@ -16,7 +16,7 @@
from conda.models.enums import PackageType
from conda.models.records import PackageRecord
from conda.resolve import MatchSpec, Resolve, ResolvePackageNotFound
-from .helpers import TEST_DATA_DIR, get_index_r_1, get_index_r_4, raises
+from .helpers import TEST_DATA_DIR, add_subdir, add_subdir_to_iter, get_index_r_1, get_index_r_4, raises
index, r, = get_index_r_1()
f_mkl = set(['mkl'])
@@ -66,7 +66,7 @@ def test_empty(self):
def test_iopro_nomkl(self):
installed = r.install(['iopro 1.4*', 'python 2.7*', 'numpy 1.7*'], returnall=True)
installed = [rec.dist_str() for rec in installed]
- assert installed == [
+ assert installed == add_subdir_to_iter([
'channel-1::iopro-1.4.3-np17py27_p0',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -77,12 +77,12 @@ def test_iopro_nomkl(self):
'channel-1::tk-8.5.13-0',
'channel-1::unixodbc-2.3.1-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_iopro_mkl(self):
installed = r.install(['iopro 1.4*', 'python 2.7*', 'numpy 1.7*', MatchSpec(track_features='mkl')], returnall=True)
installed = [prec.dist_str() for prec in installed]
- assert installed == [
+ assert installed == add_subdir_to_iter([
'channel-1::iopro-1.4.3-np17py27_p0',
'channel-1::mkl-rt-11.0-p0',
'channel-1::numpy-1.7.1-py27_p0',
@@ -94,7 +94,7 @@ def test_iopro_mkl(self):
'channel-1::tk-8.5.13-0',
'channel-1::unixodbc-2.3.1-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_mkl(self):
a = r.install(['mkl 11*', MatchSpec(track_features='mkl')])
@@ -110,13 +110,13 @@ def test_scipy_mkl(self):
precs = r.install(['scipy', 'python 2.7*', 'numpy 1.7*', MatchSpec(track_features='mkl')])
self.assert_have_mkl(precs, ('numpy', 'scipy'))
dist_strs = [prec.dist_str() for prec in precs]
- assert 'channel-1::scipy-0.12.0-np17py27_p0' in dist_strs
+ assert add_subdir('channel-1::scipy-0.12.0-np17py27_p0') in dist_strs
def test_anaconda_nomkl(self):
precs = r.install(['anaconda 1.5.0', 'python 2.7*', 'numpy 1.7*'])
assert len(precs) == 107
dist_strs = [prec.dist_str() for prec in precs]
- assert 'channel-1::scipy-0.12.0-np17py27_0' in dist_strs
+ assert add_subdir('channel-1::scipy-0.12.0-np17py27_0') in dist_strs
def test_generate_eq_1():
@@ -140,7 +140,7 @@ def test_generate_eq_1():
eqb = {key: value for key, value in iteritems(eqb)}
eqt = {key: value for key, value in iteritems(eqt)}
assert eqc == {}
- assert eqv == {
+ assert eqv == add_subdir_to_iter({
'channel-1::anaconda-1.4.0-np15py27_0': 1,
'channel-1::anaconda-1.4.0-np16py27_0': 1,
'channel-1::anaconda-1.4.0-np17py27_0': 1,
@@ -215,8 +215,8 @@ def test_generate_eq_1():
'channel-1::xlrd-0.9.0-py27_0': 1,
'channel-1::xlrd-0.9.0-py33_0': 1,
'channel-1::xlwt-0.7.4-py27_0': 1
- }
- assert eqb == {
+ })
+ assert eqb == add_subdir_to_iter({
'channel-1::cubes-0.10.2-py27_0': 1,
'channel-1::dateutil-2.1-py27_0': 1,
'channel-1::dateutil-2.1-py33_0': 1,
@@ -244,7 +244,7 @@ def test_generate_eq_1():
'channel-1::theano-0.5.0-np16py27_0': 1,
'channel-1::theano-0.5.0-np17py27_0': 1,
'channel-1::zeromq-2.2.0-0': 1
- }
+ })
# No timestamps in the current data set
assert eqt == {}
@@ -254,7 +254,7 @@ def test_pseudo_boolean():
# The latest version of iopro, 1.5.0, was not built against numpy 1.5
installed = r.install(['iopro', 'python 2.7*', 'numpy 1.5*'], returnall=True)
installed = [rec.dist_str() for rec in installed]
- assert installed == [
+ assert installed == add_subdir_to_iter([
'channel-1::iopro-1.4.3-np15py27_p0',
'channel-1::numpy-1.5.1-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -265,11 +265,11 @@ def test_pseudo_boolean():
'channel-1::tk-8.5.13-0',
'channel-1::unixodbc-2.3.1-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
installed = r.install(['iopro', 'python 2.7*', 'numpy 1.5*', MatchSpec(track_features='mkl')], returnall=True)
installed = [rec.dist_str() for rec in installed]
- assert installed == [
+ assert installed == add_subdir_to_iter([
'channel-1::iopro-1.4.3-np15py27_p0',
'channel-1::mkl-rt-11.0-p0',
'channel-1::numpy-1.5.1-py27_p4',
@@ -281,14 +281,14 @@ def test_pseudo_boolean():
'channel-1::tk-8.5.13-0',
'channel-1::unixodbc-2.3.1-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_get_dists():
reduced_index = r.get_reduced_index((MatchSpec("anaconda 1.4.0"), ))
dist_strs = [prec.dist_str() for prec in reduced_index]
- assert 'channel-1::anaconda-1.4.0-np17py27_0' in dist_strs
- assert 'channel-1::freetype-2.4.10-0' in dist_strs
+ assert add_subdir('channel-1::anaconda-1.4.0-np17py27_0') in dist_strs
+ assert add_subdir('channel-1::freetype-2.4.10-0') in dist_strs
def test_get_reduced_index_unmanageable():
@@ -643,11 +643,11 @@ def test_nonexistent_deps():
index2 = {key: value for key, value in iteritems(index2)}
r = Resolve(index2)
- assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('mypackage'))) == {
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('mypackage'))) == add_subdir_to_iter({
'defaults::mypackage-1.0-py33_0',
'defaults::mypackage-1.1-py33_0',
- }
- assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('mypackage'), ))) == {
+ })
+ assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('mypackage'), ))) == add_subdir_to_iter({
'defaults::mypackage-1.1-py33_0',
'channel-1::nose-1.1.2-py33_0',
'channel-1::nose-1.2.1-py33_0',
@@ -666,12 +666,12 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- }
+ })
target_result = r.install(['mypackage'])
assert target_result == r.install(['mypackage 1.1'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::mypackage-1.1-py33_0',
'channel-1::nose-1.3.0-py33_0',
'channel-1::openssl-1.0.1c-0',
@@ -681,13 +681,13 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
assert raises(ResolvePackageNotFound, lambda: r.install(['mypackage 1.0']))
assert raises(ResolvePackageNotFound, lambda: r.install(['mypackage 1.0', 'burgertime 1.0']))
target_result = r.install(['anotherpackage 1.0'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::anotherpackage-1.0-py33_0',
'defaults::mypackage-1.1-py33_0',
'channel-1::nose-1.3.0-py33_0',
@@ -698,11 +698,11 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
target_result = r.install(['anotherpackage'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::anotherpackage-2.0-py33_0',
'defaults::mypackage-1.1-py33_0',
'channel-1::nose-1.3.0-py33_0',
@@ -713,7 +713,7 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# This time, the latest version is messed up
index3 = index.copy()
@@ -769,11 +769,12 @@ def test_nonexistent_deps():
index3 = {key: value for key, value in iteritems(index3)}
r = Resolve(index3)
- assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('mypackage'))) == {
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('mypackage'))) == add_subdir_to_iter({
'defaults::mypackage-1.0-py33_0',
'defaults::mypackage-1.1-py33_0',
- }
- assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('mypackage'), )).keys()) == {
+ })
+ assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('mypackage'), )).keys()) ==\
+ add_subdir_to_iter({
'defaults::mypackage-1.0-py33_0',
'channel-1::nose-1.1.2-py33_0',
'channel-1::nose-1.2.1-py33_0',
@@ -792,11 +793,11 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- }
+ })
target_result = r.install(['mypackage'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::mypackage-1.0-py33_0',
'channel-1::nose-1.3.0-py33_0',
'channel-1::openssl-1.0.1c-0',
@@ -806,12 +807,12 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
assert raises(ResolvePackageNotFound, lambda: r.install(['mypackage 1.1']))
target_result = r.install(['anotherpackage 1.0'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::anotherpackage-1.0-py33_0',
'defaults::mypackage-1.0-py33_0',
'channel-1::nose-1.3.0-py33_0',
@@ -822,13 +823,13 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# If recursive checking is working correctly, this will give
# anotherpackage 2.0, not anotherpackage 1.0
target_result = r.install(['anotherpackage'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::anotherpackage-2.0-py33_0',
'defaults::mypackage-1.0-py33_0',
'channel-1::nose-1.3.0-py33_0',
@@ -839,7 +840,7 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_install_package_with_feature():
@@ -929,20 +930,20 @@ def test_circular_dependencies():
index2 = {key: value for key, value in iteritems(index2)}
r = Resolve(index2)
- assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == {
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == add_subdir_to_iter({
'defaults::package1-1.0-0',
- }
- assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('package1'), )).keys()) == {
+ })
+ assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('package1'), )).keys()) == add_subdir_to_iter({
'defaults::package1-1.0-0',
'defaults::package2-1.0-0',
- }
+ })
result = r.install(['package1', 'package2'])
assert r.install(['package1']) == r.install(['package2']) == result
result = [r.dist_str() for r in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'defaults::package1-1.0-0',
'defaults::package2-1.0-0',
- ]
+ ])
def test_optional_dependencies():
@@ -987,25 +988,25 @@ def test_optional_dependencies():
index2 = {key: value for key, value in iteritems(index2)}
r = Resolve(index2)
- assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == {
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == add_subdir_to_iter({
'defaults::package1-1.0-0',
- }
- assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('package1'), )).keys()) == {
+ })
+ assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('package1'), )).keys()) == add_subdir_to_iter({
'defaults::package1-1.0-0',
'defaults::package2-2.0-0',
- }
+ })
result = r.install(['package1'])
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'defaults::package1-1.0-0',
- ]
+ ])
result = r.install(['package1', 'package2'])
assert result == r.install(['package1', 'package2 >1.0'])
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'defaults::package1-1.0-0',
'defaults::package2-2.0-0',
- ]
+ ])
assert raises(UnsatisfiableError, lambda: r.install(['package1', 'package2 <2.0']))
assert raises(UnsatisfiableError, lambda: r.install(['package1', 'package2 1.0']))
@@ -1013,7 +1014,7 @@ def test_optional_dependencies():
def test_irrational_version():
result = r.install(['pytz 2012d', 'python 3*'], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::openssl-1.0.1c-0',
'channel-1::python-3.3.2-0',
'channel-1::pytz-2012d-py33_0',
@@ -1022,14 +1023,14 @@ def test_irrational_version():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_no_features():
# Without this, there would be another solution including 'scipy-0.11.0-np16py26_p3.tar.bz2'.
result = r.install(['python 2.6*', 'numpy 1.6*', 'scipy 0.11*'], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::numpy-1.6.2-py26_4',
'channel-1::openssl-1.0.1c-0',
'channel-1::python-2.6.8-6',
@@ -1039,11 +1040,11 @@ def test_no_features():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
result = r.install(['python 2.6*', 'numpy 1.6*', 'scipy 0.11*', MatchSpec(track_features='mkl')], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::mkl-rt-11.0-p0', # This,
'channel-1::numpy-1.6.2-py26_p4', # this,
'channel-1::openssl-1.0.1c-0',
@@ -1054,7 +1055,7 @@ def test_no_features():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
index2 = index.copy()
pandas = PackageRecord(**{
@@ -1110,7 +1111,7 @@ def test_no_features():
# of the specs directly have mkl versions)
result = r2.solve(['pandas 0.12.0 np16py27_0', 'python 2.7*'], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1123,11 +1124,11 @@ def test_no_features():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
result = r2.solve(['pandas 0.12.0 np16py27_0', 'python 2.7*', MatchSpec(track_features='mkl')], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::mkl-rt-11.0-p0', # This
'channel-1::numpy-1.6.2-py27_p5', # and this are different.
@@ -1141,13 +1142,13 @@ def test_no_features():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_broken_install():
installed = r.install(['pandas', 'python 2.7*', 'numpy 1.6*'])
_installed = [rec.dist_str() for rec in installed]
- assert _installed == [
+ assert _installed == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1161,7 +1162,7 @@ def test_broken_install():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# Add an incompatible numpy; installation should be untouched
installed1 = list(installed)
@@ -1210,7 +1211,7 @@ def test_pip_depends_removed_on_inconsistent_env():
def test_remove():
installed = r.install(['pandas', 'python 2.7*'])
_installed = [rec.dist_str() for rec in installed]
- assert _installed == [
+ assert _installed == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -1224,11 +1225,11 @@ def test_remove():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
result = r.remove(['pandas'], installed=installed)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -1241,12 +1242,12 @@ def test_remove():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# Pandas requires numpy
result = r.remove(['numpy'], installed=installed)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::openssl-1.0.1c-0',
'channel-1::python-2.7.5-0',
@@ -1257,7 +1258,7 @@ def test_remove():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_channel_priority_1():
@@ -1327,7 +1328,7 @@ def test_channel_priority_2():
eqc, eqv, eqb, eqa, eqt = r2.generate_version_metrics(C, list(r2.groups.keys()))
eqc = {key: value for key, value in iteritems(eqc)}
pprint(eqc)
- assert eqc == {
+ assert eqc == add_subdir_to_iter({
'channel-4::mkl-2017.0.4-h4c4d0af_0': 1,
'channel-4::mkl-2018.0.0-hb491cac_4': 1,
'channel-4::mkl-2018.0.1-h19d6760_4': 1,
@@ -1451,10 +1452,10 @@ def test_channel_priority_2():
'channel-4::tk-8.6.7-hc745277_3': 1,
'channel-4::zlib-1.2.11-ha838bed_2': 1,
'channel-4::zlib-1.2.11-hfbfcf68_1': 1,
- }
+ })
installed_w_priority = [prec.dist_str() for prec in this_r.install(spec)]
pprint(installed_w_priority)
- assert installed_w_priority == [
+ assert installed_w_priority == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -1468,7 +1469,7 @@ def test_channel_priority_2():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# setting strict actually doesn't do anything here; just ensures it's not 'disabled'
with env_var("CONDA_CHANNEL_PRIORITY", "strict", stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1480,7 +1481,7 @@ def test_channel_priority_2():
eqc = {key: value for key, value in iteritems(eqc)}
assert eqc == {}, eqc
installed_w_strict = [prec.dist_str() for prec in this_r.install(spec)]
- assert installed_w_strict == [
+ assert installed_w_strict == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -1494,7 +1495,7 @@ def test_channel_priority_2():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ], installed_w_strict
+ ]), installed_w_strict
with env_var("CONDA_CHANNEL_PRIORITY", "False", stack_callback=conda_tests_ctxt_mgmt_def_pol):
dists = this_r.get_reduced_index(spec)
@@ -1503,7 +1504,7 @@ def test_channel_priority_2():
eqc, eqv, eqb, eqa, eqt = r2.generate_version_metrics(C, list(r2.groups.keys()))
eqc = {key: value for key, value in iteritems(eqc)}
pprint(eqc)
- assert eqc == {
+ assert eqc == add_subdir_to_iter({
'channel-1::dateutil-1.5-py27_0': 1,
'channel-1::mkl-10.3-0': 6,
'channel-1::mkl-10.3-p1': 6,
@@ -1757,10 +1758,10 @@ def test_channel_priority_2():
'channel-4::sqlite-3.21.0-h1bed415_2': 3,
'channel-4::sqlite-3.22.0-h1bed415_0': 2,
'channel-4::sqlite-3.23.1-he433501_0': 1,
- }
+ })
installed_wo_priority = set([prec.dist_str() for prec in this_r.install(spec)])
pprint(installed_wo_priority)
- assert installed_wo_priority == {
+ assert installed_wo_priority == add_subdir_to_iter({
'channel-4::blas-1.0-mkl',
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::intel-openmp-2018.0.3-0',
@@ -1785,7 +1786,7 @@ def test_channel_priority_2():
'channel-4::sqlite-3.24.0-h84994c4_0',
'channel-4::tk-8.6.7-hc745277_3',
'channel-4::zlib-1.2.11-ha838bed_2',
- }
+ })
def test_dependency_sort():
@@ -1794,7 +1795,7 @@ def test_dependency_sort():
must_have = {prec.name: prec for prec in installed}
installed = r.dependency_sort(must_have)
- results_should_be = [
+ results_should_be = add_subdir_to_iter([
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1808,7 +1809,7 @@ def test_dependency_sort():
'channel-1::dateutil-2.1-py27_1',
'channel-1::scipy-0.12.0-np16py27_0',
'channel-1::pandas-0.11.0-np16py27_1'
- ]
+ ])
assert len(installed) == len(results_should_be)
assert [prec.dist_str() for prec in installed] == results_should_be
@@ -1816,7 +1817,7 @@ def test_dependency_sort():
def test_update_deps():
installed = r.install(['python 2.7*', 'numpy 1.6*', 'pandas 0.10.1'])
result = [rec.dist_str() for rec in installed]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1829,14 +1830,14 @@ def test_update_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# scipy, and pandas should all be updated here. pytz is a new
# dependency of pandas. But numpy does not _need_ to be updated
# to get the latest version of pandas, so it stays put.
result = r.install(['pandas', 'python 2.7*'], installed=installed, update_deps=True, returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1850,13 +1851,13 @@ def test_update_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# pandas should be updated here. However, it's going to try to not update
# scipy, so it won't be updated to the latest version (0.11.0).
result = r.install(['pandas', 'python 2.7*'], installed=installed, update_deps=False, returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1869,7 +1870,7 @@ def test_update_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_surplus_features_1():
@@ -2048,6 +2049,51 @@ def test_get_reduced_index_broadening_preferred_solution():
assert d.version == '2.5', "bottom version should be 2.5, but is {}".format(d.version)
+def test_arch_preferred_when_otherwise_identical_dependencies():
+ index2 = index.copy()
+ package1_noarch = PackageRecord(**{
+ "channel": "defaults",
+ "subdir": "noarch",
+ "md5": "0123456789",
+ "fn": "doesnt-matter-here",
+ 'build': '0',
+ 'build_number': 0,
+ 'depends': [],
+ 'name': 'package1',
+ 'requires': [],
+ 'version': '1.0',
+ })
+ index2[package1_noarch] = package1_noarch
+ package1_linux64 = PackageRecord(**{
+ "channel": "defaults",
+ "subdir": context.subdir,
+ "md5": "0123456789",
+ "fn": "doesnt-matter-here",
+ 'build': '0',
+ 'build_number': 0,
+ 'depends': [],
+ 'name': 'package1',
+ 'requires': [],
+ 'version': '1.0',
+ })
+ index2[package1_linux64] = package1_linux64
+ index2 = {key: value for key, value in iteritems(index2)}
+ r = Resolve(index2)
+
+ matches = r.find_matches(MatchSpec('package1'))
+ assert len(matches) == 2
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == {
+ 'defaults/noarch::package1-1.0-0',
+ add_subdir('defaults::package1-1.0-0')
+ }
+
+ result = r.install(['package1'])
+ result = [rec.dist_str() for rec in result]
+ assert result == [
+ add_subdir('defaults::package1-1.0-0'),
+ ]
+
+
def test_arch_preferred_over_noarch_when_otherwise_equal():
index = (
PackageRecord(**{
| conda 4.6.x and conda 4.7.x not able to resolve identical package in different subdirectories
Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
The following happens:
```
[root@596ad8f0842a /]# conda create -n conda-env --dry-run -- test-package
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package pandas conflicts for:
test-package -> pandas
Package typing conflicts for:
test-package -> typing
Package libffi conflicts for:
test-package -> libffi[version='>=3.2.1,<4.0a0']
Package pyyaml conflicts for:
test-package -> pyyaml
Package six conflicts for:
test-package -> six[version='>=1.12.0']
Package py4j conflicts for:
test-package -> py4j
Package icu conflicts for:
test-package -> icu
Package wrapt conflicts for:
test-package -> wrapt
Package pytz conflicts for:
test-package -> pytz
Package python conflicts for:
test-package -> python[version='>=2.7.14']
Package pyarrow conflicts for:
test-package -> pyarrow
Package matplotlib conflicts for:
test-package -> matplotlib[version='>=2.0.2,<2.3.0']
```
Also observed on conda 4.6.14
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
1. Create a conda repository `test-channel` with the following set up
2. In /linux-64/repodata.json
```
{
"info": {
"subdir": "linux-64"
},
"packages": {
"test-package-4.2.1-py_0.tar.bz2": {
"build": "py_0",
"build_number": 0,
"depends": [
"icu",
"libffi >=3.2.1,<4.0a0",
"matplotlib >=2.0.2,<2.3.0",
"pandas",
"py4j",
"pyarrow",
"python >=2.7.14",
"pytz",
"pyyaml",
"six >=1.12.0",
"typing",
"wrapt"
],
"md5": "1512a7e9a56ecb8523475c891bfa6657",
"name": "test-package",
"noarch": "python",
"sha256": "3c02f947500c13ceb8e8aa38db2af43e9017c4948905d0cbd1610185318fe7d9",
"size": 30098,
"subdir": "noarch",
"timestamp": 1565634321434,
"version": "4.2.1"
}
},
"removed": [],
"repodata_version": 1
}
```
3. In /noarch/repodata.json
```
{
"info": {
"subdir": "noarch"
},
"packages": {
"test-package-4.2.1-py_0.tar.bz2": {
"build": "py_0",
"build_number": 0,
"depends": [
"icu",
"libffi >=3.2.1,<4.0a0",
"matplotlib >=2.0.2,<2.3.0",
"pandas",
"py4j",
"pyarrow",
"python >=2.7.14",
"pytz",
"pyyaml",
"six >=1.12.0",
"typing",
"wrapt"
],
"md5": "1512a7e9a56ecb8523475c891bfa6657",
"name": "test-package",
"noarch": "python",
"sha256": "3c02f947500c13ceb8e8aa38db2af43e9017c4948905d0cbd1610185318fe7d9",
"size": 30098,
"subdir": "noarch",
"timestamp": 1565634321434,
"version": "4.2.1"
}
},
"removed": [],
"repodata_version": 1
}
```
3. Set up conda to only point to the test-channel, note I see this error on `--dry-run` so I did not populate the test-channel with the actual packages.
4. Run `conda create -n conda-env --dry-run -- test-package`
## Expected Behavior
<!-- What do you think should happen? -->
Previously, in conda 4.5.x, there was no issue with resolving packages like this.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
[root@596ad8f0842a /]# conda info
active environment : None
user config file : /root/.condarc
populated config files : /root/.condarc
/condarc
conda version : 4.7.10
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : /miniconda (writable)
channel URLs : file://test-channel/asset/conda/linux-64
file://test-channel/asset/conda/noarch
package cache : /miniconda/pkgs
/root/.conda/pkgs
envs directories : /miniconda/envs
/root/.conda/envs
platform : linux-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Linux/4.9.184-linuxkit centos/6.10 glibc/2.12
UID:GID : 0:0
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
[root@596ad8f0842a /]# conda config --show-sources
==> /root/.condarc <==
channel_priority: disabled
channels:
- file://test-channel/asset/conda/
repodata_fns:
- repodata.json
use_only_tar_bz2: False
==> /condarc <==
channels: []
default_channels: []
```
</p></details>
Note I attempted to remove current_repodata.json from being considered, but this is 4.7.10 before the config value is apparently respected.
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
[root@596ad8f0842a /]# conda list --show-channel-urls
# packages in environment at /miniconda:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main https://repo.anaconda.com/pkgs/main
asn1crypto 0.24.0 py37_0 https://repo.anaconda.com/pkgs/main
bzip2 1.0.8 h7b6447c_0 https://repo.anaconda.com/pkgs/main
ca-certificates 2019.5.15 0 https://repo.anaconda.com/pkgs/main
certifi 2019.6.16 py37_0 https://repo.anaconda.com/pkgs/main
cffi 1.12.3 py37h2e261b9_0 https://repo.anaconda.com/pkgs/main
chardet 3.0.4 py37_1 https://repo.anaconda.com/pkgs/main
conda 4.7.10 py37_0 https://repo.anaconda.com/pkgs/main
conda-package-handling 1.3.11 py37_0 https://repo.anaconda.com/pkgs/main
cryptography 2.7 py37h1ba5d50_0 https://repo.anaconda.com/pkgs/main
idna 2.8 py37_0 https://repo.anaconda.com/pkgs/main
libarchive 3.3.3 h5d8350f_5 https://repo.anaconda.com/pkgs/main
libedit 3.1.20181209 hc058e9b_0 https://repo.anaconda.com/pkgs/main
libffi 3.2.1 hd88cf55_4 https://repo.anaconda.com/pkgs/main
libgcc-ng 9.1.0 hdf63c60_0 https://repo.anaconda.com/pkgs/main
libstdcxx-ng 9.1.0 hdf63c60_0 https://repo.anaconda.com/pkgs/main
libxml2 2.9.9 hea5a465_1 https://repo.anaconda.com/pkgs/main
lz4-c 1.8.1.2 h14c3975_0 https://repo.anaconda.com/pkgs/main
lzo 2.10 h49e0be7_2 https://repo.anaconda.com/pkgs/main
ncurses 6.1 he6710b0_1 https://repo.anaconda.com/pkgs/main
openssl 1.1.1c h7b6447c_1 https://repo.anaconda.com/pkgs/main
pip 19.1.1 py37_0 https://repo.anaconda.com/pkgs/main
pycosat 0.6.3 py37h14c3975_0 https://repo.anaconda.com/pkgs/main
pycparser 2.19 py37_0 https://repo.anaconda.com/pkgs/main
pyopenssl 19.0.0 py37_0 https://repo.anaconda.com/pkgs/main
pysocks 1.7.0 py37_0 https://repo.anaconda.com/pkgs/main
python 3.7.3 h0371630_0 https://repo.anaconda.com/pkgs/main
python-libarchive-c 2.8 py37_11 https://repo.anaconda.com/pkgs/main
readline 7.0 h7b6447c_5 https://repo.anaconda.com/pkgs/main
requests 2.22.0 py37_0 https://repo.anaconda.com/pkgs/main
ruamel_yaml 0.15.46 py37h14c3975_0 https://repo.anaconda.com/pkgs/main
setuptools 41.0.1 py37_0 https://repo.anaconda.com/pkgs/main
six 1.12.0 py37_0 https://repo.anaconda.com/pkgs/main
sqlite 3.29.0 h7b6447c_0 https://repo.anaconda.com/pkgs/main
tk 8.6.8 hbc83047_0 https://repo.anaconda.com/pkgs/main
tqdm 4.32.1 py_0 https://repo.anaconda.com/pkgs/main
urllib3 1.24.2 py37_0 https://repo.anaconda.com/pkgs/main
wheel 0.33.4 py37_0 https://repo.anaconda.com/pkgs/main
xz 5.2.4 h14c3975_4 https://repo.anaconda.com/pkgs/main
yaml 0.1.7 had09818_2 https://repo.anaconda.com/pkgs/main
zlib 1.2.11 h7b6447c_3 https://repo.anaconda.com/pkgs/main
zstd 1.3.7 h0b5b093_0 https://repo.anaconda.com/pkgs/main
```
</p></details>
| Key question: is this expected behavior for packages that have an identical noarch and linux-64 builds?
Additional note: if I remove the repodata entry for either `linux-64` or `noarch` subdir, but not the other, then the command succeeds
This is likely similar to #8302 which was partially fixed in #8938. Packages from different subdirs with the same name will also have the same channel which causes conda to consider than as the same package.
For the time being it is best to not have packages with identical names in `noarch` and another subdir. This is not the intended behavior, the solver should treat these are two separate packages.
To add a data point, I'm seeing this on another `conda create` but this time it doesn't seem to be an issue with any packages that I can control, but somewhere in public channels. Is there a suggested way to narrow down where this is coming from?
@jjhelmus do you have any initial thoughts on how to fix the issue within conda? Happy to take a stab at contributing and testing a patch for this edge case. | 2019-09-19T18:10:39 |
conda/conda | 9,284 | conda__conda-9284 | [
"9283"
] | 700b23fe2b96cc6089f09295e85a0a4673d43797 | diff --git a/conda/core/initialize.py b/conda/core/initialize.py
--- a/conda/core/initialize.py
+++ b/conda/core/initialize.py
@@ -1233,7 +1233,7 @@ def _bashrc_content(conda_prefix, shell):
if ( -f "%(conda_prefix)s/etc/profile.d/conda.csh" ) then
source "%(conda_prefix)s/etc/profile.d/conda.csh"
else
- setenv PATH="%(conda_bin)s:$PATH"
+ setenv PATH "%(conda_bin)s:$PATH"
endif
# <<< conda initialize <<<
""") % {
| Incorrect use of csh setenv in conda init
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
The following was appended to `~/.tcshrc` (`...` indicates the path to conda):
```
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
if ( -f ".../etc/profile.d/conda.csh" ) then
source ".../etc/profile.d/conda.csh"
else
setenv PATH=".../bin:$PATH"
endif
# <<< conda initialize <<<
```
The responsible line is here: https://github.com/conda/conda/blob/master/conda/core/initialize.py#L1236
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
conda init tcsh
```
## Expected Behavior
<!-- What do you think should happen? -->
`setenv PATH=` is incorrect. A space should be used instead of an equal sign. Logging in on a system where `conda.csh` doesn't exist produces this error message:
```
setenv: Variable name must contain alphanumeric characters.
```
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
shell level : 0
user config file : /home/andreasg/.condarc
populated config files :
conda version : 4.7.12
conda-build version : not installed
python version : 3.6.7.final.0
virtual packages : __cuda=10.2
base environment : /opt/jupyterhub/miniconda3 (read only)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/jupyterhub/miniconda3/pkgs
/home/andreasg/.conda/pkgs
envs directories : /home/andreasg/.conda/envs
/opt/jupyterhub/miniconda3/envs
platform : linux-64
user-agent : conda/4.7.12 requests/2.22.0 CPython/3.6.7 Linux/4.15.0-60-generic ubuntu/18.04.3 glibc/2.27
UID:GID : 10094:10000
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
```
</p></details>
| @andreasg123 thanks for the detailed description and solution! Since you've done most of the work already you are more than welcome to submit a PR to fix the problem. This is probably the fastest way to get your fix in, and also you'll get more visible credit for your work. If you are too swamped to submit a PR, that's fine too, we'll get to it eventually, though no promises about when eventually is :/ | 2019-09-25T22:26:58 |
|
conda/conda | 9,381 | conda__conda-9381 | [
"8386"
] | 63c9c1cc27fe6380278554c830f5dbf0153e77df | diff --git a/conda/cli/main_run.py b/conda/cli/main_run.py
--- a/conda/cli/main_run.py
+++ b/conda/cli/main_run.py
@@ -3,7 +3,7 @@
from logging import getLogger
import os
-from subprocess import PIPE, Popen
+from subprocess import Popen
import sys
from ..base.context import context
@@ -22,21 +22,13 @@ def execute(args, parser):
script_caller, command_args = wrap_subprocess_call(on_win, context.root_prefix, prefix,
args.dev, args.debug_wrapper_scripts, call)
env = encode_environment(os.environ.copy())
- process = Popen(command_args, universal_newlines=False, stdout=PIPE, stderr=PIPE,
+ process = Popen(command_args, universal_newlines=False,
env=env, cwd=cwd)
- stdout, stderr = process.communicate()
- if hasattr(stdout, "decode"):
- stdout = stdout.decode('utf-8', errors='replace')
- if hasattr(stderr, "decode"):
- stderr = stderr.decode('utf-8', errors='replace')
- if stdout:
- sys.stdout.write(stdout)
- if stderr:
- sys.stderr.write(stderr)
+ process.wait()
if process.returncode != 0:
log = getLogger(__name__)
- log.error("Subprocess for 'conda run {}' command failed. Stderr was:\n{}"
- .format(call, stderr))
+ log.error("Subprocess for 'conda run {}' command failed. (See above for error)"
+ .format(call))
if script_caller is not None:
if 'CONDA_TEST_SAVE_TEMPS' not in os.environ:
rm_rf(script_caller)
diff --git a/conda/core/index.py b/conda/core/index.py
--- a/conda/core/index.py
+++ b/conda/core/index.py
@@ -15,7 +15,6 @@
from ..base.context import context
from ..common.compat import itervalues
from ..common.io import ThreadLimitedThreadPoolExecutor, time_recorder
-from ..common._os.linux import linux_get_libc_version
from ..exceptions import ChannelNotAllowed, InvalidSpec
from ..gateways.logging import initialize_logging
from ..models.channel import Channel, all_channel_urls
| conda run swallows stderr output
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
If the command executed with `conda run` prints something to stderr, that output is not shown. If it prints a lot, then it freezes.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
First, create `test.py` with the following contents:
```python
import sys
print('x' * int(sys.argv[1]), file=sys.stderr)
```
Then:
```
>conda run -n base python test.py 1
[nothing is printed]
>conda run -n base python test.py 10000
[nothing is printed _and_ the command freezes]
```
## Expected Behavior
<!-- What do you think should happen? -->
All stderr output from the command should be passed unaltered to `conda`'s own stderr.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : base
active env location : C:\Users\[redacted]\AppData\Local\Continuum\miniconda3
shell level : 1
user config file : C:\Users\[redacted]\.condarc
populated config files :
conda version : 4.6.7
conda-build version : not installed
python version : 3.7.1.final.0
base environment : C:\Users\[redacted]\AppData\Local\Continuum\miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\[redacted]\AppData\Local\Continuum\miniconda3\pkgs
C:\Users\[redacted]\.conda\pkgs
C:\Users\[redacted]\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\[redacted]\AppData\Local\Continuum\miniconda3\envs
C:\Users\[redacted]\.conda\envs
C:\Users\[redacted]\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.6.7 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.16299
administrator : False
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at C:\Users\[redacted]\AppData\Local\Continuum\miniconda3:
#
# Name Version Build Channel
asn1crypto 0.24.0 py37_0 defaults
ca-certificates 2019.1.23 0 defaults
certifi 2018.11.29 py37_0 defaults
cffi 1.11.5 py37h74b6da3_1 defaults
chardet 3.0.4 py37_1 defaults
conda 4.6.7 py37_0 defaults
conda-env 2.6.0 1 defaults
console_shortcut 0.1.1 3 defaults
cryptography 2.4.2 py37h7a1dbc1_0 defaults
idna 2.8 py37_0 defaults
menuinst 1.4.14 py37hfa6e2cd_0 defaults
openssl 1.1.1b he774522_0 defaults
pip 18.1 py37_0 defaults
pycosat 0.6.3 py37hfa6e2cd_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 18.0.0 py37_0 defaults
pysocks 1.6.8 py37_0 defaults
python 3.7.1 h8c8aaf0_6 defaults
pywin32 223 py37hfa6e2cd_1 defaults
requests 2.21.0 py37_0 defaults
ruamel_yaml 0.15.46 py37hfa6e2cd_0 defaults
setuptools 40.6.3 py37_0 defaults
six 1.12.0 py37_0 defaults
sqlite 3.26.0 he774522_0 defaults
urllib3 1.24.1 py37_0 defaults
vc 14.1 h0510ff6_4 defaults
vs2015_runtime 14.15.26706 h3a45250_0 defaults
wheel 0.32.3 py37_0 defaults
win_inet_pton 1.0.1 py37_1 defaults
wincertstore 0.2 py37_0 defaults
yaml 0.1.7 hc54c509_2 defaults
```
</p></details>
| This is especially annoying since some CLIs rely on the user gathering information from stdout.
For instance `bokeh/panel serve plot.ipynb` relies on the user getting the output that tells them which url to use to find their app.
```
(sample) ➜ ~ panel serve plot.ipynb
2019-09-04 13:40:39,793 Starting Bokeh server version 1.3.4 (running on Tornado 6.0.3)
2019-09-04 13:40:39,797 Bokeh app running at: http://localhost:5006/plot
2019-09-04 13:40:39,797 Starting Bokeh server with process id: 95442
```
conda run is an unfinished feature. We claim it to be beta, but I'd call it pre-alpha. PRs to finish it would be gratefully reviewed.
It needs (at least, IMHO):
1. Choice of spawn vs execve invocation (config option to set the default?)
2. A thread to process stdin (at all) and stderr and stdout (properly).
Understood. I just learned about it yesterday when we were talking about anaconda-project which tries to solve a lot of the same problems.
Maybe we can steal some of your code then? :-) Does anaconda-project address the stdin problem at all?
It doesn't address stdin no. It has a different approach, where all your commands are declared in a config file.
conda run would be a great command to have! Currently this is still an issue. :-(
It seems that conda run has been written with the unix philosophy to hide all the stdout and only squark if there's an error, but the performance cost of using communicate() seems a high price for this. Users running a command would probably be keen to see its std out.
Rather than capturing the stdsout and stderr via communicate() with the associated performace ramifications, why not just leave off the stdout, stderr settings on Popen and let them be piped straight into the parent process' stdout and stderr.
The only place the captured information is used in main_run.py is here:
```
if process.returncode != 0:
log = getLogger(__name__)
log.error("Subprocess for 'conda run {}' command failed. Stderr was:\n{}"
.format(call, stderr))
```
If the stdout and stderr aren't specified and thus default to passing through then there's no need for this and we can amend to:
```
if process.returncode != 0:
log = getLogger(__name__)
log.error("Subprocess for 'conda run {}' command failed. (See above for error details)\n{}"
.format(call, stderr))
``` | 2019-10-27T21:33:48 |
|
conda/conda | 9,385 | conda__conda-9385 | [
"8028"
] | 216b1c126b0f460694f9f97edc4fafcd4ecf472b | diff --git a/conda/core/subdir_data.py b/conda/core/subdir_data.py
--- a/conda/core/subdir_data.py
+++ b/conda/core/subdir_data.py
@@ -22,12 +22,13 @@
from .. import CondaError
from .._vendor.auxlib.ish import dals
from .._vendor.auxlib.logz import stringify
-from .._vendor.toolz import concat, take
+from .._vendor.boltons.setutils import IndexedSet
+from .._vendor.toolz import concat, take, groupby
from ..base.constants import CONDA_HOMEPAGE_URL, CONDA_PACKAGE_EXTENSION_V1, REPODATA_FN
from ..base.context import context
from ..common.compat import (ensure_binary, ensure_text_type, ensure_unicode, iteritems, iterkeys,
string_types, text_type, with_metaclass)
-from ..common.io import ThreadLimitedThreadPoolExecutor, DummyExecutor
+from ..common.io import ThreadLimitedThreadPoolExecutor, DummyExecutor, dashlist
from ..common.url import join_url, maybe_unquote
from ..core.package_cache_data import PackageCacheData
from ..exceptions import (CondaDependencyError, CondaHTTPError, CondaUpgradeError,
@@ -85,6 +86,13 @@ def query_all(package_ref_or_match_spec, channels=None, subdirs=None,
if subdirs is None:
subdirs = context.subdirs
channel_urls = all_channel_urls(channels, subdirs=subdirs)
+ if context.offline:
+ grouped_urls = groupby(lambda url: url.startswith('file://'), channel_urls)
+ ignored_urls = grouped_urls.get(False, ())
+ if ignored_urls:
+ log.info("Ignoring the following channel urls because mode is offline.%s",
+ dashlist(ignored_urls))
+ channel_urls = IndexedSet(grouped_urls.get(True, ()))
check_whitelist(channel_urls)
subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
package_ref_or_match_spec))
| diff --git a/tests/core/test_subdir_data.py b/tests/core/test_subdir_data.py
--- a/tests/core/test_subdir_data.py
+++ b/tests/core/test_subdir_data.py
@@ -66,6 +66,14 @@ def test_get_index_no_platform_with_offline_cache(self):
assert all(index3.get(k) == rec for k, rec in iteritems(index))
assert unknown or len(index) == len(index3)
+ def test_subdir_data_context_offline(self):
+ with env_var('CONDA_OFFLINE', 'yes', stack_callback=conda_tests_ctxt_mgmt_def_pol):
+ local_channel = Channel(join(dirname(__file__), "..", "data", "conda_format_repo", context.subdir))
+ sd = SubdirData(channel=local_channel)
+ assert len(sd.query_all('zlib', channels=[local_channel])) > 0
+ assert len(sd.query_all('zlib')) == 0
+ assert len(sd.query_all('zlib')) > 1
+
class StaticFunctionTests(TestCase):
| conda install --offline still need net connection
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
Dear all,
I want update anaconda in a offline mechine, I rsync /pkgs files and use commend,
conda update --all --offline
returns some errors:
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://repo.continuum.io/pkgs/free/linux-64/blas-1.0-mkl.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://repo.continuum.io/pkgs/free/linux-64/blas-1.0-mkl.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://repo.continuum.io/pkgs/free/linux-64/blas-1.0-mkl.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
here is detail log
[log.txt](https://github.com/conda/conda/files/2665227/log.txt)
Thanks.
```
## Expected Behavior
<!-- What do you think should happen? -->
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
Current conda install:
platform : linux-64
conda version : 4.3.22
conda is private : False
conda-env version : 4.3.22
conda-build version : 3.0.3
python version : 3.5.3.final.0
requests version : 2.14.2
root environment : /home/zhangji/python/anaconda3 (writable)
default environment : /home/zhangji/python/anaconda3
envs directories : /home/zhangji/python/anaconda3/envs
/home/zhangji/.conda/envs
package cache : /home/zhangji/python/anaconda3/pkgs
/home/zhangji/.conda/pkgs
channel URLs : https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/linux-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
config file : None
netrc file : None
offline mode : False
user-agent : conda/4.3.22 requests/2.14.2 CPython/3.5.3 Linux/2.6.32-504.el6.x86_64 CentOS/6.6 glibc/2.12
UID:GID : 526:507
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /home/zhangji/python/anaconda3:
#
_license 1.1 py35_1 defaults
alabaster 0.7.10 py35_0 defaults
anaconda custom py35_0 defaults
anaconda-client 1.6.3 py35_0 defaults
anaconda-navigator 1.6.3 py35_0 defaults
anaconda-project 0.6.0 py35_0 defaults
argcomplete 1.0.0 py35_1 defaults
asn1crypto 0.22.0 py35_0 defaults
astroid 1.4.9 py35_0 defaults
astropy 2.0 np112py35_0 defaults
babel 2.4.0 py35_0 defaults
backports 1.0 py35_0 defaults
beautifulsoup4 4.6.0 py35_0 defaults
bitarray 0.8.1 py35_0 defaults
bkcharts 0.2 py35_0 defaults
blaze 0.10.1 py35_0 defaults
bleach 1.5.0 py35_0 defaults
bokeh 0.12.6 py35_0 defaults
boto 2.47.0 py35_0 defaults
bottleneck 1.2.1 np112py35_0 defaults
Bratu3D 0.0.0 <pip>
cairo 1.14.8 0 defaults
cffi 1.10.0 py35_0 defaults
chardet 3.0.4 py35_0 defaults
chest 0.2.3 py35_0 defaults
click 6.7 py35_0 defaults
cloudpickle 0.2.2 py35_0 defaults
clyent 1.2.2 py35_0 defaults
colorama 0.3.9 py35_0 defaults
conda 4.3.22 py35_0 defaults
conda-build 3.0.3 py35_0 defaults
conda-env 2.6.0 0 defaults
conda-manager 0.4.0 py35_0 defaults
conda-verify 2.0.0 py35_0 defaults
configobj 5.0.6 py35_0 defaults
contextlib2 0.5.5 py35_0 defaults
cryptography 1.8.1 py35_0 defaults
curl 7.52.1 0 defaults
cycler 0.10.0 py35_0 defaults
cython 0.25.2 py35_0 defaults
cytoolz 0.8.2 py35_0 defaults
dask 0.15.0 py35_0 defaults
datashape 0.5.4 py35_0 defaults
dbus 1.10.20 0 defaults
decorator 4.0.11 py35_0 defaults
dill 0.2.6 py35_0 defaults
distributed 1.17.1 py35_0 defaults
docutils 0.13.1 py35_0 defaults
dynd-python 0.7.2 py35_0 defaults
entrypoints 0.2.3 py35_0 defaults
et_xmlfile 1.0.1 py35_0 defaults
evtk 1.0.0 <pip>
expat 2.1.0 0 defaults
fastcache 1.0.2 py35_1 defaults
filelock 2.0.7 py35_0 defaults
flask 0.12.2 py35_0 defaults
flask-cors 3.0.2 py35_0 defaults
fontconfig 2.12.1 3 defaults
freetype 2.5.5 2 defaults
get_terminal_size 1.0.0 py35_0 defaults
gevent 1.2.2 py35_0 defaults
glib 2.50.2 1 defaults
glob2 0.5 py35_0 defaults
greenlet 0.4.12 py35_0 defaults
gst-plugins-base 1.8.0 0 defaults
gstreamer 1.8.0 0 defaults
h5py 2.7.0 np112py35_0 defaults
harfbuzz 0.9.39 2 defaults
hdf5 1.8.17 2 defaults
heapdict 1.0.0 py35_1 defaults
html5lib 0.999 py35_0 defaults
icu 54.1 0 defaults
idna 2.5 py35_0 defaults
imagesize 0.7.1 py35_0 defaults
ipykernel 4.6.1 py35_0 defaults
ipython 6.1.0 py35_0 defaults
ipython_genutils 0.2.0 py35_0 defaults
ipywidgets 6.0.0 py35_0 defaults
isort 4.2.15 py35_0 defaults
itsdangerous 0.24 py35_0 defaults
jbig 2.1 0 defaults
jdcal 1.3 py35_0 defaults
jedi 0.10.2 py35_2 defaults
jinja2 2.9.6 py35_0 defaults
joblib 0.11 <pip>
jpeg 9b 0 defaults
jsonschema 2.6.0 py35_0 defaults
jupyter 1.0.0 py35_3 defaults
jupyter_client 5.1.0 py35_0 defaults
jupyter_console 5.1.0 py35_0 defaults
jupyter_core 4.3.0 py35_0 defaults
lazy-object-proxy 1.3.1 py35_0 defaults
libdynd 0.7.2 0 defaults
libffi 3.2.1 1 defaults
libgcc 5.2.0 0 defaults
libgfortran 3.0.0 1 defaults
libiconv 1.14 0 defaults
libpng 1.6.27 0 defaults
libprotobuf 3.2.0 0 defaults
libsodium 1.0.10 0 defaults
libtiff 4.0.6 3 defaults
libtool 2.4.2 0 defaults
libxcb 1.12 1 defaults
libxml2 2.9.4 0 defaults
libxslt 1.1.29 0 defaults
llvmlite 0.18.0 py35_0 defaults
locket 0.2.0 py35_1 defaults
lxml 3.8.0 py35_0 defaults
markupsafe 0.23 py35_2 defaults
matplotlib 2.0.2 np112py35_0 defaults
mistune 0.7.4 py35_0 defaults
mkl 2017.0.3 0 defaults
mkl-service 1.1.2 py35_3 defaults
mpi4py 2.0.0 <pip>
mpmath 0.19 py35_1 defaults
msgpack-python 0.4.8 py35_0 defaults
multipledispatch 0.4.9 py35_0 defaults
navigator-updater 0.1.0 py35_0 defaults
nbconvert 5.2.1 py35_0 defaults
nbformat 4.3.0 py35_0 defaults
networkx 1.11 py35_0 defaults
nltk 3.2.4 py35_0 defaults
nose 1.3.7 py35_1 defaults
notebook 5.0.0 py35_0 defaults
numba 0.33.0 np112py35_0 defaults
numexpr 2.6.2 np112py35_0 defaults
numpy 1.12.1 py35_0 defaults
numpydoc 0.6.0 py35_0 defaults
odo 0.5.0 py35_1 defaults
olefile 0.44 py35_0 defaults
openpyxl 2.4.7 py35_0 defaults
openssl 1.0.2l 0 defaults
packaging 16.8 py35_0 defaults
pandas 0.20.2 np112py35_0 defaults
pandocfilters 1.4.1 py35_0 defaults
pango 1.40.3 1 defaults
partd 0.3.8 py35_0 defaults
patchelf 0.9 0 defaults
path.py 10.3.1 py35_0 defaults
pathlib2 2.2.1 py35_0 defaults
patsy 0.4.1 py35_0 defaults
pcre 8.39 1 defaults
pep8 1.7.0 py35_0 defaults
petsc4py 3.7.0 <pip>
pexpect 4.2.1 py35_0 defaults
pickleshare 0.7.4 py35_0 defaults
pillow 4.2.1 py35_0 defaults
pip 9.0.1 py35_1 defaults
pixman 0.34.0 0 defaults
pkginfo 1.4.1 py35_0 defaults
ply 3.10 py35_0 defaults
prompt_toolkit 1.0.14 py35_0 defaults
protobuf 3.2.0 py35_0 defaults
psutil 5.2.2 py35_0 defaults
ptyprocess 0.5.1 py35_0 defaults
py 1.4.34 py35_0 defaults
pyasn1 0.2.3 py35_0 defaults
pycosat 0.6.2 py35_0 defaults
pycparser 2.17 py35_0 defaults
pycrypto 2.6.1 py35_6 defaults
pycurl 7.43.0 py35_2 defaults
pyflakes 1.5.0 py35_0 defaults
pygments 2.2.0 py35_0 defaults
pylint 1.6.4 py35_1 defaults
pyodbc 4.0.17 py35_0 defaults
pyopenssl 17.0.0 py35_0 defaults
pyparsing 2.1.4 py35_0 defaults
pyqt 5.6.0 py35_2 defaults
pytables 3.3.0 np112py35_0 defaults
pytest 3.1.2 py35_0 defaults
python 3.5.3 1 defaults
python-dateutil 2.6.0 py35_0 defaults
pytz 2017.2 py35_0 defaults
PyVTK 0.5.18 <pip>
pywavelets 0.5.2 np112py35_0 defaults
pyyaml 3.12 py35_0 defaults
pyzmq 16.0.2 py35_0 defaults
qt 5.6.2 4 defaults
qtawesome 0.4.4 py35_0 defaults
qtconsole 4.3.0 py35_0 defaults
qtpy 1.2.1 py35_0 defaults
readline 6.2 2 defaults
redis 3.2.0 0 defaults
redis-py 2.10.5 py35_0 defaults
requests 2.14.2 py35_0 defaults
rope 0.9.4 py35_1 defaults
ruamel_yaml 0.11.14 py35_1 defaults
scikit-image 0.13.0 np112py35_0 defaults
scikit-learn 0.18.2 np112py35_0 defaults
scipy 0.19.1 np112py35_0 defaults
seaborn 0.7.1 py35_0 defaults
setuptools 27.2.0 py35_0 defaults
simplegeneric 0.8.1 py35_1 defaults
singledispatch 3.4.0.3 py35_0 defaults
sip 4.18 py35_0 defaults
six 1.10.0 py35_0 defaults
snowballstemmer 1.2.1 py35_0 defaults
sockjs-tornado 1.0.3 py35_0 defaults
sortedcollections 0.5.3 py35_0 defaults
sortedcontainers 1.5.7 py35_0 defaults
sphinx 1.6.2 py35_0 defaults
sphinx_rtd_theme 0.2.4 py35_0 defaults
sphinxcontrib 1.0 py35_0 defaults
sphinxcontrib-websupport 1.0.1 py35_0 defaults
spyder 3.1.4 py35_0 defaults
sqlalchemy 1.1.11 py35_0 defaults
sqlite 3.13.0 0 defaults
statsmodels 0.8.0 np112py35_0 defaults
sympy 1.1 py35_0 defaults
tblib 1.3.2 py35_0 defaults
tensorflow 1.1.0 np112py35_0 defaults
terminado 0.6 py35_0 defaults
testpath 0.3.1 py35_0 defaults
tk 8.5.18 0 defaults
toolz 0.8.2 py35_0 defaults
tornado 4.5.1 py35_0 defaults
tqdm 4.14.0 <pip>
traitlets 4.3.2 py35_0 defaults
unicodecsv 0.14.1 py35_0 defaults
unixodbc 2.3.4 0 defaults
util-linux 2.21 0 defaults
wcwidth 0.1.7 py35_0 defaults
werkzeug 0.12.2 py35_0 defaults
wheel 0.29.0 py35_0 defaults
widgetsnbextension 2.0.0 py35_0 defaults
wrapt 1.10.10 py35_0 defaults
xlrd 1.0.0 py35_0 defaults
xlsxwriter 0.9.6 py35_0 defaults
xlwt 1.2.0 py35_0 defaults
xz 5.2.2 1 defaults
yaml 0.1.6 0 defaults
zeromq 4.1.5 0 defaults
zict 0.1.2 py35_0 defaults
zlib 1.2.8 3 defaults
```
</p></details>
| Your problem sounds like https://github.com/conda/conda/issues/5370. Your log indicates that you are using conda 4.3.22. #5370 was fixed in the 4.4 version of conda.
This issue still seems to have reappeared in 4.7.11.
`conda create --offline -n test numpy`
```
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/rkeith/anaconda3/envs/test
added / updated specs:
- numpy
The following packages will be downloaded:
package | build
---------------------------|-----------------
_libgcc_mutex-0.1 | main 3 KB
blas-1.0 | mkl 6 KB
intel-openmp-2019.4 | 243 729 KB
libedit-3.1.20181209 | hc058e9b_0 163 KB
libffi-3.2.1 | hd88cf55_4 40 KB
libgcc-ng-9.1.0 | hdf63c60_0 5.1 MB
libgfortran-ng-7.3.0 | hdf63c60_0 1006 KB
libstdcxx-ng-9.1.0 | hdf63c60_0 3.1 MB
mkl-2019.4 | 243 131.2 MB
mkl-service-2.0.2 | py37h7b6447c_0 65 KB
mkl_random-1.0.2 | py37hd81dba3_0 361 KB
ncurses-6.1 | he6710b0_1 777 KB
numpy-1.16.4 | py37h7e9f1db_0 48 KB
numpy-base-1.16.4 | py37hde5b4d6_0 3.5 MB
openssl-1.1.1c | h7b6447c_1 2.5 MB
readline-7.0 | h7b6447c_5 324 KB
setuptools-41.0.1 | py37_0 506 KB
six-1.12.0 | py37_0 23 KB
tk-8.6.8 | hbc83047_0 2.8 MB
wheel-0.33.4 | py37_0 41 KB
xz-5.2.4 | h14c3975_4 283 KB
zlib-1.2.11 | h7b6447c_3 103 KB
------------------------------------------------------------
Total: 152.6 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
blas pkgs/main/linux-64::blas-1.0-mkl
ca-certificates pkgs/main/linux-64::ca-certificates-2019.5.15-1
certifi pkgs/main/linux-64::certifi-2019.6.16-py37_1
intel-openmp pkgs/main/linux-64::intel-openmp-2019.4-243
libedit pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
libffi pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
libgfortran-ng pkgs/main/linux-64::libgfortran-ng-7.3.0-hdf63c60_0
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
mkl pkgs/main/linux-64::mkl-2019.4-243
mkl-service pkgs/main/linux-64::mkl-service-2.0.2-py37h7b6447c_0
mkl_fft pkgs/main/linux-64::mkl_fft-1.0.14-py37ha843d7b_0
mkl_random pkgs/main/linux-64::mkl_random-1.0.2-py37hd81dba3_0
ncurses pkgs/main/linux-64::ncurses-6.1-he6710b0_1
numpy pkgs/main/linux-64::numpy-1.16.4-py37h7e9f1db_0
numpy-base pkgs/main/linux-64::numpy-base-1.16.4-py37hde5b4d6_0
openssl pkgs/main/linux-64::openssl-1.1.1c-h7b6447c_1
pip pkgs/main/linux-64::pip-19.2.2-py37_0
python pkgs/main/linux-64::python-3.7.4-h265db76_1
readline pkgs/main/linux-64::readline-7.0-h7b6447c_5
setuptools pkgs/main/linux-64::setuptools-41.0.1-py37_0
six pkgs/main/linux-64::six-1.12.0-py37_0
sqlite pkgs/main/linux-64::sqlite-3.29.0-h7b6447c_0
tk pkgs/main/linux-64::tk-8.6.8-hbc83047_0
wheel pkgs/main/linux-64::wheel-0.33.4-py37_0
xz pkgs/main/linux-64::xz-5.2.4-h14c3975_4
zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
Proceed ([y]/n)? y
Downloading and Extracting Packages
libgcc-ng-9.1.0 | 5.1 MB | | 0%
blas-1.0 | 6 KB | | 0%
libstdcxx-ng-9.1.0 | 3.1 MB | | 0%
libffi-3.2.1 | 40 KB | | 0%
wheel-0.33.4 | 41 KB | | 0%
mkl-service-2.0.2 | 65 KB | | 0%
tk-8.6.8 | 2.8 MB | | 0%
intel-openmp-2019.4 | 729 KB | | 0%
numpy-base-1.16.4 | 3.5 MB | | 0%
six-1.12.0 | 23 KB | | 0%
setuptools-41.0.1 | 506 KB | | 0%
readline-7.0 | 324 KB | | 0%
libedit-3.1.20181209 | 163 KB | | 0%
xz-5.2.4 | 283 KB | | 0%
mkl_random-1.0.2 | 361 KB | | 0%
_libgcc_mutex-0.1 | 3 KB | | 0%
mkl-2019.4 | 131.2 MB | | 0%
ncurses-6.1 | 777 KB | | 0%
openssl-1.1.1c | 2.5 MB | | 0%
numpy-1.16.4 | 48 KB | | 0%
libgfortran-ng-7.3.0 | 1006 KB | | 0%
zlib-1.2.11 | 103 KB | | 0%
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libgcc-ng-9.1.0-hdf63c60_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/blas-1.0-mkl.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-ng-9.1.0-hdf63c60_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libffi-3.2.1-hd88cf55_4.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/wheel-0.33.4-py37_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/mkl-service-2.0.2-py37h7b6447c_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/tk-8.6.8-hbc83047_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/intel-openmp-2019.4-243.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/numpy-base-1.16.4-py37hde5b4d6_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/six-1.12.0-py37_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/setuptools-41.0.1-py37_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/readline-7.0-h7b6447c_5.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libedit-3.1.20181209-hc058e9b_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/xz-5.2.4-h14c3975_4.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/mkl_random-1.0.2-py37hd81dba3_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/_libgcc_mutex-0.1-main.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/mkl-2019.4-243.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/ncurses-6.1-he6710b0_1.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/openssl-1.1.1c-h7b6447c_1.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/numpy-1.16.4-py37h7e9f1db_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libgfortran-ng-7.3.0-hdf63c60_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/zlib-1.2.11-h7b6447c_3.conda\nThis command is using a remote connection in offline mode.\n')
```
Here is my conda info:
`conda info`
```
active environment : base
active env location : /home/rkeith/anaconda3
shell level : 2
conda version : 4.7.11
conda-build version : 3.18.9
python version : 3.7.4.final.0
virtual packages : __cuda=9.1
base environment : /home/rkeith/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/rkeith/anaconda3/pkgs
envs directories : /home/rkeith/anaconda3/envs
platform : linux-64
user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.4 Linux/4.15.0-58-generic ubuntu/16.04.6 glibc/2.23
netrc file : None
offline mode : False
``` | 2019-10-29T17:01:41 |
conda/conda | 9,418 | conda__conda-9418 | [
"9116"
] | 89d91d639ac661e71af1fdf640c06390cc7df688 | diff --git a/conda/models/match_spec.py b/conda/models/match_spec.py
--- a/conda/models/match_spec.py
+++ b/conda/models/match_spec.py
@@ -181,8 +181,16 @@ def from_dist_str(cls, dist_str):
if dist_str.endswith(CONDA_PACKAGE_EXTENSION_V1):
dist_str = dist_str[:-len(CONDA_PACKAGE_EXTENSION_V1)]
if '::' in dist_str:
- channel_str, dist_str = dist_str.split("::", 1)
- parts['channel'] = channel_str
+ channel_subdir_str, dist_str = dist_str.split("::", 1)
+ if '/' in channel_subdir_str:
+ channel_str, subdir = channel_subdir_str.split('/', 2)
+ parts.update({
+ 'channel': channel_str,
+ 'subdir': subdir,
+ })
+ else:
+ parts['channel'] = channel_subdir_str
+
name, version, build = dist_str.rsplit('-', 2)
parts.update({
'name': name,
diff --git a/conda/models/records.py b/conda/models/records.py
--- a/conda/models/records.py
+++ b/conda/models/records.py
@@ -280,7 +280,12 @@ def __eq__(self, other):
return self._pkey == other._pkey
def dist_str(self):
- return "%s::%s-%s-%s" % (self.channel.canonical_name, self.name, self.version, self.build)
+ return "%s%s::%s-%s-%s" % (
+ self.channel.canonical_name,
+ ("/" + self.subdir) if self.subdir else "",
+ self.name,
+ self.version,
+ self.build)
def dist_fields_dump(self):
return {
| diff --git a/tests/core/test_solve.py b/tests/core/test_solve.py
--- a/tests/core/test_solve.py
+++ b/tests/core/test_solve.py
@@ -25,7 +25,7 @@
from conda.models.records import PrefixRecord
from conda.models.enums import PackageType
from conda.resolve import MatchSpec
-from ..helpers import get_index_r_1, get_index_r_2, get_index_r_4, \
+from ..helpers import add_subdir_to_iter, get_index_r_1, get_index_r_2, get_index_r_4, \
get_index_r_5, get_index_cuda, get_index_must_unfreeze
from conda.common.compat import iteritems, on_win
@@ -154,7 +154,7 @@ def test_solve_1(tmpdir):
with get_solver(tmpdir, specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -163,7 +163,7 @@ def test_solve_1(tmpdir):
'channel-1::zlib-1.2.7-0',
'channel-1::python-3.3.2-0',
'channel-1::numpy-1.7.1-py33_0',
- )
+ ))
assert convert_to_dist_str(final_state) == order
specs_to_add = MatchSpec("python=2"),
@@ -171,7 +171,7 @@ def test_solve_1(tmpdir):
prefix_records=final_state, history_specs=specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -180,7 +180,7 @@ def test_solve_1(tmpdir):
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
'channel-1::numpy-1.7.1-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state) == order
@@ -190,7 +190,7 @@ def test_solve_2(tmpdir):
with get_solver_aggregate_1(tmpdir, specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::openssl-1.0.2l-0',
'channel-2::readline-6.2-2',
@@ -200,7 +200,7 @@ def test_solve_2(tmpdir):
'channel-2::zlib-1.2.11-0',
'channel-2::python-3.6.2-0',
'channel-2::numpy-1.13.1-py36_0'
- )
+ ))
assert convert_to_dist_str(final_state) == order
specs_to_add = MatchSpec("channel-4::numpy"),
@@ -242,9 +242,9 @@ def test_cuda_1(tmpdir):
with get_solver_cuda(tmpdir, specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-1::cudatoolkit-9.0-0',
- )
+ ))
assert convert_to_dist_str(final_state) == order
@@ -255,9 +255,9 @@ def test_cuda_2(tmpdir):
with get_solver_cuda(tmpdir, specs) as solver:
final_state = solver.solve_final_state()
# print(convert_to_dist_str(final_state))
- order = (
+ order = add_subdir_to_iter((
'channel-1::cudatoolkit-10.0-0',
- )
+ ))
assert convert_to_dist_str(final_state) == order
@@ -298,7 +298,7 @@ def test_prune_1(tmpdir):
with get_solver(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::libnvvm-1.0-p0',
'channel-1::mkl-rt-11.0-p0',
'channel-1::openssl-1.0.1c-0',
@@ -321,7 +321,7 @@ def test_prune_1(tmpdir):
'channel-1::scikit-learn-0.13.1-np16py27_p0',
'channel-1::mkl-11.0-np16py27_p0',
'channel-1::accelerate-1.1.0-np16py27_p0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_remove = MatchSpec("numbapro"),
@@ -330,7 +330,7 @@ def test_prune_1(tmpdir):
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-1::accelerate-1.1.0-np16py27_p0',
'channel-1::mkl-11.0-np16py27_p0',
'channel-1::scikit-learn-0.13.1-np16py27_p0',
@@ -346,10 +346,10 @@ def test_prune_1(tmpdir):
'channel-1::llvm-3.2-0',
'channel-1::mkl-rt-11.0-p0',
'channel-1::libnvvm-1.0-p0',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-1::numpy-1.6.2-py27_4',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -360,7 +360,7 @@ def test_force_remove_1(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -369,7 +369,7 @@ def test_force_remove_1(tmpdir):
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
'channel-1::numpy-1.7.1-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
# without force_remove, taking out python takes out everything that depends on it, too,
@@ -382,10 +382,9 @@ def test_force_remove_1(tmpdir):
print(convert_to_dist_str(final_state_2))
# openssl remains because it is in the aggressive_update_packages set,
# but everything else gets removed
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
-
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# with force remove, we remove only the explicit specs that we provide
@@ -396,7 +395,7 @@ def test_force_remove_1(tmpdir):
final_state_2 = solver.solve_final_state(force_remove=True)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
@@ -404,7 +403,7 @@ def test_force_remove_1(tmpdir):
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# re-solving restores order
@@ -412,7 +411,7 @@ def test_force_remove_1(tmpdir):
final_state_3 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -421,7 +420,7 @@ def test_force_remove_1(tmpdir):
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
'channel-1::numpy-1.7.1-py27_0'
- )
+ ))
assert convert_to_dist_str(final_state_3) == order
@@ -431,7 +430,7 @@ def test_no_deps_1(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -439,7 +438,7 @@ def test_no_deps_1(tmpdir):
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("numba"),
@@ -447,7 +446,7 @@ def test_no_deps_1(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -460,7 +459,7 @@ def test_no_deps_1(tmpdir):
'channel-1::meta-0.4.2.dev-py27_0',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::numba-0.8.1-np17py27_0'
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
specs_to_add = MatchSpec("numba"),
@@ -468,7 +467,7 @@ def test_no_deps_1(tmpdir):
final_state_2 = solver.solve_final_state(deps_modifier='NO_DEPS')
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -477,7 +476,7 @@ def test_no_deps_1(tmpdir):
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
'channel-1::numba-0.8.1-np17py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -487,7 +486,7 @@ def test_only_deps_1(tmpdir):
final_state_1 = solver.solve_final_state(deps_modifier=DepsModifier.ONLY_DEPS)
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -499,7 +498,7 @@ def test_only_deps_1(tmpdir):
'channel-1::llvmpy-0.11.2-py27_0',
'channel-1::meta-0.4.2.dev-py27_0',
'channel-1::numpy-1.7.1-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
@@ -509,7 +508,7 @@ def test_only_deps_2(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -518,7 +517,7 @@ def test_only_deps_2(tmpdir):
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.3-7',
'channel-1::numpy-1.5.1-py27_4',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("numba=0.5"),
@@ -526,7 +525,7 @@ def test_only_deps_2(tmpdir):
final_state_2 = solver.solve_final_state(deps_modifier=DepsModifier.ONLY_DEPS)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -540,7 +539,7 @@ def test_only_deps_2(tmpdir):
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.1-py27_0',
# 'channel-1::numba-0.5.0-np17py27_0', # not in the order because only_deps
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# fails because numpy=1.5 is in our history as an explicit spec
@@ -554,7 +553,7 @@ def test_only_deps_2(tmpdir):
final_state_2 = solver.solve_final_state(deps_modifier=DepsModifier.ONLY_DEPS)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -568,7 +567,7 @@ def test_only_deps_2(tmpdir):
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.1-py27_0',
# 'channel-1::numba-0.5.0-np17py27_0', # not in the order because only_deps
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -578,7 +577,7 @@ def test_update_all_1(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -587,7 +586,7 @@ def test_update_all_1(tmpdir):
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.6.8-6',
'channel-1::numpy-1.5.1-py26_4',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("numba=0.6"), MatchSpec("numpy")
@@ -595,7 +594,7 @@ def test_update_all_1(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -608,7 +607,7 @@ def test_update_all_1(tmpdir):
'channel-1::nose-1.3.0-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.6.0-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
specs_to_add = MatchSpec("numba=0.6"),
@@ -616,7 +615,7 @@ def test_update_all_1(tmpdir):
final_state_2 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_ALL)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -629,7 +628,7 @@ def test_update_all_1(tmpdir):
'channel-1::nose-1.3.0-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.6.0-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -639,7 +638,7 @@ def test_broken_install(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order_original = (
+ order_original = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -653,7 +652,7 @@ def test_broken_install(tmpdir):
'channel-1::dateutil-2.1-py27_1',
'channel-1::scipy-0.12.0-np16py27_0',
'channel-1::pandas-0.11.0-np16py27_1',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order_original
assert solver._r.environment_is_consistent(final_state_1)
@@ -669,7 +668,7 @@ def test_broken_install(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
"channel-1::numpy-1.7.1-py33_p0",
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
@@ -686,7 +685,7 @@ def test_broken_install(tmpdir):
'channel-1::dateutil-2.1-py27_1',
'channel-1::flask-0.9-py27_0',
'channel-1::pandas-0.11.0-np16py27_1'
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
assert not solver._r.environment_is_consistent(final_state_2)
@@ -696,7 +695,7 @@ def test_broken_install(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -713,7 +712,7 @@ def test_broken_install(tmpdir):
'channel-1::flask-0.9-py27_0',
'channel-1::scipy-0.12.0-np16py27_0',
'channel-1::pandas-0.11.0-np16py27_1',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
assert solver._r.environment_is_consistent(final_state_2)
@@ -731,7 +730,7 @@ def test_conda_downgrade(tmpdir):
with get_solver_aggregate_1(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-2::conda-env-2.6.0-0',
'channel-2::libffi-3.2.1-1',
@@ -774,7 +773,7 @@ def test_conda_downgrade(tmpdir):
'channel-4::requests-2.19.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
'channel-4::conda-build-3.12.1-py37_0'
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("itsdangerous"), # MatchSpec("conda"),
@@ -789,9 +788,9 @@ def test_conda_downgrade(tmpdir):
unlink_order = (
# no conda downgrade
)
- link_order = (
+ link_order = add_subdir_to_iter((
'channel-2::itsdangerous-0.24-py_0',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -810,7 +809,7 @@ def test_conda_downgrade(tmpdir):
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
# now conda gets downgraded
'channel-4::conda-build-3.12.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
@@ -847,8 +846,8 @@ def test_conda_downgrade(tmpdir):
'channel-4::tk-8.6.7-hc745277_3',
'channel-4::openssl-1.0.2p-h14c3975_0',
'channel-4::ncurses-6.1-hf484d3e_0',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-2::openssl-1.0.2l-0',
'channel-2::readline-6.2-2',
'channel-2::sqlite-3.13.0-0',
@@ -882,7 +881,7 @@ def test_conda_downgrade(tmpdir):
'channel-2::pyopenssl-17.0.0-py36_0',
'channel-2::conda-4.3.30-py36h5d9f9f4_0',
'channel-4::conda-build-3.12.1-py36_0'
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
finally:
@@ -906,23 +905,23 @@ def test_unfreeze_when_required(tmpdir):
with get_solver_must_unfreeze(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-freeze::libbar-2.0-0',
'channel-freeze::libfoo-1.0-0',
'channel-freeze::foobar-1.0-0',
'channel-freeze::qux-1.0-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs = MatchSpec("foobar"),
with get_solver_must_unfreeze(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-freeze::libbar-2.0-0',
'channel-freeze::libfoo-2.0-0',
'channel-freeze::foobar-2.0-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
# When frozen there is no solution - but conda tries really hard to not freeze things that conflict
@@ -937,12 +936,12 @@ def test_unfreeze_when_required(tmpdir):
final_state_2 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_SPECS)
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-freeze::libbar-2.0-0',
'channel-freeze::libfoo-1.0-0',
'channel-freeze::foobar-1.0-0',
'channel-freeze::qux-1.0-0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -952,7 +951,7 @@ def test_auto_update_conda(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -963,7 +962,7 @@ def test_auto_update_conda(tmpdir):
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_vars({"CONDA_AUTO_UPDATE_CONDA": "yes"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -972,7 +971,7 @@ def test_auto_update_conda(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -984,7 +983,7 @@ def test_auto_update_conda(tmpdir):
'channel-1::pytz-2013b-py27_0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
saved_sys_prefix = sys.prefix
@@ -996,7 +995,7 @@ def test_auto_update_conda(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1008,7 +1007,7 @@ def test_auto_update_conda(tmpdir):
'channel-1::pytz-2013b-py27_0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.5.2-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
with env_vars({"CONDA_AUTO_UPDATE_CONDA": "no"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1017,7 +1016,7 @@ def test_auto_update_conda(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1029,7 +1028,7 @@ def test_auto_update_conda(tmpdir):
'channel-1::pytz-2013b-py27_0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
finally:
sys.prefix = saved_sys_prefix
@@ -1041,7 +1040,7 @@ def test_explicit_conda_downgrade(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1052,7 +1051,7 @@ def test_explicit_conda_downgrade(tmpdir):
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.5.2-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_vars({"CONDA_AUTO_UPDATE_CONDA": "yes"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1061,7 +1060,7 @@ def test_explicit_conda_downgrade(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1072,7 +1071,7 @@ def test_explicit_conda_downgrade(tmpdir):
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
saved_sys_prefix = sys.prefix
@@ -1084,7 +1083,7 @@ def test_explicit_conda_downgrade(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1095,7 +1094,7 @@ def test_explicit_conda_downgrade(tmpdir):
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
with env_vars({"CONDA_AUTO_UPDATE_CONDA": "no"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1104,7 +1103,7 @@ def test_explicit_conda_downgrade(tmpdir):
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1115,7 +1114,7 @@ def test_explicit_conda_downgrade(tmpdir):
'channel-1::python-2.7.5-0',
'channel-1::pyyaml-3.10-py27_0',
'channel-1::conda-1.3.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
finally:
sys.prefix = saved_sys_prefix
@@ -1137,9 +1136,9 @@ def solve(prev_state, specs_to_add, order):
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": ""}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
base_state = solve(
empty_state, ["libpng=1.2"],
- (
+ add_subdir_to_iter((
'channel-1::libpng-1.2.50-0',
- ))
+ )))
# # ~~has "libpng" restricted to "=1.2" by history_specs~~ NOPE!
# In conda 4.6 making aggressive_update *more* aggressive, making it override history specs.
@@ -1147,48 +1146,48 @@ def solve(prev_state, specs_to_add, order):
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": "libpng"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
solve(
state_1, ["cmake=2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.9-0',
'channel-1::libpng-1.5.13-1',
- ))
+ )))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": ""}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
state_1_2 = solve(
state_1, ["cmake=2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.9-0',
'channel-1::libpng-1.2.50-0',
- ))
+ )))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": "libpng"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
solve(
state_1_2, ["cmake>2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.10.2-0',
'channel-1::libpng-1.5.13-1',
- ))
+ )))
# use new history_specs to remove "libpng" version restriction
state_2 = (base_state[0], (MatchSpec("libpng"),))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": "libpng"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
solve(
state_2, ["cmake=2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.9-0',
'channel-1::libpng-1.5.13-1',
- ))
+ )))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": ""}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
state_2_2 = solve(
state_2, ["cmake=2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.9-0',
'channel-1::libpng-1.2.50-0',
- ))
+ )))
with env_vars({"CONDA_AGGRESSIVE_UPDATE_PACKAGES": "libpng"}, stack_callback=conda_tests_ctxt_mgmt_def_pol):
solve(
state_2_2, ["cmake>2.8.9"],
- (
+ add_subdir_to_iter((
'channel-1::cmake-2.8.10.2-0',
'channel-1::libpng-1.5.13-1',
- ))
+ )))
def test_python2_update(tmpdir):
# Here we're actually testing that a user-request will uninstall incompatible packages
@@ -1197,7 +1196,7 @@ def test_python2_update(tmpdir):
with get_solver_4(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order1 = (
+ order1 = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::conda-env-2.6.0-1',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
@@ -1231,14 +1230,14 @@ def test_python2_update(tmpdir):
'channel-4::urllib3-1.23-py27_0',
'channel-4::requests-2.19.1-py27_0',
'channel-4::conda-4.5.10-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order1
specs_to_add = MatchSpec("python=3"),
with get_solver_4(tmpdir, specs_to_add, prefix_records=final_state_1, history_specs=specs) as solver:
final_state_2 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::conda-env-2.6.0-1',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
@@ -1269,7 +1268,7 @@ def test_python2_update(tmpdir):
'channel-4::urllib3-1.23-py37_0',
'channel-4::requests-2.19.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -1279,7 +1278,7 @@ def test_update_deps_1(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
# print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1287,14 +1286,14 @@ def test_update_deps_1(tmpdir):
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs2 = MatchSpec("numpy=1.7.0"), MatchSpec("python=2.7.3")
with get_solver(tmpdir, specs2, prefix_records=final_state_1, history_specs=specs) as solver:
final_state_2 = solver.solve_final_state()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1304,14 +1303,14 @@ def test_update_deps_1(tmpdir):
'channel-1::python-2.7.3-7',
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.0-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
specs_to_add = MatchSpec("iopro"),
with get_solver(tmpdir, specs_to_add, prefix_records=final_state_2, history_specs=specs2) as solver:
final_state_3a = solver.solve_final_state()
print(convert_to_dist_str(final_state_3a))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1323,14 +1322,14 @@ def test_update_deps_1(tmpdir):
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.0-py27_0',
'channel-1::iopro-1.5.0-np17py27_p0',
- )
+ ))
assert convert_to_dist_str(final_state_3a) == order
specs_to_add = MatchSpec("iopro"),
with get_solver(tmpdir, specs_to_add, prefix_records=final_state_2, history_specs=specs2) as solver:
final_state_3 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_DEPS)
pprint(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1342,7 +1341,7 @@ def test_update_deps_1(tmpdir):
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.1-py27_0', # with update_deps, numpy should switch from 1.7.0 to 1.7.1
'channel-1::iopro-1.5.0-np17py27_p0',
- )
+ ))
assert convert_to_dist_str(final_state_3) == order
specs_to_add = MatchSpec("iopro"),
@@ -1350,7 +1349,7 @@ def test_update_deps_1(tmpdir):
final_state_3 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_DEPS,
deps_modifier=DepsModifier.ONLY_DEPS)
pprint(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-1::unixodbc-2.3.1-0',
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
@@ -1362,7 +1361,7 @@ def test_update_deps_1(tmpdir):
'channel-1::nose-1.3.0-py27_0',
'channel-1::numpy-1.7.1-py27_0', # with update_deps, numpy should switch from 1.7.0 to 1.7.1
# 'channel-1::iopro-1.5.0-np17py27_p0',
- )
+ ))
assert convert_to_dist_str(final_state_3) == order
@@ -1371,7 +1370,7 @@ def test_update_deps_2(tmpdir):
with get_solver_aggregate_2(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order1 = (
+ order1 = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
'channel-4::libstdcxx-ng-8.2.0-hdf63c60_0',
@@ -1393,7 +1392,7 @@ def test_update_deps_2(tmpdir):
'channel-4::setuptools-40.0.0-py36_0',
'channel-2::jinja2-2.8-py36_1',
'channel-2::flask-0.12-py36_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order1
# The "conda update flask" case is held back by the jinja2==2.8 user-requested spec.
@@ -1402,12 +1401,12 @@ def test_update_deps_2(tmpdir):
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-2::flask-0.12-py36_0',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-4::flask-0.12.2-py36hb24657c_0',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -1417,14 +1416,14 @@ def test_update_deps_2(tmpdir):
unlink_precs, link_precs = solver.solve_for_diff(update_modifier=UpdateModifier.UPDATE_DEPS)
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-2::flask-0.12-py36_0',
'channel-2::jinja2-2.8-py36_1',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-4::jinja2-2.10-py36_0',
'channel-4::flask-1.0.2-py36_1',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -1434,7 +1433,7 @@ def test_fast_update_with_update_modifier_not_set(tmpdir):
with get_solver_4(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order1 = (
+ order1 = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
'channel-4::libstdcxx-ng-8.2.0-hdf63c60_0',
@@ -1447,7 +1446,7 @@ def test_fast_update_with_update_modifier_not_set(tmpdir):
'channel-4::readline-7.0-ha6073c6_4',
'channel-4::sqlite-3.21.0-h1bed415_2',
'channel-4::python-2.7.14-h89e7a4a_22',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order1
specs_to_add = MatchSpec("python"),
@@ -1455,19 +1454,19 @@ def test_fast_update_with_update_modifier_not_set(tmpdir):
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-4::python-2.7.14-h89e7a4a_22',
'channel-4::libedit-3.1-heed3624_0',
'channel-4::openssl-1.0.2l-h077ae2c_5',
'channel-4::ncurses-6.0-h9df7e31_2'
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-4::ncurses-6.1-hf484d3e_0',
'channel-4::openssl-1.0.2p-h14c3975_0',
'channel-4::xz-5.2.4-h14c3975_4',
'channel-4::libedit-3.1.20170329-h6b74fdf_2',
'channel-4::python-3.6.4-hc3d631a_1', # python is upgraded
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -1476,20 +1475,20 @@ def test_fast_update_with_update_modifier_not_set(tmpdir):
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-4::python-2.7.14-h89e7a4a_22',
'channel-4::sqlite-3.21.0-h1bed415_2',
'channel-4::libedit-3.1-heed3624_0',
'channel-4::openssl-1.0.2l-h077ae2c_5',
'channel-4::ncurses-6.0-h9df7e31_2',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-4::ncurses-6.1-hf484d3e_0',
'channel-4::openssl-1.0.2p-h14c3975_0',
'channel-4::libedit-3.1.20170329-h6b74fdf_2',
'channel-4::sqlite-3.24.0-h84994c4_0', # sqlite is upgraded
'channel-4::python-2.7.15-h1571d57_0', # python is not upgraded
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -1507,7 +1506,7 @@ def test_pinned_1(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1516,7 +1515,7 @@ def test_pinned_1(tmpdir):
'channel-1::zlib-1.2.7-0',
'channel-1::python-3.3.2-0',
'channel-1::numpy-1.7.1-py33_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_var("CONDA_PINNED_PACKAGES", "python=2.6&iopro<=1.4.2", stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1525,9 +1524,9 @@ def test_pinned_1(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::system-5.8-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
# ignore_pinned=True
@@ -1537,7 +1536,7 @@ def test_pinned_1(tmpdir):
final_state_2 = solver.solve_final_state(ignore_pinned=True)
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1545,7 +1544,7 @@ def test_pinned_1(tmpdir):
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-3.3.2-0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# ignore_pinned=False
@@ -1555,7 +1554,7 @@ def test_pinned_1(tmpdir):
final_state_2 = solver.solve_final_state(ignore_pinned=False)
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1563,7 +1562,7 @@ def test_pinned_1(tmpdir):
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.6.8-6',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
# incompatible CLI and configured specs
@@ -1583,7 +1582,7 @@ def test_pinned_1(tmpdir):
final_state_3 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1596,7 +1595,7 @@ def test_pinned_1(tmpdir):
'channel-1::llvmpy-0.11.2-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.8.1-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_3) == order
specs_to_add = MatchSpec("python"),
@@ -1606,7 +1605,7 @@ def test_pinned_1(tmpdir):
final_state_4 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_DEPS)
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_4))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1619,7 +1618,7 @@ def test_pinned_1(tmpdir):
'channel-1::llvmpy-0.11.2-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.8.1-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_4) == order
specs_to_add = MatchSpec("python"),
@@ -1629,7 +1628,7 @@ def test_pinned_1(tmpdir):
final_state_5 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_ALL)
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_5))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1642,7 +1641,7 @@ def test_pinned_1(tmpdir):
'channel-1::llvmpy-0.11.2-py26_0',
'channel-1::numpy-1.7.1-py26_0',
'channel-1::numba-0.8.1-np17py26_0',
- )
+ ))
assert convert_to_dist_str(final_state_5) == order
# now update without pinning
@@ -1653,7 +1652,7 @@ def test_pinned_1(tmpdir):
final_state_5 = solver.solve_final_state(update_modifier=UpdateModifier.UPDATE_ALL)
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_5))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1665,7 +1664,7 @@ def test_pinned_1(tmpdir):
'channel-1::llvmpy-0.11.2-py33_0',
'channel-1::numpy-1.7.1-py33_0',
'channel-1::numba-0.8.1-np17py33_0',
- )
+ ))
assert convert_to_dist_str(final_state_5) == order
@@ -1678,7 +1677,7 @@ def test_no_update_deps_1(tmpdir): # i.e. FREEZE_DEPS
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1686,7 +1685,7 @@ def test_no_update_deps_1(tmpdir): # i.e. FREEZE_DEPS
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("zope.interface"),
@@ -1694,7 +1693,7 @@ def test_no_update_deps_1(tmpdir): # i.e. FREEZE_DEPS
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1704,7 +1703,7 @@ def test_no_update_deps_1(tmpdir): # i.e. FREEZE_DEPS
'channel-1::python-2.7.5-0',
'channel-1::nose-1.3.0-py27_0',
'channel-1::zope.interface-4.0.5-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
specs_to_add = MatchSpec("zope.interface>4.1"),
@@ -1718,7 +1717,7 @@ def test_no_update_deps_1(tmpdir): # i.e. FREEZE_DEPS
final_state_2 = solver.solve_final_state()
# PrefixDag(final_state_2, specs).open_url()
print(convert_to_dist_str(final_state_2))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1728,7 +1727,7 @@ def test_no_update_deps_1(tmpdir): # i.e. FREEZE_DEPS
'channel-1::python-3.3.2-0',
'channel-1::nose-1.3.0-py33_0',
'channel-1::zope.interface-4.1.1.1-py33_0',
- )
+ ))
assert convert_to_dist_str(final_state_2) == order
@@ -1738,7 +1737,7 @@ def test_force_reinstall_1(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1746,7 +1745,7 @@ def test_force_reinstall_1(tmpdir):
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = specs
@@ -1771,7 +1770,7 @@ def test_force_reinstall_2(tmpdir):
assert not unlink_dists
# PrefixDag(final_state_1, specs).open_url()
print(convert_to_dist_str(link_dists))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1779,7 +1778,7 @@ def test_force_reinstall_2(tmpdir):
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.7.5-0',
- )
+ ))
assert convert_to_dist_str(link_dists) == order
@@ -1789,7 +1788,7 @@ def test_timestamps_1(tmpdir):
unlink_dists, link_dists = solver.solve_for_diff(force_reinstall=True)
assert not unlink_dists
pprint(convert_to_dist_str(link_dists))
- order = (
+ order = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
'channel-4::libstdcxx-ng-8.2.0-hdf63c60_0',
@@ -1804,7 +1803,7 @@ def test_timestamps_1(tmpdir):
'channel-4::sqlite-3.23.1-he433501_0',
'channel-4::python-3.6.2-hca45abc_19', # this package has a later timestamp but lower hash value
# than the alternate 'channel-4::python-3.6.2-hda45abc_19'
- )
+ ))
assert convert_to_dist_str(link_dists) == order
def test_channel_priority_churn_minimized(tmpdir):
@@ -1834,7 +1833,7 @@ def test_remove_with_constrained_dependencies(tmpdir):
assert not unlink_dists_1
pprint(convert_to_dist_str(link_dists_1))
assert not unlink_dists_1
- order = (
+ order = add_subdir_to_iter((
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::conda-env-2.6.0-1',
'channel-4::libgcc-ng-8.2.0-hdf63c60_0',
@@ -1877,7 +1876,7 @@ def test_remove_with_constrained_dependencies(tmpdir):
'channel-4::requests-2.19.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
'channel-4::conda-build-3.12.1-py37_0',
- )
+ ))
assert convert_to_dist_str(link_dists_1) == order
specs_to_remove = MatchSpec("pycosat"),
@@ -1885,11 +1884,11 @@ def test_remove_with_constrained_dependencies(tmpdir):
unlink_dists_2, link_dists_2 = solver.solve_for_diff()
assert not link_dists_2
pprint(convert_to_dist_str(unlink_dists_2))
- order = (
+ order = add_subdir_to_iter((
'channel-4::conda-build-3.12.1-py37_0',
'channel-4::conda-4.5.10-py37_0',
'channel-4::pycosat-0.6.3-py37h14c3975_0',
- )
+ ))
for spec in order:
assert spec in convert_to_dist_str(unlink_dists_2)
@@ -1901,7 +1900,7 @@ def test_priority_1(tmpdir):
with get_solver_aggregate_1(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::openssl-1.0.2l-0',
'channel-2::readline-6.2-2',
@@ -1914,7 +1913,7 @@ def test_priority_1(tmpdir):
'channel-2::six-1.10.0-py27_0',
'channel-2::python-dateutil-2.6.1-py27_0',
'channel-2::pandas-0.20.3-py27_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_var("CONDA_CHANNEL_PRIORITY", "False", stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1924,10 +1923,10 @@ def test_priority_1(tmpdir):
pprint(convert_to_dist_str(final_state_2))
# python and pandas will be updated as they are explicit specs. Other stuff may or may not,
# as required to satisfy python and pandas
- order = (
+ order = add_subdir_to_iter((
'channel-4::python-2.7.15-h1571d57_0',
'channel-4::pandas-0.23.4-py27h04863e7_0',
- )
+ ))
for spec in order:
assert spec in convert_to_dist_str(final_state_2)
@@ -1938,10 +1937,10 @@ def test_priority_1(tmpdir):
history_specs=specs) as solver:
final_state_3 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_3))
- order = (
+ order = add_subdir_to_iter((
'channel-2::python-2.7.13-0',
'channel-2::pandas-0.20.3-py27_0',
- )
+ ))
for spec in order:
assert spec in convert_to_dist_str(final_state_3)
@@ -1951,10 +1950,10 @@ def test_priority_1(tmpdir):
prefix_records=final_state_3, history_specs=specs) as solver:
final_state_4 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_4))
- order = (
+ order = add_subdir_to_iter((
'channel-2::python-2.7.13-0',
'channel-2::six-1.9.0-py27_0',
- )
+ ))
for spec in order:
assert spec in convert_to_dist_str(final_state_4)
assert 'pandas' not in convert_to_dist_str(final_state_4)
@@ -1969,7 +1968,7 @@ def test_features_solve_1(tmpdir):
with get_solver_aggregate_1(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-2::nomkl-1.0-0',
'channel-2::libgfortran-3.0.0-1',
'channel-2::openssl-1.0.2l-0',
@@ -1980,14 +1979,14 @@ def test_features_solve_1(tmpdir):
'channel-2::openblas-0.2.19-0',
'channel-2::python-2.7.13-0',
'channel-2::numpy-1.13.1-py27_nomkl_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
with env_var("CONDA_CHANNEL_PRIORITY", "False", stack_callback=conda_tests_ctxt_mgmt_def_pol):
with get_solver_aggregate_1(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-4::blas-1.0-openblas',
'channel-4::ca-certificates-2018.03.07-0',
'channel-2::libffi-3.2.1-1',
@@ -2006,7 +2005,7 @@ def test_features_solve_1(tmpdir):
'channel-4::python-2.7.15-h1571d57_0',
'channel-4::numpy-base-1.15.0-py27h7cdd4dd_0',
'channel-4::numpy-1.15.0-py27h2aefc1b_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
@@ -2016,7 +2015,7 @@ def test_freeze_deps_1(tmpdir):
with get_solver_2(tmpdir, specs) as solver:
final_state_1 = solver.solve_final_state()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-2::openssl-1.0.2l-0',
'channel-2::readline-6.2-2',
'channel-2::sqlite-3.13.0-0',
@@ -2025,7 +2024,7 @@ def test_freeze_deps_1(tmpdir):
'channel-2::zlib-1.2.11-0',
'channel-2::python-3.4.5-0',
'channel-2::six-1.7.3-py34_0',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
specs_to_add = MatchSpec("bokeh"),
@@ -2034,7 +2033,7 @@ def test_freeze_deps_1(tmpdir):
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
unlink_order = ()
- link_order = (
+ link_order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::yaml-0.1.6-0',
'channel-2::backports_abc-0.5-py34_0',
@@ -2047,7 +2046,7 @@ def test_freeze_deps_1(tmpdir):
'channel-2::python-dateutil-2.6.1-py34_0',
'channel-2::tornado-4.4.2-py34_0',
'channel-2::bokeh-0.12.4-py34_0',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -2059,7 +2058,7 @@ def test_freeze_deps_1(tmpdir):
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
unlink_order = ()
- link_order = (
+ link_order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::yaml-0.1.6-0',
'channel-2::backports_abc-0.5-py34_0',
@@ -2072,7 +2071,7 @@ def test_freeze_deps_1(tmpdir):
'channel-2::python-dateutil-2.6.1-py34_0',
'channel-2::tornado-4.4.2-py34_0',
'channel-2::bokeh-0.12.4-py34_0',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -2093,12 +2092,12 @@ def test_freeze_deps_1(tmpdir):
unlink_precs, link_precs = solver.solve_for_diff()
pprint(convert_to_dist_str(unlink_precs))
pprint(convert_to_dist_str(link_precs))
- unlink_order = (
+ unlink_order = add_subdir_to_iter((
'channel-2::six-1.7.3-py34_0',
'channel-2::python-3.4.5-0',
'channel-2::xz-5.2.3-0',
- )
- link_order = (
+ ))
+ link_order = add_subdir_to_iter((
'channel-2::mkl-2017.0.3-0',
'channel-2::yaml-0.1.6-0',
'channel-2::python-2.7.13-0',
@@ -2118,7 +2117,7 @@ def test_freeze_deps_1(tmpdir):
'channel-2::jinja2-2.9.6-py27_0',
'channel-2::tornado-4.5.2-py27_0',
'channel-2::bokeh-0.12.5-py27_1',
- )
+ ))
assert convert_to_dist_str(unlink_precs) == unlink_order
assert convert_to_dist_str(link_precs) == link_order
@@ -2241,7 +2240,7 @@ def test_downgrade_python_prevented_with_sane_message(tmpdir):
final_state_1 = solver.solve_final_state()
# PrefixDag(final_state_1, specs).open_url()
pprint(convert_to_dist_str(final_state_1))
- order = (
+ order = add_subdir_to_iter((
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -2249,7 +2248,7 @@ def test_downgrade_python_prevented_with_sane_message(tmpdir):
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
'channel-1::python-2.6.8-6',
- )
+ ))
assert convert_to_dist_str(final_state_1) == order
# incompatible CLI and configured specs
diff --git a/tests/helpers.py b/tests/helpers.py
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -111,6 +111,25 @@ def run_inprocess_conda_command(command, disallow_stderr=True):
return c.stdout, c.stderr, exit_code
+def add_subdir(dist_string):
+ channel_str, package_str = dist_string.split('::')
+ channel_str = channel_str + '/' + context.subdir
+ return '::'.join([channel_str, package_str])
+
+
+def add_subdir_to_iter(iterable):
+ if isinstance(iterable, dict):
+ return {add_subdir(k) : v for k, v in iterable.items()}
+ elif isinstance(iterable, list):
+ return list(map(add_subdir, iterable))
+ elif isinstance(iterable, set):
+ return set(map(add_subdir, iterable))
+ elif isinstance(iterable, tuple):
+ return tuple(map(add_subdir, iterable))
+ else:
+ raise Exception("Unable to add subdir to object of unknown type.")
+
+
@contextmanager
def tempdir():
tempdirdir = gettempdir()
diff --git a/tests/models/test_prefix_graph.py b/tests/models/test_prefix_graph.py
--- a/tests/models/test_prefix_graph.py
+++ b/tests/models/test_prefix_graph.py
@@ -13,6 +13,7 @@
from conda.models.records import PackageRecord
import pytest
from tests.core.test_solve import get_solver_4, get_solver_5
+from tests.helpers import add_subdir_to_iter
try:
from unittest.mock import Mock, patch
@@ -218,17 +219,17 @@ def test_prefix_graph_1(tmpdir):
)
assert nodes == order
- spec_matches = {
+ spec_matches = add_subdir_to_iter({
'channel-4::intel-openmp-2018.0.3-0': {'intel-openmp'},
- }
+ })
assert {node.dist_str(): set(str(ms) for ms in specs) for node, specs in graph.spec_matches.items()} == spec_matches
removed_nodes = graph.prune()
nodes = tuple(rec.dist_str() for rec in graph.records)
pprint(nodes)
- order = (
+ order = add_subdir_to_iter((
'channel-4::intel-openmp-2018.0.3-0',
- )
+ ))
assert nodes == order
removed_nodes = tuple(rec.name for rec in removed_nodes)
diff --git a/tests/test_resolve.py b/tests/test_resolve.py
--- a/tests/test_resolve.py
+++ b/tests/test_resolve.py
@@ -16,7 +16,7 @@
from conda.models.enums import PackageType
from conda.models.records import PackageRecord
from conda.resolve import MatchSpec, Resolve, ResolvePackageNotFound
-from .helpers import TEST_DATA_DIR, get_index_r_1, get_index_r_4, raises
+from .helpers import TEST_DATA_DIR, add_subdir, add_subdir_to_iter, get_index_r_1, get_index_r_4, raises
index, r, = get_index_r_1()
f_mkl = set(['mkl'])
@@ -66,7 +66,7 @@ def test_empty(self):
def test_iopro_nomkl(self):
installed = r.install(['iopro 1.4*', 'python 2.7*', 'numpy 1.7*'], returnall=True)
installed = [rec.dist_str() for rec in installed]
- assert installed == [
+ assert installed == add_subdir_to_iter([
'channel-1::iopro-1.4.3-np17py27_p0',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -77,12 +77,12 @@ def test_iopro_nomkl(self):
'channel-1::tk-8.5.13-0',
'channel-1::unixodbc-2.3.1-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_iopro_mkl(self):
installed = r.install(['iopro 1.4*', 'python 2.7*', 'numpy 1.7*', MatchSpec(track_features='mkl')], returnall=True)
installed = [prec.dist_str() for prec in installed]
- assert installed == [
+ assert installed == add_subdir_to_iter([
'channel-1::iopro-1.4.3-np17py27_p0',
'channel-1::mkl-rt-11.0-p0',
'channel-1::numpy-1.7.1-py27_p0',
@@ -94,7 +94,7 @@ def test_iopro_mkl(self):
'channel-1::tk-8.5.13-0',
'channel-1::unixodbc-2.3.1-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_mkl(self):
a = r.install(['mkl 11*', MatchSpec(track_features='mkl')])
@@ -110,13 +110,13 @@ def test_scipy_mkl(self):
precs = r.install(['scipy', 'python 2.7*', 'numpy 1.7*', MatchSpec(track_features='mkl')])
self.assert_have_mkl(precs, ('numpy', 'scipy'))
dist_strs = [prec.dist_str() for prec in precs]
- assert 'channel-1::scipy-0.12.0-np17py27_p0' in dist_strs
+ assert add_subdir('channel-1::scipy-0.12.0-np17py27_p0') in dist_strs
def test_anaconda_nomkl(self):
precs = r.install(['anaconda 1.5.0', 'python 2.7*', 'numpy 1.7*'])
assert len(precs) == 107
dist_strs = [prec.dist_str() for prec in precs]
- assert 'channel-1::scipy-0.12.0-np17py27_0' in dist_strs
+ assert add_subdir('channel-1::scipy-0.12.0-np17py27_0') in dist_strs
def test_generate_eq_1():
@@ -140,7 +140,7 @@ def test_generate_eq_1():
eqb = {key: value for key, value in iteritems(eqb)}
eqt = {key: value for key, value in iteritems(eqt)}
assert eqc == {}
- assert eqv == {
+ assert eqv == add_subdir_to_iter({
'channel-1::anaconda-1.4.0-np15py27_0': 1,
'channel-1::anaconda-1.4.0-np16py27_0': 1,
'channel-1::anaconda-1.4.0-np17py27_0': 1,
@@ -215,8 +215,8 @@ def test_generate_eq_1():
'channel-1::xlrd-0.9.0-py27_0': 1,
'channel-1::xlrd-0.9.0-py33_0': 1,
'channel-1::xlwt-0.7.4-py27_0': 1
- }
- assert eqb == {
+ })
+ assert eqb == add_subdir_to_iter({
'channel-1::cubes-0.10.2-py27_0': 1,
'channel-1::dateutil-2.1-py27_0': 1,
'channel-1::dateutil-2.1-py33_0': 1,
@@ -244,7 +244,7 @@ def test_generate_eq_1():
'channel-1::theano-0.5.0-np16py27_0': 1,
'channel-1::theano-0.5.0-np17py27_0': 1,
'channel-1::zeromq-2.2.0-0': 1
- }
+ })
# No timestamps in the current data set
assert eqt == {}
@@ -254,7 +254,7 @@ def test_pseudo_boolean():
# The latest version of iopro, 1.5.0, was not built against numpy 1.5
installed = r.install(['iopro', 'python 2.7*', 'numpy 1.5*'], returnall=True)
installed = [rec.dist_str() for rec in installed]
- assert installed == [
+ assert installed == add_subdir_to_iter([
'channel-1::iopro-1.4.3-np15py27_p0',
'channel-1::numpy-1.5.1-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -265,11 +265,11 @@ def test_pseudo_boolean():
'channel-1::tk-8.5.13-0',
'channel-1::unixodbc-2.3.1-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
installed = r.install(['iopro', 'python 2.7*', 'numpy 1.5*', MatchSpec(track_features='mkl')], returnall=True)
installed = [rec.dist_str() for rec in installed]
- assert installed == [
+ assert installed == add_subdir_to_iter([
'channel-1::iopro-1.4.3-np15py27_p0',
'channel-1::mkl-rt-11.0-p0',
'channel-1::numpy-1.5.1-py27_p4',
@@ -281,14 +281,14 @@ def test_pseudo_boolean():
'channel-1::tk-8.5.13-0',
'channel-1::unixodbc-2.3.1-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_get_dists():
reduced_index = r.get_reduced_index((MatchSpec("anaconda 1.4.0"), ))
dist_strs = [prec.dist_str() for prec in reduced_index]
- assert 'channel-1::anaconda-1.4.0-np17py27_0' in dist_strs
- assert 'channel-1::freetype-2.4.10-0' in dist_strs
+ assert add_subdir('channel-1::anaconda-1.4.0-np17py27_0') in dist_strs
+ assert add_subdir('channel-1::freetype-2.4.10-0') in dist_strs
def test_get_reduced_index_unmanageable():
@@ -643,11 +643,11 @@ def test_nonexistent_deps():
index2 = {key: value for key, value in iteritems(index2)}
r = Resolve(index2)
- assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('mypackage'))) == {
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('mypackage'))) == add_subdir_to_iter({
'defaults::mypackage-1.0-py33_0',
'defaults::mypackage-1.1-py33_0',
- }
- assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('mypackage'), ))) == {
+ })
+ assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('mypackage'), ))) == add_subdir_to_iter({
'defaults::mypackage-1.1-py33_0',
'channel-1::nose-1.1.2-py33_0',
'channel-1::nose-1.2.1-py33_0',
@@ -666,12 +666,12 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- }
+ })
target_result = r.install(['mypackage'])
assert target_result == r.install(['mypackage 1.1'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::mypackage-1.1-py33_0',
'channel-1::nose-1.3.0-py33_0',
'channel-1::openssl-1.0.1c-0',
@@ -681,13 +681,13 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
assert raises(ResolvePackageNotFound, lambda: r.install(['mypackage 1.0']))
assert raises(ResolvePackageNotFound, lambda: r.install(['mypackage 1.0', 'burgertime 1.0']))
target_result = r.install(['anotherpackage 1.0'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::anotherpackage-1.0-py33_0',
'defaults::mypackage-1.1-py33_0',
'channel-1::nose-1.3.0-py33_0',
@@ -698,11 +698,11 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
target_result = r.install(['anotherpackage'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::anotherpackage-2.0-py33_0',
'defaults::mypackage-1.1-py33_0',
'channel-1::nose-1.3.0-py33_0',
@@ -713,7 +713,7 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# This time, the latest version is messed up
index3 = index.copy()
@@ -769,11 +769,12 @@ def test_nonexistent_deps():
index3 = {key: value for key, value in iteritems(index3)}
r = Resolve(index3)
- assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('mypackage'))) == {
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('mypackage'))) == add_subdir_to_iter({
'defaults::mypackage-1.0-py33_0',
'defaults::mypackage-1.1-py33_0',
- }
- assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('mypackage'), )).keys()) == {
+ })
+ assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('mypackage'), )).keys()) ==\
+ add_subdir_to_iter({
'defaults::mypackage-1.0-py33_0',
'channel-1::nose-1.1.2-py33_0',
'channel-1::nose-1.2.1-py33_0',
@@ -792,11 +793,11 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- }
+ })
target_result = r.install(['mypackage'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::mypackage-1.0-py33_0',
'channel-1::nose-1.3.0-py33_0',
'channel-1::openssl-1.0.1c-0',
@@ -806,12 +807,12 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
assert raises(ResolvePackageNotFound, lambda: r.install(['mypackage 1.1']))
target_result = r.install(['anotherpackage 1.0'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::anotherpackage-1.0-py33_0',
'defaults::mypackage-1.0-py33_0',
'channel-1::nose-1.3.0-py33_0',
@@ -822,13 +823,13 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# If recursive checking is working correctly, this will give
# anotherpackage 2.0, not anotherpackage 1.0
target_result = r.install(['anotherpackage'])
target_result = [rec.dist_str() for rec in target_result]
- assert target_result == [
+ assert target_result == add_subdir_to_iter([
'defaults::anotherpackage-2.0-py33_0',
'defaults::mypackage-1.0-py33_0',
'channel-1::nose-1.3.0-py33_0',
@@ -839,7 +840,7 @@ def test_nonexistent_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_install_package_with_feature():
@@ -929,20 +930,20 @@ def test_circular_dependencies():
index2 = {key: value for key, value in iteritems(index2)}
r = Resolve(index2)
- assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == {
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == add_subdir_to_iter({
'defaults::package1-1.0-0',
- }
- assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('package1'), )).keys()) == {
+ })
+ assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('package1'), )).keys()) == add_subdir_to_iter({
'defaults::package1-1.0-0',
'defaults::package2-1.0-0',
- }
+ })
result = r.install(['package1', 'package2'])
assert r.install(['package1']) == r.install(['package2']) == result
result = [r.dist_str() for r in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'defaults::package1-1.0-0',
'defaults::package2-1.0-0',
- ]
+ ])
def test_optional_dependencies():
@@ -987,25 +988,25 @@ def test_optional_dependencies():
index2 = {key: value for key, value in iteritems(index2)}
r = Resolve(index2)
- assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == {
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == add_subdir_to_iter({
'defaults::package1-1.0-0',
- }
- assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('package1'), )).keys()) == {
+ })
+ assert set(prec.dist_str() for prec in r.get_reduced_index((MatchSpec('package1'), )).keys()) == add_subdir_to_iter({
'defaults::package1-1.0-0',
'defaults::package2-2.0-0',
- }
+ })
result = r.install(['package1'])
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'defaults::package1-1.0-0',
- ]
+ ])
result = r.install(['package1', 'package2'])
assert result == r.install(['package1', 'package2 >1.0'])
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'defaults::package1-1.0-0',
'defaults::package2-2.0-0',
- ]
+ ])
assert raises(UnsatisfiableError, lambda: r.install(['package1', 'package2 <2.0']))
assert raises(UnsatisfiableError, lambda: r.install(['package1', 'package2 1.0']))
@@ -1013,7 +1014,7 @@ def test_optional_dependencies():
def test_irrational_version():
result = r.install(['pytz 2012d', 'python 3*'], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::openssl-1.0.1c-0',
'channel-1::python-3.3.2-0',
'channel-1::pytz-2012d-py33_0',
@@ -1022,14 +1023,14 @@ def test_irrational_version():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_no_features():
# Without this, there would be another solution including 'scipy-0.11.0-np16py26_p3.tar.bz2'.
result = r.install(['python 2.6*', 'numpy 1.6*', 'scipy 0.11*'], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::numpy-1.6.2-py26_4',
'channel-1::openssl-1.0.1c-0',
'channel-1::python-2.6.8-6',
@@ -1039,11 +1040,11 @@ def test_no_features():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
result = r.install(['python 2.6*', 'numpy 1.6*', 'scipy 0.11*', MatchSpec(track_features='mkl')], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::mkl-rt-11.0-p0', # This,
'channel-1::numpy-1.6.2-py26_p4', # this,
'channel-1::openssl-1.0.1c-0',
@@ -1054,7 +1055,7 @@ def test_no_features():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
index2 = index.copy()
pandas = PackageRecord(**{
@@ -1110,7 +1111,7 @@ def test_no_features():
# of the specs directly have mkl versions)
result = r2.solve(['pandas 0.12.0 np16py27_0', 'python 2.7*'], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1123,11 +1124,11 @@ def test_no_features():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
result = r2.solve(['pandas 0.12.0 np16py27_0', 'python 2.7*', MatchSpec(track_features='mkl')], returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::mkl-rt-11.0-p0', # This
'channel-1::numpy-1.6.2-py27_p5', # and this are different.
@@ -1141,13 +1142,13 @@ def test_no_features():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_broken_install():
installed = r.install(['pandas', 'python 2.7*', 'numpy 1.6*'])
_installed = [rec.dist_str() for rec in installed]
- assert _installed == [
+ assert _installed == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1161,7 +1162,7 @@ def test_broken_install():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# Add an incompatible numpy; installation should be untouched
installed1 = list(installed)
@@ -1210,7 +1211,7 @@ def test_pip_depends_removed_on_inconsistent_env():
def test_remove():
installed = r.install(['pandas', 'python 2.7*'])
_installed = [rec.dist_str() for rec in installed]
- assert _installed == [
+ assert _installed == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -1224,11 +1225,11 @@ def test_remove():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
result = r.remove(['pandas'], installed=installed)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -1241,12 +1242,12 @@ def test_remove():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# Pandas requires numpy
result = r.remove(['numpy'], installed=installed)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::openssl-1.0.1c-0',
'channel-1::python-2.7.5-0',
@@ -1257,7 +1258,7 @@ def test_remove():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_channel_priority_1():
@@ -1327,7 +1328,7 @@ def test_channel_priority_2():
eqc, eqv, eqb, eqa, eqt = r2.generate_version_metrics(C, list(r2.groups.keys()))
eqc = {key: value for key, value in iteritems(eqc)}
pprint(eqc)
- assert eqc == {
+ assert eqc == add_subdir_to_iter({
'channel-4::mkl-2017.0.4-h4c4d0af_0': 1,
'channel-4::mkl-2018.0.0-hb491cac_4': 1,
'channel-4::mkl-2018.0.1-h19d6760_4': 1,
@@ -1451,10 +1452,10 @@ def test_channel_priority_2():
'channel-4::tk-8.6.7-hc745277_3': 1,
'channel-4::zlib-1.2.11-ha838bed_2': 1,
'channel-4::zlib-1.2.11-hfbfcf68_1': 1,
- }
+ })
installed_w_priority = [prec.dist_str() for prec in this_r.install(spec)]
pprint(installed_w_priority)
- assert installed_w_priority == [
+ assert installed_w_priority == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -1468,7 +1469,7 @@ def test_channel_priority_2():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# setting strict actually doesn't do anything here; just ensures it's not 'disabled'
with env_var("CONDA_CHANNEL_PRIORITY", "strict", stack_callback=conda_tests_ctxt_mgmt_def_pol):
@@ -1480,7 +1481,7 @@ def test_channel_priority_2():
eqc = {key: value for key, value in iteritems(eqc)}
assert eqc == {}, eqc
installed_w_strict = [prec.dist_str() for prec in this_r.install(spec)]
- assert installed_w_strict == [
+ assert installed_w_strict == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.7.1-py27_0',
'channel-1::openssl-1.0.1c-0',
@@ -1494,7 +1495,7 @@ def test_channel_priority_2():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ], installed_w_strict
+ ]), installed_w_strict
with env_var("CONDA_CHANNEL_PRIORITY", "False", stack_callback=conda_tests_ctxt_mgmt_def_pol):
dists = this_r.get_reduced_index(spec)
@@ -1503,7 +1504,7 @@ def test_channel_priority_2():
eqc, eqv, eqb, eqa, eqt = r2.generate_version_metrics(C, list(r2.groups.keys()))
eqc = {key: value for key, value in iteritems(eqc)}
pprint(eqc)
- assert eqc == {
+ assert eqc == add_subdir_to_iter({
'channel-1::dateutil-1.5-py27_0': 1,
'channel-1::mkl-10.3-0': 6,
'channel-1::mkl-10.3-p1': 6,
@@ -1757,10 +1758,10 @@ def test_channel_priority_2():
'channel-4::sqlite-3.21.0-h1bed415_2': 3,
'channel-4::sqlite-3.22.0-h1bed415_0': 2,
'channel-4::sqlite-3.23.1-he433501_0': 1,
- }
+ })
installed_wo_priority = set([prec.dist_str() for prec in this_r.install(spec)])
pprint(installed_wo_priority)
- assert installed_wo_priority == {
+ assert installed_wo_priority == add_subdir_to_iter({
'channel-4::blas-1.0-mkl',
'channel-4::ca-certificates-2018.03.07-0',
'channel-4::intel-openmp-2018.0.3-0',
@@ -1785,7 +1786,7 @@ def test_channel_priority_2():
'channel-4::sqlite-3.24.0-h84994c4_0',
'channel-4::tk-8.6.7-hc745277_3',
'channel-4::zlib-1.2.11-ha838bed_2',
- }
+ })
def test_dependency_sort():
@@ -1794,7 +1795,7 @@ def test_dependency_sort():
must_have = {prec.name: prec for prec in installed}
installed = r.dependency_sort(must_have)
- results_should_be = [
+ results_should_be = add_subdir_to_iter([
'channel-1::openssl-1.0.1c-0',
'channel-1::readline-6.2-0',
'channel-1::sqlite-3.7.13-0',
@@ -1808,7 +1809,7 @@ def test_dependency_sort():
'channel-1::dateutil-2.1-py27_1',
'channel-1::scipy-0.12.0-np16py27_0',
'channel-1::pandas-0.11.0-np16py27_1'
- ]
+ ])
assert len(installed) == len(results_should_be)
assert [prec.dist_str() for prec in installed] == results_should_be
@@ -1816,7 +1817,7 @@ def test_dependency_sort():
def test_update_deps():
installed = r.install(['python 2.7*', 'numpy 1.6*', 'pandas 0.10.1'])
result = [rec.dist_str() for rec in installed]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1829,14 +1830,14 @@ def test_update_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# scipy, and pandas should all be updated here. pytz is a new
# dependency of pandas. But numpy does not _need_ to be updated
# to get the latest version of pandas, so it stays put.
result = r.install(['pandas', 'python 2.7*'], installed=installed, update_deps=True, returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1850,13 +1851,13 @@ def test_update_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
# pandas should be updated here. However, it's going to try to not update
# scipy, so it won't be updated to the latest version (0.11.0).
result = r.install(['pandas', 'python 2.7*'], installed=installed, update_deps=False, returnall=True)
result = [rec.dist_str() for rec in result]
- assert result == [
+ assert result == add_subdir_to_iter([
'channel-1::dateutil-2.1-py27_1',
'channel-1::numpy-1.6.2-py27_4',
'channel-1::openssl-1.0.1c-0',
@@ -1869,7 +1870,7 @@ def test_update_deps():
'channel-1::system-5.8-1',
'channel-1::tk-8.5.13-0',
'channel-1::zlib-1.2.7-0',
- ]
+ ])
def test_surplus_features_1():
@@ -2048,6 +2049,51 @@ def test_get_reduced_index_broadening_preferred_solution():
assert d.version == '2.5', "bottom version should be 2.5, but is {}".format(d.version)
+def test_arch_preferred_when_otherwise_identical_dependencies():
+ index2 = index.copy()
+ package1_noarch = PackageRecord(**{
+ "channel": "defaults",
+ "subdir": "noarch",
+ "md5": "0123456789",
+ "fn": "doesnt-matter-here",
+ 'build': '0',
+ 'build_number': 0,
+ 'depends': [],
+ 'name': 'package1',
+ 'requires': [],
+ 'version': '1.0',
+ })
+ index2[package1_noarch] = package1_noarch
+ package1_linux64 = PackageRecord(**{
+ "channel": "defaults",
+ "subdir": context.subdir,
+ "md5": "0123456789",
+ "fn": "doesnt-matter-here",
+ 'build': '0',
+ 'build_number': 0,
+ 'depends': [],
+ 'name': 'package1',
+ 'requires': [],
+ 'version': '1.0',
+ })
+ index2[package1_linux64] = package1_linux64
+ index2 = {key: value for key, value in iteritems(index2)}
+ r = Resolve(index2)
+
+ matches = r.find_matches(MatchSpec('package1'))
+ assert len(matches) == 2
+ assert set(prec.dist_str() for prec in r.find_matches(MatchSpec('package1'))) == {
+ 'defaults/noarch::package1-1.0-0',
+ add_subdir('defaults::package1-1.0-0')
+ }
+
+ result = r.install(['package1'])
+ result = [rec.dist_str() for rec in result]
+ assert result == [
+ add_subdir('defaults::package1-1.0-0'),
+ ]
+
+
def test_arch_preferred_over_noarch_when_otherwise_equal():
index = (
PackageRecord(**{
| conda 4.6.x and conda 4.7.x not able to resolve identical package in different subdirectories
Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
The following happens:
```
[root@596ad8f0842a /]# conda create -n conda-env --dry-run -- test-package
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package pandas conflicts for:
test-package -> pandas
Package typing conflicts for:
test-package -> typing
Package libffi conflicts for:
test-package -> libffi[version='>=3.2.1,<4.0a0']
Package pyyaml conflicts for:
test-package -> pyyaml
Package six conflicts for:
test-package -> six[version='>=1.12.0']
Package py4j conflicts for:
test-package -> py4j
Package icu conflicts for:
test-package -> icu
Package wrapt conflicts for:
test-package -> wrapt
Package pytz conflicts for:
test-package -> pytz
Package python conflicts for:
test-package -> python[version='>=2.7.14']
Package pyarrow conflicts for:
test-package -> pyarrow
Package matplotlib conflicts for:
test-package -> matplotlib[version='>=2.0.2,<2.3.0']
```
Also observed on conda 4.6.14
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
1. Create a conda repository `test-channel` with the following set up
2. In /linux-64/repodata.json
```
{
"info": {
"subdir": "linux-64"
},
"packages": {
"test-package-4.2.1-py_0.tar.bz2": {
"build": "py_0",
"build_number": 0,
"depends": [
"icu",
"libffi >=3.2.1,<4.0a0",
"matplotlib >=2.0.2,<2.3.0",
"pandas",
"py4j",
"pyarrow",
"python >=2.7.14",
"pytz",
"pyyaml",
"six >=1.12.0",
"typing",
"wrapt"
],
"md5": "1512a7e9a56ecb8523475c891bfa6657",
"name": "test-package",
"noarch": "python",
"sha256": "3c02f947500c13ceb8e8aa38db2af43e9017c4948905d0cbd1610185318fe7d9",
"size": 30098,
"subdir": "noarch",
"timestamp": 1565634321434,
"version": "4.2.1"
}
},
"removed": [],
"repodata_version": 1
}
```
3. In /noarch/repodata.json
```
{
"info": {
"subdir": "noarch"
},
"packages": {
"test-package-4.2.1-py_0.tar.bz2": {
"build": "py_0",
"build_number": 0,
"depends": [
"icu",
"libffi >=3.2.1,<4.0a0",
"matplotlib >=2.0.2,<2.3.0",
"pandas",
"py4j",
"pyarrow",
"python >=2.7.14",
"pytz",
"pyyaml",
"six >=1.12.0",
"typing",
"wrapt"
],
"md5": "1512a7e9a56ecb8523475c891bfa6657",
"name": "test-package",
"noarch": "python",
"sha256": "3c02f947500c13ceb8e8aa38db2af43e9017c4948905d0cbd1610185318fe7d9",
"size": 30098,
"subdir": "noarch",
"timestamp": 1565634321434,
"version": "4.2.1"
}
},
"removed": [],
"repodata_version": 1
}
```
3. Set up conda to only point to the test-channel, note I see this error on `--dry-run` so I did not populate the test-channel with the actual packages.
4. Run `conda create -n conda-env --dry-run -- test-package`
## Expected Behavior
<!-- What do you think should happen? -->
Previously, in conda 4.5.x, there was no issue with resolving packages like this.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
[root@596ad8f0842a /]# conda info
active environment : None
user config file : /root/.condarc
populated config files : /root/.condarc
/condarc
conda version : 4.7.10
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : /miniconda (writable)
channel URLs : file://test-channel/asset/conda/linux-64
file://test-channel/asset/conda/noarch
package cache : /miniconda/pkgs
/root/.conda/pkgs
envs directories : /miniconda/envs
/root/.conda/envs
platform : linux-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Linux/4.9.184-linuxkit centos/6.10 glibc/2.12
UID:GID : 0:0
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
[root@596ad8f0842a /]# conda config --show-sources
==> /root/.condarc <==
channel_priority: disabled
channels:
- file://test-channel/asset/conda/
repodata_fns:
- repodata.json
use_only_tar_bz2: False
==> /condarc <==
channels: []
default_channels: []
```
</p></details>
Note I attempted to remove current_repodata.json from being considered, but this is 4.7.10 before the config value is apparently respected.
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
[root@596ad8f0842a /]# conda list --show-channel-urls
# packages in environment at /miniconda:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main https://repo.anaconda.com/pkgs/main
asn1crypto 0.24.0 py37_0 https://repo.anaconda.com/pkgs/main
bzip2 1.0.8 h7b6447c_0 https://repo.anaconda.com/pkgs/main
ca-certificates 2019.5.15 0 https://repo.anaconda.com/pkgs/main
certifi 2019.6.16 py37_0 https://repo.anaconda.com/pkgs/main
cffi 1.12.3 py37h2e261b9_0 https://repo.anaconda.com/pkgs/main
chardet 3.0.4 py37_1 https://repo.anaconda.com/pkgs/main
conda 4.7.10 py37_0 https://repo.anaconda.com/pkgs/main
conda-package-handling 1.3.11 py37_0 https://repo.anaconda.com/pkgs/main
cryptography 2.7 py37h1ba5d50_0 https://repo.anaconda.com/pkgs/main
idna 2.8 py37_0 https://repo.anaconda.com/pkgs/main
libarchive 3.3.3 h5d8350f_5 https://repo.anaconda.com/pkgs/main
libedit 3.1.20181209 hc058e9b_0 https://repo.anaconda.com/pkgs/main
libffi 3.2.1 hd88cf55_4 https://repo.anaconda.com/pkgs/main
libgcc-ng 9.1.0 hdf63c60_0 https://repo.anaconda.com/pkgs/main
libstdcxx-ng 9.1.0 hdf63c60_0 https://repo.anaconda.com/pkgs/main
libxml2 2.9.9 hea5a465_1 https://repo.anaconda.com/pkgs/main
lz4-c 1.8.1.2 h14c3975_0 https://repo.anaconda.com/pkgs/main
lzo 2.10 h49e0be7_2 https://repo.anaconda.com/pkgs/main
ncurses 6.1 he6710b0_1 https://repo.anaconda.com/pkgs/main
openssl 1.1.1c h7b6447c_1 https://repo.anaconda.com/pkgs/main
pip 19.1.1 py37_0 https://repo.anaconda.com/pkgs/main
pycosat 0.6.3 py37h14c3975_0 https://repo.anaconda.com/pkgs/main
pycparser 2.19 py37_0 https://repo.anaconda.com/pkgs/main
pyopenssl 19.0.0 py37_0 https://repo.anaconda.com/pkgs/main
pysocks 1.7.0 py37_0 https://repo.anaconda.com/pkgs/main
python 3.7.3 h0371630_0 https://repo.anaconda.com/pkgs/main
python-libarchive-c 2.8 py37_11 https://repo.anaconda.com/pkgs/main
readline 7.0 h7b6447c_5 https://repo.anaconda.com/pkgs/main
requests 2.22.0 py37_0 https://repo.anaconda.com/pkgs/main
ruamel_yaml 0.15.46 py37h14c3975_0 https://repo.anaconda.com/pkgs/main
setuptools 41.0.1 py37_0 https://repo.anaconda.com/pkgs/main
six 1.12.0 py37_0 https://repo.anaconda.com/pkgs/main
sqlite 3.29.0 h7b6447c_0 https://repo.anaconda.com/pkgs/main
tk 8.6.8 hbc83047_0 https://repo.anaconda.com/pkgs/main
tqdm 4.32.1 py_0 https://repo.anaconda.com/pkgs/main
urllib3 1.24.2 py37_0 https://repo.anaconda.com/pkgs/main
wheel 0.33.4 py37_0 https://repo.anaconda.com/pkgs/main
xz 5.2.4 h14c3975_4 https://repo.anaconda.com/pkgs/main
yaml 0.1.7 had09818_2 https://repo.anaconda.com/pkgs/main
zlib 1.2.11 h7b6447c_3 https://repo.anaconda.com/pkgs/main
zstd 1.3.7 h0b5b093_0 https://repo.anaconda.com/pkgs/main
```
</p></details>
| Key question: is this expected behavior for packages that have an identical noarch and linux-64 builds?
Additional note: if I remove the repodata entry for either `linux-64` or `noarch` subdir, but not the other, then the command succeeds
This is likely similar to #8302 which was partially fixed in #8938. Packages from different subdirs with the same name will also have the same channel which causes conda to consider than as the same package.
For the time being it is best to not have packages with identical names in `noarch` and another subdir. This is not the intended behavior, the solver should treat these are two separate packages.
To add a data point, I'm seeing this on another `conda create` but this time it doesn't seem to be an issue with any packages that I can control, but somewhere in public channels. Is there a suggested way to narrow down where this is coming from?
@jjhelmus do you have any initial thoughts on how to fix the issue within conda? Happy to take a stab at contributing and testing a patch for this edge case. | 2019-11-07T22:40:30 |
conda/conda | 9,464 | conda__conda-9464 | [
"8243",
"8243"
] | 89d91d639ac661e71af1fdf640c06390cc7df688 | diff --git a/conda/gateways/disk/update.py b/conda/gateways/disk/update.py
--- a/conda/gateways/disk/update.py
+++ b/conda/gateways/disk/update.py
@@ -109,17 +109,17 @@ def touch(path, mkdir=False, sudo_safe=False):
mkdir_p(dirpath)
else:
assert isdir(dirname(path))
- try:
- fh = open(path, 'a')
- except:
- raise
- else:
- fh.close()
- if sudo_safe and not on_win and os.environ.get('SUDO_UID') is not None:
- uid = int(os.environ['SUDO_UID'])
- gid = int(os.environ.get('SUDO_GID', -1))
- log.trace("chowning %s:%s %s", uid, gid, path)
- os.chown(path, uid, gid)
- return False
+ with open(path, 'a'):
+ pass
+ # This chown call causes a false positive PermissionError to be
+ # raised (similar to #7109) when called in an environment which
+ # comes from sudo -u.
+ #
+ # if sudo_safe and not on_win and os.environ.get('SUDO_UID') is not None:
+ # uid = int(os.environ['SUDO_UID'])
+ # gid = int(os.environ.get('SUDO_GID', -1))
+ # log.trace("chowning %s:%s %s", uid, gid, path)
+ # os.chown(path, uid, gid)
+ return False
except (IOError, OSError) as e:
raise NotWritableError(path, e.errno, caused_by=e)
| conda raises bogus NotWritableError exception for a bogus attempt to chown to root
This isn't a dupe (well it is a dupe of #7109) but the issue still persists.
#7180 fixed the problem in one section of code, but the same problematic snippet is present here:
https://github.com/conda/conda/blob/master/conda/gateways/disk/update.py#L121
conda raises bogus NotWritableError exception for a bogus attempt to chown to root
This isn't a dupe (well it is a dupe of #7109) but the issue still persists.
#7180 fixed the problem in one section of code, but the same problematic snippet is present here:
https://github.com/conda/conda/blob/master/conda/gateways/disk/update.py#L121
| This is pretty straightforward, and I'd be happy to fix it, I'd just like some feedback from the conda team first. Thanks!
Sure, it seems like you have a fix identified, and that's most welcome. Deduplicating code or otherwise fixing this problem would be very helpful, and we'd appreciate it.
This is pretty straightforward, and I'd be happy to fix it, I'd just like some feedback from the conda team first. Thanks!
Sure, it seems like you have a fix identified, and that's most welcome. Deduplicating code or otherwise fixing this problem would be very helpful, and we'd appreciate it. | 2019-11-25T17:30:46 |
|
conda/conda | 9,614 | conda__conda-9614 | [
"7279"
] | d527576f8033731cac9196494b9a1061b29091ba | diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -281,6 +281,8 @@ def solve_final_state(
the solved state of the environment.
"""
+ if prune and update_modifier == UpdateModifier.FREEZE_INSTALLED:
+ update_modifier = NULL
if update_modifier is NULL:
update_modifier = context.update_modifier
else:
@@ -520,54 +522,60 @@ def empty_package_list(pkg):
@time_recorder(module_name=__name__)
def _collect_all_metadata(self, ssc):
- # add in historically-requested specs
- ssc.specs_map.update(ssc.specs_from_history_map)
-
- # these are things that we want to keep even if they're not explicitly specified. This
- # is to compensate for older installers not recording these appropriately for them
- # to be preserved.
- for pkg_name in (
- "anaconda",
- "conda",
- "conda-build",
- "python.app",
- "console_shortcut",
- "powershell_shortcut",
- ):
- if pkg_name not in ssc.specs_map and ssc.prefix_data.get(pkg_name, None):
- ssc.specs_map[pkg_name] = MatchSpec(pkg_name)
-
- # Add virtual packages so they are taken into account by the solver
- virtual_pkg_index = {}
- _supplement_index_with_system(virtual_pkg_index)
- virtual_pkgs = [p.name for p in virtual_pkg_index.keys()]
- for virtual_pkgs_name in virtual_pkgs:
- if virtual_pkgs_name not in ssc.specs_map:
- ssc.specs_map[virtual_pkgs_name] = MatchSpec(virtual_pkgs_name)
-
- for prec in ssc.prefix_data.iter_records():
- # first check: add everything if we have no history to work with.
- # This happens with "update --all", for example.
- #
- # second check: add in aggressively updated packages
- #
- # third check: add in foreign stuff (e.g. from pip) into the specs
- # map. We add it so that it can be left alone more. This is a
- # declaration that it is manually installed, much like the
- # history map. It may still be replaced if it is in conflict,
- # but it is not just an indirect dep that can be pruned.
- if (
- not ssc.specs_from_history_map
- or MatchSpec(prec.name) in context.aggressive_update_packages
- or prec.subdir == "pypi"
+ if ssc.prune:
+ # When pruning DO NOT consider history of already installed packages when solving.
+ prepared_specs = {*self.specs_to_remove, *self.specs_to_add}
+ else:
+ # add in historically-requested specs
+ ssc.specs_map.update(ssc.specs_from_history_map)
+
+ # these are things that we want to keep even if they're not explicitly specified. This
+ # is to compensate for older installers not recording these appropriately for them
+ # to be preserved.
+ for pkg_name in (
+ "anaconda",
+ "conda",
+ "conda-build",
+ "python.app",
+ "console_shortcut",
+ "powershell_shortcut",
):
- ssc.specs_map.update({prec.name: MatchSpec(prec.name)})
+ if pkg_name not in ssc.specs_map and ssc.prefix_data.get(
+ pkg_name, None
+ ):
+ ssc.specs_map[pkg_name] = MatchSpec(pkg_name)
+
+ # Add virtual packages so they are taken into account by the solver
+ virtual_pkg_index = {}
+ _supplement_index_with_system(virtual_pkg_index)
+ virtual_pkgs = [p.name for p in virtual_pkg_index.keys()]
+ for virtual_pkgs_name in virtual_pkgs:
+ if virtual_pkgs_name not in ssc.specs_map:
+ ssc.specs_map[virtual_pkgs_name] = MatchSpec(virtual_pkgs_name)
+
+ for prec in ssc.prefix_data.iter_records():
+ # first check: add everything if we have no history to work with.
+ # This happens with "update --all", for example.
+ #
+ # second check: add in aggressively updated packages
+ #
+ # third check: add in foreign stuff (e.g. from pip) into the specs
+ # map. We add it so that it can be left alone more. This is a
+ # declaration that it is manually installed, much like the
+ # history map. It may still be replaced if it is in conflict,
+ # but it is not just an indirect dep that can be pruned.
+ if (
+ not ssc.specs_from_history_map
+ or MatchSpec(prec.name) in context.aggressive_update_packages
+ or prec.subdir == "pypi"
+ ):
+ ssc.specs_map.update({prec.name: MatchSpec(prec.name)})
- prepared_specs = {
- *self.specs_to_remove,
- *self.specs_to_add,
- *ssc.specs_from_history_map.values(),
- }
+ prepared_specs = {
+ *self.specs_to_remove,
+ *self.specs_to_add,
+ *ssc.specs_from_history_map.values(),
+ }
index, r = self._prepare(prepared_specs)
ssc.set_repository_metadata(index, r)
@@ -731,17 +739,18 @@ def _add_specs(self, ssc):
# the only things we should consider freezing are things that don't conflict with the new
# specs being added.
explicit_pool = ssc.r._get_package_pool(self.specs_to_add)
+ if ssc.prune:
+ # Ignore installed specs on prune.
+ installed_specs = ()
+ else:
+ installed_specs = [
+ record.to_match_spec() for record in ssc.prefix_data.iter_records()
+ ]
conflict_specs = (
- ssc.r.get_conflicting_specs(
- tuple(
- record.to_match_spec() for record in ssc.prefix_data.iter_records()
- ),
- self.specs_to_add,
- )
- or ()
+ ssc.r.get_conflicting_specs(installed_specs, self.specs_to_add) or tuple()
)
- conflict_specs = {_.name for _ in conflict_specs}
+ conflict_specs = {spec.name for spec in conflict_specs}
for pkg_name, spec in ssc.specs_map.items():
matches_for_spec = tuple(
@@ -1342,7 +1351,8 @@ def __init__(
# Group 4. Mutable working containers
self.specs_map = {}
- self.solution_precs = tuple(self.prefix_data.iter_records())
+ self.solution_precs = None
+ self._init_solution_precs()
self.add_back_map = {} # name: (prec, spec)
self.final_environment_specs = None
@@ -1365,9 +1375,16 @@ def pinned_specs(self):
def set_repository_metadata(self, index, r):
self.index, self.r = index, r
+ def _init_solution_precs(self):
+ if self.prune:
+ # DO NOT add existing prefix data to solution on prune
+ self.solution_precs = tuple()
+ else:
+ self.solution_precs = tuple(self.prefix_data.iter_records())
+
def working_state_reset(self):
self.specs_map = {}
- self.solution_precs = tuple(self.prefix_data.iter_records())
+ self._init_solution_precs()
self.add_back_map = {} # name: (prec, spec)
self.final_environment_specs = None
| diff --git a/tests/core/test_solve.py b/tests/core/test_solve.py
--- a/tests/core/test_solve.py
+++ b/tests/core/test_solve.py
@@ -429,6 +429,297 @@ def test_prune_1(tmpdir):
assert convert_to_dist_str(link_precs) == link_order
+def test_update_prune_1(tmpdir):
+ """Regression test: Ensure that update with prune is not taking the history
+ into account, since that stops it from removing packages that were removed
+ from the environment specs.
+ """
+ specs = (
+ MatchSpec("numpy"),
+ MatchSpec("python=2.7.3"),
+ )
+
+ with get_solver(tmpdir, specs) as solver:
+ final_state_1 = solver.solve_final_state()
+ pprint(convert_to_dist_str(final_state_1))
+ order = add_subdir_to_iter(
+ (
+ "channel-1::openssl-1.0.1c-0",
+ "channel-1::readline-6.2-0",
+ "channel-1::sqlite-3.7.13-0",
+ "channel-1::system-5.8-1",
+ "channel-1::tk-8.5.13-0",
+ "channel-1::zlib-1.2.7-0",
+ "channel-1::python-2.7.3-7",
+ "channel-1::numpy-1.7.1-py27_0",
+ )
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+ # Here numpy is removed from the specs (but the old specs are kept as
+ # history).
+ new_environment_specs = (MatchSpec("python=2.7.3"),)
+
+ with get_solver(
+ tmpdir,
+ new_environment_specs,
+ prefix_records=final_state_1,
+ history_specs=specs,
+ ) as solver:
+ final_state_1 = solver.solve_final_state(prune=True)
+ pprint(convert_to_dist_str(final_state_1))
+
+ # Numpy should now be absent from the solved packages.
+ order = add_subdir_to_iter(
+ (
+ "channel-1::openssl-1.0.1c-0",
+ "channel-1::readline-6.2-0",
+ "channel-1::sqlite-3.7.13-0",
+ "channel-1::system-5.8-1",
+ "channel-1::tk-8.5.13-0",
+ "channel-1::zlib-1.2.7-0",
+ "channel-1::python-2.7.3-7",
+ )
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+
+def test_update_prune_2(tmpdir):
+ """Regression test: Ensure that update with prune is pruning dependencies
+ of packages that are removed from environment as well.
+ """
+ specs = (
+ MatchSpec("python=2.7.3"),
+ MatchSpec("accelerate"),
+ )
+
+ with get_solver(tmpdir, specs) as solver:
+ final_state_1 = solver.solve_final_state()
+ pprint(convert_to_dist_str(final_state_1))
+ order = add_subdir_to_iter(
+ (
+ "channel-1::libnvvm-1.0-p0",
+ "channel-1::mkl-rt-11.0-p0",
+ "channel-1::openssl-1.0.1c-0",
+ "channel-1::readline-6.2-0",
+ "channel-1::sqlite-3.7.13-0",
+ "channel-1::system-5.8-1",
+ "channel-1::tk-8.5.13-0",
+ "channel-1::zlib-1.2.7-0",
+ "channel-1::llvm-3.2-0",
+ "channel-1::python-2.7.3-7",
+ "channel-1::bitarray-0.8.1-py27_0",
+ "channel-1::llvmpy-0.11.2-py27_0",
+ "channel-1::meta-0.4.2.dev-py27_0",
+ "channel-1::mkl-service-1.0.0-py27_p0",
+ "channel-1::numpy-1.7.1-py27_p0",
+ "channel-1::numba-0.8.1-np17py27_0",
+ "channel-1::numexpr-2.1-np17py27_p0",
+ "channel-1::scipy-0.12.0-np17py27_p0",
+ "channel-1::numbapro-0.11.0-np17py27_p0",
+ "channel-1::scikit-learn-0.13.1-np17py27_p0",
+ "channel-1::mkl-11.0-np17py27_p0",
+ "channel-1::accelerate-1.1.0-np17py27_p0",
+ )
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+ # Here accelerate is removed from the specs (but the old specs are kept as
+ # history). This should cause every dependency of accelerate to disappear
+ # from the pruned package list.
+ new_environment_specs = (MatchSpec("python=2.7.3"),)
+
+ with get_solver(
+ tmpdir,
+ new_environment_specs,
+ prefix_records=final_state_1,
+ history_specs=specs,
+ ) as solver:
+ final_state_1 = solver.solve_final_state(prune=True)
+ pprint(convert_to_dist_str(final_state_1))
+
+ # Every dependecy of accelerate should now be absent from the solved
+ # packages.
+ order = add_subdir_to_iter(
+ (
+ "channel-1::openssl-1.0.1c-0",
+ "channel-1::readline-6.2-0",
+ "channel-1::sqlite-3.7.13-0",
+ "channel-1::system-5.8-1",
+ "channel-1::tk-8.5.13-0",
+ "channel-1::zlib-1.2.7-0",
+ "channel-1::python-2.7.3-7",
+ )
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+
+def test_update_prune_3(tmpdir):
+ """Ensure that update with prune is not removing packages that are still
+ needed by remaining specs.
+ """
+ specs = (
+ MatchSpec("numpy"),
+ MatchSpec("python=2.7.3"),
+ MatchSpec("accelerate"),
+ )
+
+ with get_solver(tmpdir, specs) as solver:
+ final_state_1 = solver.solve_final_state()
+ pprint(convert_to_dist_str(final_state_1))
+ order = add_subdir_to_iter(
+ (
+ "channel-1::libnvvm-1.0-p0",
+ "channel-1::mkl-rt-11.0-p0",
+ "channel-1::openssl-1.0.1c-0",
+ "channel-1::readline-6.2-0",
+ "channel-1::sqlite-3.7.13-0",
+ "channel-1::system-5.8-1",
+ "channel-1::tk-8.5.13-0",
+ "channel-1::zlib-1.2.7-0",
+ "channel-1::llvm-3.2-0",
+ "channel-1::python-2.7.3-7",
+ "channel-1::bitarray-0.8.1-py27_0",
+ "channel-1::llvmpy-0.11.2-py27_0",
+ "channel-1::meta-0.4.2.dev-py27_0",
+ "channel-1::mkl-service-1.0.0-py27_p0",
+ "channel-1::numpy-1.7.1-py27_p0",
+ "channel-1::numba-0.8.1-np17py27_0",
+ "channel-1::numexpr-2.1-np17py27_p0",
+ "channel-1::scipy-0.12.0-np17py27_p0",
+ "channel-1::numbapro-0.11.0-np17py27_p0",
+ "channel-1::scikit-learn-0.13.1-np17py27_p0",
+ "channel-1::mkl-11.0-np17py27_p0",
+ "channel-1::accelerate-1.1.0-np17py27_p0",
+ )
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+ # Here accelerate is removed from the specs (but the old specs are kept as
+ # history). This should cause every dependency of accelerate to disappear
+ # from the pruned package list, but numpy should be kept, because it is still
+ # in the specs.
+ new_environment_specs = (
+ MatchSpec("numpy"),
+ MatchSpec("python=2.7.3"),
+ )
+
+ with get_solver(
+ tmpdir,
+ new_environment_specs,
+ prefix_records=final_state_1,
+ history_specs=specs,
+ ) as solver:
+ final_state_1 = solver.solve_final_state(prune=True)
+ pprint(convert_to_dist_str(final_state_1))
+
+ # Every dependecy of accelerate should now be absent from the solved packages,
+ # but numpy should remain.
+ order = add_subdir_to_iter(
+ (
+ "channel-1::openssl-1.0.1c-0",
+ "channel-1::readline-6.2-0",
+ "channel-1::sqlite-3.7.13-0",
+ "channel-1::system-5.8-1",
+ "channel-1::tk-8.5.13-0",
+ "channel-1::zlib-1.2.7-0",
+ "channel-1::python-2.7.3-7",
+ "channel-1::numpy-1.7.1-py27_0",
+ )
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+
+def test_update_prune_4(tmpdir):
+ """Regression test: Ensure that update with prune is not taking the history
+ into account, since that stops it from removing packages that were removed
+ from the environment specs.
+ """
+ specs = (
+ MatchSpec("numpy"),
+ MatchSpec("python=2.7.3"),
+ )
+
+ with get_solver(tmpdir, specs) as solver:
+ final_state_1 = solver.solve_final_state()
+ pprint(convert_to_dist_str(final_state_1))
+ order = add_subdir_to_iter(
+ (
+ "channel-1::openssl-1.0.1c-0",
+ "channel-1::readline-6.2-0",
+ "channel-1::sqlite-3.7.13-0",
+ "channel-1::system-5.8-1",
+ "channel-1::tk-8.5.13-0",
+ "channel-1::zlib-1.2.7-0",
+ "channel-1::python-2.7.3-7",
+ "channel-1::numpy-1.7.1-py27_0",
+ )
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+ # Here numpy is removed from the specs (but the old specs are kept as
+ # history).
+ new_environment_specs = (MatchSpec("python=2.7.3"),)
+
+ with get_solver(
+ tmpdir,
+ new_environment_specs,
+ prefix_records=final_state_1,
+ history_specs=specs,
+ ) as solver:
+ final_state_1 = solver.solve_final_state(
+ prune=True,
+ update_modifier=UpdateModifier.FREEZE_INSTALLED,
+ )
+ pprint(convert_to_dist_str(final_state_1))
+
+ # Numpy should now be absent from the solved packages.
+ order = add_subdir_to_iter(
+ (
+ "channel-1::openssl-1.0.1c-0",
+ "channel-1::readline-6.2-0",
+ "channel-1::sqlite-3.7.13-0",
+ "channel-1::system-5.8-1",
+ "channel-1::tk-8.5.13-0",
+ "channel-1::zlib-1.2.7-0",
+ "channel-1::python-2.7.3-7",
+ )
+ )
+ assert convert_to_dist_str(final_state_1) == order
+
+
[email protected]("prune", [True, False])
+def test_update_prune_5(tmpdir, prune, capsys):
+ """Regression test: Check that prefix data is not taken into account when solving on prune."""
+ # "Create" a conda env with specs that "pin" dependencies.
+ specs = (
+ MatchSpec("python=2.7"),
+ MatchSpec("numexpr==2.0.1=np17py27_p3"),
+ )
+ with get_solver(tmpdir, specs) as solver:
+ final_state_1 = solver.solve_final_state()
+
+ out, _ = capsys.readouterr()
+ assert "Updating numexpr is constricted by" not in out
+
+ # If prefix data is evaluated it will conflict with "pinned" dependencies of new specs.
+ new_environment_specs = (
+ MatchSpec("python=2.7"),
+ MatchSpec("numexpr==2.0.1=np17py27_p2"),
+ )
+ with get_solver(
+ tmpdir,
+ new_environment_specs,
+ prefix_records=final_state_1,
+ history_specs=specs,
+ ) as solver:
+ solver.solve_final_state(prune=prune)
+
+ out, _ = capsys.readouterr()
+ solve_using_prefix_data = not prune
+ assert ("Updating numexpr is constricted by" in out) is solve_using_prefix_data
+
+
def test_force_remove_1(tmpdir):
specs = (MatchSpec("numpy[version=*,build=*py27*]"),)
with get_solver(tmpdir, specs) as solver:
| conda env update --prune does not remove installed packages not defined in environment.yml
**I'm submitting a...**
- [x] bug report
- [ ] feature request
## Current Behavior
`conda env update --prune` does not remove packages no longer referenced in the `environment.yml` file.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
Define an `environment.yml` file in a project directory as follows:
name: new-project-env
dependencies:
- python=3
- numpy
In the project directory run the following commands:
conda env create
conda activate new-project-env
python
import numpy
exit()
This succeeds as expected.
Update the `environment.yml` file as follows, **removing numpy**,
name: new-project-env
dependencies:
- python=3
Run the following commands in the project directory:
conda deactivate
conda env update --prune
conda activate new-project-env
python
import numpy
exit()
**This numpy import succeeds and seems like a bug**.
## Expected Behavior
Per [the docs](https://conda.io/docs/commands/env/conda-env-update.html) (--prune means "remove installed packages not defined in environment.yml") I expect that after installing a package (numpy in the example above) and subsquently removing it from `environment.yml` the package should be removed from the relevant conda environment.
## Current Workaround
I've found that we can use `conda env create --force` to overwrite the existing environment and thus ensure that the environment accurately reflects the `environment.yml` file. But this requires recreating the environment from scratch.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : new-project-env
active env location : /home/mikhailgolubitsky/anaconda3/envs/new-project-env
shell level : 2
user config file : /home/mikhailgolubitsky/.condarc
populated config files : /home/mikhailgolubitsky/.condarc
conda version : 4.5.3
conda-build version : 3.0.27
python version : 3.6.3.final.0
base environment : /home/mikhailgolubitsky/anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /home/mikhailgolubitsky/anaconda3/pkgs
/home/mikhailgolubitsky/.conda/pkgs
envs directories : /home/mikhailgolubitsky/anaconda3/envs
/home/mikhailgolubitsky/.conda/envs
platform : linux-64
user-agent : conda/4.5.3 requests/2.18.4 CPython/3.6.3 Linux/4.13.0-39-generic ubuntu/17.10 glibc/2.26
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /home/mikhailgolubitsky/.condarc <==
channels:
- conda-forge
- defaults
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /home/mikhailgolubitsky/anaconda3/envs/new-project-env:
#
# Name Version Build Channel
ca-certificates 2018.4.16 0 conda-forge
certifi 2018.4.16 py36_0 conda-forge
intel-openmp 2018.0.0 8 defaults
libgcc-ng 7.2.0 hdf63c60_3 defaults
libgfortran-ng 7.2.0 hdf63c60_3 defaults
mkl 2018.0.2 1 defaults
mkl_fft 1.0.2 py36_0 conda-forge
mkl_random 1.0.1 py36_0 conda-forge
ncurses 5.9 10 conda-forge
numpy 1.14.3 py36h14a74c5_0 defaults
numpy-base 1.14.3 py36hdbf6ddf_0 defaults
openssl 1.0.2o 0 conda-forge
pip 9.0.3 py36_0 conda-forge
python 3.6.5 1 conda-forge
readline 7.0 0 conda-forge
setuptools 39.1.0 py36_0 conda-forge
sqlite 3.20.1 2 conda-forge
tk 8.6.7 0 conda-forge
wheel 0.31.0 py36_0 conda-forge
xz 5.2.3 0 conda-forge
zlib 1.2.11 0 conda-forge
```
</p></details>
| This has the same root cause as #6809, but is a better summary of the issue. The problem is that conda looks through its history file and thinks that you've requested those specs in the past, so it adds them back. So, the behaviour of `--prune` since 4.4.0 has been that only dependencies, rather than explicitly requested packages, have been pruned.
In my opinion, the fix would either be for `conda env update` to not take specs from the history at all, or for `conda env` operations to not populate the history at all, or both.
If you'd like a workaround that is faster than `conda env create --force` you can truncate the history file located at `<env>/conda-meta/history` (the file needs to be present but can be empty).
This confused me a lot also.
The ```truncate the history file located at `<env>/conda-meta/history` ``` hack does not work any longer for me.
I was testing conda 4.7.5 (windows and linux) when stumbled upon this.
> In my opinion, the fix would either be for conda env update to not take specs from the history at all, or for conda env operations to not populate the history at all, or both.
Seems like the correct approach, IMHO. Any comments from the team? We are willing to work on this and provide a PR, as we dearly depend on this and is preventing us from upgrading.
I'm not sure I fully understand the desired behavior, but yes, absolutely, a PR to implement better behavior is welcome.
The party I don't understand is why basing it on the history is bad. It seems like the history of explicit specs would be there best source of minimal information for env specs, but I must be missing the reasons why that doesn't work in practice. Perhaps the reason is that the removal part of the update is not factored in correctly?
> I'm not sure I fully understand the desired behavior, but yes, absolutely, a PR to implement better behavior is welcome.
Sure, let me explain with an example.
## conda <4.4
Suppose we have this `environment.yaml` file:
```yaml
name: env-app
dependencies:
- python
- pytest-mock
```
When running `conda env update` for the 1st time, conda creates an environment with `python`, `pytest-mock`, and their dependencies, including `pytest`, which `pytest-mock` depends on.
If we change the `environment.yaml` to:
```yaml
name: env-app
dependencies:
- python
```
and execute `conda env update` again, nothing happens, because by default it will only add to the environment, never remove.
When we implemented `--prune` originally, its purpose was to remove every package and dependency not listed in the `environment.yaml` file.
So adding `--prune` to the 2nd run, conda would uninstall `pytest-mock` and `pytest`, as they are no longer listed.
## conda 4.4+
This has changed since version 4.4 with the introduction of the history feature: conda keeps track of what was installed previously, so users typing `conda install` multiple times would get a consistent environment (that's my understanding of the feature).
But this has also affected `conda env update --prune`, most likely unintentionally (I suspect the reason is that it uses `conda install` behind the scenes).
So what happens in the 2nd run now, using `--prune`, is that `pytest-mock` and `pytest` are kept in the environment.
So effectively `--prune` has been broken since 4.4, as it no longer removes previous packages.
> The party I don't understand is why basing it on the history is bad.
The main use case is to get the exact environment described in the yaml file, exactly what you would get with `conda create --force`, but much quicker as you don't have to delete/re-link everything.
@msarahan are you OK with a PR fixing the behavior of `--prune` as I describe above?
I see, thanks for the explanation. Yes, any PR that fixes this is welcome. It's not immediately obvious to me how to do it. Perhaps a flag like --replace-specs that ignores the history and only keeps the specs that are passed explicitly.
The implementation of history specs being added in is in conda/core/solve.py in the _add_specs method. Let me know if you have any questions.
Thanks for the pointers!
Can we raise a warning or `NotImplementedError` for the update `--prune` option until it is fixed? It seems that the Conda project has relatively frequent releases, vs the expected time for this to get fixed.
I am having trouble with the workaround as well (truncating the history file). Step to reproduce (conda 4.8.2):
1. conda create --clone base -n update-test
2. conda activate update-test
3. conda env export > orig.yml
4. conda install ipython
5. truncate --size 0 ~/miniconda3/envs/update-test/conda-meta/history
6. conda env update --prune -f orig.yml
after those steps ipython is still installed. | 2020-01-17T21:07:06 |
conda/conda | 9,660 | conda__conda-9660 | [
"9625"
] | 50093e14c6a96c7cd4f6c4570cc09bc5b763ede4 | diff --git a/conda_env/cli/main_config.py b/conda_env/cli/main_config.py
--- a/conda_env/cli/main_config.py
+++ b/conda_env/cli/main_config.py
@@ -24,5 +24,10 @@ def configure_parser(sub_parsers):
help=config_description,
epilog=config_example,
)
+ config_parser.set_defaults(func='.main_config.execute')
config_subparser = config_parser.add_subparsers()
configure_vars_parser(config_subparser)
+
+
+def execute(args, parser):
+ parser.parse_args(['config', '--help'])
| conda env config (or other inappropriate/incomplete commands) results in AttributeError(possibly related to argparse ?)
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
```conda env config``` (or other options that are either incomplete or inappropriate,
such as ```conda env config vars```)
shows Error message including
```
Traceback (most recent call last):
File "/home/USERNAME/miniconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1078, in __call__
return func(*args, **kwargs)
File "/home/USERNAME/miniconda3/lib/python3.7/site-packages/conda_env/cli/main.py", line 76, in do_call
relative_mod, func_name = args.func.rsplit('.', 1)
AttributeError: 'Namespace' object has no attribute 'func'
```
This seems to be related to argparse behavior?
(p.s. USERNAME is in place for the username currently used, and ROOTUSERNAME is the (main) root username. ANOTHERFOLDER is just another folder.)
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
conda env config
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/USERNAME/miniconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1078, in __call__
return func(*args, **kwargs)
File "/home/USERNAME/miniconda3/lib/python3.7/site-packages/conda_env/cli/main.py", line 76, in do_call
relative_mod, func_name = args.func.rsplit('.', 1)
AttributeError: 'Namespace' object has no attribute 'func'
`$ /home/USERNAME/miniconda3/bin/conda-env config vars`
environment variables:
CIO_TEST=<not set>
CONDA_AUTO_UPDATE_CONDA=false
CONDA_DEFAULT_ENV=base
CONDA_EXE=/home/USERNAME/miniconda3/bin/conda
CONDA_PREFIX=/home/USERNAME/miniconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/home/USERNAME/miniconda3/bin/python
CONDA_ROOT=/home/USERNAME/miniconda3
CONDA_SHLVL=1
PATH=/home/USERNAME/miniconda3/bin:/home/USERNAME/miniconda3/bin:/home/
USERNAME/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/
usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/
java-8-openjdk-amd64/bin:/usr/lib/jvm/java-8-openjdk-
amd64/jre/bin:/home/ROOTUSERNAME/ANOTHERFOLDER/apache-maven-3.6.0/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : base
active env location : /home/USERNAME/miniconda3
shell level : 1
user config file : /home/USERNAME/.condarc
populated config files : /home/USERNAME/.condarc
conda version : 4.8.1
conda-build version : not installed
python version : 3.7.6.final.0
virtual packages : __cuda=10.1
__glibc=2.27
base environment : /home/USERNAME/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/USERNAME/miniconda3/pkgs
/home/USERNAME/.conda/pkgs
envs directories : /home/USERNAME/miniconda3/envs
/home/USERNAME/.conda/envs
platform : linux-64
user-agent : conda/4.8.1 requests/2.22.0 CPython/3.7.6 Linux/4.15.0-74-generic ubuntu/18.04.3 glibc/2.27
UID:GID : 1010:1010
netrc file : None
offline mode : False
```
## Expected Behavior
<!-- What do you think should happen? -->
show error message or --help option equivalent output
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : base
active env location : /home/USERNAME/miniconda3
shell level : 1
user config file : /home/USERNAME/.condarc
populated config files : /home/USERNAME/.condarc
conda version : 4.8.1
conda-build version : not installed
python version : 3.7.6.final.0
virtual packages : __cuda=10.1
__glibc=2.27
base environment : /home/USERNAME/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/USERNAME/miniconda3/pkgs
/home/USERNAME/.conda/pkgs
envs directories : /home/USERNAME/miniconda3/envs
/home/USERNAME/.conda/envs
platform : linux-64
user-agent : conda/4.8.1 requests/2.22.0 CPython/3.7.6 Linux/4.15.0-74-generic ubuntu/18.04.3 glibc/2.27
UID:GID : 1010:1010
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /home/USERNAME/.condarc <==
channels:
- defaults
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /home/USERNAME/miniconda3:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main defaults
asn1crypto 1.3.0 py37_0 defaults
ca-certificates 2019.11.27 0 defaults
certifi 2019.11.28 py37_0 defaults
cffi 1.13.2 py37h2e261b9_0 defaults
chardet 3.0.4 py37_1003 defaults
conda 4.8.1 py37_0 defaults
conda-package-handling 1.6.0 py37h7b6447c_0 defaults
cryptography 2.8 py37h1ba5d50_0 defaults
idna 2.8 py37_0 defaults
ld_impl_linux-64 2.33.1 h53a641e_7 defaults
libedit 3.1.20181209 hc058e9b_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc-ng 9.1.0 hdf63c60_0 defaults
libstdcxx-ng 9.1.0 hdf63c60_0 defaults
ncurses 6.1 he6710b0_1 defaults
openssl 1.1.1d h7b6447c_3 defaults
pip 19.3.1 py37_0 defaults
pycosat 0.6.3 py37h7b6447c_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 19.1.0 py37_0 defaults
pysocks 1.7.1 py37_0 defaults
python 3.7.6 h0371630_2 defaults
readline 7.0 h7b6447c_5 defaults
requests 2.22.0 py37_1 defaults
ruamel_yaml 0.15.87 py37h7b6447c_0 defaults
setuptools 44.0.0 py37_0 defaults
six 1.13.0 py37_0 defaults
sqlite 3.30.1 h7b6447c_0 defaults
tk 8.6.8 hbc83047_0 defaults
tqdm 4.41.1 py_0 defaults
urllib3 1.25.7 py37_0 defaults
wheel 0.33.6 py37_0 defaults
xz 5.2.4 h14c3975_4 defaults
yaml 0.1.7 had09818_2 defaults
zlib 1.2.11 h7b6447c_3 defaults
```
</p></details>
| Can confirm this also happens on ```Windows 10 (x86_64), same conda version``` installed through anaconda.
Anybody else on mac who can check/confirm this behavior?
I never recall seeing this behavior before, so I assume this might occur due to changes in ```conda 4.8.1```. Though if one uses ```conda``` in an 'appropriate way' no problems will occur, it is very annoying(and technically a bug since a predictable Exception is not caught). However, I am not sure of what the anticipated behavior is, so I cannot pinpoint/PR on this issue.
| 2020-02-04T19:20:35 |
|
conda/conda | 9,665 | conda__conda-9665 | [
"9599"
] | 2cdd7ab052c2b96c088137f52dc40c613e99ce33 | diff --git a/conda/cli/main.py b/conda/cli/main.py
--- a/conda/cli/main.py
+++ b/conda/cli/main.py
@@ -84,6 +84,8 @@ def _main(*args, **kwargs):
exit_code = do_call(args, p)
if isinstance(exit_code, int):
return exit_code
+ elif hasattr(exit_code, 'rc'):
+ return exit_code.rc
if sys.platform == 'win32' and sys.version_info[0] == 2:
| diff --git a/tests/test_cli.py b/tests/test_cli.py
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -162,3 +162,34 @@ def test_search_4(self):
@pytest.mark.integration
def test_search_5(self):
self.assertIsInstance(capture_json_with_argv('conda search --platform win-32 --json'), dict)
+
+class TestRun(unittest.TestCase):
+ def test_run_returns_int(self):
+ from tests.test_create import make_temp_env
+ from tests.test_create import make_temp_prefix
+
+ prefix = make_temp_prefix(name='test')
+ with make_temp_env(prefix=prefix):
+ stdout, stderr, result = run_inprocess_conda_command('conda run -p {} echo hi'.format(prefix))
+
+ assert isinstance(result, int)
+
+ def test_run_returns_zero_errorlevel(self):
+ from tests.test_create import make_temp_env
+ from tests.test_create import make_temp_prefix
+
+ prefix = make_temp_prefix(name='test')
+ with make_temp_env(prefix=prefix):
+ stdout, stderr, result = run_inprocess_conda_command('conda run -p {} exit 0'.format(prefix))
+
+ assert result == 0
+
+ def test_run_returns_nonzero_errorlevel(self):
+ from tests.test_create import make_temp_env
+ from tests.test_create import make_temp_prefix
+
+ prefix = make_temp_prefix(name='test')
+ with make_temp_env(prefix=prefix) as prefix:
+ stdout, stderr, result = run_inprocess_conda_command('conda run -p "{}" exit 5'.format(prefix))
+
+ assert result == 5
| conda run is not preserving exit code
## Current Behavior
`conda run` used to return the correct exit status of the target process, but it doesn't anymore. This was apparently working correctly in conda 4.8.0 but it seems broken since version 4.8.1. `conda run` now erroneously always return the exit status of 0. This is a serious problem as jobs fail silently now.
### Steps to Reproduce
```
$ conda -V
conda 4.8.1
$ conda run -n myenv /usr/bin/true; echo $?
0
$ conda run -n myenv /usr/bin/false; echo $?
ERROR conda.cli.main_run:execute(30): Subprocess for 'conda run ['/usr/bin/false']' command failed. (See above for error)
0
```
## Expected Behavior
`conda run` should preserve the exit status of the target process, whether the target is `python` or otherwise. It worked correctly with the previous version:
```
$ conda -V
conda 4.8.0
$ conda run -n base /usr/bin/true; echo $?
0
$ conda run -n base /usr/bin/false; echo $?
ERROR conda.cli.main_run:execute(39): Subprocess for 'conda run ['/usr/bin/false']' command failed. Stderr was:
1
```
## Environment Information
This issue really is independent of the environment as it happens both in various dockerfiles and on MacOS too.
---
@msarahan Please fix this bug considering I see a commit from 25 days that may have introduced it! Adding unit tests would also be wise.
| Our team have many things to work on. PRs that try to fix this would be welcome if you are interested. Conda run is still not ready for prime time usage unfortunately.
We are not churning out new conda features.
It appears commit https://github.com/conda/conda/commit/c7d5ada5d0a6038e81f9ab10380e5e69c7d65d1c introduced the error.
Returning a namedtuple (Response) instead of an int breaks this logic https://github.com/conda/conda/blob/e9a50561880696e57ba80472dce332e08e58ee0b/conda/cli/main.py#L84-L86
I can create a pull request to fix. Thoughts on reverting the return value to an int vs expanding the logic at the call site in main.py? I can't find rationale for changing the return value.
| 2020-02-06T03:55:50 |
conda/conda | 9,730 | conda__conda-9730 | [
"9661"
] | 901afcffb77b9a1132bfdb8381b2ce8afdc28c69 | diff --git a/conda/core/subdir_data.py b/conda/core/subdir_data.py
--- a/conda/core/subdir_data.py
+++ b/conda/core/subdir_data.py
@@ -14,7 +14,7 @@
import json
from logging import DEBUG, getLogger
from mmap import ACCESS_READ, mmap
-from os.path import dirname, isdir, join, splitext
+from os.path import dirname, isdir, join, splitext, exists
import re
from time import time
import warnings
@@ -29,6 +29,7 @@
from ..common.compat import (ensure_binary, ensure_text_type, ensure_unicode, iteritems, iterkeys,
string_types, text_type, with_metaclass)
from ..common.io import ThreadLimitedThreadPoolExecutor, DummyExecutor, dashlist
+from ..common.path import url_to_path
from ..common.url import join_url, maybe_unquote
from ..core.package_cache_data import PackageCacheData
from ..exceptions import (CondaDependencyError, CondaHTTPError, CondaUpgradeError,
@@ -62,11 +63,19 @@ def __call__(cls, channel, repodata_fn=REPODATA_FN):
assert channel.subdir
assert not channel.package_filename
assert type(channel) is Channel
+ now = time()
cache_key = channel.url(with_credentials=True), repodata_fn
- if not cache_key[0].startswith('file://') and cache_key in SubdirData._cache_:
- return SubdirData._cache_[cache_key]
-
+ if cache_key in SubdirData._cache_:
+ cache_entry = SubdirData._cache_[cache_key]
+ if cache_key[0].startswith('file://'):
+ file_path = url_to_path(channel.url() + '/' + repodata_fn)
+ if exists(file_path):
+ if cache_entry._mtime > getmtime(file_path):
+ return cache_entry
+ else:
+ return cache_entry
subdir_data_instance = super(SubdirDataType, cls).__call__(channel, repodata_fn)
+ subdir_data_instance._mtime = now
SubdirData._cache_[cache_key] = subdir_data_instance
return subdir_data_instance
@@ -75,6 +84,12 @@ def __call__(cls, channel, repodata_fn=REPODATA_FN):
class SubdirData(object):
_cache_ = {}
+ @classmethod
+ def clear_cached_local_channel_data(cls):
+ # This should only ever be needed during unit tests, when
+ # CONDA_USE_ONLY_TAR_BZ2 may change during process lifetime.
+ cls._cache_ = {k: v for k, v in cls._cache_.items() if not k[0].startswith('file://')}
+
@staticmethod
def query_all(package_ref_or_match_spec, channels=None, subdirs=None,
repodata_fn=REPODATA_FN):
diff --git a/conftest.py b/conftest.py
--- a/conftest.py
+++ b/conftest.py
@@ -8,6 +8,7 @@
from conda.common.compat import PY3
from conda.gateways.disk.create import TemporaryDirectory
+from conda.core.subdir_data import SubdirData
win_default_shells = ["cmd.exe", "powershell", "git_bash", "cygwin"]
shells = ["bash", "zsh"]
@@ -65,6 +66,11 @@ def set_tmpdir(tmpdir):
tmpdir_in_use = td
[email protected](autouse=True)
+def clear_subdir_cache(tmpdir):
+ SubdirData.clear_cached_local_channel_data()
+
+
# From: https://hackebrot.github.io/pytest-tricks/fixtures_as_class_attributes/
# This allows using pytest fixtures in unittest subclasses, here is how to use it:
#
| diff --git a/tests/core/test_subdir_data.py b/tests/core/test_subdir_data.py
--- a/tests/core/test_subdir_data.py
+++ b/tests/core/test_subdir_data.py
@@ -4,6 +4,7 @@
from logging import getLogger
from os.path import dirname, join
from unittest import TestCase
+from time import sleep
import pytest
@@ -201,16 +202,59 @@ def test_subdir_data_prefers_conda_to_tar_bz2():
def test_use_only_tar_bz2():
channel = Channel(join(dirname(__file__), "..", "data", "conda_format_repo", context.subdir))
+ SubdirData.clear_cached_local_channel_data()
with env_var('CONDA_USE_ONLY_TAR_BZ2', True, stack_callback=conda_tests_ctxt_mgmt_def_pol):
sd = SubdirData(channel)
precs = tuple(sd.query("zlib"))
assert precs[0].fn.endswith(".tar.bz2")
+ SubdirData.clear_cached_local_channel_data()
with env_var('CONDA_USE_ONLY_TAR_BZ2', False, stack_callback=conda_tests_ctxt_mgmt_def_pol):
sd = SubdirData(channel)
precs = tuple(sd.query("zlib"))
assert precs[0].fn.endswith(".conda")
+def test_metadata_cache_works():
+ channel = Channel(join(dirname(__file__), "..", "data", "conda_format_repo", context.subdir))
+ SubdirData.clear_cached_local_channel_data()
+
+ # Sadly, on Windows, st_mtime resolution is limited to 2 seconds. (See note in Python docs
+ # on os.stat_result.) To ensure that the timestamp on the existing JSON file is safely
+ # in the past before this test starts, we need to wait for more than 2 seconds...
+
+ sleep(3)
+
+ with patch('conda.core.subdir_data.fetch_repodata_remote_request',
+ wraps=fetch_repodata_remote_request) as fetcher:
+ sd_a = SubdirData(channel)
+ precs_a = tuple(sd_a.query("zlib"))
+ assert fetcher.call_count == 1
+
+ sd_b = SubdirData(channel)
+ assert sd_b is sd_a
+ precs_b = tuple(sd_b.query("zlib"))
+ assert fetcher.call_count == 1
+
+
+def test_metadata_cache_clearing():
+ channel = Channel(join(dirname(__file__), "..", "data", "conda_format_repo", context.subdir))
+ SubdirData.clear_cached_local_channel_data()
+
+ with patch('conda.core.subdir_data.fetch_repodata_remote_request',
+ wraps=fetch_repodata_remote_request) as fetcher:
+ sd_a = SubdirData(channel)
+ precs_a = tuple(sd_a.query("zlib"))
+ assert fetcher.call_count == 1
+
+ SubdirData.clear_cached_local_channel_data()
+
+ sd_b = SubdirData(channel)
+ assert sd_b is not sd_a
+ precs_b = tuple(sd_b.query("zlib"))
+ assert fetcher.call_count == 2
+ assert precs_b == precs_a
+
+
# @pytest.mark.integration
# class SubdirDataTests(TestCase):
#
| Conda 4.7+ extremely slow "Collecting package metadata (repodata.json)" with local (file:///) channels
When installing or updating packages, conda gets stuck for an incredibly long time at the "Collecting package metadata (repodata.json)" step.
This appears to be a regression caused by conda 4.7 (and remains in 4.8) as this operation was quite fast in conda 4.6.
The slowdown only appears to occur when using (file:///) channels on a local or network filesystem.
To test this I ran `python -m http.server 8000` in the channel parent directory and renamed channel URLs in `.condarc` from `file:///<DRIVE>:/<PATH>` to `http://localhost:8000/`. Commands then run in around the same time as they did in conda 4.6.
<!--
Hi! Read this; it's important.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
We get a lot of reports on the conda issue tracker about speed. These are mostly
not very helpful, because they only very generally complain about the total time
conda is taking. They often don’t even say what conda is taking so long to do -
just that it’s slow. If you want to file an issue report about conda’s speed, we
ask that you take the time to isolate exactly what part is slow, and what you think
is a reasonable amount of time for that operation to take (preferably by
comparison with another tool that is performing a similar task). Please see some
tips below on how to collect useful information for a bug report.
Complaints that include no useful information will be ignored and closed.
-->
## Steps to Reproduce
`conda update conda` or any other conda update/install command
<!-- Show us some debugging output. Here we generate conda_debug_output.txt - please upload it with your report.
* On unix (bash shells):
CONDA_INSTRUMENTATION_ENABLED=1 <your conda command> -vv | tee conda_debug_output.txt
* On Windows:
set CONDA_INSTRUMENTATION_ENABLED=1
powershell "<your conda command> -vv | tee conda_debug_output.txt"
-->
[conda-debug.txt](https://github.com/conda/conda/files/4156708/conda-debug.txt)
(note I exited (Ctrl+c) the command after a few minutes, normally it would run for an hour or more)
```
DEBUG conda.gateways.logging:set_verbosity(231): verbosity set to 2
DEBUG conda.core.solve:solve_final_state(223): solving prefix C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3
specs_to_remove: frozenset()
specs_to_add: frozenset({MatchSpec("conda")})
prune: <auxlib._Null object at 0x0000024AA6792148>
DEBUG conda.core.package_cache_data:_check_writable(259): package cache directory 'C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\pkgs' writable: True
DEBUG conda.core.subdir_data:_load(241): Local cache timed out for file:///X:/<LOCAL-MIRROR-PATH>/msys2/noarch/repodata.json at C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\pkgs\cache\e8bdfbda.json
DEBUG conda.core.subdir_data:_load(241): Local cache timed out for file:///X:/<LOCAL-MIRROR-PATH>/msys2/win-64/repodata.json at C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\pkgs\cache\270cd9d6.json
DEBUG conda.core.subdir_data:_load(241): Local cache timed out for file:///X:/<LOCAL-MIRROR-PATH>/main/win-64/repodata.json at C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\pkgs\cache\a83aae50.json
DEBUG conda.core.subdir_data:_load(241): Local cache timed out for file:///X:/<LOCAL-MIRROR-PATH>/main/noarch/repodata.json at C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\pkgs\cache\ce3ccb3a.json
INFO conda._vendor.auxlib.logz:stringify(144): request is 'None' for Response object with url file:///X:/<LOCAL-MIRROR-PATH>/msys2/noarch/repodata.json
DEBUG conda.core.subdir_data:fetch_repodata_remote_request(487):
<<FILE 200 None
< Content-Type: application/json
< Last-Modified: Tue, 13 Nov 2018 03:00:11 GMT
< Content-Length: 103
< Elapsed: 00:00.840189
{ 'info': {'subdir': 'noarch'},
'packages': {},
'removed': [],
'repodata_version': 1}
DEBUG conda.core.subdir_data:_pickle_me(284): Saving pickled state for file:///X:/<LOCAL-MIRROR-PATH>/msys2/noarch/repodata.json at C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\pkgs\cache\e8bdfbda.json
INFO conda._vendor.auxlib.logz:stringify(144): request is 'None' for Response object with url file:///X:/<LOCAL-MIRROR-PATH>/msys2/win-64/repodata.json
DEBUG conda.core.subdir_data:fetch_repodata_remote_request(487):
<<FILE 200 None
< Content-Type: application/json
< Last-Modified: Thu, 30 Jan 2020 00:18:12 GMT
< Content-Length: 227211
< Elapsed: 00:00.843118
{ 'info': {'subdir': 'win-64'},
'packages': { 'm2-autoconf-2.69-3.tar.bz2': { 'build': '3',
'build_number': 3,
'depends': [ 'm2-bash',
INFO conda._vendor.auxlib.logz:stringify(144): request is 'None' for Response object with url file:///X:/<LOCAL-MIRROR-PATH>/main/noarch/repodata.json
DEBUG conda.core.subdir_data:_pickle_me(284): Saving pickled state for file:///X:/<LOCAL-MIRROR-PATH>/msys2/win-64/repodata.json at C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\pkgs\cache\270cd9d6.json
DEBUG conda.core.subdir_data:fetch_repodata_remote_request(487):
<<FILE 200 None
< Content-Type: application/json
< Last-Modified: Thu, 30 Jan 2020 00:17:55 GMT
< Content-Length: 704400
< Elapsed: 00:00.841911
{ 'info': {'subdir': 'noarch'},
'packages': { 'affine-2.1.0-pyh128a3a6_1.tar.bz2': { 'build': 'pyh128a3a6_1',
'build_number': 1,
'depends': ['py
```
```
conda.core.prefix_data.PrefixData.load,0.565156
conda.core.solve.Solver._collect_all_metadata,119.613876
conda.core.prefix_data.PrefixData.load,0.163001
conda.core.solve.Solver._collect_all_metadata,9.134097
conda.core.prefix_data.PrefixData.load,0.161001
conda.core.solve.Solver._collect_all_metadata,84.478895
```
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
shell level : 0
user config file : C:\Users\<USERNAME>\.condarc
populated config files : C:\Users\<USERNAME>\.condarc
conda version : 4.8.1
conda-build version : 3.18.11
python version : 3.7.6.final.0
virtual packages :
base environment : C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3 (writable)
channel URLs : file:///X:/<LOCAL-MIRROR-PATH>/main/win-64
file:///X:/<LOCAL-MIRROR-PATH>/main/noarch
file:///X:/<LOCAL-MIRROR-PATH>/msys2/win-64
file:///X:/<LOCAL-MIRROR-PATH>/msys2/noarch
package cache : C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\pkgs
C:\Users\<USERNAME>\.conda\pkgs
C:\Users\<USERNAME>\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3\envs
C:\Users\<USERNAME>\.conda\envs
C:\Users\<USERNAME>\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.8.1 requests/2.22.0 CPython/3.7.6 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> C:\Users\<USERNAME>\.condarc <==
auto_update_conda: False
auto_activate_base: False
channel_alias: file:///X:/<LOCAL-MIRROR-PATH>
channel_priority: disabled
channels:
- defaults
default_channels:
- main
- msys2
show_channel_urls: True
use_only_tar_bz2: True
report_errors: False
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at C:\Users\<USERNAME>\AppData\Local\Programs\Miniconda3:
#
# Name Version Build Channel
asn1crypto 1.3.0 py37_0 defaults
backports 1.0 py_2 defaults
backports.functools_lru_cache 1.6.1 py_0 defaults
backports.tempfile 1.0 py_1 defaults
backports.weakref 1.0.post1 py_1 defaults
beautifulsoup4 4.8.2 py37_0 defaults
bzip2 1.0.8 he774522_0 defaults
ca-certificates 2019.11.27 0 defaults
certifi 2019.11.28 py37_0 defaults
cffi 1.13.2 py37h7a1dbc1_0 defaults
chardet 3.0.4 py37_1003 defaults
click 7.0 py_0 defaults
conda 4.8.1 py37_0 defaults
conda-build 3.18.11 py37_0 defaults
conda-package-handling 1.6.0 py37h62dcd97_0 defaults
conda-verify 3.4.2 py_1 defaults
console_shortcut 0.1.1 3 https://repo.anaconda.com/pkgs/main
constructor 3.0.0 py37_0 defaults
cryptography 2.8 py37h7a1dbc1_0 defaults
filelock 3.0.12 py_0 defaults
freetype 2.9.1 ha9979f8_1 defaults
future 0.18.2 py37_0 defaults
glob2 0.7 py_0 defaults
idna 2.8 py37_0 https://repo.anaconda.com/pkgs/main
jinja2 2.10.3 py_0 defaults
jpeg 9b hb83a4c4_2 defaults
libarchive 3.3.3 h0643e63_5 defaults
libiconv 1.15 h1df5818_7 defaults
liblief 0.9.0 ha925a31_2 defaults
libpng 1.6.37 h2a8f88b_0 defaults
libtiff 4.1.0 h56a325e_0 defaults
libxml2 2.9.9 h464c3ec_0 defaults
lz4-c 1.8.1.2 h2fa13f4_0 defaults
lzo 2.10 h6df0209_2 defaults
m2-msys2-runtime 2.5.0.17080.65c939c 3 defaults
m2-patch 2.7.5 2 defaults
markupsafe 1.1.1 py37he774522_0 defaults
menuinst 1.4.16 py37he774522_0 https://repo.anaconda.com/pkgs/main
msys2-conda-epoch 20160418 1 defaults
nsis 3.01 8 defaults
olefile 0.46 py37_0 defaults
openssl 1.1.1d he774522_3 defaults
pillow 7.0.0 py37hcc1f983_0 defaults
pip 20.0.2 py37_0 defaults
pkginfo 1.5.0.1 py37_0 defaults
powershell_shortcut 0.0.1 2 https://repo.anaconda.com/pkgs/main
psutil 5.6.7 py37he774522_0 defaults
py-lief 0.9.0 py37ha925a31_2 defaults
pycosat 0.6.3 py37he774522_0 defaults
pycparser 2.19 py_0 defaults
pyopenssl 19.1.0 py37_0 defaults
pysocks 1.7.1 py37_0 defaults
python 3.7.6 h60c2a47_2 defaults
python-dateutil 2.8.1 py_0 defaults
python-libarchive-c 2.8 py37_13 defaults
pytz 2019.3 py_0 defaults
pywin32 227 py37he774522_1 defaults
pyyaml 5.2 py37he774522_0 defaults
requests 2.22.0 py37_1 defaults
ruamel_yaml 0.15.87 py37he774522_0 defaults
setuptools 45.1.0 py37_0 defaults
six 1.14.0 py37_0 defaults
soupsieve 1.9.5 py37_0 defaults
sqlite 3.30.1 he774522_0 defaults
tk 8.6.8 hfa6e2cd_0 defaults
tqdm 4.42.0 py_0 defaults
urllib3 1.25.8 py37_0 defaults
vc 14.1 h0510ff6_4 https://repo.anaconda.com/pkgs/main
vs2015_runtime 14.16.27012 hf0eaf9b_1 defaults
wheel 0.33.6 py37_0 defaults
win_inet_pton 1.1.0 py37_0 https://repo.anaconda.com/pkgs/main
wincertstore 0.2 py37_0 https://repo.anaconda.com/pkgs/main
xz 5.2.4 h2fa13f4_4 defaults
yaml 0.1.7 hc54c509_2 https://repo.anaconda.com/pkgs/main
zlib 1.2.11 h62dcd97_3 defaults
zstd 1.3.7 h508b16e_0 defaults
```
</p></details>
| I've seen the same thing, a dramatic slow-down in performance when using file-based channels, especially on slow NFS shares. I think I've found a solution and hope to submit a proper pull request in a day or two, but for now, this information might be useful...
The new solver seems (under some circumstances) to create many instances of the SubDirData class for the same channel, when the old solver only produced one. That should be okay, as the class is loaded using a metaclass that implements a cache. So we should only create at most two instances per channel., one for "current_repodata.json" and (perhaps) one for "repodata.json".
The problem is that this cache is explicitly disabled for file-based channels. That didn't matter much when we were only requesting each object once, but that's no longer the case. Each instance has to read the file, parse it, and write a copy back to a disk-based cache. That takes time on slow NFS drives.
My proposed fix will be to change the if statement [here](https://github.com/conda/conda/blob/c154d2e3c68841a82376633f2ebc9ffc916dbf1c/conda/core/subdir_data.py#L66) so that it doesn't check for urls starting with "file:///".
In my test case, I could add certain packages to an environment in 5.6 seconds using conda 4.6.8. When I upgraded to conda 4.8.2 that suddenly took 93 seconds. Hacking that if statement to allow caching for file-based urls brought it back down to 6.5 seconds.
As I said, I hope to submit a proper pull request soon. If anyone else wants to do so, feel free. :) | 2020-03-03T19:28:16 |
conda/conda | 9,738 | conda__conda-9738 | [
"9737"
] | 901afcffb77b9a1132bfdb8381b2ce8afdc28c69 | diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -485,8 +485,8 @@ def _find_inconsistent_packages(self, ssc):
if inconsistent_precs:
print(dedent("""
The environment is inconsistent, please check the package plan carefully
- The following packages are causing the inconsistency:"""))
- print(dashlist(inconsistent_precs))
+ The following packages are causing the inconsistency:"""), file=sys.stderr)
+ print(dashlist(inconsistent_precs), file=sys.stderr)
for prec in inconsistent_precs:
# pop and save matching spec in specs_map
spec = ssc.specs_map.pop(prec.name, None)
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -2138,8 +2138,10 @@ def test_conda_recovery_of_pip_inconsistent_env(self):
rc = p.returncode
assert int(rc) == 0
- stdout, stderr, _ = run_command(Commands.INSTALL, prefix, 'imagesize')
- assert not stderr
+ stdout, stderr, _ = run_command(Commands.INSTALL, prefix, 'imagesize', '--json')
+ assert json.loads(stdout)['success']
+ assert "The environment is inconsistent" in stderr
+
stdout, stderr, _ = run_command(Commands.LIST, prefix, '--json')
pkgs = json.loads(stdout)
for entry in pkgs:
| inconsistent environment warning breaks --json
<!--
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
-->
## Current Behavior
The ["environment is inconsistent"](https://github.com/conda/conda/blob/e9a50561880696e57ba80472dce332e08e58ee0b/conda/core/solve.py#L486-L489) warning goes to STDOUT and breaks `--json --dry-run` output.
Observed with an environment which works perfectly fine and also `conda install` (without `--dry-run`) succeeds without issues.
### Steps to Reproduce
```bash
conda create -y -n test python
conda activate test
# remove a non-essential package
conda uninstall -y --force readline
conda install --json --dry-run requests | json_verify
```
Output:
```
lexical error: invalid char in json text.
The environment is inconsisten
(right here) ------^
JSON is invalid
```
## Expected Behavior
Valid JSON.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : test
active env location : /home/thomas/miniconda3/envs/test
shell level : 2
user config file : /home/thomas/.condarc
populated config files : /home/thomas/.condarc
conda version : 4.7.12
conda-build version : 3.18.11
python version : 3.7.1.final.0
virtual packages : __cuda=10.2
base environment : /home/thomas/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
package cache : /home/thomas/miniconda3/pkgs
/home/thomas/.conda/pkgs
envs directories : /home/thomas/miniconda3/envs
/home/thomas/.conda/envs
platform : linux-64
user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.1 Linux/5.5.4-arch1-1 arch/rolling glibc/2.31
UID:GID : 1000:100
netrc file : /home/thomas/.netrc
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /home/thomas/.condarc <==
auto_update_conda: False
ssl_verify: True
default_channels:
- https://repo.anaconda.com/pkgs/main
anaconda_upload: False
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /home/thomas/miniconda3/envs/test:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main defaults
ca-certificates 2020.1.1 0 defaults
certifi 2019.11.28 py38_0 defaults
ld_impl_linux-64 2.33.1 h53a641e_7 defaults
libedit 3.1.20181209 hc058e9b_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc-ng 9.1.0 hdf63c60_0 defaults
libstdcxx-ng 9.1.0 hdf63c60_0 defaults
ncurses 6.2 he6710b0_0 defaults
openssl 1.1.1d h7b6447c_4 defaults
pip 20.0.2 py38_1 defaults
python 3.8.1 h0371630_1 defaults
setuptools 45.2.0 py38_0 defaults
sqlite 3.31.1 h7b6447c_0 defaults
tk 8.6.8 hbc83047_0 defaults
wheel 0.34.2 py38_0 defaults
xz 5.2.4 h14c3975_4 defaults
zlib 1.2.11 h7b6447c_3 defaults
```
</p></details>
| 2020-03-06T10:19:34 |
|
conda/conda | 9,841 | conda__conda-9841 | [
"9819"
] | a7ad4df5882e2ae6bf7a62aecfe94c3c15ea0718 | diff --git a/conda/core/link.py b/conda/core/link.py
--- a/conda/core/link.py
+++ b/conda/core/link.py
@@ -1222,7 +1222,7 @@ def messages(prefix):
m = fi.read()
if hasattr(m, "decode"):
m = m.decode('utf-8')
- print(m.encode('utf-8'), file=sys.stderr if context.json else sys.stdout)
+ print(m, file=sys.stderr if context.json else sys.stdout)
return m
finally:
rm_rf(path)
| Post-link script output is ill-formatted
We observed the problem in conda-forge/openmpi-feedstock#56:
```bash
$ conda create -n mpi_test -c conda-forge python=3.7 mpi4py openmpi
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.7.12
latest version: 4.8.3
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /home/leofang/miniconda3/envs/mpi_test
added / updated specs:
- mpi4py
- openmpi
- python=3.7
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2020.4.5.1 | hecc5488_0 146 KB conda-forge
certifi-2020.4.5.1 | py37hc8dfbb8_0 151 KB conda-forge
mpi-1.0 | openmpi 4 KB conda-forge
mpi4py-3.0.3 | py37hbfacf26_1 647 KB conda-forge
openmpi-4.0.2 | hdf1f1ad_4 3.9 MB conda-forge
setuptools-46.1.3 | py37hc8dfbb8_0 634 KB conda-forge
xz-5.2.5 | h516909a_0 430 KB conda-forge
------------------------------------------------------------
Total: 5.9 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
_openmp_mutex conda-forge/linux-64::_openmp_mutex-4.5-0_gnu
ca-certificates conda-forge/linux-64::ca-certificates-2020.4.5.1-hecc5488_0
certifi conda-forge/linux-64::certifi-2020.4.5.1-py37hc8dfbb8_0
ld_impl_linux-64 conda-forge/linux-64::ld_impl_linux-64-2.34-h53a641e_0
libffi conda-forge/linux-64::libffi-3.2.1-he1b5a44_1007
libgcc-ng conda-forge/linux-64::libgcc-ng-9.2.0-h24d8f2e_2
libgfortran-ng conda-forge/linux-64::libgfortran-ng-7.3.0-hdf63c60_5
libgomp conda-forge/linux-64::libgomp-9.2.0-h24d8f2e_2
libstdcxx-ng conda-forge/linux-64::libstdcxx-ng-9.2.0-hdf63c60_2
mpi conda-forge/linux-64::mpi-1.0-openmpi
mpi4py conda-forge/linux-64::mpi4py-3.0.3-py37hbfacf26_1
ncurses conda-forge/linux-64::ncurses-6.1-hf484d3e_1002
openmpi conda-forge/linux-64::openmpi-4.0.2-hdf1f1ad_4
openssl conda-forge/linux-64::openssl-1.1.1f-h516909a_0
pip conda-forge/noarch::pip-20.0.2-py_2
python conda-forge/linux-64::python-3.7.6-h8356626_5_cpython
python_abi conda-forge/linux-64::python_abi-3.7-1_cp37m
readline conda-forge/linux-64::readline-8.0-hf8c457e_0
setuptools conda-forge/linux-64::setuptools-46.1.3-py37hc8dfbb8_0
sqlite conda-forge/linux-64::sqlite-3.30.1-hcee41ef_0
tk conda-forge/linux-64::tk-8.6.10-hed695b0_0
wheel conda-forge/noarch::wheel-0.34.2-py_1
xz conda-forge/linux-64::xz-5.2.5-h516909a_0
zlib conda-forge/linux-64::zlib-1.2.11-h516909a_1006
Proceed ([y]/n)?
Downloading and Extracting Packages
openmpi-4.0.2 | 3.9 MB | ############################################################################################################################ | 100%
mpi4py-3.0.3 | 647 KB | ############################################################################################################################ | 100%
mpi-1.0 | 4 KB | ############################################################################################################################ | 100%
ca-certificates-2020 | 146 KB | ############################################################################################################################ | 100%
setuptools-46.1.3 | 634 KB | ############################################################################################################################ | 100%
certifi-2020.4.5.1 | 151 KB | ############################################################################################################################ | 100%
xz-5.2.5 | 430 KB | ############################################################################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: \ b' \nFor Linux 64, Open MPI is built with CUDA awareness but this support is disabled by default.\nTo enable it, please set the environmental variable OMPI_MCA_opal_cuda_support=true before\nlaunching your MPI processes. Equivalently, you can set the MCA parameter in the command line:\nmpiexec --mca opal_cuda_support 1 ...\n \n'
done
#
# To activate this environment, use
#
# $ conda activate mpi_test
#
# To deactivate an active environment, use
#
# $ conda deactivate
```
All post-link output is crushed into one line in "Executing transaction"; the newline is not respected. This makes it impossible for our users to notice/read the warning...
| 2020-04-14T05:07:44 |
||
conda/conda | 9,999 | conda__conda-9999 | [
"9917"
] | 45ad4a4b8e38aaa9299e971f69c630b4fcfd93b2 | diff --git a/conda/core/prefix_data.py b/conda/core/prefix_data.py
--- a/conda/core/prefix_data.py
+++ b/conda/core/prefix_data.py
@@ -376,6 +376,8 @@ def get_python_version_for_prefix(prefix):
next_record = next(py_record_iter, None)
if next_record is not None:
raise CondaDependencyError("multiple python records found in prefix %s" % prefix)
+ elif record.version[3].isdigit():
+ return record.version[:4]
else:
return record.version[:3]
| get_python_version_for_prefix in prefix_data.py doesn't handle two digit minor version
The function `get_python_version_for_prefix` silently truncates two digit minor version numbers. For example, if the Python version number is 3.10, it will return "3.1", which can cause some packages to be installed in the incorrect location.
Of course, there isn't a Python 3.10 yet -- I ran into this while experimenting. FWIW, the accepted [PEP 602](https://www.python.org/dev/peps/pep-0602/) suggests that 3.10 will be the version after 3.9 (as opposed to 4.0).
https://github.com/conda/conda/blob/2cdd7ab052c2b96c088137f52dc40c613e99ce33/conda/core/prefix_data.py#L370-L380
| 2020-06-11T20:38:55 |
||
conda/conda | 10,022 | conda__conda-10022 | [
"3781"
] | 45ad4a4b8e38aaa9299e971f69c630b4fcfd93b2 | diff --git a/conda/cli/conda_argparse.py b/conda/cli/conda_argparse.py
--- a/conda/cli/conda_argparse.py
+++ b/conda/cli/conda_argparse.py
@@ -55,6 +55,7 @@ def generate_parser():
sub_parsers.required = True
configure_parser_clean(sub_parsers)
+ configure_parser_compare(sub_parsers)
configure_parser_config(sub_parsers)
configure_parser_create(sub_parsers)
configure_parser_help(sub_parsers)
@@ -860,6 +861,39 @@ def configure_parser_list(sub_parsers):
)
p.set_defaults(func='.main_list.execute')
+def configure_parser_compare(sub_parsers):
+ descr = "Compare packages between conda environments."
+
+ # Note, the formatting of this is designed to work well with help2man
+ examples = dedent("""
+ Examples:
+
+ Compare packages in the current environment with respect to 'environment.yml':
+
+ conda compare environment.yml
+
+ Compare packages installed into the environment 'myenv' with respect to 'environment.yml':
+
+ conda compare -n myenv environment.yml
+
+ """)
+ p = sub_parsers.add_parser(
+ 'compare',
+ description=descr,
+ help=descr,
+ formatter_class=RawDescriptionHelpFormatter,
+ epilog=examples,
+ add_help=False,
+ )
+ add_parser_help(p)
+ add_parser_json(p)
+ add_parser_prefix(p)
+ p.add_argument(
+ 'file',
+ action="store",
+ help="Path to the environment file that is to be compared against",
+ )
+ p.set_defaults(func='.main_compare.execute')
def configure_parser_package(sub_parsers):
descr = "Low-level conda package utility. (EXPERIMENTAL)"
diff --git a/conda/cli/main_compare.py b/conda/cli/main_compare.py
new file mode 100644
--- /dev/null
+++ b/conda/cli/main_compare.py
@@ -0,0 +1,93 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2012 Anaconda, Inc
+# SPDX-License-Identifier: BSD-3-Clause
+from __future__ import absolute_import, division, print_function, unicode_literals
+
+import logging
+import os
+
+from .common import stdout_json
+from ..base.context import context
+from ..common.compat import text_type
+from ..core.prefix_data import PrefixData
+from ..gateways.connection.session import CONDA_SESSION_SCHEMES
+from ..gateways.disk.test import is_conda_environment
+from .._vendor.auxlib.path import expand
+from conda_env import exceptions, specs
+from ..models.match_spec import MatchSpec
+
+log = logging.getLogger(__name__)
+
+def get_packages(prefix):
+ if not os.path.isdir(prefix):
+ from ..exceptions import EnvironmentLocationNotFound
+ raise EnvironmentLocationNotFound(prefix)
+
+ return sorted(PrefixData(prefix, pip_interop_enabled=True).iter_records(),
+ key=lambda x: x.name)
+
+def _get_name_tuple(pkg):
+ return pkg.name, pkg
+
+def _to_str(pkg):
+ return "%s==%s=%s" % (pkg.name, pkg.version, pkg.build)
+
+def compare_packages(active_pkgs, specification_pkgs):
+ output = []
+ res = 0
+ ok = True
+ for pkg in specification_pkgs:
+ pkg_spec = MatchSpec(pkg)
+ name = pkg_spec.name
+ if name in active_pkgs:
+ if not pkg_spec.match(active_pkgs[name]):
+ ok = False
+ output.append("{} found but mismatch. Specification pkg: {}, Running pkg: {}"
+ .format(name, pkg, _to_str(active_pkgs[name])))
+ else:
+ ok = False
+ output.append("{} not found".format(name))
+ if ok:
+ output.append("Success. All the packages in the \
+specification file are present in the environment \
+with matching version and build string.")
+ else:
+ res = 1
+ return res, output
+
+def execute(args, parser):
+ prefix = context.target_prefix
+ if not is_conda_environment(prefix):
+ from ..exceptions import EnvironmentLocationNotFound
+ raise EnvironmentLocationNotFound(prefix)
+
+ try:
+ url_scheme = args.file.split("://", 1)[0]
+ if url_scheme in CONDA_SESSION_SCHEMES:
+ filename = args.file
+ else:
+ filename = expand(args.file)
+
+ spec = specs.detect(name=args.name, filename=filename, directory=os.getcwd())
+ env = spec.environment
+
+ if args.prefix is None and args.name is None:
+ args.name = env.name
+ except exceptions.SpecNotFound:
+ raise
+
+ active_pkgs = dict(map(_get_name_tuple, get_packages(prefix)))
+ specification_pkgs = []
+ if 'conda' in env.dependencies:
+ specification_pkgs = specification_pkgs + env.dependencies['conda']
+ if 'pip' in env.dependencies:
+ specification_pkgs = specification_pkgs + env.dependencies['pip']
+
+ exitcode, output = compare_packages(active_pkgs, specification_pkgs)
+
+ if context.json:
+ stdout_json(output)
+ else:
+ print('\n'.join(map(text_type, output)))
+
+ return exitcode
| diff --git a/tests/test_cli.py b/tests/test_cli.py
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -112,6 +112,16 @@ def test_list(self, mockable_context_envs_dirs):
assert mockable_context_envs_dirs.call_count > 0
+ @pytest.mark.usefixtures("empty_env_tmpdir")
+ @patch("conda.base.context.mockable_context_envs_dirs")
+ def test_compare(self, mockable_context_envs_dirs):
+ mockable_context_envs_dirs.return_value = (self.tmpdir,)
+ stdout, stderr, rc = run_inprocess_conda_command('conda compare --name nonexistent tempfile.rc --json')
+ assert json.loads(stdout.strip())['exception_name'] == 'EnvironmentLocationNotFound'
+ assert stderr == ''
+ assert rc > 0
+ assert mockable_context_envs_dirs.call_count > 0
+
@pytest.mark.integration
def test_search_0(self):
with captured():
diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -196,6 +196,7 @@ def FORCE_temp_prefix(name=None, use_restricted_unicode=False):
class Commands:
+ COMPARE = "compare"
CONFIG = "config"
CLEAN = "clean"
CREATE = "create"
@@ -246,7 +247,7 @@ def run_command(command, prefix, *arguments, **kwargs):
if command is Commands.CONFIG:
arguments.append('--file')
arguments.append(join(prefix, 'condarc'))
- if command in (Commands.LIST, Commands.CREATE, Commands.INSTALL,
+ if command in (Commands.LIST, Commands.COMPARE, Commands.CREATE, Commands.INSTALL,
Commands.REMOVE, Commands.UPDATE, Commands.RUN):
arguments.insert(0, '-p')
arguments.insert(1, prefix)
@@ -913,6 +914,39 @@ def test_list_with_pip_wheel(self):
assert not isdir(prefix)
assert prefix not in PrefixData._cache_
+ def test_compare_success(self):
+ with make_temp_env("python=3.6", "flask=1.0.2", "bzip2=1.0.8") as prefix:
+ env_file = join(prefix, 'env.yml')
+ touch(env_file)
+ with open(env_file, "w") as f:
+ f.write(
+"""name: dummy
+channels:
+ - defaults
+dependencies:
+ - bzip2=1.0.8
+ - flask>=1.0.1,<=1.0.4""")
+ output, _, _ = run_command(Commands.COMPARE, prefix, env_file, "--json")
+ assert "Success" in output
+ rmtree(prefix, ignore_errors=True)
+
+ def test_compare_fail(self):
+ with make_temp_env("python=3.6", "flask=1.0.2", "bzip2=1.0.8") as prefix:
+ env_file = join(prefix, 'env.yml')
+ touch(env_file)
+ with open(env_file, "w") as f:
+ f.write(
+"""name: dummy
+channels:
+ - defaults
+dependencies:
+ - yaml
+ - flask=1.0.3""")
+ output, _, _ = run_command(Commands.COMPARE, prefix, env_file, "--json")
+ assert "yaml not found" in output
+ assert "flask found but mismatch. Specification pkg: flask=1.0.3, Running pkg: flask==1.0.2=py36_1" in output
+ rmtree(prefix, ignore_errors=True)
+
def test_install_tarball_from_local_channel(self):
# Regression test for #2812
# install from local channel
| [ENH] Compare environments
I find I am often in a situation where I want to know if my current Conda environment matches the environment specification of an `environment.yml` file or a `requirements.txt` file or some other specification of Conda packages. Why? Because as much as I love Conda environments, sometimes I'd like to know:
*"Can I just run this in my current environment without changing anything? Because if so, then I know others can also run this thing in this same environment that I know they have access to, rather than having to complicate my life and theirs with instructions on how to augment their current environment appropriately."*
So off the top of my head this would mean the ability to do something like:
```
conda compare environment.yml # report on delta between current environment and environment.yml
conda compare foo bar # where foo and bar are two named environments
```
But as it stands I end up writing some complicated `conda list -e | grep` statements by hand, after doing `cat environment.yml`.
| This would be really great.
I often encounter problems with parallelization where some commands are executed on a Jupyterhub server and some on a cluster that it is connected to via ssh.
In order to run everything successfully, I need to ensure that the environments on both machines are the same.
Right now I do it by just comparing the outputs of `conda list --export`.
I agree this would be nice to have - I came across a bug in pytest/py and it took me a while to figure out where the problem was - a side by side comparison like this would be really helpful -
```
> conda compare root fooenv
# installed packages
root fooenv
alabaster 0.7.10
anaconda 5.0.1
anaconda-client 1.6.5
anaconda-navigator 1.6.9
anaconda-project 0.8.0
asn1crypto 0.22.0 0.22.0
astroid 1.5.3
astropy 2.0.2
attrs 17.3.0
babel 2.5.0
```
I find it quite comfortable to use a diff tool of my choice, i.e.,
```bash
$diffTool <(conda list -n env1) <(conda list -n env2)
```
or for environment files
```bash
$diffTool env1.yml <(conda list -en env2)
```
with `$diffTool` being any of `diff`, `diff -y`, `sdiff`, `meld`, ...
That way use can even use a tool to do 3-way compares, like
```bash
meld base.yml <(conda list -en env1) <(conda list -en env2)
```
IMHO, a `conda compare` (if needed at all) could just be simple wrapper around a diff tool (e.g., given by a parameter `--diff-tool=sdiff`). So the only own functionality would just have to be parsing its arguments to determine whether they are YAML files or environment names/paths.
I was just using `diff` on the output of `conda list`-- and it was actually pretty unhelpful. I guess the problem is that the two environments are too different -- one had a bunch of extra packages, as well as maybe some different versions of the same package -- so the diff was pretty ugly.
I;d live a tool that gave a me a clean difference:
- these packages are in a and not b
- these packages are in b and not a
- these packages are in both but different versions
OK -- off to write that ----
-CHB
DONE.
Here is a hacked-together python script that compares two conda environments:
https://gist.github.com/ChrisBarker-NOAA/00106a2af2029259ba7496f865c39086
It would be great if similar functionality could be built in to conda.
PR for conda welcome Chris!
On Wed, Sep 19, 2018, 9:15 AM Chris Barker <[email protected]> wrote:
> DONE.
>
> Here is a hacked-together python script that compares two conda
> environments:
>
> https://gist.github.com/ChrisBarker-NOAA/00106a2af2029259ba7496f865c39086
>
> IT would be great if similar functionality could be built in to conda.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/conda/conda/issues/3781#issuecomment-422703511>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AA_pdBt1j6UX6MuJ1GwP9b78LIXMy9Bbks5ucf0ogaJpZM4KmHBb>
> .
>
@mingwandroid: yeah, that would be nice. But would require familiarizing myself with the conda code first -- hopefully I'll have time some day, but don't hold your breath :-(
But nice to know you're open to the idea -- if anyone else has the rountoits, feel free to get ideas from my code -- I was pleasantly surprised how easy it was to use a sets to get out what I wanted -- I'd hardly ever used sets for anything meaningful before ...
I had an issue on this topic. When I typed `conda info --envs`, I was given a list that included two different environments with the same name, except one was capitalized. I don't know how I got myself into this predicament. I ran @ChrisBarker-NOAA's tool on these two envs, and they were identical. Here's my stupid part: I tried to delete one, and it deleted both.
This was on a Mac.
The Mac is weird. It has a case insensitive, but case preserving file system.
This behaves oddly with *nix tools that are case sensitive.
I’m not sure conda can prevent these oddities.
I would like to work on this issue. I encountered a similar issue to what the OP did and have written this script: https://github.com/sidhant007/DiffConda to compare between the current conda env and a particular yml config file.
OP's motivation was to be able to check if a condo environment is capable of running what is mentioned in an environment specification (a .yml file)
I think the use-case that @ChrisBarker-NOAA highlighted, i.e to be able to compare two different conda envs is less-interesting because if the user already has the two conda environments created then they will just switch to the one required, on the contrary the OP's aim was to avoid creating the second environment if the .yml file showed that is a subset of the current environment.
So for the first iteration (a basic version of conda compare), I would like to propose this:
1. `conda compare environment.yml` - Reports packages lacking in the current environment required by `environment.yml` and if there are any version mismatches.
2. `conda compare -n myenv environment.yml` - Same as above except in this we consider the environment as `myenv`
Implementation wise: It will be similar to how `conda list` is written, since this is also a command that won't change anything on the backend. We use [package match specifications](https://docs.conda.io/projects/conda-build/en/latest/resources/package-spec.html#package-match-specifications) to define whether a package in the current environment "matches" with the one mentioned in the `environment.yml`.
Are they are any suggestions/objections to such a feature?
Well, what you find interesting depends on what you need to do :-) -- in my case, I knew that one of the environments I had didn't work, but I did't know why. The problem is that if you build two environments from the same spec at different times, you get a different result if some packages have been updated and aren't pinned. or if you had an environment and added packages one by one.
Anyway, what people find interesting aside, the ability to compare environments is useful, and it would be good if it could be done from a environment file OR a live environment with the same code.
But what is being asked for now is another step: testing whether a given application can run in a given environment, which would require, as stated, using package match specifications, which means checking against a requirements file, not an environemnt.yaml.
checking: "does anything need to be changed in this environment to fit this spec" has got to be in conda already.
I'm pretty that in the general case, there is no robust way to say whether an application that can run in one environment will run in another one without knowing its requirements (unless the environments are identical) -- there's no way to know what particular version it might need otherwise. So:
> OP's motivation was to be able to check if a condo environment is capable of running what is mentioned in an environment specification (a .yml file)
that depends on the environment specification -- is in in "match" form, which could work, or a full, everything pinned version, which would not work in the general case.
-CHB
| 2020-06-22T11:08:06 |
conda/conda | 10,028 | conda__conda-10028 | [
"10027"
] | 45ad4a4b8e38aaa9299e971f69c630b4fcfd93b2 | diff --git a/conda/cli/install.py b/conda/cli/install.py
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -148,7 +148,7 @@ def install(args, parser, command='install'):
# fall-through expected under normal operation
pass
else:
- if args.mkdir:
+ if hasattr(args, "mkdir") and args.mkdir:
try:
mkdir_p(prefix)
except EnvironmentError as e:
| `conda update -n nonexistent --all` crashes
## Current Behavior
Running:
```
conda update -n non-existent-env --all
```
crashes with
```
Traceback (most recent call last):
File "/opt/anaconda/lib/python3.7/site-packages/conda/exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "/opt/anaconda/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/opt/anaconda/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
return getattr(module, func_name)(args, parser)
File "/opt/anaconda/lib/python3.7/site-packages/conda/cli/main_update.py", line 20, in execute
install(args, parser, 'update')
File "/opt/anaconda/lib/python3.7/site-packages/conda/cli/install.py", line 174, in install
if args.mkdir:
AttributeError: 'Namespace' object has no attribute 'mkdir'
```
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : default
active env location : /opt/anaconda/envs/default
shell level : 1
user config file : /home/alan/.condarc
populated config files : /home/alan/.condarc
conda version : 4.8.3
conda-build version : 3.19.1
python version : 3.7.6.final.0
virtual packages : __glibc=2.27
base environment : /opt/anaconda (writable)
channel URLs : https://conda.anaconda.org/conda-canary/linux-64
https://conda.anaconda.org/conda-canary/noarch
https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/anaconda/pkgs
/home/alan/.conda/pkgs
envs directories : /opt/anaconda/envs
/home/alan/.conda/envs
platform : linux-64
user-agent : conda/4.8.3 requests/2.24.0 CPython/3.7.6 Linux/5.3.0-53-generic ubuntu/18.04.4 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
=> /home/alan/.condarc <==
channel_priority: strict
channels:
- conda-canary
- conda-forge
- defaults
```
</p></details>
| 2020-06-24T01:07:57 |
||
conda/conda | 10,057 | conda__conda-10057 | [
"9896"
] | 45ad4a4b8e38aaa9299e971f69c630b4fcfd93b2 | diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -390,6 +390,14 @@ def _collect_all_metadata(self, ssc):
if pkg_name not in ssc.specs_map and ssc.prefix_data.get(pkg_name, None):
ssc.specs_map[pkg_name] = MatchSpec(pkg_name)
+ # Add virtual packages so they are taken into account by the solver
+ virtual_pkg_index = {}
+ _supplement_index_with_system(virtual_pkg_index)
+ virtual_pkgs = [p.name for p in virtual_pkg_index.keys()]
+ for virtual_pkgs_name in (virtual_pkgs):
+ if virtual_pkgs_name not in ssc.specs_map:
+ ssc.specs_map[virtual_pkgs_name] = MatchSpec(virtual_pkgs_name)
+
for prec in ssc.prefix_data.iter_records():
# first check: add everything if we have no history to work with.
# This happens with "update --all", for example.
diff --git a/conda/exceptions.py b/conda/exceptions.py
--- a/conda/exceptions.py
+++ b/conda/exceptions.py
@@ -679,11 +679,11 @@ def __init__(self, bad_deps, chains=True, strict=False):
The following specifications were found to be incompatible with each other:
'''),
- 'cuda': dals('''
+ 'virtual_package': dals('''
-The following specifications were found to be incompatible with your CUDA driver:\n{specs}
+The following specifications were found to be incompatible with your system:\n{specs}
-Your installed CUDA driver is: {ref}
+Your installed version is: {ref}
''')}
msg = ""
diff --git a/conda/resolve.py b/conda/resolve.py
--- a/conda/resolve.py
+++ b/conda/resolve.py
@@ -292,7 +292,8 @@ def _classify_bad_deps(self, bad_deps, specs_to_add, history_specs, strict_chann
classes = {'python': set(),
'request_conflict_with_history': set(),
'direct': set(),
- 'cuda': set(), }
+ 'virtual_package': set(),
+ }
specs_to_add = set(MatchSpec(_) for _ in specs_to_add or [])
history_specs = set(MatchSpec(_) for _ in history_specs or [])
for chain in bad_deps:
@@ -307,10 +308,10 @@ def _classify_bad_deps(self, bad_deps, specs_to_add, history_specs, strict_chann
set(self.find_matches(chain[-1]))):
classes['python'].add((tuple([chain[0], chain[-1]]),
str(MatchSpec(python_spec, target=None))))
- elif chain[-1].name == '__cuda':
- cuda_version = [_ for _ in self._system_precs if _.name == '__cuda']
- cuda_version = cuda_version[0].version if cuda_version else "not available"
- classes['cuda'].add((tuple(chain), cuda_version))
+ elif chain[-1].name.startswith('__'):
+ version = [_ for _ in self._system_precs if _.name == chain[-1].name]
+ virtual_package_version = version[0].version if version else "not available"
+ classes['virtual_package'].add((tuple(chain), virtual_package_version))
elif chain[0] in specs_to_add:
match = False
for spec in history_specs:
@@ -444,6 +445,8 @@ def build_conflict_map(self, specs, specs_to_add=None, history_specs=None):
strict_channel_priority = context.channel_priority == ChannelPriority.STRICT
specs = set(specs) | (specs_to_add or set())
+ # Remove virtual packages
+ specs = set([spec for spec in specs if not spec.name.startswith('__')])
if len(specs) == 1:
matches = self.find_matches(next(iter(specs)))
if len(matches) == 1:
| diff --git a/tests/core/test_solve.py b/tests/core/test_solve.py
--- a/tests/core/test_solve.py
+++ b/tests/core/test_solve.py
@@ -236,6 +236,16 @@ def test_solve_2(tmpdir):
assert len(prec_names) == len(set(prec_names))
+def test_virtual_package_solver(tmpdir):
+ specs = MatchSpec("cudatoolkit"),
+
+ with env_var('CONDA_OVERRIDE_CUDA', '10.0'):
+ with get_solver_cuda(tmpdir, specs) as solver:
+ final_state = solver.solve_final_state()
+ # Check the cuda virtual package is included in the solver
+ assert '__cuda' in solver.ssc.specs_map.keys()
+
+
def test_cuda_1(tmpdir):
specs = MatchSpec("cudatoolkit"),
@@ -282,12 +292,13 @@ def test_cuda_fail_1(tmpdir):
plat = "win-64"
else:
plat = "linux-64"
- assert str(exc.value).strip() == dals("""The following specifications were found to be incompatible with your CUDA driver:
+
+ assert str(exc.value).strip() == dals("""The following specifications were found to be incompatible with your system:
- feature:/{}::__cuda==8.0=0
- cudatoolkit -> __cuda[version='>=10.0|>=9.0']
-Your installed CUDA driver is: 8.0""".format(plat))
+Your installed version is: 8.0""".format(plat))
@@ -299,11 +310,12 @@ def test_cuda_fail_2(tmpdir):
with get_solver_cuda(tmpdir, specs) as solver:
with pytest.raises(UnsatisfiableError) as exc:
final_state = solver.solve_final_state()
- assert str(exc.value).strip() == dals("""The following specifications were found to be incompatible with your CUDA driver:
+
+ assert str(exc.value).strip() == dals("""The following specifications were found to be incompatible with your system:
- cudatoolkit -> __cuda[version='>=10.0|>=9.0']
-Your installed CUDA driver is: not available""")
+Your installed version is: not available""")
def test_prune_1(tmpdir):
specs = MatchSpec("numpy=1.6"), MatchSpec("python=2.7.3"), MatchSpec("accelerate"),
diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -2112,34 +2112,23 @@ def test_install_freezes_env_by_default(self):
# create an initial env
with make_temp_env("python=2", use_restricted_unicode=on_win, no_capture=True) as prefix:
assert package_is_installed(prefix, "python=2.7.*")
+ # Install a version older than the last one
+ run_command(Commands.INSTALL, prefix, "setuptools=40.*")
+
stdout, stderr, _ = run_command(Commands.LIST, prefix, '--json')
+
pkgs = json.loads(stdout)
- specs = set()
- for entry in pkgs:
- if entry['name'] in DEFAULT_AGGRESSIVE_UPDATE_PACKAGES:
- specs.add(MatchSpec(entry['name']))
- else:
- specs.add(MatchSpec(entry['name'],
- version=entry['version'],
- channel=entry['channel'],
- subdir=entry['platform'],
- build=entry['build_string']))
- ms = MatchSpec('imagesize')
- specs.add(ms)
-
- import conda.core.solve
- r = conda.core.solve.Resolve(get_index())
- reduced_index = r.get_reduced_index([ms])
-
- # now add imagesize to that env. The call to get_reduced_index should include our exact specs
- # for the existing env. doing so will greatly reduce the search space for the initial solve
- with patch.object(conda.core.solve.Resolve, 'get_reduced_index',
- return_value=reduced_index) as mock_method:
- run_command(Commands.INSTALL, prefix, "imagesize")
- # TODO: this should match the specs above. It does, at least as far as I can tell from text
- # comparison. Unfortunately, it doesn't evaluate as a match, even though the text all matches.
- # I suspect some strange equality of objects issue.
- mock_method.assert_called_with(specs, exit_on_conflict=False)
+
+ run_command(Commands.INSTALL, prefix, "imagesize", "--freeze-installed")
+
+ stdout, _, _ = run_command(Commands.LIST, prefix, '--json')
+ pkgs_after_install = json.loads(stdout)
+
+ # Compare before and after installing package
+ for pkg in pkgs:
+ for pkg_after in pkgs_after_install:
+ if pkg["name"] == pkg_after["name"]:
+ assert pkg["version"] == pkg_after["version"]
@pytest.mark.skipif(on_win, reason="gawk is a windows only package")
def test_search_gawk_not_win_filter(self):
| cudatoolkit run constrain on __cuda not used for solve
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
Recently we added a repodata patch to `cudatoolkit` to constrain its version based on the `__cuda` virtual package's version ( https://github.com/AnacondaRecipes/repodata-hotfixes/pull/81 ) (IOW the max version of CUDA the GPU driver will support). However it seems this isn't respected when installing `cudatoolkit`. Instead one needs to prod `conda` a bit to get it to consider `__cuda`.
### Steps to Reproduce
Running the following does not take into account the `__cuda` version supported.
<details>
<summary>
```
conda create -d -n test_cuda cudatoolkit
```
</summary>
```
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/ubuntu/miniforge/envs/test_cuda
added / updated specs:
- cudatoolkit
The following packages will be downloaded:
package | build
---------------------------|-----------------
_libgcc_mutex-0.1 | main 3 KB
cudatoolkit-10.2.89 | hfd86e86_0 539.3 MB
libgcc-ng-9.1.0 | hdf63c60_0 8.1 MB
libstdcxx-ng-9.1.0 | hdf63c60_0 4.0 MB
------------------------------------------------------------
Total: 551.5 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
cudatoolkit pkgs/main/linux-64::cudatoolkit-10.2.89-hfd86e86_0
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
DryRunExit: Dry run. Exiting.
```
</details>
However adding `__cuda` to the install spec does work.
<details>
<summary>
```
conda create -d -n test_cuda __cuda cudatoolkit
```
</summary>
```
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/ubuntu/miniforge/envs/test_cuda
added / updated specs:
- __cuda
- cudatoolkit
The following packages will be downloaded:
package | build
---------------------------|-----------------
cudatoolkit-10.1.243 | h6bb024c_0 513.2 MB
------------------------------------------------------------
Total: 513.2 MB
The following NEW packages will be INSTALLED:
cudatoolkit pkgs/main/linux-64::cudatoolkit-10.1.243-h6bb024c_0
DryRunExit: Dry run. Exiting.
```
</details>
Interestingly we also observe compiler runtime packages installed in the first case, but not in the second. Unclear on why that happens, but may also be related to the same issue.
## Expected Behavior
When installing `cudatoolkit` or really anything that depends on `cudatoolkit`, `__cuda` should be factored into the solve.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : base
active env location : /datasets/jkirkham/miniconda
shell level : 1
user config file : /home/nfs/jkirkham/.condarc
populated config files : /home/nfs/jkirkham/.condarc
conda version : 4.8.3
conda-build version : 3.19.2
python version : 3.7.6.final.0
virtual packages : __cuda=10.1
__glibc=2.27
base environment : /datasets/jkirkham/miniconda (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://conda.anaconda.org/nvidia/linux-64
https://conda.anaconda.org/nvidia/noarch
package cache : /datasets/jkirkham/miniconda/pkgs
/home/nfs/jkirkham/.conda/pkgs
envs directories : /datasets/jkirkham/miniconda/envs
/home/nfs/jkirkham/.conda/envs
platform : linux-64
user-agent : conda/4.8.3 requests/2.23.0 CPython/3.7.6 Linux/4.15.0-76-generic ubuntu/18.04.4 glibc/2.27
UID:GID : 10124:10004
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /home/nfs/jkirkham/.condarc <==
channels:
- conda-forge
- defaults
- nvidia
show_channel_urls: True
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /datasets/jkirkham/miniconda:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 0_gnu conda-forge
beautifulsoup4 4.9.0 py37hc8dfbb8_0 conda-forge
brotlipy 0.7.0 py37h8f50634_1000 conda-forge
bzip2 1.0.8 h516909a_2 conda-forge
ca-certificates 2020.4.5.1 hecc5488_0 conda-forge
certifi 2020.4.5.1 py37hc8dfbb8_0 conda-forge
cffi 1.14.0 py37hd463f26_0 conda-forge
chardet 3.0.4 py37hc8dfbb8_1006 conda-forge
conda 4.8.3 py37hc8dfbb8_1 conda-forge
conda-build 3.19.2 py37hc8dfbb8_0 conda-forge
conda-package-handling 1.6.0 py37h8f50634_2 conda-forge
cryptography 2.9.2 py37hb09aad4_0 conda-forge
filelock 3.0.10 py_0 conda-forge
glob2 0.7 py_0 conda-forge
icu 64.2 he1b5a44_1 conda-forge
idna 2.9 py_1 conda-forge
jinja2 2.11.2 pyh9f0ad1d_0 conda-forge
ld_impl_linux-64 2.34 h53a641e_0 conda-forge
libarchive 3.3.3 h3a8160c_1008 conda-forge
libffi 3.2.1 he1b5a44_1007 conda-forge
libgcc-ng 9.2.0 h24d8f2e_2 conda-forge
libgomp 9.2.0 h24d8f2e_2 conda-forge
libiconv 1.15 h516909a_1006 conda-forge
liblief 0.9.0 hf8a498c_1 conda-forge
libstdcxx-ng 9.2.0 hdf63c60_2 conda-forge
libxml2 2.9.10 hee79883_0 conda-forge
lz4-c 1.9.2 he1b5a44_0 conda-forge
lzo 2.10 h14c3975_1000 conda-forge
markupsafe 1.1.1 py37h8f50634_1 conda-forge
ncurses 6.1 hf484d3e_1002 conda-forge
openssl 1.1.1g h516909a_0 conda-forge
patchelf 0.10 he1b5a44_0 conda-forge
pip 20.0.2 py_2 conda-forge
pkginfo 1.5.0.1 py_0 conda-forge
psutil 5.7.0 py37h8f50634_1 conda-forge
py-lief 0.9.0 py37he1b5a44_1 conda-forge
pycosat 0.6.3 py37h8f50634_1004 conda-forge
pycparser 2.20 py_0 conda-forge
pyopenssl 19.1.0 py_1 conda-forge
pysocks 1.7.1 py37hc8dfbb8_1 conda-forge
python 3.7.6 h8356626_5_cpython conda-forge
python-libarchive-c 2.9 py37_0 conda-forge
python_abi 3.7 1_cp37m conda-forge
pytz 2020.1 pyh9f0ad1d_0 conda-forge
pyyaml 5.3.1 py37h8f50634_0 conda-forge
readline 8.0 hf8c457e_0 conda-forge
requests 2.23.0 pyh8c360ce_2 conda-forge
ripgrep 12.0.1 h516909a_1 conda-forge
ruamel_yaml 0.15.80 py37h8f50634_1001 conda-forge
setuptools 46.1.3 py37hc8dfbb8_0 conda-forge
six 1.14.0 py_1 conda-forge
soupsieve 1.9.4 py37hc8dfbb8_1 conda-forge
sqlite 3.30.1 hcee41ef_0 conda-forge
tk 8.6.10 hed695b0_0 conda-forge
tqdm 4.45.0 pyh9f0ad1d_1 conda-forge
urllib3 1.25.9 py_0 conda-forge
wheel 0.34.2 py_1 conda-forge
xz 5.2.5 h516909a_0 conda-forge
yaml 0.2.4 h516909a_0 conda-forge
zlib 1.2.11 h516909a_1006 conda-forge
zstd 1.4.4 h6597ccf_3 conda-forge
```
</p></details>
| 2020-07-08T15:53:13 |
|
conda/conda | 10,086 | conda__conda-10086 | [
"9755"
] | 63204e684c8a6ea609c789bb83da4fc111ebd1f5 | diff --git a/conda/cli/main_remove.py b/conda/cli/main_remove.py
--- a/conda/cli/main_remove.py
+++ b/conda/cli/main_remove.py
@@ -4,6 +4,7 @@
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
+from os.path import isfile, join
import sys
from .common import check_non_admin, specs_from_args
@@ -13,7 +14,7 @@
from ..core.link import PrefixSetup, UnlinkLinkTransaction
from ..core.prefix_data import PrefixData
from ..core.solve import Solver
-from ..exceptions import CondaEnvironmentError, CondaValueError
+from ..exceptions import CondaEnvironmentError, CondaValueError, DirectoryNotACondaEnvironmentError
from ..gateways.disk.delete import rm_rf, path_is_clean
from ..models.match_spec import MatchSpec
from ..exceptions import PackagesNotFoundError
@@ -54,6 +55,8 @@ def execute(args, parser):
if prefix == context.root_prefix:
raise CondaEnvironmentError('cannot remove root environment,\n'
' add -n NAME or -p PREFIX option')
+ if not isfile(join(prefix, 'conda-meta', 'history')):
+ raise DirectoryNotACondaEnvironmentError(prefix)
print("\nRemove all packages in environment %s:\n" % prefix, file=sys.stderr)
if 'package_names' in args:
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -2878,6 +2878,22 @@ def test_remove_empty_env(self):
run_command(Commands.CREATE, prefix)
run_command(Commands.REMOVE, prefix, '--all')
+ def test_remove_ignore_nonenv(self):
+ with tempdir() as test_root:
+ prefix = join(test_root, "not-an-env")
+ filename = join(prefix, "file.dat")
+
+ os.mkdir(prefix)
+ with open(filename, "wb") as empty:
+ pass
+
+ with pytest.raises(DirectoryNotACondaEnvironmentError):
+ run_command(Commands.REMOVE, prefix, "--all")
+
+ assert(exists(filename))
+ assert(exists(prefix))
+
+
@pytest.mark.skipif(True, reason="get the rest of Solve API worked out first")
@pytest.mark.integration
class PrivateEnvIntegrationTests(TestCase):
| conda remove erased directories not from a conda environment
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
If your issue is a bug report or feature request for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==>
If you continue on, and especially if you are submitting a bug report,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
**I'm submitting a...**
- [x ] bug report
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
`conda remove -p /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy --all` removed all my files and directories even though they were not an environment. The intended command was `conda remove -p /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3 --all` but the environment name was not added by mistake. Result: **2.5Tb** of data are gone...
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
Use of `conda remove` with a PATH that is not an environment.
```
conda remove -p /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy --all
```
## Expected Behavior
<!-- What do you think should happen? -->
Conda should be able to know what is a conda env and what not. Erasing all directories and files without checking first (not sure if this is true) is not ideal.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
conda info
active environment : None
shell level : 0
user config file : /dss/dsshome1/lxc04/di52zuy/.condarc
populated config files : /dss/dsshome1/lxc04/di52zuy/.condarc
conda version : 4.8.2
conda-build version : 3.18.11
python version : 3.7.6.final.0
virtual packages : __glibc=2.22
base environment : /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://conda.anaconda.org/bioconda/linux-64
https://conda.anaconda.org/bioconda/noarch
https://conda.anaconda.org/ursky/linux-64
https://conda.anaconda.org/ursky/noarch
package cache : /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3/.conda/pkgs
envs directories : /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3/.conda/envs
/dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3/envs
/dss/dsshome1/lxc04/di52zuy/.conda/envs
platform : linux-64
user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Linux/4.12.14-95.32-default sles/12.4 glibc/2.22
UID:GID : 3907198:3891457
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
conda config --show-sources
==> /dss/dsshome1/lxc04/di52zuy/.condarc <==
auto_activate_base: False
root_prefix: /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3
envs_dirs:
- /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3/.conda/envs
pkgs_dirs:
- /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3/.conda/pkgs
channel_priority: flexible
channels:
- defaults
- conda-forge
- bioconda
- ursky
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
conda list --show-channel-urls
# packages in environment at /dss/dssfs02/lwp-dss-0001/pn69xe/pn69xe-dss-0000/di52zuy/ignite_tools_py3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0 defaults
_libgcc_mutex 0.1 main defaults
alabaster 0.7.12 py37_0 defaults
anaconda 2020.02 py37_0 defaults
anaconda-client 1.7.2 py37_0 defaults
anaconda-navigator 1.9.12 py37_0 defaults
anaconda-project 0.8.4 py_0 defaults
argh 0.26.2 py37_0 defaults
asn1crypto 1.3.0 py37_0 defaults
astroid 2.3.3 py37_0 defaults
astropy 4.0 py37h7b6447c_0 defaults
atomicwrites 1.3.0 py37_1 defaults
attrs 19.3.0 py_0 defaults
autopep8 1.4.4 py_0 defaults
babel 2.8.0 py_0 defaults
backcall 0.1.0 py37_0 defaults
backports 1.0 py_2 defaults
backports.functools_lru_cache 1.6.1 py_0 defaults
backports.shutil_get_terminal_size 1.0.0 py37_2 defaults
backports.tempfile 1.0 py_1 defaults
backports.weakref 1.0.post1 py_1 defaults
beautifulsoup4 4.8.2 py37_0 defaults
bitarray 1.2.1 py37h7b6447c_0 defaults
bkcharts 0.2 py37_0 defaults
blas 1.0 mkl defaults
bleach 3.1.0 py37_0 defaults
blosc 1.16.3 hd408876_0 defaults
bokeh 1.4.0 py37_0 defaults
boost-cpp 1.70.0 ha2d47e9_1 conda-forge
boto 2.49.0 py37_0 defaults
bottleneck 1.3.2 py37heb32a55_0 defaults
bzip2 1.0.8 h7b6447c_0 defaults
ca-certificates 2020.1.1 0 defaults
cairo 1.14.12 h8948797_3 defaults
certifi 2019.11.28 py37_0 defaults
cffi 1.14.0 py37h2e261b9_0 defaults
chardet 3.0.4 py37_1003 defaults
click 7.0 py37_0 defaults
cloudpickle 1.3.0 py_0 defaults
clyent 1.2.2 py37_1 defaults
colorama 0.4.3 py_0 defaults
conda 4.8.2 py37_0 defaults
conda-build 3.18.11 py37_0 defaults
conda-env 2.6.0 1 defaults
conda-package-handling 1.6.0 py37h7b6447c_0 defaults
conda-verify 3.4.2 py_1 defaults
contextlib2 0.6.0.post1 py_0 defaults
cryptography 2.8 py37h1ba5d50_0 defaults
curl 7.68.0 hbc83047_0 defaults
cycler 0.10.0 py37_0 defaults
cython 0.29.15 py37he6710b0_0 defaults
cytoolz 0.10.1 py37h7b6447c_0 defaults
dask 2.11.0 py_0 defaults
dask-core 2.11.0 py_0 defaults
dbus 1.13.12 h746ee38_0 defaults
decorator 4.4.1 py_0 defaults
defusedxml 0.6.0 py_0 defaults
diff-match-patch 20181111 py_0 defaults
distributed 2.11.0 py37_0 defaults
docutils 0.16 py37_0 defaults
entrypoints 0.3 py37_0 defaults
et_xmlfile 1.0.1 py37_0 defaults
expat 2.2.6 he6710b0_0 defaults
fastcache 1.1.0 py37h7b6447c_0 defaults
filelock 3.0.12 py_0 defaults
flake8 3.7.9 py37_0 defaults
flask 1.1.1 py_0 defaults
fontconfig 2.13.0 h9420a91_0 defaults
freetype 2.9.1 h8a8886c_1 defaults
fribidi 1.0.5 h7b6447c_0 defaults
fsspec 0.6.2 py_0 defaults
future 0.18.2 py37_0 defaults
get_terminal_size 1.0.0 haa9412d_0 defaults
gevent 1.4.0 py37h7b6447c_0 defaults
glib 2.63.1 h5a9c865_0 defaults
glob2 0.7 py_0 defaults
gmp 6.1.2 h6c8ec71_1 defaults
gmpy2 2.0.8 py37h10f8cd9_2 defaults
graphite2 1.3.13 h23475e2_0 defaults
greenlet 0.4.15 py37h7b6447c_0 defaults
gst-plugins-base 1.14.0 hbbd80ab_1 defaults
gstreamer 1.14.0 hb453b48_1 defaults
h5py 2.10.0 py37h7918eee_0 defaults
harfbuzz 1.8.8 hffaf4a1_0 defaults
hdf5 1.10.4 hb1b8bf9_0 defaults
heapdict 1.0.1 py_0 defaults
html5lib 1.0.1 py37_0 defaults
hypothesis 5.5.4 py_0 defaults
icu 58.2 h9c2bf20_1 defaults
idna 2.8 py37_0 defaults
imageio 2.6.1 py37_0 defaults
imagesize 1.2.0 py_0 defaults
importlib_metadata 1.5.0 py37_0 defaults
intel-openmp 2020.0 166 defaults
intervaltree 3.0.2 py_0 defaults
ipykernel 5.1.4 py37h39e3cac_0 defaults
ipython 7.12.0 py37h5ca1d4c_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
ipywidgets 7.5.1 py_0 defaults
isort 4.3.21 py37_0 defaults
itsdangerous 1.1.0 py37_0 defaults
jbig 2.1 hdba287a_0 defaults
jdcal 1.4.1 py_0 defaults
jedi 0.14.1 py37_0 defaults
jeepney 0.4.2 py_0 defaults
jinja2 2.11.1 py_0 defaults
joblib 0.14.1 py_0 defaults
jpeg 9b h024ee3a_2 defaults
json5 0.9.1 py_0 defaults
jsonschema 3.2.0 py37_0 defaults
jupyter 1.0.0 py37_7 defaults
jupyter_client 5.3.4 py37_0 defaults
jupyter_console 6.1.0 py_0 defaults
jupyter_core 4.6.1 py37_0 defaults
jupyterlab 1.2.6 pyhf63ae98_0 defaults
jupyterlab_server 1.0.6 py_0 defaults
kat 2.4.2 py37he1b856b_0 bioconda
keyring 21.1.0 py37_0 defaults
kiwisolver 1.1.0 py37he6710b0_0 defaults
krb5 1.17.1 h173b8e3_0 defaults
lazy-object-proxy 1.4.3 py37h7b6447c_0 defaults
ld_impl_linux-64 2.33.1 h53a641e_7 defaults
libarchive 3.3.3 h5d8350f_5 defaults
libcurl 7.68.0 h20c2e04_0 defaults
libedit 3.1.20181209 hc058e9b_0 defaults
libffi 3.2.1 hd88cf55_4 defaults
libgcc 7.2.0 h69d50b8_2 defaults
libgcc-ng 9.1.0 hdf63c60_0 defaults
libgfortran-ng 7.3.0 hdf63c60_0 defaults
liblief 0.9.0 h7725739_2 defaults
libpng 1.6.37 hbc83047_0 defaults
libsodium 1.0.16 h1bed415_0 defaults
libspatialindex 1.9.3 he6710b0_0 defaults
libssh2 1.8.2 h1ba5d50_0 defaults
libstdcxx-ng 9.1.0 hdf63c60_0 defaults
libtiff 4.1.0 h2733197_0 defaults
libtool 2.4.6 h7b6447c_5 defaults
libuuid 1.0.3 h1bed415_2 defaults
libxcb 1.13 h1bed415_1 defaults
libxml2 2.9.9 hea5a465_1 defaults
libxslt 1.1.33 h7d1a2b0_0 defaults
llvmlite 0.31.0 py37hd408876_0 defaults
locket 0.2.0 py37_1 defaults
lxml 4.5.0 py37hefd8a0e_0 defaults
lz4-c 1.8.1.2 h14c3975_0 defaults
lzo 2.10 h49e0be7_2 defaults
markupsafe 1.1.1 py37h7b6447c_0 defaults
matplotlib 3.1.3 py37_0 defaults
matplotlib-base 3.1.3 py37hef1b27d_0 defaults
mccabe 0.6.1 py37_1 defaults
mistune 0.8.4 py37h7b6447c_0 defaults
mkl 2020.0 166 defaults
mkl-service 2.3.0 py37he904b0f_0 defaults
mkl_fft 1.0.15 py37ha843d7b_0 defaults
mkl_random 1.1.0 py37hd6b4f25_0 defaults
mock 4.0.1 py_0 defaults
more-itertools 8.2.0 py_0 defaults
mpc 1.1.0 h10f8cd9_1 defaults
mpfr 4.0.1 hdf1c602_3 defaults
mpmath 1.1.0 py37_0 defaults
msgpack-python 0.6.1 py37hfd86e86_1 defaults
multipledispatch 0.6.0 py37_0 defaults
navigator-updater 0.2.1 py37_0 defaults
nbconvert 5.6.1 py37_0 defaults
nbformat 5.0.4 py_0 defaults
ncurses 6.2 he6710b0_0 defaults
networkx 2.4 py_0 defaults
nltk 3.4.5 py37_0 defaults
nose 1.3.7 py37_2 defaults
notebook 6.0.3 py37_0 defaults
numba 0.48.0 py37h0573a6f_0 defaults
numexpr 2.7.1 py37h423224d_0 defaults
numpy 1.18.1 py37h4f9e942_0 defaults
numpy-base 1.18.1 py37hde5b4d6_1 defaults
numpydoc 0.9.2 py_0 defaults
olefile 0.46 py37_0 defaults
openpyxl 3.0.3 py_0 defaults
openssl 1.1.1d h7b6447c_4 defaults
packaging 20.1 py_0 defaults
pandas 1.0.1 py37h0573a6f_0 defaults
pandoc 2.2.3.2 0 defaults
pandocfilters 1.4.2 py37_1 defaults
pango 1.42.4 h049681c_0 defaults
parso 0.5.2 py_0 defaults
partd 1.1.0 py_0 defaults
patchelf 0.10 he6710b0_0 defaults
path 13.1.0 py37_0 defaults
path.py 12.4.0 0 defaults
pathlib2 2.3.5 py37_0 defaults
pathtools 0.1.2 py_1 defaults
patsy 0.5.1 py37_0 defaults
pcre 8.43 he6710b0_0 defaults
pep8 1.7.1 py37_0 defaults
perl 5.26.2 h14c3975_0 defaults
perl-bioperl 1.6.924 4 bioconda
perl-threaded 5.26.0 0 bioconda
perl-yaml 1.29 pl526_0 bioconda
pexpect 4.8.0 py37_0 defaults
pickleshare 0.7.5 py37_0 defaults
pillow 7.0.0 py37hb39fc2d_0 defaults
pip 20.0.2 py37_1 defaults
pixman 0.38.0 h7b6447c_0 defaults
pkginfo 1.5.0.1 py37_0 defaults
pluggy 0.13.1 py37_0 defaults
ply 3.11 py37_0 defaults
prometheus_client 0.7.1 py_0 defaults
prompt_toolkit 3.0.3 py_0 defaults
psutil 5.6.7 py37h7b6447c_0 defaults
ptyprocess 0.6.0 py37_0 defaults
py 1.8.1 py_0 defaults
py-lief 0.9.0 py37h7725739_2 defaults
pycodestyle 2.5.0 py37_0 defaults
pycosat 0.6.3 py37h7b6447c_0 defaults
pycparser 2.19 py37_0 defaults
pycrypto 2.6.1 py37h14c3975_9 defaults
pycurl 7.43.0.5 py37h1ba5d50_0 defaults
pydocstyle 4.0.1 py_0 defaults
pyflakes 2.1.1 py37_0 defaults
pygments 2.5.2 py_0 defaults
pylint 2.4.4 py37_0 defaults
pyodbc 4.0.30 py37he6710b0_0 defaults
pyopenssl 19.1.0 py37_0 defaults
pyparsing 2.4.6 py_0 defaults
pyqt 5.9.2 py37h05f1152_2 defaults
pyrsistent 0.15.7 py37h7b6447c_0 defaults
pysocks 1.7.1 py37_0 defaults
pytables 3.6.1 py37h71ec239_0 defaults
pytest 5.3.5 py37_0 defaults
pytest-arraydiff 0.3 py37h39e3cac_0 defaults
pytest-astropy 0.8.0 py_0 defaults
pytest-astropy-header 0.1.2 py_0 defaults
pytest-doctestplus 0.5.0 py_0 defaults
pytest-openfiles 0.4.0 py_0 defaults
pytest-remotedata 0.3.2 py37_0 defaults
python 3.7.6 h0371630_2 defaults
python-dateutil 2.8.1 py_0 defaults
python-jsonrpc-server 0.3.4 py_0 defaults
python-language-server 0.31.7 py37_0 defaults
python-libarchive-c 2.8 py37_13 defaults
pytz 2019.3 py_0 defaults
pywavelets 1.1.1 py37h7b6447c_0 defaults
pyxdg 0.26 py_0 defaults
pyyaml 5.3 py37h7b6447c_0 defaults
pyzmq 18.1.1 py37he6710b0_0 defaults
qdarkstyle 2.8 py_0 defaults
qt 5.9.7 h5867ecd_1 defaults
qtawesome 0.6.1 py_0 defaults
qtconsole 4.6.0 py_1 defaults
qtpy 1.9.0 py_0 defaults
readline 7.0 h7b6447c_5 defaults
requests 2.22.0 py37_1 defaults
ripgrep 11.0.2 he32d670_0 defaults
rope 0.16.0 py_0 defaults
rtree 0.9.3 py37_0 defaults
ruamel_yaml 0.15.87 py37h7b6447c_0 defaults
scikit-image 0.16.2 py37h0573a6f_0 defaults
scikit-learn 0.22.1 py37hd81dba3_0 defaults
scipy 1.4.1 py37h0b6359f_0 defaults
seaborn 0.10.0 py_0 defaults
secretstorage 3.1.2 py37_0 defaults
send2trash 1.5.0 py37_0 defaults
setuptools 45.2.0 py37_0 defaults
simplegeneric 0.8.1 py37_2 defaults
singledispatch 3.4.0.3 py37_0 defaults
sip 4.19.8 py37hf484d3e_0 defaults
six 1.14.0 py37_0 defaults
snappy 1.1.7 hbae5bb6_3 defaults
snowballstemmer 2.0.0 py_0 defaults
sortedcollections 1.1.2 py37_0 defaults
sortedcontainers 2.1.0 py37_0 defaults
soupsieve 1.9.5 py37_0 defaults
sphinx 2.4.0 py_0 defaults
sphinxcontrib 1.0 py37_1 defaults
sphinxcontrib-applehelp 1.0.1 py_0 defaults
sphinxcontrib-devhelp 1.0.1 py_0 defaults
sphinxcontrib-htmlhelp 1.0.2 py_0 defaults
sphinxcontrib-jsmath 1.0.1 py_0 defaults
sphinxcontrib-qthelp 1.0.2 py_0 defaults
sphinxcontrib-serializinghtml 1.1.3 py_0 defaults
sphinxcontrib-websupport 1.2.0 py_0 defaults
spyder 4.0.1 py37_0 defaults
spyder-kernels 1.8.1 py37_0 defaults
sqlalchemy 1.3.13 py37h7b6447c_0 defaults
sqlite 3.31.1 h7b6447c_0 defaults
statsmodels 0.11.0 py37h7b6447c_0 defaults
sympy 1.5.1 py37_0 defaults
tabulate 0.8.3 py37_0 defaults
tbb 2020.0 hfd86e86_0 defaults
tblib 1.6.0 py_0 defaults
terminado 0.8.3 py37_0 defaults
testpath 0.4.4 py_0 defaults
tk 8.6.8 hbc83047_0 defaults
toolz 0.10.0 py_0 defaults
tornado 6.0.3 py37h7b6447c_3 defaults
tqdm 4.42.1 py_0 defaults
traitlets 4.3.3 py37_0 defaults
ujson 1.35 py37h14c3975_0 defaults
unicodecsv 0.14.1 py37_0 defaults
unixodbc 2.3.7 h14c3975_0 defaults
urllib3 1.25.8 py37_0 defaults
watchdog 0.10.2 py37_0 defaults
wcwidth 0.1.8 py_0 defaults
webencodings 0.5.1 py37_1 defaults
werkzeug 1.0.0 py_0 defaults
wheel 0.34.2 py37_0 defaults
widgetsnbextension 3.5.1 py37_0 defaults
wrapt 1.11.2 py37h7b6447c_0 defaults
wurlitzer 2.0.0 py37_0 defaults
xlrd 1.2.0 py37_0 defaults
xlsxwriter 1.2.7 py_0 defaults
xlwt 1.3.0 py37_0 defaults
xmltodict 0.12.0 py_0 defaults
xz 5.2.4 h14c3975_4 defaults
yaml 0.1.7 had09818_2 defaults
yapf 0.28.0 py_0 defaults
zeromq 4.3.1 he6710b0_3 defaults
zict 1.0.0 py_0 defaults
zipp 2.2.0 py_0 defaults
zlib 1.2.11 h7b6447c_3 defaults
zstd 1.3.7 h0b5b093_0 defaults
```
</p></details>
| Unverified myself, but if accurate this is a sev-1 bug.
Confirmed in 4.8.3; basic steps to reproduce:
```
mkdir /tmp/not-an-env
touch /tmp/not-an-env
conda remove --all -y -p /tmp/not-an-env
``` | 2020-07-20T21:32:10 |
conda/conda | 10,090 | conda__conda-10090 | [
"9997"
] | ac6487bf6b79dac1d620fb9ddbadb334b613596b | diff --git a/conda/cli/main_create.py b/conda/cli/main_create.py
--- a/conda/cli/main_create.py
+++ b/conda/cli/main_create.py
@@ -21,6 +21,10 @@ def execute(args, parser):
if is_conda_environment(context.target_prefix):
if paths_equal(context.target_prefix, context.root_prefix):
raise CondaValueError("The target prefix is the base prefix. Aborting.")
+ if context.dry_run:
+ # Taking the "easy" way out, rather than trying to fake removing
+ # the existing environment before creating a new one.
+ raise CondaValueError("Cannot `create --dry-run` with an existing conda environment")
confirm_yn("WARNING: A conda environment already exists at '%s'\n"
"Remove existing environment" % context.target_prefix,
default='no',
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -53,7 +53,8 @@
from conda.core.subdir_data import create_cache_dir
from conda.exceptions import CommandArgumentError, DryRunExit, OperationNotAllowed, \
PackagesNotFoundError, RemoveError, conda_exception_handler, PackageNotInstalledError, \
- DisallowedPackageError, DirectoryNotACondaEnvironmentError, EnvironmentLocationNotFound
+ DisallowedPackageError, DirectoryNotACondaEnvironmentError, EnvironmentLocationNotFound, \
+ CondaValueError
from conda.gateways.anaconda_client import read_binstar_tokens
from conda.gateways.disk.create import mkdir_p, extract_tarball
from conda.gateways.disk.delete import rm_rf, path_is_clean
@@ -1760,6 +1761,12 @@ def test_create_dry_run_json(self):
assert "python" in names
assert "flask" in names
+ def test_create_dry_run_yes_safety(self):
+ with make_temp_env() as prefix:
+ with pytest.raises(CondaValueError):
+ run_command(Commands.CREATE, prefix, "--dry-run", "--yes")
+ assert exists(prefix)
+
def test_packages_not_found(self):
with make_temp_env() as prefix:
with pytest.raises(PackagesNotFoundError) as exc:
| 'conda create --dry-run --yes' deletes existing environment.
## Current Behavior
If `--dry-run` and `--yes` are _both_ passed to `conda create`, and the named environment already exists, the named environment is deleted.
### Steps to Reproduce
```
# create the env
conda create -n tmp -y
conda env list | grep tmp
# --dry-run without --yes leaves env in place
conda create -n tmp --dry-run
conda env list | grep tmp
# --dry-run with --yes deletes the env
conda create -n tmp --dry-run --yes
conda env list | grep tmp
```
## Expected Behavior
'conda create --dry-run' should not delete an existing environment.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
```
active environment : garpy.conda-dev
active env location : /Users/aschweit/miniconda3/envs/garpy.conda-dev
shell level : 2
user config file : /Users/aschweit/.condarc
populated config files : /Users/aschweit/.condarc
conda version : 4.8.2
conda-build version : 3.19.2
python version : 3.7.6.final.0
virtual packages : __osx=10.14.6
base environment : /Users/aschweit/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/aschweit/miniconda3/pkgs
/Users/aschweit/.conda/pkgs
envs directories : /Users/aschweit/miniconda3/envs
/Users/aschweit/.conda/envs
platform : osx-64
user-agent : conda/4.8.2 requests/2.23.0 CPython/3.7.6 Darwin/18.7.0 OSX/10.14.6
UID:GID : 501:20
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
```
==> /Users/aschweit/.condarc <==
auto_update_conda: False
auto_stack: 1
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
```
# packages in environment at /Users/aschweit/miniconda3:
#
# Name Version Build Channel
appdirs 1.4.3 py_1 conda-forge
arrow 0.15.6 py37hc8dfbb8_1 conda-forge
attrs 19.3.0 py_0 conda-forge
beautifulsoup4 4.9.0 py37hc8dfbb8_0 conda-forge
binaryornot 0.4.4 py_1 conda-forge
black 19.10b0 py37_0 conda-forge
bleach 3.1.4 py_0 defaults
brotlipy 0.7.0 py37h9bfed18_1000 conda-forge
bzip2 1.0.8 h0b31af3_2 conda-forge
ca-certificates 2020.4.5.1 hecc5488_0 conda-forge
certifi 2020.4.5.1 py37hc8dfbb8_0 conda-forge
cffi 1.14.0 py37h356ff06_0 conda-forge
chardet 3.0.4 py37hc8dfbb8_1006 conda-forge
click 7.1.2 pyh9f0ad1d_0 conda-forge
cmarkgfm 0.4.2 py37h1de35cc_0 defaults
conda 4.8.2 py37_0 defaults
conda-build 3.19.2 py37hc8dfbb8_2 conda-forge
conda-package-handling 1.6.0 py37h9bfed18_2 conda-forge
cookiecutter 1.7.2 pyh9f0ad1d_0 conda-forge
cryptography 2.9.2 py37he655712_0 conda-forge
curl 7.69.1 ha441bb4_0 defaults
decorator 4.4.2 py_0 defaults
docutils 0.16 py37_0 defaults
expat 2.2.9 h4a8c4bd_2 conda-forge
filelock 3.0.10 py_0 conda-forge
future 0.18.2 py37_0 defaults
gettext 0.19.8.1 h46ab8bc_1002 conda-forge
git 2.26.2 pl526hcc376a2_0 conda-forge
glob2 0.7 py_0 conda-forge
icu 67.1 h4a8c4bd_0 conda-forge
idna 2.9 py_1 conda-forge
importlib-metadata 1.6.0 py37hc8dfbb8_0 conda-forge
importlib_metadata 1.6.0 0 conda-forge
jinja2 2.11.2 pyh9f0ad1d_0 conda-forge
jinja2-time 0.2.0 py_2 conda-forge
krb5 1.17.1 hddcf347_0 defaults
libarchive 3.3.3 h02796b4_1008 conda-forge
libcurl 7.69.1 h051b688_0 defaults
libcxx 10.0.0 h1af66ff_2 conda-forge
libedit 3.1.20181209 hb402a30_0 defaults
libffi 3.2.1 h4a8c4bd_1007 conda-forge
libiconv 1.15 h0b31af3_1006 conda-forge
liblief 0.9.0 h3e78482_1 conda-forge
libssh2 1.9.0 ha12b0ac_1 defaults
libxml2 2.9.10 hc06c4ae_1 conda-forge
lz4-c 1.9.2 h4a8c4bd_1 conda-forge
lzo 2.10 h1de35cc_1000 conda-forge
markupsafe 1.1.1 py37h9bfed18_1 conda-forge
mypy_extensions 0.4.3 py37hc8dfbb8_1 conda-forge
ncurses 6.1 h0a44026_1002 conda-forge
networkx 2.4 py_0 defaults
openssl 1.1.1g h0b31af3_0 conda-forge
packaging 20.1 py_0 conda-forge
pathspec 0.8.0 pyh9f0ad1d_0 conda-forge
pcre 8.44 h4a8c4bd_0 conda-forge
perl 5.26.2 haec8ef5_1006 conda-forge
pip 20.1 pyh9f0ad1d_0 conda-forge
pkginfo 1.5.0.1 py_0 conda-forge
pluggy 0.13.1 py37hc8dfbb8_1 conda-forge
poyo 0.5.0 py_0 conda-forge
psutil 5.7.0 py37h9bfed18_1 conda-forge
py 1.8.1 py_0 conda-forge
py-lief 0.9.0 py37h0ceac7d_1 conda-forge
pycosat 0.6.3 py37h9bfed18_1004 conda-forge
pycparser 2.20 py_0 conda-forge
pygments 2.6.1 py_0 defaults
pyopenssl 19.1.0 py_1 conda-forge
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pysocks 1.7.1 py37hc8dfbb8_1 conda-forge
python 3.7.6 h359304d_2 defaults
python-dateutil 2.8.1 py_0 conda-forge
python-libarchive-c 2.9 py37_0 conda-forge
python-slugify 4.0.0 pyh9f0ad1d_1 conda-forge
python.app 2 py37_10 defaults
python_abi 3.7 1_cp37m conda-forge
pytz 2020.1 pyh9f0ad1d_0 conda-forge
pyyaml 5.3.1 py37h9bfed18_0 conda-forge
readline 7.0 hcfe32e1_1001 conda-forge
readme_renderer 24.0 py37_0 defaults
regex 2020.5.14 py37h9bfed18_0 conda-forge
requests 2.23.0 pyh8c360ce_2 conda-forge
requests-toolbelt 0.9.1 py_0 defaults
ripgrep 12.1.0 h0b31af3_0 conda-forge
ruamel_yaml 0.15.80 py37h9bfed18_1001 conda-forge
setuptools 46.3.0 py37hc8dfbb8_0 conda-forge
six 1.14.0 py_1 conda-forge
soupsieve 1.9.4 py37hc8dfbb8_1 conda-forge
sqlite 3.31.1 ha441bb4_0 defaults
text-unidecode 1.3 py_0 conda-forge
tk 8.6.10 hbbe82c9_0 conda-forge
toml 0.10.0 py_0 conda-forge
tox 3.15.0 py37hc8dfbb8_0 conda-forge
tox-conda 0.2.1 py_0 conda-forge
tqdm 4.46.0 pyh9f0ad1d_0 conda-forge
tree 1.8.0 h0b31af3_1 conda-forge
twine 2.0.0 py_0 defaults
typed-ast 1.4.1 py37h0b31af3_0 conda-forge
typing_extensions 3.7.4.2 py_0 conda-forge
unidecode 1.1.1 py_0 conda-forge
urllib3 1.25.9 py_0 conda-forge
virtualenv 16.7.5 py_0 conda-forge
webencodings 0.5.1 py37_1 defaults
wheel 0.34.2 py_1 conda-forge
whichcraft 0.6.1 py_0 conda-forge
xz 5.2.5 h0b31af3_0 conda-forge
yaml 0.2.4 h0b31af3_0 conda-forge
zipp 3.1.0 py_0 conda-forge
zlib 1.2.11 h0b31af3_1006 conda-forge
zstd 1.4.4 h4b3e974_3 conda-forge
```
</p></details>
| 2020-07-22T03:50:40 |
|
conda/conda | 10,117 | conda__conda-10117 | [
"10116"
] | 9785db1271ae83d7d44828c04fa01dab7a44af9e | diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -369,6 +369,8 @@ def empty_package_list(pkg):
return update_constrained
for pkg in self.specs_to_add:
+ if pkg.name.startswith('__'): # ignore virtual packages
+ continue
current_version = max(i[1] for i in pre_packages[pkg.name])
if current_version == max(i.version for i in index_keys if i.name == pkg.name):
continue
| diff --git a/tests/test_create.py b/tests/test_create.py
--- a/tests/test_create.py
+++ b/tests/test_create.py
@@ -2881,6 +2881,12 @@ def test_neutering_of_historic_specs(self):
# If this command runs successfully (does not raise), then all is well.
stdout, stderr, _ = run_command(Commands.INSTALL, prefix, "imagesize")
+ # https://github.com/conda/conda/issues/10116
+ @pytest.mark.skipif(not context.subdir.startswith('linux'), reason="__glibc only available on linux")
+ def test_install_bound_virtual_package(self):
+ with make_temp_env("__glibc>0") as prefix:
+ pass
+
@pytest.mark.integration
def test_remove_empty_env(self):
with make_temp_env() as prefix:
| conda cannot create an environment with only a constrained virtual package
## Current Behavior
Conda fails when asked to create a environment containing only a virtual package with a version constraint. Adding an additional spec to the environment or removing the constraint works.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
$ conda create -n example __glibc --dry-run # works
$ conda create -n example "__glibc>=0` openssl --dry-run # works
$ conda create -n example "__glibc>=0" --dry-run
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
return getattr(module, func_name)(args, parser)
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/cli/main_create.py", line 37, in execute
install(args, parser, 'create')
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/cli/install.py", line 265, in install
should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/core/solve.py", line 117, in solve_for_transaction
should_retry_solve)
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/core/solve.py", line 158, in solve_for_diff
force_remove, should_retry_solve)
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/core/solve.py", line 289, in solve_final_state
self.determine_constricting_specs(spec, ssc.solution_precs)
File "/home/jhelmus/conda/lib/python3.7/site-packages/conda/core/solve.py", line 315, in determine_constricting_specs
if sp.name == spec.name][0]
IndexError: list index out of range
`$ /home/jhelmus/conda/bin/conda create -n example __glibc>=0 --dry-run`
environment variables:
CIO_TEST=<not set>
CONDA_BACKUP_JAVA_HOME=
CONDA_BACKUP_JAVA_LD_LIBRARY_PATH=
CONDA_DEFAULT_ENV=base
CONDA_EXE=/home/jhelmus/conda/bin/conda
CONDA_PREFIX=/home/jhelmus/conda
CONDA_PROMPT_MODIFIER=
CONDA_PYTHONBREAKPOINT=
CONDA_PYTHON_EXE=/home/jhelmus/conda/bin/python
CONDA_ROOT=/home/jhelmus/conda
CONDA_SHLVL=1
JAVA_LD_LIBRARY_PATH=/home/jhelmus/conda/jre/lib/amd64/server
PATH=/home/jhelmus/conda/bin:/home/jhelmus/bin:/home/jhelmus/conda/bin:/hom
e/jhelmus/conda/condabin:/home/jhelmus/bin:/usr/local/sbin:/usr/local/
bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bi
n
PYTHONBREAKPOINT=ipdb.set_trace
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
WINDOWPATH=2
active environment : base
active env location : /home/jhelmus/conda
shell level : 1
user config file : /home/jhelmus/.condarc
populated config files : /home/jhelmus/.condarc
conda version : 4.8.3
conda-build version : 3.18.11
python version : 3.7.7.final.0
virtual packages : __cuda=10.1
__glibc=2.27
base environment : /home/jhelmus/conda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/jhelmus/conda/pkgs
/home/jhelmus/.conda/pkgs
envs directories : /home/jhelmus/conda/envs
/home/jhelmus/.conda/envs
platform : linux-64
user-agent : conda/4.8.3 requests/2.21.0 CPython/3.7.7 Linux/4.15.0-109-generic ubuntu/18.04.4 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
## Expected Behavior
Provided that the virtual package spec is valid conda should create an empty environment in the same manner as when an un-restrained virtual package is specified.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
$ conda info
active environment : base
active env location : /home/jhelmus/conda
shell level : 1
user config file : /home/jhelmus/.condarc
populated config files : /home/jhelmus/.condarc
conda version : 4.8.3
conda-build version : 3.18.11
python version : 3.7.7.final.0
virtual packages : __cuda=10.1
__glibc=2.27
base environment : /home/jhelmus/conda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/jhelmus/conda/pkgs
/home/jhelmus/.conda/pkgs
envs directories : /home/jhelmus/conda/envs
/home/jhelmus/.conda/envs
platform : linux-64
user-agent : conda/4.8.3 requests/2.21.0 CPython/3.7.7 Linux/4.15.0-109-generic ubuntu/18.04.4 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
$ conda config --show-sources
==> /home/jhelmus/.condarc <==
add_pip_as_python_dependency: False
changeps1: False
ssl_verify: True
channels:
- defaults
show_channel_urls: True
report_errors: False
```
</p></details>
| I'm curious if #10057 changes this behavior
#10057 does not change this behavior. | 2020-07-29T16:27:53 |
conda/conda | 10,261 | conda__conda-10261 | [
"10231"
] | 10953ebc9e06c6f189ed923994b1d4d1bf9edac4 | diff --git a/conda/cli/main_remove.py b/conda/cli/main_remove.py
--- a/conda/cli/main_remove.py
+++ b/conda/cli/main_remove.py
@@ -73,8 +73,9 @@ def execute(args, parser):
handle_txn(txn, prefix, args, False, True)
except PackagesNotFoundError:
print("No packages found in %s. Continuing environment removal" % prefix)
- rm_rf(prefix, clean_empty_parents=True)
- unregister_env(prefix)
+ if not context.dry_run:
+ rm_rf(prefix, clean_empty_parents=True)
+ unregister_env(prefix)
return
| diff --git a/tests/conda_env/test_cli.py b/tests/conda_env/test_cli.py
--- a/tests/conda_env/test_cli.py
+++ b/tests/conda_env/test_cli.py
@@ -361,6 +361,14 @@ def test_update_env_no_action_json_output(self):
output = json.loads(stdout)
assert output["message"] == "All requested packages already installed."
+ def test_remove_dry_run(self):
+ # Test for GH-10231
+ create_env(environment_1)
+ run_env_command(Commands.ENV_CREATE, None)
+ env_name = "env-1"
+ run_env_command(Commands.ENV_REMOVE, env_name, "--dry-run")
+ self.assertTrue(env_is_created(env_name))
+
def test_set_unset_env_vars(self):
create_env(environment_1)
run_env_command(Commands.ENV_CREATE, None)
| `conda env remove --dry-run` actually deletes the env
## Current Behavior
Using the `--dry-run` flag doesn't do a dry-run at all.
### Steps to Reproduce
```
$ conda env list
# conda environments:
#
base * /usr
$ conda create -n foo
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/eric/.conda/envs/foo
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate foo
#
# To deactivate an active environment, use
#
# $ conda deactivate
$ conda env list
# conda environments:
#
foo /home/eric/.conda/envs/foo
base * /usr
~ $ conda env remove --dry-run -n foo
Remove all packages in environment /home/eric/.conda/envs/foo:
$ conda env list
# conda environments:
#
base * /usr
$
```
## Expected Behavior
`--dry-run` is documented as `Only display what would have been done.`, but clearly that's not true :upside_down_face:
The expected behaviour here is obviously that the environment is **not** removed :slightly_smiling_face:
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
```
active environment : None
shell level : 0
user config file : /home/eric/.condarc
populated config files : /usr/share/conda/condarc.d/defaults.yaml
/home/eric/.condarc
conda version : 4.8.2
conda-build version : not installed
python version : 3.8.5.final.0
virtual packages : __glibc=2.31
base environment : /usr (read only)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /var/cache/conda/pkgs
/home/eric/.conda/pkgs
envs directories : /home/eric/.conda/envs
/usr/envs
platform : linux-64
user-agent : conda/4.8.2 requests/2.22.0 CPython/3.8.5 Linux/5.8.6-201.fc32.x86_64 fedora/32 glibc/2.31
UID:GID : 1000:1000
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
```
==> /usr/share/conda/condarc.d/defaults.yaml <==
pkgs_dirs:
- /var/cache/conda/pkgs
- ~/.conda/pkgs
==> /home/eric/.condarc <==
channels:
- conda-forge
- defaults
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
EnvironmentLocationNotFound: Not a conda environment: /usr
```
(I expect that might also be a bug, conda shouldn't crash like that here.)
</p></details>
| 2020-10-01T02:55:30 |
|
conda/conda | 10,356 | conda__conda-10356 | [
"9749"
] | e5a596438122ae15347aec16a2370423d7917b46 | diff --git a/conda_env/env.py b/conda_env/env.py
--- a/conda_env/env.py
+++ b/conda_env/env.py
@@ -155,8 +155,12 @@ def from_file(filename):
elif not os.path.exists(filename):
raise exceptions.EnvironmentFileNotFound(filename)
else:
- with open(filename, 'r') as fp:
- yamlstr = fp.read()
+ with open(filename, 'rb') as fp:
+ yamlb = fp.read()
+ try:
+ yamlstr = yamlb.decode('utf-8')
+ except UnicodeDecodeError:
+ yamlstr = yamlb.decode('utf-16')
return from_yaml(yamlstr, filename=filename)
| Installing from environment.yml produces unexpected error, maybe due to character encoding
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
I'm using `conda env export` to generate an `environment.yml` file. It's my understanding that these files should make conda environments portable, thus easily replicated on a different machine. Please correct me if I'm wrong with that.
I'm able to successfully create an environment, activate and export it, deactivate and remove it, but when I try to recreate it from the `environment.yml` file, I'm getting a message stating `An unexpected error has occurred.`
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
# create the environment
conda create --name testenv python=3.8
# activate and export the environment to yml
conda activate testenv
conda env export > environment.yml
# deactivate and remove the environment
conda deactivate
conda remove --name testenv --all
# try to restore environment from environment.yml
conda env create -v -v -v -f .\environment.yml
```
All of the commands succeed, except for `conda env create`
<details open><summary><code>`conda env create -f environment.yml`</code> <strong>ERROR REPORT</strong></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
DEBUG conda.gateways.logging:set_verbosity(231): verbosity set to 3
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "D:\Program_Files\miniconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\cli\main.py", line 80, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\cli\main_create.py", line 80, in execute
directory=os.getcwd())
File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\specs\__init__.py", line 40, in detect
if spec.can_handle():
File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\specs\yaml_file.py", line 18, in can_handle
self._environment = env.from_file(self.filename)
File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\env.py", line 151, in from_file
return from_yaml(yamlstr, filename=filename)
File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\env.py", line 136, in from_yaml
data = yaml_load_standard(yamlstr)
File "D:\Program_Files\miniconda3\lib\site-packages\conda\common\serialize.py", line 76, in yaml_load_standard
return yaml.load(string, Loader=yaml.Loader, version="1.2")
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\main.py", line 933, in load
loader = Loader(stream, version, preserve_quotes=preserve_quotes)
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\loader.py", line 50, in __init__
Reader.__init__(self, stream, loader=self)
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 85, in __init__
self.stream = stream # type: Any # as .read is called
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 117, in stream
self.check_printable(val)
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 255, in check_printable
'special characters are not allowed',
ruamel_yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
in "<unicode string>", position 3
`$ D:\Program_Files\miniconda3\Scripts\conda-env-script.py create -v -v -v -f .\environment.yml`
environment variables:
CIO_TEST=<not set>
CONDA_AUTO_UPDATE_CONDA=false
CONDA_DEFAULT_ENV=base
CONDA_EXE=D:\Program_Files\miniconda3\Scripts\conda.exe
CONDA_PREFIX=D:\Program_Files\miniconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=D:\Program_Files\miniconda3\python.exe
CONDA_ROOT=D:\Program_Files\miniconda3
CONDA_SHLVL=1
HOMEPATH=\
PATH=D:\Program_Files\miniconda3;D:\Program_Files\miniconda3\Library\mingw-
w64\bin;D:\Program_Files\miniconda3\Library\usr\bin;D:\Program_Files\m
iniconda3\Library\bin;D:\Program_Files\miniconda3\Scripts;D:\Program_F
iles\miniconda3\bin;D:\Program_Files\miniconda3;D:\Program_Files\minic
onda3\Library\mingw-w64\bin;D:\Program_Files\miniconda3\Library\usr\bi
n;D:\Program_Files\miniconda3\Library\bin;D:\Program_Files\miniconda3\
Scripts;D:\Program_Files\miniconda3\bin;D:\Program_Files\miniconda3\co
ndabin;C:\Oracle11\Ora11G-64\11.2.0\client_1\bin;C:\Oracle\ORA11\11.2.
0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDO
WS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Prog
ram Files (x86)\WebEx\Productivity Tools;C:\Program
Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL
Server\150\DTS\Binn;C:\Program Files (x86)\ArcGIS\Bin;C:\Program Files
(x86)\ArcGIS\EsriProductionMapping\Desktop10.5\Bin;C:\Program
Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Webe
x\Webex\Applications;C:\Users\avitale\AppData\Local\Microsoft\WindowsA
pps;C:\Users\avitale\AppData\Local\Programs\Microsoft VS Code\bin;C:\U
sers\avitale\AppData\Roaming\npm;C:\Python3X;C:\OSGeo4W\bin;C:\Python3
X;C:\OSGeo4W\bin;C:\Python3X;C:\OSGeo4W\bin;C:\OSGeo4W\bin;C:\Program
Files\dotnet;C:\Users\avitale\AppData\Local\Microsoft\WindowsApps;.;C:
\Users\avitale\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\a
vitale\AppData\Roaming\npm;C:\Users\avitale\.dotnet\tools
PSMODULEPATH=C:\Users\avitale\Documents\WindowsPowerShell\Modules;C:\Program Files\
WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\M
odules
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : base
active env location : D:\Program_Files\miniconda3
shell level : 1
user config file : C:\Users\avitale\.condarc
populated config files : C:\Users\avitale\.condarc
conda version : 4.8.2
conda-build version : not installed
python version : 3.7.4.final.0
virtual packages : __cuda=10.2
base environment : D:\Program_Files\miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : D:\Program_Files\miniconda3\pkgs
C:\Users\avitale\.conda\pkgs
C:\Users\avitale\AppData\Local\conda\conda\pkgs
envs directories : D:\Program_Files\miniconda3\envs
C:\Users\avitale\.conda\envs
C:\Users\avitale\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.4 Windows/10 Windows/10.0.17134
administrator : False
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
[y/N]:
No report sent. To permanently opt-out, use
$ conda config --set report_errors false
```
</p></details>
## Expected Behavior
<!-- What do you think should happen? -->
I believe that the `conda env create -f .\environment.yml` command should install the packages listed in the `environment.yml` file without error.
### Workaround
I found a strange workaround, that seems to work on two separate Windows 10 machines. If I open the `environment.yml` file in VS Code, change the character encoding to UTF-8 and "reopen with encoding", hit `ctrl+z` to undo the change, then save the file, the install works as expected. The default character encoding for the `environment.yml` file that's output from conda is UTF-16 LE.
The error from the YAML parser led me down this path:
```python
File "D:\Program_Files\miniconda3\lib\site-packages\conda_env\env.py", line 136, in from_yaml
data = yaml_load_standard(yamlstr)
File "D:\Program_Files\miniconda3\lib\site-packages\conda\common\serialize.py", line 76, in yaml_load_standard
return yaml.load(string, Loader=yaml.Loader, version="1.2")
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\main.py", line 933, in load
loader = Loader(stream, version, preserve_quotes=preserve_quotes)
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\loader.py", line 50, in __init__
Reader.__init__(self, stream, loader=self)
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 85, in __init__
self.stream = stream # type: Any # as .read is called
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 117, in stream
self.check_printable(val)
File "D:\Program_Files\miniconda3\lib\site-packages\ruamel_yaml\reader.py", line 255, in check_printable
'special characters are not allowed',
ruamel_yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
in "<unicode string>", position 3
```
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : base
active env location : D:\Program_Files\miniconda3
shell level : 1
user config file : C:\Users\avitale\.condarc
populated config files : C:\Users\avitale\.condarc
conda version : 4.8.2
conda-build version : not installed
python version : 3.7.4.final.0
virtual packages : __cuda=10.2
base environment : D:\Program_Files\miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : D:\Program_Files\miniconda3\pkgs
C:\Users\avitale\.conda\pkgs
C:\Users\avitale\AppData\Local\conda\conda\pkgs
envs directories : D:\Program_Files\miniconda3\envs
C:\Users\avitale\.conda\envs
C:\Users\avitale\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.4 Windows/10 Windows/10.0.17134
administrator : False
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> C:\Users\avitale\.condarc <==
ssl_verify: False
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at D:\Program_Files\miniconda3:
#
# Name Version Build Channel
asn1crypto 1.3.0 py37_0 defaults
ca-certificates 2020.1.1 0 defaults
certifi 2019.11.28 py37_0 defaults
cffi 1.14.0 py37h7a1dbc1_0 defaults
chardet 3.0.4 py37_1003 defaults
conda 4.8.2 py37_0 defaults
conda-package-handling 1.6.0 py37h62dcd97_0 defaults
console_shortcut 0.1.1 3 defaults
cryptography 2.8 py37h7a1dbc1_0 defaults
idna 2.8 py37_0 defaults
menuinst 1.4.16 py37he774522_0 defaults
openssl 1.1.1d he774522_4 defaults
pip 20.0.2 py37_1 defaults
powershell_shortcut 0.0.1 2 defaults
pycosat 0.6.3 py37he774522_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 19.1.0 py37_0 defaults
pysocks 1.7.1 py37_0 defaults
python 3.7.4 h5263a28_0 defaults
pywin32 227 py37he774522_1 defaults
requests 2.22.0 py37_1 defaults
ruamel_yaml 0.15.87 py37he774522_0 defaults
setuptools 45.2.0 py37_0 defaults
six 1.14.0 py37_0 defaults
sqlite 3.31.1 he774522_0 defaults
tqdm 4.42.1 py_0 defaults
urllib3 1.25.8 py37_0 defaults
vc 14.1 h0510ff6_4 defaults
vs2015_runtime 14.16.27012 hf0eaf9b_1 defaults
wheel 0.34.2 py37_0 defaults
win_inet_pton 1.1.0 py37_0 defaults
wincertstore 0.2 py37_0 defaults
yaml 0.1.7 hc54c509_2 defaults
```
</p></details>
| I had the some error. The YML file was created by conda on a Windows 10 machine, and I tried to recreate the environment on another Windows 10 machine.
I converted the YML file in Notepad++ to UTF-8, after that it worked.
The workaround using VS code that vitale232 described worked for me, too.
It looks like the bad encoding happens when you write out using `>`
I was getting the same error, had to change the export to:
`conda env export -f environment.yml`
or
`conda env export | Out-File environment.yml -Encoding utf8NoBom` | 2020-11-13T12:20:27 |
|
conda/conda | 10,413 | conda__conda-10413 | [
"9362"
] | ca16b2c4747c6464a30615d7462fac646c63743e | diff --git a/conda/core/initialize.py b/conda/core/initialize.py
--- a/conda/core/initialize.py
+++ b/conda/core/initialize.py
@@ -450,7 +450,10 @@ def make_initialize_plan(conda_prefix, shells, for_user, for_system, anaconda_pr
})
if 'zsh' in shells and for_user:
- zshrc_path = expand(join('~', '.zshrc'))
+ if 'ZDOTDIR' in os.environ:
+ zshrc_path = expand(join("$ZDOTDIR", ".zshrc"))
+ else:
+ zshrc_path = expand(join('~', '.zshrc'))
plan.append({
'function': init_sh_user.__name__,
'kwargs': {
| Conda init zsh ignores $ZDOTDIR variable
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
When using `conda init zsh`, conda will create a .zshrc file in my `$HOME` directory instead of looking for one in my `$ZDOTDIR` directory.
I have set `$ZDOTDIR` in a .zshenv file (in `$HOME`), all my other zsh files, in particular .zshrc, are in `$ZDOTDIR`. Since this duplicate file created by conda won't be read by the shell, conda packages can't be called.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
On zsh:
Set `$ZDOTDIR` to a directory different from `$HOME`.
Move or create a .zshrc file in `$ZDOTDIR`.
run `conda init zsh`.
## Expected Behavior
<!-- What do you think should happen? -->
`Conda init zsh` should look for .zshrc in `$ZDOTDIR` ([as zsh does](http://zsh.sourceforge.net/Intro/intro_3.html)).
I understand the problem can easily be fixed by copy-pasting the text from one file to another,
but it would be better if the default behavior was to look for the .zshrc file in `$ZDOTDIR`.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
user config file : /Users/sergioalejandro/.condarc
populated config files :
conda version : 4.7.12
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : /usr/local/Caskroom/miniconda/base (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /usr/local/Caskroom/miniconda/base/pkgs
/Users/sergioalejandro/.conda/pkgs
envs directories : /usr/local/Caskroom/miniconda/base/envs
/Users/sergioalejandro/.conda/envs
platform : osx-64
user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.3 Darwin/19.0.0 OSX/10.15
UID:GID : 501:20
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /usr/local/Caskroom/miniconda/base:
#
# Name Version Build Channel
appnope 0.1.0 py37_0 defaults
asn1crypto 1.2.0 py37_0 defaults
attrs 19.3.0 py_0 defaults
backcall 0.1.0 py37_0 defaults
bleach 3.1.0 py37_0 defaults
ca-certificates 2019.10.16 0 defaults
certifi 2019.9.11 py37_0 defaults
cffi 1.13.0 py37hb5b8e2f_0 defaults
chardet 3.0.4 py37_1003 defaults
conda 4.7.12 py37_0 defaults
conda-package-handling 1.6.0 py37h1de35cc_0 defaults
cryptography 2.8 py37ha12b0ac_0 defaults
dbus 1.13.6 h90a0687_0 defaults
decorator 4.4.0 py37_1 defaults
defusedxml 0.6.0 py_0 defaults
entrypoints 0.3 py37_0 defaults
expat 2.2.6 h0a44026_0 defaults
gettext 0.19.8.1 h15daf44_3 defaults
glib 2.56.2 hd9629dc_0 defaults
icu 58.2 h4b95b61_1 defaults
idna 2.8 py37_0 defaults
importlib_metadata 0.23 py37_0 defaults
ipykernel 5.1.2 py37h39e3cac_0 defaults
ipython 7.8.0 py37h39e3cac_0 defaults
ipython_genutils 0.2.0 py37_0 defaults
ipywidgets 7.5.1 py_0 defaults
jedi 0.15.1 py37_0 defaults
jinja2 2.10.3 py_0 defaults
jpeg 9b he5867d9_2 defaults
jsonschema 3.1.1 py37_0 defaults
jupyter 1.0.0 py37_7 defaults
jupyter_client 5.3.4 py37_0 defaults
jupyter_console 6.0.0 py37_0 defaults
jupyter_core 4.6.0 py37_0 defaults
libcxx 4.0.1 hcfea43d_1 defaults
libcxxabi 4.0.1 hcfea43d_1 defaults
libedit 3.1.20181209 hb402a30_0 defaults
libffi 3.2.1 h475c297_4 defaults
libiconv 1.15 hdd342a3_7 defaults
libpng 1.6.37 ha441bb4_0 defaults
libsodium 1.0.16 h3efe00b_0 defaults
markupsafe 1.1.1 py37h1de35cc_0 defaults
mistune 0.8.4 py37h1de35cc_0 defaults
more-itertools 7.2.0 py37_0 defaults
nbconvert 5.6.0 py37_1 defaults
nbformat 4.4.0 py37_0 defaults
ncurses 6.1 h0a44026_1 defaults
notebook 6.0.1 py37_0 defaults
openssl 1.1.1d h1de35cc_3 defaults
pandoc 2.2.3.2 0 defaults
pandocfilters 1.4.2 py37_1 defaults
parso 0.5.1 py_0 defaults
pcre 8.43 h0a44026_0 defaults
pexpect 4.7.0 py37_0 defaults
pickleshare 0.7.5 py37_0 defaults
prometheus_client 0.7.1 py_0 defaults
prompt_toolkit 2.0.10 py_0 defaults
ptyprocess 0.6.0 py37_0 defaults
pycosat 0.6.3 py37h1de35cc_0 defaults
pycparser 2.19 py37_0 defaults
pygments 2.4.2 py_0 defaults
pyopenssl 19.0.0 py37_0 defaults
pyqt 5.9.2 py37h655552a_2 defaults
pyrsistent 0.15.4 py37h1de35cc_0 defaults
pysocks 1.7.1 py37_0 defaults
python 3.7.3 h359304d_0 defaults
python-dateutil 2.8.0 py37_0 defaults
python.app 2 py37_9 defaults
pyzmq 18.1.0 py37h0a44026_0 defaults
qt 5.9.7 h468cd18_1 defaults
qtconsole 4.5.5 py_0 defaults
readline 7.0 h1de35cc_5 defaults
requests 2.22.0 py37_0 defaults
ruamel_yaml 0.15.46 py37h1de35cc_0 defaults
send2trash 1.5.0 py37_0 defaults
setuptools 41.4.0 py37_0 defaults
sip 4.19.8 py37h0a44026_0 defaults
six 1.12.0 py37_0 defaults
sqlite 3.30.0 ha441bb4_0 defaults
terminado 0.8.2 py37_0 defaults
testpath 0.4.2 py37_0 defaults
tk 8.6.8 ha441bb4_0 defaults
tornado 6.0.3 py37h1de35cc_0 defaults
tqdm 4.36.1 py_0 defaults
traitlets 4.3.3 py37_0 defaults
urllib3 1.24.2 py37_0 defaults
wcwidth 0.1.7 py37_0 defaults
webencodings 0.5.1 py37_1 defaults
widgetsnbextension 3.5.1 py37_0 defaults
xz 5.2.4 h1de35cc_4 defaults
yaml 0.1.7 hc338f04_2 defaults
zeromq 4.3.1 h0a44026_3 defaults
zipp 0.6.0 py_0 defaults
zlib 1.2.11 h1de35cc_3 defaults
```
</p></details>
| 2020-12-14T17:33:08 |
||
conda/conda | 10,530 | conda__conda-10530 | [
"9580"
] | dc0c8d48cc62a792cf93dfc2aa67914a98a67878 | diff --git a/conda/cli/conda_argparse.py b/conda/cli/conda_argparse.py
--- a/conda/cli/conda_argparse.py
+++ b/conda/cli/conda_argparse.py
@@ -536,11 +536,7 @@ def configure_parser_create(sub_parsers):
metavar='ENV',
)
solver_mode_options, package_install_options = add_parser_create_install_update(p)
- solver_mode_options.add_argument(
- "--no-default-packages",
- action="store_true",
- help='Ignore create_default_packages in the .condarc file.',
- )
+ add_parser_default_packages(solver_mode_options)
p.add_argument(
'-m', "--mkdir",
action="store_true",
@@ -1669,3 +1665,10 @@ def add_parser_known(p):
dest='unknown',
help=SUPPRESS,
)
+
+def add_parser_default_packages(p):
+ p.add_argument(
+ "--no-default-packages",
+ action="store_true",
+ help='Ignore create_default_packages in the .condarc file.',
+ )
diff --git a/conda_env/cli/main_create.py b/conda_env/cli/main_create.py
--- a/conda_env/cli/main_create.py
+++ b/conda_env/cli/main_create.py
@@ -10,7 +10,8 @@
from conda._vendor.auxlib.path import expand
from conda.cli import install as cli_install
-from conda.cli.conda_argparse import add_parser_json, add_parser_prefix, add_parser_networking
+from conda.cli.conda_argparse import add_parser_default_packages, add_parser_json, \
+ add_parser_prefix, add_parser_networking
from conda.core.prefix_data import PrefixData
from conda.gateways.connection.session import CONDA_SESSION_SCHEMES
from conda.gateways.disk.delete import rm_rf
@@ -69,6 +70,7 @@ def configure_parser(sub_parsers):
action='store_true',
default=False,
)
+ add_parser_default_packages(p)
add_parser_json(p)
p.set_defaults(func='.main_create.execute')
@@ -106,6 +108,13 @@ def execute(args, parser):
# channel_urls = args.channel or ()
result = {"conda": None, "pip": None}
+
+ args_packages = context.create_default_packages if not args.no_default_packages else []
+ if args_packages:
+ installer_type = "conda"
+ installer = get_installer(installer_type)
+ result[installer_type] = installer.install(prefix, args_packages, args, env)
+
if len(env.dependencies.items()) == 0:
installer_type = "conda"
pkg_specs = []
| diff --git a/tests/conda_env/support/env_with_dependencies.yml b/tests/conda_env/support/env_with_dependencies.yml
new file mode 100644
--- /dev/null
+++ b/tests/conda_env/support/env_with_dependencies.yml
@@ -0,0 +1,7 @@
+channels:
+ - conda-forge
+ - defaults
+
+dependencies:
+ - python=2
+ - pytz
\ No newline at end of file
diff --git a/tests/conda_env/test_create.py b/tests/conda_env/test_create.py
--- a/tests/conda_env/test_create.py
+++ b/tests/conda_env/test_create.py
@@ -3,6 +3,7 @@
from logging import Handler, getLogger
from os.path import exists, join
+from shutil import rmtree
from unittest import TestCase
from uuid import uuid4
@@ -10,12 +11,15 @@
from conda.base.context import conda_tests_ctxt_mgmt_def_pol
from conda.common.io import dashlist, env_var, env_vars
+from conda.common.serialize import yaml_round_trip_load
from conda.core.prefix_data import PrefixData
from conda.install import on_win
from conda.models.enums import PackageType
from conda.models.match_spec import MatchSpec
from . import support_file
from .utils import make_temp_envs_dir, Commands, run_command
+from ..test_create import run_command as run_conda_command, \
+ Commands as CondaCommands
PYTHON_BINARY = 'python.exe' if on_win else 'bin/python'
from tests.test_utils import is_prefix_activated_PATHwise
@@ -134,3 +138,47 @@ def test_create_empty_env(self):
run_command(Commands.CREATE, env_name, support_file('empty_env.yml'))
assert exists(prefix)
+
+ def test_create_env_default_packages(self):
+ with make_temp_envs_dir() as envs_dir:
+ with env_var('CONDA_ENVS_DIRS', envs_dir, stack_callback=conda_tests_ctxt_mgmt_def_pol):
+ # set packages
+ run_conda_command(CondaCommands.CONFIG, envs_dir, "--add", "create_default_packages", "pip")
+ run_conda_command(CondaCommands.CONFIG, envs_dir, "--add", "create_default_packages", "flask")
+ stdout, stderr, _ = run_conda_command(CondaCommands.CONFIG, envs_dir, "--show")
+ yml_obj = yaml_round_trip_load(stdout)
+ assert yml_obj['create_default_packages'] == ['flask', 'pip']
+
+ assert not package_is_installed(envs_dir, 'python=2')
+ assert not package_is_installed(envs_dir, 'pytz')
+ assert not package_is_installed(envs_dir, 'flask')
+
+ env_name = str(uuid4())[:8]
+ prefix = join(envs_dir, env_name)
+ run_command(Commands.CREATE, env_name, support_file('env_with_dependencies.yml'))
+ assert exists(prefix)
+ assert package_is_installed(prefix, 'python=2')
+ assert package_is_installed(prefix, 'pytz')
+ assert package_is_installed(prefix, 'flask')
+
+ def test_create_env_no_default_packages(self):
+ with make_temp_envs_dir() as envs_dir:
+ with env_var('CONDA_ENVS_DIRS', envs_dir, stack_callback=conda_tests_ctxt_mgmt_def_pol):
+ # set packages
+ run_conda_command(CondaCommands.CONFIG, envs_dir, "--add", "create_default_packages", "pip")
+ run_conda_command(CondaCommands.CONFIG, envs_dir, "--add", "create_default_packages", "flask")
+ stdout, stderr, _ = run_conda_command(CondaCommands.CONFIG, envs_dir, "--show")
+ yml_obj = yaml_round_trip_load(stdout)
+ assert yml_obj['create_default_packages'] == ['flask', 'pip']
+
+ assert not package_is_installed(envs_dir, 'python=2')
+ assert not package_is_installed(envs_dir, 'pytz')
+ assert not package_is_installed(envs_dir, 'flask')
+
+ env_name = str(uuid4())[:8]
+ prefix = join(envs_dir, env_name)
+ run_command(Commands.CREATE, env_name, support_file('env_with_dependencies.yml'), "--no-default-packages")
+ assert exists(prefix)
+ assert package_is_installed(prefix, 'python=2')
+ assert package_is_installed(prefix, 'pytz')
+ assert not package_is_installed(prefix, 'flask')
| conda default packages do not work with conda env
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
The expected behavior for default packages (set in my `.condarc` file) works when I create an environment like `conda create -n testenv <name of package>` but it doesn't work when I create an environment using `conda env create -f <environment file>`.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
.condarc file
```
channels:
- conda-forge
- bioconda
- defaults
create_default_packages:
- python-language-server
- r-languageserver
```
environment.yml
```
name: test-env-file
dependencies:
- pandas
```
commands
```
conda create -n test-env pandas
conda activate test-env
conda list # shows python-language-server and r-languageserver
conda deactivate
conda env create -f environment.yml
conda activate test-env-file
conda list # does not show python-language-server and r-languageserver
```
## Expected Behavior
<!-- What do you think should happen? -->
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : None
shell level : 0
user config file : /Users/robinsonwi/.condarc
populated config files : /Users/robinsonwi/.condarc
conda version : 4.8.1
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages : __osx=10.14.6
base environment : //miniconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/osx-64
https://conda.anaconda.org/conda-forge/noarch
https://conda.anaconda.org/bioconda/osx-64
https://conda.anaconda.org/bioconda/noarch
https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : //miniconda3/pkgs
/Users/robinsonwi/.conda/pkgs
envs directories : //miniconda3/envs
/Users/robinsonwi/.conda/envs
platform : osx-64
user-agent : conda/4.8.1 requests/2.22.0 CPython/3.7.3 Darwin/18.7.0 OSX/10.14.6
UID:GID : 185593938:1360859114
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
```
==> /Users/robinsonwi/.condarc <==
create_default_packages:
- python-language-server
- r-languageserver
channels:
- conda-forge
- bioconda
- defaults
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at //miniconda3:
#
# Name Version Build Channel
asn1crypto 1.2.0 py37_0 defaults
blas 1.0 mkl defaults
ca-certificates 2019.11.27 0 defaults
certifi 2019.11.28 py37_0 defaults
cffi 1.13.2 py37hb5b8e2f_0 defaults
chardet 3.0.4 py37_1003 defaults
conda 4.8.1 py37_0 defaults
conda-package-handling 1.6.0 py37h1de35cc_0 defaults
cryptography 2.8 py37ha12b0ac_0 defaults
idna 2.8 py37_0 defaults
intel-openmp 2019.4 233 defaults
libcxx 4.0.1 hcfea43d_1 defaults
libcxxabi 4.0.1 hcfea43d_1 defaults
libedit 3.1.20181209 hb402a30_0 defaults
libffi 3.2.1 h475c297_4 defaults
libgfortran 3.0.1 h93005f0_2 defaults
mkl 2019.4 233 defaults
mkl-service 2.3.0 py37hfbe908c_0 defaults
mkl_fft 1.0.15 py37h5e564d8_0 defaults
mkl_random 1.1.0 py37ha771720_0 defaults
ncurses 6.1 h0a44026_1 defaults
numpy 1.17.4 py37h890c691_0 defaults
numpy-base 1.17.4 py37h6575580_0 defaults
openssl 1.1.1d h1de35cc_3 defaults
pandas 0.25.2 py37h0a44026_0 defaults
pycosat 0.6.3 py37h1de35cc_0 defaults
pycparser 2.19 py37_0 defaults
pyopenssl 19.1.0 py37_0 defaults
pysocks 1.7.1 py37_0 defaults
python 3.7.3 h359304d_0 defaults
python-dateutil 2.8.1 py_0 defaults
pytz 2019.3 py_0 defaults
readline 7.0 h1de35cc_5 defaults
requests 2.22.0 py37_1 defaults
ruamel_yaml 0.15.87 py37h1de35cc_0 defaults
setuptools 44.0.0 py37_0 defaults
six 1.13.0 py37_0 defaults
sqlite 3.30.1 ha441bb4_0 defaults
tk 8.6.8 ha441bb4_0 defaults
tqdm 4.40.2 py_0 defaults
urllib3 1.25.7 py37_0 defaults
xz 5.2.4 h1de35cc_4 defaults
yaml 0.1.7 hc338f04_2 defaults
zlib 1.2.11 h1de35cc_3 defaults
```
</p></details>
| I was also surprised by this behavior. Is there a plan to implement or fix this @soapy1 ?
shouldn't that be the default behavior though?
If I have a yaml defining my environment, I would want it to be recreated as specified in the yaml, and not depend on other settings hidden in a .condarc
Yes, agreed, the expectation that the environment created from an environment file should be the same everywhere is a sane default behaviour.
Nevertheless there are situations, where having an extra argument for `env create` that would automatically extend the listed dependencies by what is in the `create_default_packages` setting would be very helpful. For example to enforce adding an `ipython`, `python-languageserver` dependency to environments.
I suggest to call this argument `--with-default-packages`.
I just got bitten by this, so I'll add another use case that makes this really desirable. When running on an air-gapped network on Windows machines, and using the Windows Certificate Store, the `python-certifi-win32` package must be installed in every environment in order for things wanting to verify SSL certs to use the Windows Certificate Store to be able to do so. Having the ability to automatically enforce that package gets added every time is pretty important when the conda channel server requires SSL verification.
@chenghlee If no one started working on this, I'd be happy to | 2021-02-28T22:00:57 |
conda/conda | 10,542 | conda__conda-10542 | [
"10490"
] | 86b4aea54b27666e33b835063c8e37f7dfb35264 | diff --git a/conda/base/context.py b/conda/base/context.py
--- a/conda/base/context.py
+++ b/conda/base/context.py
@@ -783,7 +783,7 @@ def os_distribution_name_version(self):
# 'Windows', '10.0.17134'
platform_name = self.platform_system_release[0]
if platform_name == 'Linux':
- from .._vendor.distro import id, version
+ from conda._vendor.distro import id, version
try:
distinfo = id(), version(best=True)
except Exception as e:
| `conda search` with Python 3.9 broken on Linux
## Current Behavior
Running `conda search ${pkg}` using Python 3.9 triggers the following exception:
```
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/gateways/connection/session.py", line 60, in __call__
return cls._thread_local.session
AttributeError: '_thread._local' object has no attribute 'session'
....
During handling of the above exception, another exception occurred:
....
Traceback (most recent call last):
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/cli/conda_argparse.py", line 83, in do_call
return getattr(module, func_name)(args, parser)
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/cli/main_search.py", line 73, in execute
matches = sorted(SubdirData.query_all(spec, channel_urls, subdirs),
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/core/subdir_data.py", line 120, in query_all
result = tuple(concat(executor.map(subdir_query, channel_urls)))
File "$HOME/.miniconda3-x86_64/lib/python3.9/concurrent/futures/_base.py", line 600, in result_iterator
yield fs.pop().result()
File "$HOME/.miniconda3-x86_64/lib/python3.9/concurrent/futures/_base.py", line 433, in result
return self.__get_result()
File "$HOME/.miniconda3-x86_64/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "$HOME/.miniconda3-x86_64/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/core/subdir_data.py", line 112, in <lambda>
subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/core/subdir_data.py", line 125, in query
self.load()
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/core/subdir_data.py", line 189, in load
_internal_state = self._load()
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/core/subdir_data.py", line 259, in _load
raw_repodata_str = fetch_repodata_remote_request(
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/core/subdir_data.py", line 485, in fetch_repodata_remote_request
session = CondaSession()
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/gateways/connection/session.py", line 62, in __call__
session = cls._thread_local.session = super(CondaSessionType, cls).__call__()
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/gateways/connection/session.py", line 97, in __init__
self.headers['User-Agent'] = context.user_agent
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/_vendor/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/base/context.py", line 744, in user_agent
builder.append("%s/%s" % self.os_distribution_name_version)
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/_vendor/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "$HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/base/context.py", line 786, in os_distribution_name_version
from .._vendor.distro import id, version
ImportError: cannot import name 'id' from partially initialized module 'conda._vendor.distro' (most likely due to a circular import) ($HOME/.miniconda3-x86_64/lib/python3.9/site-packages/conda/_vendor/distro.py)
```
This seems to be Linux specific, as the same command on macOS and Windows 10 works correctly. It also seems to be Py3.9-specific, as switching to Py3.7 or Py3.8 in the base environment resolves the issue.
### Steps to Reproduce
1. Install conda 4.9.2 in a Python 3.9 base environment.
2. Run `conda search python=3.8`.
## Expected Behavior
`conda search` returns a list of matching packages in the configured channels.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
```
active environment : base
active env location : $HOME/.miniconda3-x86_64
shell level : 1
user config file : $HOME/.condarc
populated config files :
conda version : 4.9.2
conda-build version : 3.21.4
python version : 3.9.1.final.0
virtual packages : __cuda=11.0=0
__glibc=2.27=0
__unix=0=0
__archspec=1=x86_64
base environment : $HOME/.miniconda3-x86_64 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : $HOME/.miniconda3-x86_64/pkgs
$HOME/.conda/pkgs
envs directories : $HOME/.miniconda3-x86_64/envs
$HOME/.conda/envs
platform : linux-64
user-agent : conda/4.9.2 requests/2.25.1 CPython/3.9.1 Linux/5.4.0-65-generic ubuntu/18.04.5 glibc/2.27
UID:GID : 1000:100
netrc file : $HOME/.netrc
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
```
```
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
```
# packages in environment at $HOME/.miniconda3-x86_64:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main defaults
anaconda-client 1.7.2 py39h06a4308_0 defaults
attrs 20.3.0 pyhd3eb1b0_0 defaults
backports 1.0 pyhd3eb1b0_2 defaults
backports.functools_lru_cache 1.6.1 pyhd3eb1b0_0 defaults
backports.tempfile 1.0 pyhd3eb1b0_1 defaults
backports.weakref 1.0.post1 py_1 defaults
beautifulsoup4 4.9.3 pyha847dfd_0 defaults
brotlipy 0.7.0 py39h27cfd23_1003 defaults
bzip2 1.0.8 h7b6447c_0 defaults
ca-certificates 2021.1.19 h06a4308_0 defaults
certifi 2020.12.5 py39h06a4308_0 defaults
cffi 1.14.4 py39h261ae71_0 defaults
chardet 4.0.0 py39h06a4308_1003 defaults
click 7.1.2 pyhd3eb1b0_0 defaults
clyent 1.2.2 py39h06a4308_1 defaults
conda 4.9.2 py39h06a4308_0 defaults
conda-build 3.21.4 py39h06a4308_0 defaults
conda-package-handling 1.7.2 py39h27cfd23_1 defaults
conda-verify 3.4.2 py_1 defaults
cryptography 3.3.1 py39h3c74f83_0 defaults
filelock 3.0.12 pyhd3eb1b0_1 defaults
future 0.18.2 py39h06a4308_1 defaults
glob2 0.7 pyhd3eb1b0_0 defaults
icu 58.2 he6710b0_3 defaults
idna 2.10 pyhd3eb1b0_0 defaults
importlib-metadata 2.0.0 py_1 defaults
importlib_metadata 2.0.0 1 defaults
iniconfig 1.1.1 pyhd3eb1b0_0 defaults
ipython_genutils 0.2.0 pyhd3eb1b0_1 defaults
jinja2 2.11.2 pyhd3eb1b0_0 defaults
jsonschema 3.2.0 py_2 defaults
jupyter_core 4.7.0 py39h06a4308_0 defaults
ld_impl_linux-64 2.33.1 h53a641e_7 defaults
libarchive 3.4.2 h62408e4_0 defaults
libedit 3.1.20191231 h14c3975_1 defaults
libffi 3.3 he6710b0_2 defaults
libgcc-ng 9.1.0 hdf63c60_0 defaults
liblief 0.10.1 h2531618_1 defaults
libstdcxx-ng 9.1.0 hdf63c60_0 defaults
libxml2 2.9.10 hb55368b_3 defaults
lz4-c 1.9.3 h2531618_0 defaults
markupsafe 1.1.1 py39h27cfd23_0 defaults
more-itertools 8.6.0 pyhd3eb1b0_0 defaults
nbformat 5.1.2 pyhd3eb1b0_1 defaults
ncurses 6.2 he6710b0_1 defaults
openssl 1.1.1i h27cfd23_0 defaults
packaging 20.8 pyhd3eb1b0_0 defaults
patchelf 0.12 h2531618_1 defaults
pip 20.3.3 py39h06a4308_0 defaults
pkginfo 1.7.0 py39h06a4308_0 defaults
pluggy 0.12.0 py_0 defaults
psutil 5.7.2 py39h27cfd23_0 defaults
py 1.10.0 pyhd3eb1b0_0 defaults
py-lief 0.10.1 py39h2531618_1 defaults
pycosat 0.6.3 py39h27cfd23_0 defaults
pycparser 2.20 py_2 defaults
pyopenssl 20.0.1 pyhd3eb1b0_1 defaults
pyparsing 2.4.7 pyhd3eb1b0_0 defaults
pyrsistent 0.17.3 py39h27cfd23_0 defaults
pysocks 1.7.1 py39h06a4308_0 defaults
pytest 6.2.2 py39h06a4308_2 defaults
python 3.9.1 hdb3f193_2 defaults
python-dateutil 2.8.1 py_0 defaults
python-libarchive-c 2.9 pyhd3eb1b0_0 defaults
pytz 2020.5 pyhd3eb1b0_0 defaults
pyyaml 5.4.1 py39h27cfd23_1 defaults
readline 8.0 h7b6447c_0 defaults
requests 2.25.1 pyhd3eb1b0_0 defaults
ripgrep 12.1.1 0 defaults
ruamel_yaml 0.15.80 py39h27cfd23_0 defaults
setuptools 52.0.0 py39h06a4308_0 defaults
six 1.15.0 py39h06a4308_0 defaults
soupsieve 2.1 pyhd3eb1b0_0 defaults
sqlite 3.33.0 h62c20be_0 defaults
tk 8.6.10 hbc83047_0 defaults
toml 0.10.1 py_0 defaults
tqdm 4.55.1 pyhd3eb1b0_0 defaults
traitlets 5.0.5 py_0 defaults
tzdata 2020f h52ac0ba_0 defaults
urllib3 1.26.2 pyhd3eb1b0_0 defaults
wheel 0.36.2 pyhd3eb1b0_0 defaults
xz 5.2.5 h7b6447c_0 defaults
yaml 0.2.5 h7b6447c_0 defaults
zipp 3.4.0 pyhd3eb1b0_0 defaults
zlib 1.2.11 h7b6447c_3 defaults
zstd 1.4.5 h9ceee32_0 defaults
```
</p></details>
| Just hit this myself. Glad to see you've got it here!
I also encounter this exact problem with the exact same error message, but only sporadically. Sometimes it does not work but when I run it again it often works.
```
% conda info
active environment : base
active env location : $HOME/usr/local/opt/mambaforge
shell level : 1
user config file : $HOME/.condarc
populated config files : $HOME/usr/local/opt/mambaforge/.condarc
$HOME/.condarc
conda version : 4.9.2
conda-build version : not installed
python version : 3.9.1.final.0
virtual packages : __glibc=2.28=0
__unix=0=0
__archspec=1=x86_64
base environment : $HOME/usr/local/opt/mambaforge (writable)
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : $HOME/usr/local/opt/mambaforge/pkgs
$HOME/.conda/pkgs
envs directories : $HOME/usr/local/opt/mambaforge/envs
$HOME/.conda/envs
platform : linux-64
user-agent : conda/4.9.2 requests/2.25.1 CPython/3.9.1 Linux/4.19.0-14-amd64 debian/10 glibc/2.28
UID:GID : 203887:10516
netrc file : $HOME/.netrc
offline mode : False
```
Setting the `repodata_threads` condarc option to 1 seems to be a (non-ideal) workaround. | 2021-03-06T05:51:32 |
|
conda/conda | 10,552 | conda__conda-10552 | [
"10551"
] | 4f7c7fe89c5d172e425f549a1c260f7b69769995 | diff --git a/conda/core/index.py b/conda/core/index.py
--- a/conda/core/index.py
+++ b/conda/core/index.py
@@ -172,6 +172,8 @@ def _supplement_index_with_system(index):
libc_family, libc_version = context.libc_family_version
is_linux = context.subdir.startswith("linux-")
if is_linux:
+ rec = _make_virtual_package('__linux')
+ index[rec] = rec
if not (libc_family and libc_version):
# Default to glibc when using CONDA_SUBDIR var
libc_family = "glibc"
| __linux virtual package
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
If your issue is a feature request for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
-->
Hi,
currently, there are `__unix` and` __linux` virtual packages. It would be nice to have one for Linux a well.
Based on #10214 I would assume this to be something along the lines of:
```python
if is_linux:
rec = _make_virtual_package('__linux')
index[rec] = rec
```
Happy to create the PR but just wanted to check first if that'd be the correct approach?
| 2021-03-13T21:48:41 |
||
conda/conda | 10,638 | conda__conda-10638 | [
"10614",
"10614"
] | b6d32c8d761163cf42099f02ca564f55602b1a11 | diff --git a/conda_env/env.py b/conda_env/env.py
--- a/conda_env/env.py
+++ b/conda_env/env.py
@@ -63,6 +63,7 @@ def validate_keys(data, kwargs):
"in the wrong place. Please add an explicit pip dependency. I'm adding one"
" for you, but still nagging you.")
new_data['dependencies'].insert(0, 'pip')
+ break
return new_data
| diff --git a/tests/conda_env/support/add-pip.yml b/tests/conda_env/support/add-pip.yml
new file mode 100644
--- /dev/null
+++ b/tests/conda_env/support/add-pip.yml
@@ -0,0 +1,6 @@
+name: pip
+dependencies:
+ - car
+ - pip:
+ - foo
+ - baz
diff --git a/tests/conda_env/test_env.py b/tests/conda_env/test_env.py
--- a/tests/conda_env/test_env.py
+++ b/tests/conda_env/test_env.py
@@ -78,6 +78,15 @@ def test_with_pip(self):
assert 'foo' in e.dependencies['pip']
assert 'baz' in e.dependencies['pip']
+ @pytest.mark.timeout(20)
+ def test_add_pip(self):
+ e = env.from_file(support_file('add-pip.yml'))
+ expected = OrderedDict([
+ ('conda', ['pip', 'car']),
+ ('pip', ['foo', 'baz'])
+ ])
+ self.assertEqual(e.dependencies, expected)
+
@pytest.mark.integration
def test_http(self):
e = get_simple_environment()
| Conda prints pip warning over and over again
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
I'm trying to create a conda environment using a yaml file. I just get a warning message about needing to specify pip as a dependency over and over again, but the environment doesn't get created.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
conda env create -f filter.yml
```
The contents of the file `filter.yml` are:
```
name: filter
channels:
- bioconda
- r
- defaults
- conda-forge
dependencies:
- python
- pip:
- numpy
```
I get the output:
```
conda env create -f filter.yml
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
```
I've truncated the output, but you get the idea...
## Expected Behavior
<!-- What do you think should happen? -->
This warning message should only appear once, and then the environment should be created.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : base
active env location : /home/sco305/miniconda3
shell level : 1
user config file : /home/sco305/.condarc
populated config files :
conda version : 4.10.0
conda-build version : not installed
python version : 3.8.5.final.0
virtual packages : __linux=5.4.0=0
__glibc=2.27=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/sco305/miniconda3 (writable)
conda av data dir : /home/sco305/miniconda3/etc/conda
conda av metadata url : https://repo.anaconda.com/pkgs/main
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/sco305/miniconda3/pkgs
/home/sco305/.conda/pkgs
envs directories : /home/sco305/miniconda3/envs
/home/sco305/.conda/envs
platform : linux-64
user-agent : conda/4.10.0 requests/2.25.1 CPython/3.8.5 Linux/5.4.0-1028-gcp ubuntu/18.04.5 glibc/2.27
UID:GID : 1004:1005
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
I don't get any output after running `conda config --show-sources`
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /home/sco305/miniconda3:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
adal 1.2.7 pyhd3eb1b0_0 defaults
aioeasywebdav 2.4.0 py38h578d9bd_1001 conda-forge
aiohttp 3.7.4 py38h497a2fe_0 conda-forge
amply 0.1.4 py_0 conda-forge
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 3.0.1 py_1000 conda-forge
atk-1.0 2.36.0 h3371d22_4 conda-forge
attmap 0.13.0 pyhd8ed1ab_0 conda-forge
attrs 20.3.0 pyhd3deb0d_0 conda-forge
azure-common 1.1.27 pyhd8ed1ab_0 conda-forge
azure-core 1.12.0 pyhd8ed1ab_0 conda-forge
azure-storage-blob 12.8.0 pyhd8ed1ab_0 conda-forge
backports 1.0 py_2 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
bcrypt 3.2.0 py38h497a2fe_1 conda-forge
blinker 1.4 py_1 conda-forge
boto 2.49.0 py_0 conda-forge
boto3 1.17.51 pyhd8ed1ab_0 conda-forge
botocore 1.20.51 pyhd8ed1ab_0 conda-forge
brotlipy 0.7.0 py38h27cfd23_1003 defaults
bzip2 1.0.8 h7f98852_4 conda-forge
c-ares 1.17.1 h7f98852_1 conda-forge
ca-certificates 2021.1.19 h06a4308_1 defaults
cachetools 4.2.1 pyhd8ed1ab_0 conda-forge
cairo 1.16.0 h6cf1ce9_1008 conda-forge
certifi 2020.12.5 py38h06a4308_0 defaults
cffi 1.14.5 py38h261ae71_0 defaults
chardet 4.0.0 py38h06a4308_1003 defaults
coincbc 2.10.5 hcee13e7_1 conda-forge
conda 4.10.0 py38h578d9bd_1 conda-forge
conda-package-handling 1.7.3 py38h27cfd23_1 defaults
configargparse 1.4 pyhd8ed1ab_0 conda-forge
cryptography 3.4.7 py38hd23ed53_0 defaults
datrie 0.8.2 py38h1e0a361_1 conda-forge
decorator 4.4.2 py_0 conda-forge
docutils 0.17 py38h578d9bd_0 conda-forge
dropbox 11.6.0 pyhd8ed1ab_0 conda-forge
expat 2.3.0 h9c3ff4c_0 conda-forge
fftw 3.3.9 nompi_hcdd671c_101 conda-forge
filechunkio 1.8 py_2 conda-forge
filelock 3.0.12 pyh9f0ad1d_0 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 2.001 hab24e00_0 conda-forge
font-ttf-source-code-pro 2.030 hab24e00_0 conda-forge
font-ttf-ubuntu 0.83 hab24e00_0 conda-forge
fontconfig 2.13.1 hba837de_1005 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
freetype 2.10.4 h0708190_1 conda-forge
fribidi 1.0.10 h516909a_0 conda-forge
ftputil 5.0.1 pyhd8ed1ab_0 conda-forge
gdk-pixbuf 2.42.6 h04a7f16_0 conda-forge
gettext 0.21.0 hf68c758_0 defaults
ghostscript 9.53.3 h58526e2_2 conda-forge
giflib 5.2.1 h516909a_2 conda-forge
gitdb 4.0.7 pyhd8ed1ab_0 conda-forge
gitpython 3.1.14 pyhd8ed1ab_0 conda-forge
google-api-core 1.26.2 pyhd8ed1ab_0 conda-forge
google-api-python-client 2.2.0 pyhd8ed1ab_0 conda-forge
google-auth 1.28.1 pyhd3eb1b0_0 defaults
google-auth-httplib2 0.1.0 pyhd8ed1ab_0 conda-forge
google-cloud-core 1.6.0 pyhd3eb1b0_0 defaults
google-cloud-storage 1.37.1 pyhd3eb1b0_0 defaults
google-crc32c 1.1.2 py38h8838a9a_0 conda-forge
google-resumable-media 1.2.0 pyhd3deb0d_0 conda-forge
googleapis-common-protos 1.53.0 py38h578d9bd_0 conda-forge
graphite2 1.3.14 h23475e2_0 defaults
graphviz 2.47.0 he056042_1 conda-forge
gtk2 2.24.33 hab0c2f8_0 conda-forge
gts 0.7.6 h64030ff_2 conda-forge
harfbuzz 2.8.0 h83ec7ef_1 conda-forge
httplib2 0.19.1 pyhd8ed1ab_0 conda-forge
icu 68.1 h58526e2_0 conda-forge
idna 2.10 pyhd3eb1b0_0 defaults
imagemagick 7.0.11_7 pl5320h0cb4662_0 conda-forge
importlib-metadata 3.10.1 py38h578d9bd_0 conda-forge
importlib_metadata 3.10.1 hd8ed1ab_0 conda-forge
iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
isodate 0.6.0 py_1 conda-forge
jbig 2.1 h516909a_2002 conda-forge
jinja2 2.11.3 pyh44b312d_0 conda-forge
jmespath 0.10.0 pyh9f0ad1d_0 conda-forge
jpeg 9d h516909a_0 conda-forge
jsonschema 3.2.0 py38h32f6830_1 conda-forge
jupyter_core 4.7.1 py38h578d9bd_0 conda-forge
krb5 1.17.2 h926e7f8_0 conda-forge
ld_impl_linux-64 2.33.1 h53a641e_7 defaults
libarchive 3.5.1 h3f442fb_1 conda-forge
libblas 3.9.0 8_openblas conda-forge
libcblas 3.9.0 8_openblas conda-forge
libcrc32c 1.1.1 he1b5a44_2 conda-forge
libcurl 7.76.0 hc4aaa36_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libffi 3.3 he6710b0_2 defaults
libgcc-ng 9.3.0 h2828fa1_19 conda-forge
libgd 2.3.2 h78a0170_0 conda-forge
libgfortran-ng 9.3.0 hff62375_19 conda-forge
libgfortran5 9.3.0 hff62375_19 conda-forge
libglib 2.68.1 h3e27bee_0 conda-forge
libgomp 9.3.0 h2828fa1_19 conda-forge
libiconv 1.16 h516909a_0 conda-forge
liblapack 3.9.0 8_openblas conda-forge
libnghttp2 1.43.0 h812cca2_0 conda-forge
libopenblas 0.3.12 pthreads_h4812303_1 conda-forge
libpng 1.6.37 hed695b0_2 conda-forge
libprotobuf 3.15.8 h780b84a_0 conda-forge
librsvg 2.50.3 hfa39831_1 conda-forge
libsodium 1.0.18 h516909a_1 conda-forge
libsolv 0.7.18 h780b84a_0 conda-forge
libssh2 1.9.0 ha56f1ee_6 conda-forge
libstdcxx-ng 9.3.0 h6de172a_19 conda-forge
libtiff 4.2.0 hdc55705_0 conda-forge
libtool 2.4.6 h58526e2_1007 conda-forge
libuuid 2.32.1 h14c3975_1000 conda-forge
libwebp 1.2.0 h3452ae3_0 conda-forge
libwebp-base 1.2.0 h7f98852_2 conda-forge
libxcb 1.14 h7b6447c_0 defaults
libxml2 2.9.10 h72842e0_4 conda-forge
logmuse 0.2.6 pyh8c360ce_0 conda-forge
lz4-c 1.9.3 h9c3ff4c_0 conda-forge
lzo 2.10 h516909a_1000 conda-forge
mamba 0.9.2 py38h2aa5da1_0 conda-forge
markupsafe 1.1.1 py38h497a2fe_3 conda-forge
more-itertools 8.7.0 pyhd8ed1ab_0 conda-forge
msrest 0.6.21 pyh44b312d_0 conda-forge
multidict 5.1.0 py38h497a2fe_1 conda-forge
nbformat 5.1.3 pyhd8ed1ab_0 conda-forge
ncurses 6.2 he6710b0_1 defaults
networkx 2.5.1 pyhd8ed1ab_0 conda-forge
numpy 1.20.2 py38h9894fe3_0 conda-forge
oauth2client 4.1.3 py_0 conda-forge
oauthlib 3.1.0 py_0 defaults
openjpeg 2.4.0 hf7af979_0 conda-forge
openssl 1.1.1k h27cfd23_0 defaults
packaging 20.9 pyh44b312d_0 conda-forge
pandas 1.2.4 py38h1abd341_0 conda-forge
pango 1.42.4 h80147aa_5 conda-forge
paramiko 2.7.2 pyh9f0ad1d_0 conda-forge
pcre 8.44 he1b5a44_0 conda-forge
peppy 0.31.0 pyh9f0ad1d_0 conda-forge
perl 5.32.0 h36c2ea0_0 conda-forge
pip 21.0.1 py38h06a4308_0 defaults
pixman 0.40.0 h36c2ea0_0 conda-forge
pkg-config 0.29.2 h516909a_1008 conda-forge
pluggy 0.13.1 py38h578d9bd_4 conda-forge
ply 3.11 py_1 conda-forge
prettytable 2.1.0 pyhd8ed1ab_0 conda-forge
protobuf 3.15.8 py38h709712a_0 conda-forge
psutil 5.8.0 py38h497a2fe_1 conda-forge
pulp 2.4 py38h578d9bd_0 conda-forge
py 1.10.0 pyhd3deb0d_0 conda-forge
pyasn1 0.4.8 py_0 conda-forge
pyasn1-modules 0.2.8 py_0 defaults
pycosat 0.6.3 py38h7b6447c_1 defaults
pycparser 2.20 py_2 defaults
pygments 2.8.1 pyhd8ed1ab_0 conda-forge
pygraphviz 1.7 py38h0d738da_0 conda-forge
pyjwt 2.0.1 pyhd8ed1ab_1 conda-forge
pynacl 1.4.0 py38h497a2fe_2 conda-forge
pyopenssl 20.0.1 pyhd3eb1b0_1 defaults
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pyrsistent 0.17.3 py38h497a2fe_2 conda-forge
pysftp 0.2.9 py_1 conda-forge
pysocks 1.7.1 py38h06a4308_0 defaults
pytest 6.2.3 py38h578d9bd_0 conda-forge
python 3.8.5 h7579374_1 defaults
python-dateutil 2.8.1 py_0 conda-forge
python-irodsclient 0.8.6 pyhd8ed1ab_0 conda-forge
python-kubernetes 12.0.1 pyhd3eb1b0_0 defaults
python_abi 3.8 1_cp38 conda-forge
pytz 2021.1 pyhd8ed1ab_0 conda-forge
pyyaml 5.4.1 py38h497a2fe_0 conda-forge
ratelimiter 1.2.0 py38h32f6830_1001 conda-forge
readline 8.1 h27cfd23_0 defaults
reproc 14.2.1 h36c2ea0_0 conda-forge
reproc-cpp 14.2.1 h58526e2_0 conda-forge
requests 2.25.1 pyhd3eb1b0_0 defaults
requests-oauthlib 1.3.0 pyh9f0ad1d_0 conda-forge
rsa 4.7.2 pyh44b312d_0 conda-forge
ruamel_yaml 0.15.100 py38h27cfd23_0 defaults
s3transfer 0.3.7 pyhd8ed1ab_0 conda-forge
setuptools 52.0.0 py38h06a4308_0 defaults
simplejson 3.17.2 py38h497a2fe_2 conda-forge
six 1.15.0 py38h06a4308_0 defaults
slacker 0.14.0 py_0 conda-forge
smart_open 5.0.0 pyhd8ed1ab_0 conda-forge
smmap 3.0.5 pyh44b312d_0 conda-forge
snakemake 6.1.1 hdfd78af_0 bioconda
snakemake-minimal 6.1.1 pyhdfd78af_0 bioconda
sqlite 3.35.4 hdfb4753_0 defaults
stone 3.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.10 hbc83047_0 defaults
toml 0.10.2 pyhd8ed1ab_0 conda-forge
toposort 1.6 pyhd8ed1ab_0 conda-forge
tqdm 4.59.0 pyhd3eb1b0_1 defaults
traitlets 5.0.5 py_0 conda-forge
typing-extensions 3.7.4.3 0 conda-forge
typing_extensions 3.7.4.3 py_0 conda-forge
ubiquerg 0.6.1 pyh9f0ad1d_0 conda-forge
uritemplate 3.0.1 py_0 conda-forge
urllib3 1.26.4 pyhd3eb1b0_0 defaults
veracitools 0.1.3 py_0 conda-forge
wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge
websocket-client 0.58.0 py38h06a4308_4 defaults
wheel 0.36.2 pyhd3eb1b0_0 defaults
wrapt 1.12.1 py38h497a2fe_3 conda-forge
xmlrunner 1.7.7 py_0 conda-forge
xorg-kbproto 1.0.7 h14c3975_1002 conda-forge
xorg-libice 1.0.10 h516909a_0 conda-forge
xorg-libsm 1.2.3 hd9c2040_1000 conda-forge
xorg-libx11 1.7.0 h36c2ea0_0 conda-forge
xorg-libxau 1.0.9 h14c3975_0 conda-forge
xorg-libxext 1.3.4 h7f98852_1 conda-forge
xorg-libxrender 0.9.10 h7f98852_1003 conda-forge
xorg-libxt 1.2.1 h7f98852_2 conda-forge
xorg-renderproto 0.11.1 h14c3975_1002 conda-forge
xorg-xextproto 7.3.0 h14c3975_1002 conda-forge
xorg-xproto 7.0.31 h14c3975_1007 conda-forge
xz 5.2.5 h7b6447c_0 defaults
yaml 0.2.5 h7b6447c_0 defaults
yarl 1.5.1 py38h1e0a361_0 conda-forge
zipp 3.4.1 pyhd8ed1ab_0 conda-forge
zlib 1.2.11 h7b6447c_3 defaults
zstd 1.4.9 ha95c52a_0 conda-forge
```
</p></details>
Conda prints pip warning over and over again
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
If your issue is a bug report for:
* a specific conda package from Anaconda ('defaults' channel):
==> file at https://github.com/ContinuumIO/anaconda-issues
* a specific conda package from conda-forge:
==> file at the corresponding feedstock under https://github.com/conda-forge
* repo.anaconda.com access and service:
==> file at https://github.com/ContinuumIO/anaconda-issues
* anaconda.org access and service:
==> file at https://anaconda.org/contact/report
* commands under 'conda build':
==> file at https://github.com/conda/conda-build
* commands under 'conda env':
==> please file it here!
* all other conda commands that start with 'conda':
==> please file it here!
If you continue on,
**please include all requested information below.**
If a maintainer determines the information is required to understand
your issue, and if it is not provided, your issue may be
closed automatically.
-->
## Current Behavior
<!-- What actually happens?
If you want to include console output, please use "Steps to Reproduce" below. -->
I'm trying to create a conda environment using a yaml file. I just get a warning message about needing to specify pip as a dependency over and over again, but the environment doesn't get created.
### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
conda env create -f filter.yml
```
The contents of the file `filter.yml` are:
```
name: filter
channels:
- bioconda
- r
- defaults
- conda-forge
dependencies:
- python
- pip:
- numpy
```
I get the output:
```
conda env create -f filter.yml
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
```
I've truncated the output, but you get the idea...
## Expected Behavior
<!-- What do you think should happen? -->
This warning message should only appear once, and then the environment should be created.
## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->
```
active environment : base
active env location : /home/sco305/miniconda3
shell level : 1
user config file : /home/sco305/.condarc
populated config files :
conda version : 4.10.0
conda-build version : not installed
python version : 3.8.5.final.0
virtual packages : __linux=5.4.0=0
__glibc=2.27=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/sco305/miniconda3 (writable)
conda av data dir : /home/sco305/miniconda3/etc/conda
conda av metadata url : https://repo.anaconda.com/pkgs/main
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/sco305/miniconda3/pkgs
/home/sco305/.conda/pkgs
envs directories : /home/sco305/miniconda3/envs
/home/sco305/.conda/envs
platform : linux-64
user-agent : conda/4.10.0 requests/2.25.1 CPython/3.8.5 Linux/5.4.0-1028-gcp ubuntu/18.04.5 glibc/2.27
UID:GID : 1004:1005
netrc file : None
offline mode : False
```
</p></details>
<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->
I don't get any output after running `conda config --show-sources`
</p></details>
<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->
```
# packages in environment at /home/sco305/miniconda3:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
adal 1.2.7 pyhd3eb1b0_0 defaults
aioeasywebdav 2.4.0 py38h578d9bd_1001 conda-forge
aiohttp 3.7.4 py38h497a2fe_0 conda-forge
amply 0.1.4 py_0 conda-forge
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 3.0.1 py_1000 conda-forge
atk-1.0 2.36.0 h3371d22_4 conda-forge
attmap 0.13.0 pyhd8ed1ab_0 conda-forge
attrs 20.3.0 pyhd3deb0d_0 conda-forge
azure-common 1.1.27 pyhd8ed1ab_0 conda-forge
azure-core 1.12.0 pyhd8ed1ab_0 conda-forge
azure-storage-blob 12.8.0 pyhd8ed1ab_0 conda-forge
backports 1.0 py_2 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
bcrypt 3.2.0 py38h497a2fe_1 conda-forge
blinker 1.4 py_1 conda-forge
boto 2.49.0 py_0 conda-forge
boto3 1.17.51 pyhd8ed1ab_0 conda-forge
botocore 1.20.51 pyhd8ed1ab_0 conda-forge
brotlipy 0.7.0 py38h27cfd23_1003 defaults
bzip2 1.0.8 h7f98852_4 conda-forge
c-ares 1.17.1 h7f98852_1 conda-forge
ca-certificates 2021.1.19 h06a4308_1 defaults
cachetools 4.2.1 pyhd8ed1ab_0 conda-forge
cairo 1.16.0 h6cf1ce9_1008 conda-forge
certifi 2020.12.5 py38h06a4308_0 defaults
cffi 1.14.5 py38h261ae71_0 defaults
chardet 4.0.0 py38h06a4308_1003 defaults
coincbc 2.10.5 hcee13e7_1 conda-forge
conda 4.10.0 py38h578d9bd_1 conda-forge
conda-package-handling 1.7.3 py38h27cfd23_1 defaults
configargparse 1.4 pyhd8ed1ab_0 conda-forge
cryptography 3.4.7 py38hd23ed53_0 defaults
datrie 0.8.2 py38h1e0a361_1 conda-forge
decorator 4.4.2 py_0 conda-forge
docutils 0.17 py38h578d9bd_0 conda-forge
dropbox 11.6.0 pyhd8ed1ab_0 conda-forge
expat 2.3.0 h9c3ff4c_0 conda-forge
fftw 3.3.9 nompi_hcdd671c_101 conda-forge
filechunkio 1.8 py_2 conda-forge
filelock 3.0.12 pyh9f0ad1d_0 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 2.001 hab24e00_0 conda-forge
font-ttf-source-code-pro 2.030 hab24e00_0 conda-forge
font-ttf-ubuntu 0.83 hab24e00_0 conda-forge
fontconfig 2.13.1 hba837de_1005 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
freetype 2.10.4 h0708190_1 conda-forge
fribidi 1.0.10 h516909a_0 conda-forge
ftputil 5.0.1 pyhd8ed1ab_0 conda-forge
gdk-pixbuf 2.42.6 h04a7f16_0 conda-forge
gettext 0.21.0 hf68c758_0 defaults
ghostscript 9.53.3 h58526e2_2 conda-forge
giflib 5.2.1 h516909a_2 conda-forge
gitdb 4.0.7 pyhd8ed1ab_0 conda-forge
gitpython 3.1.14 pyhd8ed1ab_0 conda-forge
google-api-core 1.26.2 pyhd8ed1ab_0 conda-forge
google-api-python-client 2.2.0 pyhd8ed1ab_0 conda-forge
google-auth 1.28.1 pyhd3eb1b0_0 defaults
google-auth-httplib2 0.1.0 pyhd8ed1ab_0 conda-forge
google-cloud-core 1.6.0 pyhd3eb1b0_0 defaults
google-cloud-storage 1.37.1 pyhd3eb1b0_0 defaults
google-crc32c 1.1.2 py38h8838a9a_0 conda-forge
google-resumable-media 1.2.0 pyhd3deb0d_0 conda-forge
googleapis-common-protos 1.53.0 py38h578d9bd_0 conda-forge
graphite2 1.3.14 h23475e2_0 defaults
graphviz 2.47.0 he056042_1 conda-forge
gtk2 2.24.33 hab0c2f8_0 conda-forge
gts 0.7.6 h64030ff_2 conda-forge
harfbuzz 2.8.0 h83ec7ef_1 conda-forge
httplib2 0.19.1 pyhd8ed1ab_0 conda-forge
icu 68.1 h58526e2_0 conda-forge
idna 2.10 pyhd3eb1b0_0 defaults
imagemagick 7.0.11_7 pl5320h0cb4662_0 conda-forge
importlib-metadata 3.10.1 py38h578d9bd_0 conda-forge
importlib_metadata 3.10.1 hd8ed1ab_0 conda-forge
iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
isodate 0.6.0 py_1 conda-forge
jbig 2.1 h516909a_2002 conda-forge
jinja2 2.11.3 pyh44b312d_0 conda-forge
jmespath 0.10.0 pyh9f0ad1d_0 conda-forge
jpeg 9d h516909a_0 conda-forge
jsonschema 3.2.0 py38h32f6830_1 conda-forge
jupyter_core 4.7.1 py38h578d9bd_0 conda-forge
krb5 1.17.2 h926e7f8_0 conda-forge
ld_impl_linux-64 2.33.1 h53a641e_7 defaults
libarchive 3.5.1 h3f442fb_1 conda-forge
libblas 3.9.0 8_openblas conda-forge
libcblas 3.9.0 8_openblas conda-forge
libcrc32c 1.1.1 he1b5a44_2 conda-forge
libcurl 7.76.0 hc4aaa36_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libffi 3.3 he6710b0_2 defaults
libgcc-ng 9.3.0 h2828fa1_19 conda-forge
libgd 2.3.2 h78a0170_0 conda-forge
libgfortran-ng 9.3.0 hff62375_19 conda-forge
libgfortran5 9.3.0 hff62375_19 conda-forge
libglib 2.68.1 h3e27bee_0 conda-forge
libgomp 9.3.0 h2828fa1_19 conda-forge
libiconv 1.16 h516909a_0 conda-forge
liblapack 3.9.0 8_openblas conda-forge
libnghttp2 1.43.0 h812cca2_0 conda-forge
libopenblas 0.3.12 pthreads_h4812303_1 conda-forge
libpng 1.6.37 hed695b0_2 conda-forge
libprotobuf 3.15.8 h780b84a_0 conda-forge
librsvg 2.50.3 hfa39831_1 conda-forge
libsodium 1.0.18 h516909a_1 conda-forge
libsolv 0.7.18 h780b84a_0 conda-forge
libssh2 1.9.0 ha56f1ee_6 conda-forge
libstdcxx-ng 9.3.0 h6de172a_19 conda-forge
libtiff 4.2.0 hdc55705_0 conda-forge
libtool 2.4.6 h58526e2_1007 conda-forge
libuuid 2.32.1 h14c3975_1000 conda-forge
libwebp 1.2.0 h3452ae3_0 conda-forge
libwebp-base 1.2.0 h7f98852_2 conda-forge
libxcb 1.14 h7b6447c_0 defaults
libxml2 2.9.10 h72842e0_4 conda-forge
logmuse 0.2.6 pyh8c360ce_0 conda-forge
lz4-c 1.9.3 h9c3ff4c_0 conda-forge
lzo 2.10 h516909a_1000 conda-forge
mamba 0.9.2 py38h2aa5da1_0 conda-forge
markupsafe 1.1.1 py38h497a2fe_3 conda-forge
more-itertools 8.7.0 pyhd8ed1ab_0 conda-forge
msrest 0.6.21 pyh44b312d_0 conda-forge
multidict 5.1.0 py38h497a2fe_1 conda-forge
nbformat 5.1.3 pyhd8ed1ab_0 conda-forge
ncurses 6.2 he6710b0_1 defaults
networkx 2.5.1 pyhd8ed1ab_0 conda-forge
numpy 1.20.2 py38h9894fe3_0 conda-forge
oauth2client 4.1.3 py_0 conda-forge
oauthlib 3.1.0 py_0 defaults
openjpeg 2.4.0 hf7af979_0 conda-forge
openssl 1.1.1k h27cfd23_0 defaults
packaging 20.9 pyh44b312d_0 conda-forge
pandas 1.2.4 py38h1abd341_0 conda-forge
pango 1.42.4 h80147aa_5 conda-forge
paramiko 2.7.2 pyh9f0ad1d_0 conda-forge
pcre 8.44 he1b5a44_0 conda-forge
peppy 0.31.0 pyh9f0ad1d_0 conda-forge
perl 5.32.0 h36c2ea0_0 conda-forge
pip 21.0.1 py38h06a4308_0 defaults
pixman 0.40.0 h36c2ea0_0 conda-forge
pkg-config 0.29.2 h516909a_1008 conda-forge
pluggy 0.13.1 py38h578d9bd_4 conda-forge
ply 3.11 py_1 conda-forge
prettytable 2.1.0 pyhd8ed1ab_0 conda-forge
protobuf 3.15.8 py38h709712a_0 conda-forge
psutil 5.8.0 py38h497a2fe_1 conda-forge
pulp 2.4 py38h578d9bd_0 conda-forge
py 1.10.0 pyhd3deb0d_0 conda-forge
pyasn1 0.4.8 py_0 conda-forge
pyasn1-modules 0.2.8 py_0 defaults
pycosat 0.6.3 py38h7b6447c_1 defaults
pycparser 2.20 py_2 defaults
pygments 2.8.1 pyhd8ed1ab_0 conda-forge
pygraphviz 1.7 py38h0d738da_0 conda-forge
pyjwt 2.0.1 pyhd8ed1ab_1 conda-forge
pynacl 1.4.0 py38h497a2fe_2 conda-forge
pyopenssl 20.0.1 pyhd3eb1b0_1 defaults
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pyrsistent 0.17.3 py38h497a2fe_2 conda-forge
pysftp 0.2.9 py_1 conda-forge
pysocks 1.7.1 py38h06a4308_0 defaults
pytest 6.2.3 py38h578d9bd_0 conda-forge
python 3.8.5 h7579374_1 defaults
python-dateutil 2.8.1 py_0 conda-forge
python-irodsclient 0.8.6 pyhd8ed1ab_0 conda-forge
python-kubernetes 12.0.1 pyhd3eb1b0_0 defaults
python_abi 3.8 1_cp38 conda-forge
pytz 2021.1 pyhd8ed1ab_0 conda-forge
pyyaml 5.4.1 py38h497a2fe_0 conda-forge
ratelimiter 1.2.0 py38h32f6830_1001 conda-forge
readline 8.1 h27cfd23_0 defaults
reproc 14.2.1 h36c2ea0_0 conda-forge
reproc-cpp 14.2.1 h58526e2_0 conda-forge
requests 2.25.1 pyhd3eb1b0_0 defaults
requests-oauthlib 1.3.0 pyh9f0ad1d_0 conda-forge
rsa 4.7.2 pyh44b312d_0 conda-forge
ruamel_yaml 0.15.100 py38h27cfd23_0 defaults
s3transfer 0.3.7 pyhd8ed1ab_0 conda-forge
setuptools 52.0.0 py38h06a4308_0 defaults
simplejson 3.17.2 py38h497a2fe_2 conda-forge
six 1.15.0 py38h06a4308_0 defaults
slacker 0.14.0 py_0 conda-forge
smart_open 5.0.0 pyhd8ed1ab_0 conda-forge
smmap 3.0.5 pyh44b312d_0 conda-forge
snakemake 6.1.1 hdfd78af_0 bioconda
snakemake-minimal 6.1.1 pyhdfd78af_0 bioconda
sqlite 3.35.4 hdfb4753_0 defaults
stone 3.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.10 hbc83047_0 defaults
toml 0.10.2 pyhd8ed1ab_0 conda-forge
toposort 1.6 pyhd8ed1ab_0 conda-forge
tqdm 4.59.0 pyhd3eb1b0_1 defaults
traitlets 5.0.5 py_0 conda-forge
typing-extensions 3.7.4.3 0 conda-forge
typing_extensions 3.7.4.3 py_0 conda-forge
ubiquerg 0.6.1 pyh9f0ad1d_0 conda-forge
uritemplate 3.0.1 py_0 conda-forge
urllib3 1.26.4 pyhd3eb1b0_0 defaults
veracitools 0.1.3 py_0 conda-forge
wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge
websocket-client 0.58.0 py38h06a4308_4 defaults
wheel 0.36.2 pyhd3eb1b0_0 defaults
wrapt 1.12.1 py38h497a2fe_3 conda-forge
xmlrunner 1.7.7 py_0 conda-forge
xorg-kbproto 1.0.7 h14c3975_1002 conda-forge
xorg-libice 1.0.10 h516909a_0 conda-forge
xorg-libsm 1.2.3 hd9c2040_1000 conda-forge
xorg-libx11 1.7.0 h36c2ea0_0 conda-forge
xorg-libxau 1.0.9 h14c3975_0 conda-forge
xorg-libxext 1.3.4 h7f98852_1 conda-forge
xorg-libxrender 0.9.10 h7f98852_1003 conda-forge
xorg-libxt 1.2.1 h7f98852_2 conda-forge
xorg-renderproto 0.11.1 h14c3975_1002 conda-forge
xorg-xextproto 7.3.0 h14c3975_1002 conda-forge
xorg-xproto 7.0.31 h14c3975_1007 conda-forge
xz 5.2.5 h7b6447c_0 defaults
yaml 0.2.5 h7b6447c_0 defaults
yarl 1.5.1 py38h1e0a361_0 conda-forge
zipp 3.4.1 pyhd8ed1ab_0 conda-forge
zlib 1.2.11 h7b6447c_3 defaults
zstd 1.4.9 ha95c52a_0 conda-forge
```
</p></details>
| 2021-04-27T14:16:20 |
|
zulip/zulip | 183 | zulip__zulip-183 | [
"148"
] | 6569018de7658bddf1ea1afd7d65b79009df1485 | diff --git a/provision.py b/provision.py
--- a/provision.py
+++ b/provision.py
@@ -51,6 +51,12 @@
VENV_PATH="/srv/zulip-venv"
ZULIP_PATH="/srv/zulip"
+if not os.path.exists(os.path.join(os.path.dirname(__file__), ".git")):
+ print "Error: No Zulip git repository present at /srv/zulip!"
+ print "To setup the Zulip development environment, you should clone the code"
+ print "from GitHub, rather than using a Zulip production release tarball."
+ sys.exit(1)
+
# TODO: Parse arguments properly
if "--travis" in sys.argv:
ZULIP_PATH="."
| Check for .git in Vagrantfile to avoid building dev VM from production tarballs.
Possibly I am missing something. I have Vagrant installed on a local Ubuntu 14.04 host, with the latest virtual box installed. Doing `Vagrant up`worked fine. However, inside the Vagrant container, there is no `./tools/run-dev.py`.
```
$ /srv/zulip $ sudo vagrant ssh -- -L9991:localhost:9991
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.16.0-38-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Tue Oct 6 12:48:44 2015 from 10.0.3.1
(zulip-venv)vagrant@vagrant-base-trusty-amd64:~$ cd /srv/zulip
(zulip-venv)vagrant@vagrant-base-trusty-amd64:/srv/zulip$ source /srv/zulip-venv/bin/activate
(zulip-venv)vagrant@vagrant-base-trusty-amd64:/srv/zulip$ ./tools/run-dev.py --interface=''
-bash: ./tools/run-dev.py: No such file or directory
```
Is this a know issue?
| That is quite weird for the development environment. Can you run `git status` inside /srv/zulip? In theory that should just be a clone of the git repository with a few files added...
Hmm, that's where I went wrong:
```
(zulip-venv)vagrant@vagrant-base-trusty-amd64:/srv/zulip$ git status
fatal: Not a git repository (or any of the parent directories): .git
```
I downloaded the server install from https://www.zulip.com/dist/releases. I imagine i should be cloning https://github.com/zulip/zulip.git
Yes, exactly, there's two setup models:
(1) Zulip production server tarball, which has the javascript all built, etc from https://www.zulip.com/dist/releases
(2) Zulip development environment, where you want a git repository so you can easily test changes as you write commits for them, which uses vagrant
We should probably add a test in the Vagrantfile to confirm .git exists so other folks don't run into this problem. I'll rename this issue to fixing that problem.
| 2015-10-14T14:16:48 |
|
zulip/zulip | 471 | zulip__zulip-471 | [
"470"
] | 668d0d9dfa52d88ec720b3c6a4aa7b36a604e0f8 | diff --git a/provision.py b/provision.py
--- a/provision.py
+++ b/provision.py
@@ -36,6 +36,8 @@
"git",
"npm",
"yui-compressor",
+ "wget",
+ "ca-certificates", # Explicit dependency in case e.g. wget is already installed
"puppet", # Used by lint-all
"gettext", # Used by makemessages i18n
]
| Dependency on `wget` not declared
Attempting to provision in a minimal LXC container on Ubuntu 14.04:
```
Traceback (most recent call last):
File "/srv/zulip/provision.py", line 182, in <module>
sys.exit(main())
File "/srv/zulip/provision.py", line 98, in main
sh.wget(
File "/usr/lib/python2.7/dist-packages/pbs.py", line 543, in __getattr__
return self.env[name]
File "/usr/lib/python2.7/dist-packages/pbs.py", line 495, in __missing__
return Command._create(k)
File "/usr/lib/python2.7/dist-packages/pbs.py", line 239, in _create
if not path: raise CommandNotFound(program)
pbs.CommandNotFound: wget
```
| 2016-02-18T03:41:44 |
||
zulip/zulip | 597 | zulip__zulip-597 | [
"586"
] | 6d0e868897b1fdc4ae7c844bac2e99f47b7aea57 | diff --git a/zerver/management/commands/process_queue.py b/zerver/management/commands/process_queue.py
--- a/zerver/management/commands/process_queue.py
+++ b/zerver/management/commands/process_queue.py
@@ -38,6 +38,7 @@ def handle(self, *args, **options):
logger.info("Worker %d connecting to queue %s" % (worker_num, queue_name))
worker = get_worker(queue_name)
+ worker.setup()
def signal_handler(signal, frame):
logger.info("Worker %d disconnecting from queue %s" % (worker_num, queue_name))
| Potential bug with Supervisor zulip.conf
I just merged commits made within the past few days. On my live server, I'm now seeing repeated errors like this:
```
manage.py process_queue: error: unrecognized arguments: missedmessage_mobile_notifications
usage: manage.py process_queue [-h] [--version] [-v {0,1,2,3}]
[--settings SETTINGS] [--pythonpath PYTHONPATH]
[--traceback] [--no-color]
[--queue_name <queue name>]
[--worker_num [<worker number>]] [--all]
```
I'm light as far as configuration / DevOps, but I believe this is because `process_queue` is being executed by: `/puppet/zulip/files/supervisor/conf.d/zulip.conf` and the contained commands not using the `--` characters before the arguments?
[Example here](https://github.com/zulip/zulip/blob/master/puppet/zulip/files/supervisor/conf.d/zulip.conf#L102)
| yes, that's exactly right. We need to revert the part of the process_queue.py refactoring in cd2348e9aec36d7f26475fa7d966d06588dbeb75 that desupported that way of specifying arguments.
Thanks for reporting this @danshev! Ultimately this is a failure of our "production" test suite that it didn't catch this.
Absolutely -- glad it was of help!
#597 should fix this; if you're up for testing this @danshev, I'd definitely appreciate it!
Certainly; will do it right now.
I'm seeing:
```
2016-03-27 18:33:14,640 INFO Worker 0 connecting to queue message_sender
Traceback (most recent call last):
File "/home/zulip/deployments/current/manage.py", line 25, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 393, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 444, in execute
output = self.handle(*args, **options)
File "/home/zulip/deployments/2016-03-27-22-31-02/zerver/management/commands/process_queue.py", line 49, in handle
worker.start()
File "/home/zulip/deployments/2016-03-27-22-31-02/zerver/worker/queue_processors.py", line 92, in start
self.q.register_json_consumer(self.queue_name, self.consume_wrapper)
AttributeError: 'NoneType' object has no attribute 'register_json_consumer'
```
Ok will look tonight
-Tim Abbott (mobile)
On Mar 27, 2016 3:34 PM, "Dan Shevenell" [email protected] wrote:
> I'm seeing:
>
> 2016-03-27 18:33:14,640 INFO Worker 0 connecting to queue message_sender
> Traceback (most recent call last):
> File "/home/zulip/deployments/current/manage.py", line 25, in <module>
> execute_from_command_line(sys.argv)
> File "/usr/lib/python2.7/dist-packages/django/core/management/**init**.py", line 338, in execute_from_command_line
> utility.execute()
> File "/usr/lib/python2.7/dist-packages/django/core/management/**init**.py", line 330, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 393, in run_from_argv
> self.execute(_args, *_cmd_options)
> File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 444, in execute
> output = self.handle(_args, *_options)
> File "/home/zulip/deployments/2016-03-27-22-31-02/zerver/management/commands/process_queue.py", line 49, in handle
> worker.start()
> File "/home/zulip/deployments/2016-03-27-22-31-02/zerver/worker/queue_processors.py", line 92, in start
> self.q.register_json_consumer(self.queue_name, self.consume_wrapper)
> AttributeError: 'NoneType' object has no attribute 'register_json_consumer'
>
> —
> You are receiving this because you commented.
> Reply to this email directly or view it on GitHub
> https://github.com/zulip/zulip/issues/586#issuecomment-202162786
| 2016-03-27T22:00:46 |
|
zulip/zulip | 837 | zulip__zulip-837 | [
"708"
] | 09400a7e508b2d9007a6f92fa504c6b6528b2fd8 | diff --git a/provision.py b/provision.py
--- a/provision.py
+++ b/provision.py
@@ -146,7 +146,8 @@ def main():
run(["wget", "-O", temp_deb_path, TSEARCH_URL])
run(["sudo", "dpkg", "--install", temp_deb_path])
- setup_virtualenv(PY3_VENV_PATH, os.path.join(ZULIP_PATH, "tools", "py3_test_reqs.txt"),
+ setup_virtualenv(PY3_VENV_PATH,
+ os.path.join(ZULIP_PATH, "tools", "setup", "py3_test_reqs.txt"),
virtualenv_args=['-p', 'python3'])
setup_virtualenv(VENV_PATH, os.path.join(ZULIP_PATH, "requirements.txt"))
@@ -164,11 +165,11 @@ def main():
os.chdir(ZULIP_PATH)
if "--travis" in sys.argv:
- run(["tools/install-phantomjs", "--travis"])
+ run(["tools/setup/install-phantomjs", "--travis"])
else:
- run(["tools/install-phantomjs"])
- run(["tools/download-zxcvbn"])
- run(["tools/emoji_dump/build_emoji"])
+ run(["tools/setup/install-phantomjs"])
+ run(["tools/setup/download-zxcvbn"])
+ run(["tools/setup/emoji_dump/build_emoji"])
run(["scripts/setup/generate_secrets.py", "-d"])
if "--travis" in sys.argv:
run(["sudo", "service", "rabbitmq-server", "restart"])
@@ -181,9 +182,9 @@ def main():
run(["sudo", "service", "redis-server", "restart"])
run(["sudo", "service", "memcached", "restart"])
run(["scripts/setup/configure-rabbitmq"])
- run(["tools/postgres-init-dev-db"])
+ run(["tools/setup/postgres-init-dev-db"])
run(["tools/do-destroy-rebuild-database"])
- run(["tools/postgres-init-test-db"])
+ run(["tools/setup/postgres-init-test-db"])
run(["tools/do-destroy-rebuild-test-database"])
run(["python", "./manage.py", "compilemessages"])
# Install the latest npm.
diff --git a/tools/emoji_dump/emoji_dump.py b/tools/setup/emoji_dump/emoji_dump.py
similarity index 100%
rename from tools/emoji_dump/emoji_dump.py
rename to tools/setup/emoji_dump/emoji_dump.py
| diff --git a/frontend_tests/run-casper b/frontend_tests/run-casper
--- a/frontend_tests/run-casper
+++ b/frontend_tests/run-casper
@@ -36,9 +36,9 @@ for file in args:
os.chdir(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
-subprocess.check_call('tools/generate-fixtures')
+subprocess.check_call('tools/setup/generate-fixtures')
-subprocess.check_call('tools/generate-test-credentials')
+subprocess.check_call('tools/setup/generate-test-credentials')
subprocess.check_call(['rm', '-f'] + glob.glob('/tmp/casper-failure*.png'))
diff --git a/tools/py3_test_reqs.txt b/tools/setup/py3_test_reqs.txt
similarity index 100%
rename from tools/py3_test_reqs.txt
rename to tools/setup/py3_test_reqs.txt
| Split out a tools/setup from tools/ to decrease clutter
We now have a bunch of tools under `tools`, many of which are only used as part of the development environment setup process. It probably makes sense to move a bunch of those into a `setup/` subdirectory to both make their purpose more clear and clean up the directory of commands one is unlikely to run. Good targets include:
- download-zxcvbn
- generate-test-credentials
- generate-fixtures
- postgres-init-dev-db
- postgres-init-test-db
- setup-git-repo
- emoji_dump
- install-phantomjs
- py3_test_reqs.txt
If someone's going to work on this, please do 1 commit per command so it's easy to review and read, and please use `grep` to confirm you updated all references to the relevant command.
| @timabbott working on this now.
| 2016-05-26T13:00:58 |
zulip/zulip | 1,065 | zulip__zulip-1065 | [
"1035"
] | aceee3da11b79bfc34d5af3231ab46082b6ce77d | diff --git a/scripts/setup/generate_secrets.py b/scripts/setup/generate_secrets.py
--- a/scripts/setup/generate_secrets.py
+++ b/scripts/setup/generate_secrets.py
@@ -8,6 +8,8 @@
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
from django.utils.crypto import get_random_string
+import six
+
from zerver.lib.utils import generate_random_token
os.chdir(os.path.join(os.path.dirname(__file__), '..', '..'))
@@ -31,6 +33,21 @@ def generate_django_secretkey():
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
return get_random_string(50, chars)
+def get_old_conf(output_filename):
+ if not os.path.exists(output_filename):
+ return {}
+
+ secrets_file = six.moves.configparser.RawConfigParser()
+ secrets_file.read(output_filename)
+
+ def get_secret(key):
+ if secrets_file.has_option('secrets', key):
+ return secrets_file.get('secrets', key)
+ return None
+
+ fields = AUTOGENERATED_SETTINGS + ['secret_key', 'camo_key']
+ return {name: get_secret(name) for name in fields}
+
def generate_secrets(development=False):
if development:
OUTPUT_SETTINGS_FILENAME = "zproject/dev-secrets.conf"
@@ -42,12 +59,16 @@ def generate_secrets(development=False):
def config_line(var, value):
return "%s = %s\n" % (var, value)
+ old_conf = get_old_conf(OUTPUT_SETTINGS_FILENAME)
for name in AUTOGENERATED_SETTINGS:
- lines.append(config_line(name, generate_random_token(64)))
+ lines.append(config_line(name, old_conf.get(name, generate_random_token(64))))
+
+ secret_key = old_conf.get('secret_key', generate_django_secretkey())
+ lines.append(config_line('secret_key', secret_key))
- lines.append(config_line('secret_key', generate_django_secretkey()))
- camo_key = get_random_string(64)
+ camo_key = old_conf.get('camo_key', get_random_string(64))
lines.append(config_line('camo_key', camo_key))
+
if not development:
# Write the Camo config file directly
generate_camo_config_file(camo_key)
| Make `scripts/setup/generate-secrets -d` use existing setting values
Currently, `generate-secrets -d` regenerates all the secret keys each time it is run, modifying zproject/settings.py, which means that if you use the same Zulip checkout for both a development VM on the host and a Vagrant guest, every time you provision on the Vagrant guest, you need to rebuild the database (to match the new keys). I think this would also affect someone using both Docker and Vagrant with the same checkout (as I imagine happens with some frequency when testing).
| I think this would be pretty reasonable to do while still preserving the fact that it'll automatically add new settings by just checking whether `OUTPUT_SETTINGS_FILENAME` already exists, and if it does, parse the file and use the existing values if already present.
This would also have the nice side effect of making `scripts/setup/generate-settings` no longer dangerous to run on an already setup production server (right now, it will permanently delete all the secrets!).
| 2016-06-20T12:13:44 |
|
zulip/zulip | 1,112 | zulip__zulip-1112 | [
"1111"
] | 8cecb3774321adf638b93781a175e74e68a6564b | diff --git a/scripts/lib/setup_venv.py b/scripts/lib/setup_venv.py
--- a/scripts/lib/setup_venv.py
+++ b/scripts/lib/setup_venv.py
@@ -18,6 +18,7 @@
from typing import List, Optional
VENV_DEPENDENCIES = [
+ "build-essential",
"libffi-dev",
"libfreetype6-dev",
"libldap2-dev",
@@ -25,6 +26,7 @@
"postgresql-server-dev-all",
"python3-dev", # Needed to install typed-ast dependency of mypy
"python-dev",
+ "python-pip",
"python-virtualenv",
]
| Commit c74a74d causes docker dev image build to fail.
Hi,
I had 1.3.13 successfully install in a docker dev environment, which fully built and installed. I decided to try the latest source in master today and this error occurred:
```
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/typed_ast
copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.4/typed_ast
copying typed_ast/ast35.py -> build/lib.linux-x86_64-3.4/typed_ast
copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.4/typed_ast
copying typed_ast/__init__.py -> build/lib.linux-x86_64-3.4/typed_ast
running build_ext
building '_ast27' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/ast27
creating build/temp.linux-x86_64-3.4/ast27/Parser
creating build/temp.linux-x86_64-3.4/ast27/Python
creating build/temp.linux-x86_64-3.4/ast27/Custom
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Iast27/Include -I/usr/include/python3.4m -I/srv/zulip-venv-cache/2d0d4429f07d3367f31c904bcf110e00407cafa8/zulip-py3-venv/include/python3.4m -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.4/ast27/Parser/acceler.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/srv/zulip-venv-cache/2d0d4429f07d3367f31c904bcf110e00407cafa8/zulip-py3-venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-u0_6ev0b/typed-ast/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-eq6ql577-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/zulip-venv-cache/2d0d4429f07d3367f31c904bcf110e00407cafa8/zulip-py3-venv/include/site/python3.4/typed-ast" failed with error code 1 in /tmp/pip-build-u0_6ev0b/typed-ast/
Traceback (most recent call last):
File "/srv/zulip/provision.py", line 202, in <module>
sys.exit(main())
File "/srv/zulip/provision.py", line 153, in main
virtualenv_args=['-p', 'python3'])
File "/srv/zulip/scripts/lib/setup_venv.py", line 44, in setup_virtualenv
do_setup_virtualenv(cached_venv_path, requirements_file, virtualenv_args or [])
File "/srv/zulip/scripts/lib/setup_venv.py", line 68, in do_setup_virtualenv
run(["pip", "install", "--no-deps", "--requirement", requirements_file])
File "/srv/zulip/zulip_tools.py", line 78, in run
raise subprocess.CalledProcessError(rc, args)
subprocess.CalledProcessError: Command '['pip', 'install', '--no-deps', '--requirement', '/srv/zulip/requirements/mypy.txt']' returned non-zero exit status 1
```
At the time of this writing commit https://github.com/zulip/zulip/commit/8cecb3774321adf638b93781a175e74e68a6564b is the latest version I used, so the error must have been between this commit and last commit for release 1.3.13.
When I reverted this commit https://github.com/zulip/zulip/commit/c74a74dc7427549eba4ececcf91c483ca2876796 everything compiled as normal. There must be a dependency that is pulled in that makes it work.
Hope this helps.
Jon
| 2016-06-24T16:11:25 |
||
zulip/zulip | 1,152 | zulip__zulip-1152 | [
"878"
] | 17b6d136d566fde2de889aeb22440bf0db83c138 | diff --git a/tools/run-dev.py b/tools/run-dev.py
--- a/tools/run-dev.py
+++ b/tools/run-dev.py
@@ -74,7 +74,6 @@ def patched_finish(self):
# Pass --nostatic because we configure static serving ourselves in
# zulip/urls.py.
cmds = [['./tools/compile-handlebars-templates', 'forever'],
- ['./tools/webpack', '--watch', '--port', str(webpack_port)],
['python', 'manage.py', 'rundjango'] +
manage_args + ['localhost:%d' % (django_port,)],
['python', 'manage.py', 'runtornado'] +
@@ -82,7 +81,14 @@ def patched_finish(self):
['./tools/run-dev-queue-processors'] + manage_args,
['env', 'PGHOST=localhost', # Force password authentication using .pgpass
'./puppet/zulip/files/postgresql/process_fts_updates']]
-
+if options.test:
+ # Webpack doesn't support 2 copies running on the same system, so
+ # in order to support running the Casper tests while a Zulip
+ # development server is running, we use webpack in production mode
+ # for the Casper tests.
+ subprocess.check_call('./tools/webpack')
+else:
+ cmds += [['./tools/webpack', '--watch', '--port', str(webpack_port)]]
for cmd in cmds:
subprocess.Popen(cmd)
diff --git a/zproject/settings.py b/zproject/settings.py
--- a/zproject/settings.py
+++ b/zproject/settings.py
@@ -754,6 +754,7 @@ def get_secret(key):
}
if PIPELINE:
+ # This is also done in test_settings.py, see comment there..
JS_SPECS['app']['source_filenames'].append('js/bundle.js')
app_srcs = JS_SPECS['app']['source_filenames']
| diff --git a/zproject/test_settings.py b/zproject/test_settings.py
--- a/zproject/test_settings.py
+++ b/zproject/test_settings.py
@@ -11,6 +11,10 @@
"TEST_NAME": "django_zulip_tests",
"OPTIONS": {"connection_factory": TimeTrackingConnection },}
+# In theory this should just go in zproject/settings.py inside the `if
+# PIPELINE` statement, but because zproject/settings.py is processed
+# first, we have to add it here as a hack.
+JS_SPECS['app']['source_filenames'].append('js/bundle.js')
if "TORNADO_SERVER" in os.environ:
# This covers the Casper test suite case
| Running casper tests while run-dev.py is running doesn't work
The failure mode is hanging at "Logging in" in 00-login.js, and this seems to be easily reproducible.
This is a recent regression (this used to work) and would be great to debug.
| So the way this is supposed to work is that the casper tests call `run-dev.py --test`, which is supposed to use a totally independent set of ports/interfaces/etc. from the normal `run-dev.py`. I suspect we regressed this behavior somehow recently (possibly in 98d5f64f365e6c7008190a8ed88d59392ed35d1c).
I investigated this, and indeed, it is caused by `webpack` having some sort of lock that prevents running two copies of webpack on the same codebase.
I haven't figured out a way to work around this yet to actually fix the bug :(.
| 2016-06-30T21:19:08 |
zulip/zulip | 2,024 | zulip__zulip-2024 | [
"1981"
] | a85f9a951a8b06f9f4c7852b57cd58146e27776b | diff --git a/scripts/lib/node_cache.py b/scripts/lib/node_cache.py
--- a/scripts/lib/node_cache.py
+++ b/scripts/lib/node_cache.py
@@ -5,7 +5,7 @@
from os.path import dirname, abspath
if False:
- from typing import Optional, List, Tuple
+ from typing import Optional, List, IO, Tuple
from scripts.lib.zulip_tools import subprocess_text_output, run
@@ -17,7 +17,7 @@
NPM_CACHE_PATH = "/home/travis/zulip-npm-cache"
def setup_node_modules(npm_args=None, stdout=None, stderr=None, copy_modules=False):
- # type: (Optional[List[str]], Optional[str], Optional[str], Optional[bool]) -> None
+ # type: (Optional[List[str]], Optional[IO], Optional[IO], Optional[bool]) -> None
sha1sum = hashlib.sha1()
sha1sum.update(subprocess_text_output(['cat', 'package.json']).encode('utf8'))
sha1sum.update(subprocess_text_output(['npm', '--version']).encode('utf8'))
@@ -42,7 +42,7 @@ def setup_node_modules(npm_args=None, stdout=None, stderr=None, copy_modules=Fal
run(cmd, stdout=stdout, stderr=stderr)
def do_npm_install(target_path, npm_args, stdout=None, stderr=None, copy_modules=False):
- # type: (str, List[str], Optional[str], Optional[str], Optional[bool]) -> None
+ # type: (str, List[str], Optional[IO], Optional[IO], Optional[bool]) -> None
cmds = [
["sudo", "rm", "-rf", target_path],
['sudo', 'mkdir', '-p', target_path],
| Use options available in the latest mypy
With mypy's new `--scripts-are-modules` and `-i` options, we can make running mypy much faster (and the Travis CI output much cleaner). The main challenge with `--scripts-are-modules` is that we need to annotate or exclude a bunch of files since we weren't previously running the scripts with `--disallow-untyped-defs`. The main challenge with `-i` is that we need to make sure we put the cache in `.gitignore` properly, probably by just specifying a path under `var/`.
We're already using a new enough version of mypy for both of these.
| 2016-10-16T05:58:31 |
||
zulip/zulip | 2,778 | zulip__zulip-2778 | [
"2435"
] | 3227484fbf9e5cec3caf969b87fbf98cbd75d972 | diff --git a/zerver/lib/cache.py b/zerver/lib/cache.py
--- a/zerver/lib/cache.py
+++ b/zerver/lib/cache.py
@@ -312,7 +312,7 @@ def user_profile_by_id_cache_key(user_profile_id):
return u"user_profile_by_id:%s" % (user_profile_id,)
# TODO: Refactor these cache helpers into another file that can import
-# models.py so that python3-style type annotations can also work.
+# models.py so that python v3 style type annotations can also work.
def cache_save_user_profile(user_profile):
# type: (UserProfile) -> None
| diff --git a/tools/tests/test_css_parser.py b/tools/tests/test_css_parser.py
--- a/tools/tests/test_css_parser.py
+++ b/tools/tests/test_css_parser.py
@@ -19,7 +19,7 @@
class ParserTestHappyPath(unittest.TestCase):
def __init__(self, *args, **kwargs):
# type: (*Any, **Any) -> None
- # This method should be remove when we quit from python2
+ # This method should be removed when we migrate to version 3 of Python
import six
if six.PY2:
self.assertRaisesRegex = self.assertRaisesRegexp # type: ignore
@@ -136,7 +136,7 @@ class ParserTestSadPath(unittest.TestCase):
'''
def __init__(self, *args, **kwargs):
# type: (*Any, **Any) -> None
- # This method should be remove when we quit from python2
+ # This method should be removed when we migrate to version 3 of Python
import six
if six.PY2:
self.assertRaisesRegex = self.assertRaisesRegexp # type: ignore
diff --git a/tools/tests/test_template_parser.py b/tools/tests/test_template_parser.py
--- a/tools/tests/test_template_parser.py
+++ b/tools/tests/test_template_parser.py
@@ -20,7 +20,7 @@
class ParserTest(unittest.TestCase):
def __init__(self, *args, **kwargs):
# type: (*Any, **Any) -> None
- # This method should be remove when we quit from python2
+ # This method should be removed when we migrate to version 3 of Python
import six
if six.PY2:
self.assertRaisesRegex = self.assertRaisesRegexp # type: ignore
diff --git a/zerver/lib/test_classes.py b/zerver/lib/test_classes.py
--- a/zerver/lib/test_classes.py
+++ b/zerver/lib/test_classes.py
@@ -80,7 +80,7 @@ class ZulipTestCase(TestCase):
'''
def __init__(self, *args, **kwargs):
# type: (*Any, **Any) -> None
- # This method should be remove when we quit from python2
+ # This method should be removed when we migrate to version 3 of Python
import six
if six.PY2:
self.assertRaisesRegex = self.assertRaisesRegexp
diff --git a/zerver/tests/test_decorators.py b/zerver/tests/test_decorators.py
--- a/zerver/tests/test_decorators.py
+++ b/zerver/tests/test_decorators.py
@@ -40,7 +40,7 @@
class DecoratorTestCase(TestCase):
def __init__(self, *args, **kwargs):
# type: (*Any, **Any) -> None
- # This method should be remove when we quit from python2
+ # This method should be removed when we migrate to version 3 of Python
import six
if six.PY2:
self.assertRaisesRegex = self.assertRaisesRegexp
| Add lint check for explicit python invocations
(Split from #2378.)
The following are some regexes to check for explicit `python` invocations and incorrect `python` shebang lines that may interfere with the Python 3 transition.
```python
def looks_like_python_args():
yield '-'
yield '/'
yield r'\./'
yield r'\.\./'
for fpath in lister.list_files(ftypes=['py']):
while True:
yield re.escape(fpath)
try:
topdir, fpath = fpath.split(os.path.sep)
except ValueError:
break
bad_python_call_re = '''python[0-9.]*[ ,"']+(?:''' + '|'.join(set(looks_like_python_args())) + ')'
bad_python_shebang_re = '^#!(?!/usr/bin/env python$).*python'
```
We want to match the first one against all files (including random config files that don’t currently have a recognized file type), not just `py` files. Tim says we don't currently have a nice way to do that.
| The closest we have to a mechanism for doing that is to add this to `whitespace_rules` (and then rename it). Might make sense to just add it as a new list that is checked explicitly against all files; it would probably be a pretty small amount of code in `tools/lint-all`.
@timabbott I've just claimed the task from GCI, Could you explain me the issue please
> The basic idea is pretty simple--we want to remove uses of python2 and python3 in shebangs and in places where we call out to python programs, and then we want a lint rule to prevent future occurrences. I just think the implementation is kind of tricky.
Source: https://chat.zulip.org/#narrow/near/85427/stream/GCI.20help/topic/Issue.20.232435 | 2016-12-18T22:25:35 |
zulip/zulip | 2,809 | zulip__zulip-2809 | [
"2729"
] | 56e1fb6df664bcf1629b7b69ef953680b1a7954c | diff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.py
--- a/zilencer/management/commands/populate_db.py
+++ b/zilencer/management/commands/populate_db.py
@@ -17,7 +17,6 @@
bulk_create_clients
from zerver.models import DefaultStream, get_stream, get_realm_by_string_id
from zilencer.models import Deployment
-import datetime
import random
import os
@@ -183,7 +182,7 @@ def handle(self, **options):
# Populate users with some bar data
for user in user_profiles:
status = 1 # type: int
- date = datetime.datetime.now() # type: datetime.datetime
+ date = now()
client = get_client("website")
for i in range(3):
client = get_client("API")
| Naive datetime warnings in populate_db
This output is generated every time we provision:
```
/srv/zulip-venv-cache/2ded3ad4731e6a2943352f72cd4f555ecd484fc5/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1430: RuntimeWarning: DateTimeField UserPresence.timestamp received a naive datetime (2016-12-15 19:38:41.072319) while time zone support is active.
RuntimeWarning)
/srv/zulip-venv-cache/2ded3ad4731e6a2943352f72cd4f555ecd484fc5/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1430: RuntimeWarning: DateTimeField UserPresence.timestamp received a naive datetime (2016-12-15 19:38:41.082099) while time zone support is active.
RuntimeWarning)
/srv/zulip-venv-cache/2ded3ad4731e6a2943352f72cd4f555ecd484fc5/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1430: RuntimeWarning: DateTimeField UserPresence.timestamp received a naive datetime (2016-12-15 19:38:41.085108) while time zone support is active.
RuntimeWarning)
/srv/zulip-venv-cache/2ded3ad4731e6a2943352f72cd4f555ecd484fc5/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1430: RuntimeWarning: DateTimeField UserPresence.timestamp received a naive datetime (2016-12-15 19:38:41.088053) while time zone support is active.
RuntimeWarning)
/srv/zulip-venv-cache/2ded3ad4731e6a2943352f72cd4f555ecd484fc5/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1430: RuntimeWarning: DateTimeField UserPresence.timestamp received a naive datetime (2016-12-15 19:38:41.090953) while time zone support is active.
RuntimeWarning)
/srv/zulip-venv-cache/2ded3ad4731e6a2943352f72cd4f555ecd484fc5/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1430: RuntimeWarning: DateTimeField UserPresence.timestamp received a naive datetime (2016-12-15 19:38:41.094410) while time zone support is active.
RuntimeWarning)
/srv/zulip-venv-cache/2ded3ad4731e6a2943352f72cd4f555ecd484fc5/zulip-py3-venv/lib/python3.5/site-packages/django/db/models/fields/__init__.py:1430: RuntimeWarning: DateTimeField UserPresence.timestamp received a naive datetime (2016-12-15 19:38:41.097529) while time zone support is active.
```
I think this is a regression introduced in #2626, but masked by the fact that these warnings may not have been displayed before the Django 1.10 upgrade.
The solution is to use timezone-aware datetime objects; we do this generally with `django.util.timezone.now()` in Zulip.
| Looking on this.. | 2016-12-20T19:07:00 |
|
zulip/zulip | 3,035 | zulip__zulip-3035 | [
"2930"
] | 8b6a28dfa6d253f648a3a9818df4db4bb1b7d589 | diff --git a/api/zulip/__init__.py b/api/zulip/__init__.py
--- a/api/zulip/__init__.py
+++ b/api/zulip/__init__.py
@@ -641,13 +641,30 @@ def remove_subscriptions(self, streams):
request=request,
)
+ def get_stream_id(self, stream):
+ # type: (str) -> Dict[str, Any]
+ '''
+ Example usage: client.get_stream_id('devel')
+ '''
+ stream_encoded = urllib.parse.quote(stream, safe='')
+ url = 'get_stream_id?stream=%s' % (stream_encoded,)
+ return self.call_endpoint(
+ url=url,
+ method='GET',
+ request=None,
+ )
+
def get_subscribers(self, **request):
# type: (**Any) -> Dict[str, Any]
'''
Example usage: client.get_subscribers(stream='devel')
'''
- stream = urllib.parse.quote(request['stream'], safe='')
- url = 'streams/%s/members' % (stream,)
+ request_stream_id = self.get_stream_id(request['stream'])
+ try:
+ stream_id = request_stream_id['stream_id']
+ except KeyError:
+ return request_stream_id
+ url = 'streams/%d/members' % (stream_id,)
return self.call_endpoint(
url=url,
method='GET',
diff --git a/zerver/views/streams.py b/zerver/views/streams.py
--- a/zerver/views/streams.py
+++ b/zerver/views/streams.py
@@ -20,7 +20,7 @@
from zerver.lib.response import json_success, json_error, json_response
from zerver.lib.validator import check_string, check_list, check_dict, \
check_bool, check_variable_type
-from zerver.models import UserProfile, Stream, Subscription, \
+from zerver.models import UserProfile, Stream, Realm, Subscription, \
Recipient, get_recipient, get_stream, bulk_get_streams, \
bulk_get_recipients, valid_stream_name, get_active_user_dicts_in_realm
@@ -132,11 +132,9 @@ def principal_to_user_profile(agent, principal):
return principal_user_profile
@require_realm_admin
-def deactivate_stream_backend(request, user_profile, stream_name):
- # type: (HttpRequest, UserProfile, Text) -> HttpResponse
- target = get_stream(stream_name, user_profile.realm)
- if not target:
- return json_error(_('No such stream name'))
+def deactivate_stream_backend(request, user_profile, stream_id):
+ # type: (HttpRequest, UserProfile, int) -> HttpResponse
+ target = get_and_validate_stream_by_id(stream_id, user_profile.realm)
if target.invite_only and not subscribed_to_stream(user_profile, target):
return json_error(_('Cannot administer invite-only streams this way'))
@@ -160,11 +158,14 @@ def remove_default_stream(request, user_profile, stream_name=REQ()):
@require_realm_admin
@has_request_variables
-def update_stream_backend(request, user_profile, stream_name,
+def update_stream_backend(request, user_profile, stream_id,
description=REQ(validator=check_string, default=None),
is_private=REQ(validator=check_bool, default=None),
new_name=REQ(validator=check_string, default=None)):
- # type: (HttpRequest, UserProfile, Text, Optional[Text], Optional[bool], Optional[Text]) -> HttpResponse
+ # type: (HttpRequest, UserProfile, int, Optional[Text], Optional[bool], Optional[Text]) -> HttpResponse
+ stream = get_and_validate_stream_by_id(stream_id, user_profile.realm)
+ stream_name = stream.name
+
if description is not None:
do_change_stream_description(user_profile.realm, stream_name, description)
if stream_name is not None and new_name is not None:
@@ -406,12 +407,10 @@ def add_subscriptions_backend(request, user_profile,
return json_success(result)
@has_request_variables
-def get_subscribers_backend(request, user_profile, stream_name=REQ('stream')):
- # type: (HttpRequest, UserProfile, Text) -> HttpResponse
- stream = get_stream(stream_name, user_profile.realm)
- if stream is None:
- raise JsonableError(_("Stream does not exist: %s") % (stream_name,))
-
+def get_subscribers_backend(request, user_profile,
+ stream_id=REQ('stream', converter=to_non_negative_int)):
+ # type: (HttpRequest, UserProfile, int) -> HttpResponse
+ stream = get_and_validate_stream_by_id(stream_id, user_profile.realm)
subscribers = get_subscriber_emails(stream, user_profile)
return json_success({'subscribers': subscribers})
@@ -436,11 +435,7 @@ def get_streams_backend(request, user_profile,
def get_topics_backend(request, user_profile,
stream_id=REQ(converter=to_non_negative_int)):
# type: (HttpRequest, UserProfile, int) -> HttpResponse
-
- try:
- stream = Stream.objects.get(pk=stream_id)
- except Stream.DoesNotExist:
- return json_error(_("Invalid stream id"))
+ stream = get_and_validate_stream_by_id(stream_id, user_profile.realm)
if stream.realm_id != user_profile.realm_id:
return json_error(_("Invalid stream id"))
@@ -468,13 +463,20 @@ def get_topics_backend(request, user_profile,
def json_stream_exists(request, user_profile, stream=REQ(),
autosubscribe=REQ(default=False)):
# type: (HttpRequest, UserProfile, Text, bool) -> HttpResponse
- return stream_exists_backend(request, user_profile, stream, autosubscribe)
-
-def stream_exists_backend(request, user_profile, stream_name, autosubscribe):
- # type: (HttpRequest, UserProfile, Text, bool) -> HttpResponse
- if not valid_stream_name(stream_name):
+ if not valid_stream_name(stream):
return json_error(_("Invalid characters in stream name"))
- stream = get_stream(stream_name, user_profile.realm)
+ try:
+ stream_id = Stream.objects.get(realm=user_profile.realm, name=stream).id
+ except Stream.DoesNotExist:
+ stream_id = None
+ return stream_exists_backend(request, user_profile, stream_id, autosubscribe)
+
+def stream_exists_backend(request, user_profile, stream_id, autosubscribe):
+ # type: (HttpRequest, UserProfile, int, bool) -> HttpResponse
+ try:
+ stream = get_and_validate_stream_by_id(stream_id, user_profile.realm)
+ except JsonableError:
+ stream = None
result = {"exists": bool(stream)}
if stream is not None:
recipient = get_recipient(Recipient.STREAM, stream.id)
@@ -487,6 +489,23 @@ def stream_exists_backend(request, user_profile, stream_name, autosubscribe):
return json_success(result) # results are ignored for HEAD requests
return json_response(data=result, status=404)
+def get_and_validate_stream_by_id(stream_id, realm):
+ # type: (int, Realm) -> Stream
+ try:
+ stream = Stream.objects.get(pk=stream_id, realm_id=realm.id)
+ except Stream.DoesNotExist:
+ raise JsonableError(_("Invalid stream id"))
+ return stream
+
+@has_request_variables
+def json_get_stream_id(request, user_profile, stream=REQ()):
+ # type: (HttpRequest, UserProfile, Text) -> HttpResponse
+ try:
+ stream_id = Stream.objects.get(realm=user_profile.realm, name=stream).id
+ except Stream.DoesNotExist:
+ return json_error(_("No such stream name"))
+ return json_success({'stream_id': stream_id})
+
def get_subscription_or_die(stream_name, user_profile):
# type: (Text, UserProfile) -> Subscription
stream = get_stream(stream_name, user_profile.realm)
diff --git a/zproject/urls.py b/zproject/urls.py
--- a/zproject/urls.py
+++ b/zproject/urls.py
@@ -288,10 +288,14 @@
url(r'^streams$', rest_dispatch,
{'GET': 'zerver.views.streams.get_streams_backend'}),
+ # GET returns `stream_id`, stream name should be encoded in the url query (in `stream` param)
+ url(r'^get_stream_id', rest_dispatch,
+ {'GET': 'zerver.views.streams.json_get_stream_id'}),
+
# GET returns "stream info" (undefined currently?), HEAD returns whether stream exists (200 or 404)
- url(r'^streams/(?P<stream_name>.*)/members$', rest_dispatch,
+ url(r'^streams/(?P<stream_id>\d+)/members$', rest_dispatch,
{'GET': 'zerver.views.streams.get_subscribers_backend'}),
- url(r'^streams/(?P<stream_name>.*)$', rest_dispatch,
+ url(r'^streams/(?P<stream_id>\d+)$', rest_dispatch,
{'HEAD': 'zerver.views.streams.stream_exists_backend',
'GET': 'zerver.views.streams.stream_exists_backend',
'PATCH': 'zerver.views.streams.update_stream_backend',
| diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py
--- a/zerver/tests/test_signup.py
+++ b/zerver/tests/test_signup.py
@@ -75,12 +75,13 @@ def test_public_urls(self):
# FIXME: We should also test the Tornado URLs -- this codepath
# can't do so because this Django test mechanism doesn't go
# through Tornado.
+ denmark_stream_id = Stream.objects.get(name='Denmark').id
get_urls = {200: ["/accounts/home/", "/accounts/login/"
"/en/accounts/home/", "/ru/accounts/home/",
"/en/accounts/login/", "/ru/accounts/login/",
"/help/"],
302: ["/", "/en/", "/ru/"],
- 401: ["/json/streams/Denmark/members",
+ 401: ["/json/streams/%d/members" % (denmark_stream_id,),
"/api/v1/users/me/subscriptions",
"/api/v1/messages",
"/json/messages",
diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py
--- a/zerver/tests/test_subs.py
+++ b/zerver/tests/test_subs.py
@@ -120,7 +120,8 @@ def test_make_stream_public(self):
'stream_name': ujson.dumps('private_stream'),
'is_private': ujson.dumps(False)
}
- result = self.client_patch("/json/streams/private_stream", params)
+ stream_id = Stream.objects.get(realm=user_profile.realm, name='private_stream').id
+ result = self.client_patch("/json/streams/%d" % (stream_id,), params)
self.assert_json_error(result, 'You are not invited to this stream.')
self.subscribe_to_stream(email, 'private_stream')
@@ -130,7 +131,7 @@ def test_make_stream_public(self):
'stream_name': ujson.dumps('private_stream'),
'is_private': ujson.dumps(False)
}
- result = self.client_patch("/json/streams/private_stream", params)
+ result = self.client_patch("/json/streams/%d" % (stream_id,), params)
self.assert_json_success(result)
realm = user_profile.realm
@@ -150,7 +151,8 @@ def test_make_stream_private(self):
'stream_name': ujson.dumps('public_stream'),
'is_private': ujson.dumps(True)
}
- result = self.client_patch("/json/streams/public_stream", params)
+ stream_id = Stream.objects.get(realm=user_profile.realm, name='public_stream').id
+ result = self.client_patch("/json/streams/%d" % (stream_id,), params)
self.assert_json_success(result)
stream = Stream.objects.get(name='public_stream', realm=realm)
self.assertTrue(stream.invite_only)
@@ -164,7 +166,7 @@ def test_deactivate_stream_backend(self):
self.subscribe_to_stream(user_profile.email, stream.name)
do_change_is_admin(user_profile, True)
- result = self.client_delete('/json/streams/new_stream')
+ result = self.client_delete('/json/streams/%d' % (stream.id,))
self.assert_json_success(result)
subscription_exists = Subscription.objects.filter(
user_profile=user_profile,
@@ -182,8 +184,8 @@ def test_deactivate_stream_backend_requires_existing_stream(self):
self.make_stream('new_stream')
do_change_is_admin(user_profile, True)
- result = self.client_delete('/json/streams/unknown_stream')
- self.assert_json_error(result, 'No such stream name')
+ result = self.client_delete('/json/streams/999999999')
+ self.assert_json_error(result, u'Invalid stream id')
def test_deactivate_stream_backend_requires_realm_admin(self):
# type: () -> None
@@ -191,7 +193,8 @@ def test_deactivate_stream_backend_requires_realm_admin(self):
self.login(email)
self.subscribe_to_stream(email, 'new_stream')
- result = self.client_delete('/json/streams/new_stream')
+ stream_id = Stream.objects.get(name='new_stream').id
+ result = self.client_delete('/json/streams/%d' % (stream_id,))
self.assert_json_error(result, 'Must be a realm administrator')
def test_private_stream_live_updates(self):
@@ -208,7 +211,8 @@ def test_private_stream_live_updates(self):
events = [] # type: List[Dict[str, Any]]
with tornado_redirected_to_list(events):
- result = self.client_patch('/json/streams/private_stream',
+ stream_id = Stream.objects.get(name='private_stream').id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'description': ujson.dumps('Test description')})
self.assert_json_success(result)
@@ -222,7 +226,8 @@ def test_private_stream_live_updates(self):
events = []
with tornado_redirected_to_list(events):
- result = self.client_patch('/json/streams/private_stream',
+ stream_id = Stream.objects.get(name='private_stream').id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'new_name': ujson.dumps('whatever')})
self.assert_json_success(result)
@@ -242,7 +247,8 @@ def test_rename_stream(self):
events = [] # type: List[Dict[str, Any]]
with tornado_redirected_to_list(events):
- result = self.client_patch('/json/streams/stream_name1',
+ stream_id = Stream.objects.get(name='stream_name1').id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'new_name': ujson.dumps('stream_name2')})
self.assert_json_success(result)
@@ -270,7 +276,8 @@ def test_rename_stream(self):
# Test case to handle unicode stream name change
# *NOTE: Here Encoding is needed when Unicode string is passed as an argument*
with tornado_redirected_to_list(events):
- result = self.client_patch('/json/streams/stream_name2',
+ stream_id = stream_name2_exists.id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'new_name': ujson.dumps(u'नया नाम'.encode('utf-8'))})
self.assert_json_success(result)
# While querying, system can handle unicode strings.
@@ -281,7 +288,8 @@ def test_rename_stream(self):
# NOTE: Unicode string being part of URL is handled cleanly
# by client_patch call, encoding of URL is not needed.
with tornado_redirected_to_list(events):
- result = self.client_patch('/json/streams/नया नाम',
+ stream_id = stream_name_uni_exists.id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'new_name': ujson.dumps(u'नाम में क्या रक्खा हे'.encode('utf-8'))})
self.assert_json_success(result)
# While querying, system can handle unicode strings.
@@ -292,7 +300,8 @@ def test_rename_stream(self):
# Test case to change name from one language to other.
with tornado_redirected_to_list(events):
- result = self.client_patch('/json/streams/नाम में क्या रक्खा हे',
+ stream_id = stream_name_new_uni_exists.id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'new_name': ujson.dumps(u'français'.encode('utf-8'))})
self.assert_json_success(result)
stream_name_fr_exists = get_stream(u'français', realm)
@@ -300,7 +309,8 @@ def test_rename_stream(self):
# Test case to change name to mixed language name.
with tornado_redirected_to_list(events):
- result = self.client_patch('/json/streams/français',
+ stream_id = stream_name_fr_exists.id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'new_name': ujson.dumps(u'français name'.encode('utf-8'))})
self.assert_json_success(result)
stream_name_mixed_exists = get_stream(u'français name', realm)
@@ -312,7 +322,8 @@ def test_rename_stream_requires_realm_admin(self):
self.login(email)
self.make_stream('stream_name1')
- result = self.client_patch('/json/streams/stream_name1',
+ stream_id = Stream.objects.get(name='stream_name1').id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'new_name': ujson.dumps('stream_name2')})
self.assert_json_error(result, 'Must be a realm administrator')
@@ -327,7 +338,8 @@ def test_change_stream_description(self):
events = [] # type: List[Dict[str, Any]]
with tornado_redirected_to_list(events):
- result = self.client_patch('/json/streams/stream_name1',
+ stream_id = Stream.objects.get(realm=realm, name='stream_name1').id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'description': ujson.dumps('Test description')})
self.assert_json_success(result)
@@ -362,7 +374,8 @@ def test_change_stream_description_requires_realm_admin(self):
self.subscribe_to_stream(email, 'stream_name1')
do_change_is_admin(user_profile, False)
- result = self.client_patch('/json/streams/stream_name1',
+ stream_id = Stream.objects.get(realm=user_profile.realm, name='stream_name1').id
+ result = self.client_patch('/json/streams/%d' % (stream_id,),
{'description': ujson.dumps('Test description')})
self.assert_json_error(result, 'Must be a realm administrator')
@@ -392,10 +405,11 @@ def delete_stream(self, stream, subscribed=True):
"""
active_name = stream.name
realm = stream.realm
+ stream_id = stream.id
events = [] # type: List[Dict[str, Any]]
with tornado_redirected_to_list(events):
- result = self.client_delete('/json/streams/' + active_name)
+ result = self.client_delete('/json/streams/' + str(stream_id))
self.assert_json_success(result)
deletion_events = [e['event'] for e in events if e['event']['type'] == 'subscription']
@@ -467,7 +481,7 @@ def test_delete_streams_youre_not_on(self):
priv_stream = self.set_up_stream_for_deletion(
"privstream", subscribed=False, invite_only=True)
- result = self.client_delete('/json/streams/' + priv_stream.name)
+ result = self.client_delete('/json/streams/' + str(priv_stream.id))
self.assert_json_error(
result, "Cannot administer invite-only streams this way")
@@ -1934,6 +1948,25 @@ def test_public_streams_api(self):
**self.api_auth(email))
self.assertEqual(result.status_code, 400)
+class StreamIdTest(ZulipTestCase):
+ def setUp(self):
+ # type: () -> None
+ self.email = "[email protected]"
+ self.user_profile = get_user_profile_by_email(self.email)
+ self.login(self.email)
+
+ def test_get_stream_id(self):
+ # type: () -> None
+ stream = gather_subscriptions(self.user_profile)[0][0]
+ result = self.client_get("/json/get_stream_id?stream=%s" % (stream['name'],))
+ self.assert_json_success(result)
+ self.assertEqual(result.json()['stream_id'], stream['stream_id'])
+
+ def test_get_stream_id_wrong_name(self):
+ # type: () -> None
+ result = self.client_get("/json/get_stream_id?stream=wrongname")
+ self.assert_json_error(result, u'No such stream name')
+
class InviteOnlyStreamTest(ZulipTestCase):
def test_must_be_subbed_to_send(self):
# type: () -> None
@@ -2017,7 +2050,8 @@ def test_inviteonly(self):
self.assertEqual(json["already_subscribed"], {})
# Make sure both users are subscribed to this stream
- result = self.client_get("/api/v1/streams/%s/members" % (stream_name,),
+ stream_id = Stream.objects.get(name=stream_name).id
+ result = self.client_get("/api/v1/streams/%d/members" % (stream_id,),
**self.api_auth(email))
self.assert_json_success(result)
json = ujson.loads(result.content)
@@ -2049,16 +2083,17 @@ def check_well_formed_result(self, result, stream_name, realm):
stream_name, realm)]
self.assertEqual(sorted(result["subscribers"]), sorted(true_subscribers))
- def make_subscriber_request(self, stream_name, email=None):
- # type: (Text, Optional[str]) -> HttpResponse
+ def make_subscriber_request(self, stream_id, email=None):
+ # type: (int, Optional[str]) -> HttpResponse
if email is None:
email = self.email
- return self.client_get("/api/v1/streams/%s/members" % (stream_name,),
+ return self.client_get("/api/v1/streams/%d/members" % (stream_id,),
**self.api_auth(email))
def make_successful_subscriber_request(self, stream_name):
# type: (Text) -> None
- result = self.make_subscriber_request(stream_name)
+ stream_id = Stream.objects.get(name=stream_name).id
+ result = self.make_subscriber_request(stream_id)
self.assert_json_success(result)
self.check_well_formed_result(ujson.loads(result.content),
stream_name, self.user_profile.realm)
@@ -2197,9 +2232,9 @@ def test_json_get_subscribers_stream_not_exist(self):
"""
json_get_subscribers also returns the list of subscribers for a stream.
"""
- stream_name = "unknown_stream"
- result = self.client_get("/json/streams/%s/members" % (stream_name,))
- self.assert_json_error(result, "Stream does not exist: %s" % (stream_name,))
+ stream_id = 99999999
+ result = self.client_get("/json/streams/%d/members" % (stream_id,))
+ self.assert_json_error(result, u'Invalid stream id')
def test_json_get_subscribers(self):
# type: () -> None
@@ -2208,8 +2243,9 @@ def test_json_get_subscribers(self):
also returns the list of subscribers for a stream.
"""
stream_name = gather_subscriptions(self.user_profile)[0][0]['name']
+ stream_id = Stream.objects.get(realm=self.user_profile.realm, name=stream_name).id
expected_subscribers = gather_subscriptions(self.user_profile)[0][0]['subscribers']
- result = self.client_get("/json/streams/%s/members" % (stream_name,))
+ result = self.client_get("/json/streams/%d/members" % (stream_id,))
self.assert_json_success(result)
result_dict = ujson.loads(result.content)
self.assertIn('subscribers', result_dict)
@@ -2232,6 +2268,7 @@ def test_nonsubscriber_private_stream(self):
other_email = "[email protected]"
# Try to fetch the subscriber list as a non-member.
- result = self.make_subscriber_request(stream_name, email=other_email)
+ stream_id = Stream.objects.get(name=stream_name).id
+ result = self.make_subscriber_request(stream_id, email=other_email)
self.assert_json_error(result,
"Unable to retrieve subscribers for invite-only stream")
| Adding missing encodeURIComponent on some `PATCH /json/streams/` uses
Our frontend correctly uses encodeURIComponent(stream_name) in only half of the instances it should it when doing PATCH on `/json/streams`, and thus those other calls probably won't work in the event that the stream names contain unusual characters.
| looking on this..
@timabbott Is `email` should be encoded also?
```
url: '/json/users/' + email,
``` | 2016-12-31T15:52:37 |
zulip/zulip | 3,044 | zulip__zulip-3044 | [
"2996"
] | c199c73b939d187cf8b8ab22caa90bbd1ed3a451 | diff --git a/tools/test-help-documentation.py b/tools/test-help-documentation.py
--- a/tools/test-help-documentation.py
+++ b/tools/test-help-documentation.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
from __future__ import print_function
+import optparse
import os
import sys
import subprocess
@@ -19,6 +20,11 @@
os.environ["EXTERNAL_HOST"] = "localhost:9981"
+parser = optparse.OptionParser()
+parser.add_option('--force', default=False,
+ action="store_true",
+ help='Run tests despite possible problems.')
+(options, args) = parser.parse_args()
def assert_server_running(server):
# type: (subprocess.Popen) -> None
@@ -45,7 +51,12 @@ def server_is_up(server):
log.write('\n\n')
else:
log = open(LOG_FILE, 'w')
-server = subprocess.Popen(('tools/run-dev.py', '--test'), stdout=log, stderr=log)
+
+run_dev_server_command = ['tools/run-dev.py', '--test']
+if options.force:
+ run_dev_server_command.append('--force')
+server = subprocess.Popen(run_dev_server_command, stdout=log, stderr=log)
+
sys.stdout.write('Waiting for test server')
try:
while not server_is_up(server):
| diff --git a/frontend_tests/run-casper b/frontend_tests/run-casper
--- a/frontend_tests/run-casper
+++ b/frontend_tests/run-casper
@@ -123,7 +123,10 @@ def run_tests(realms_have_subdomains, files):
remote_debug = "--remote-debugger-port=7777 --remote-debugger-autorun=yes"
# Run this not through the shell, so that we have the actual PID.
- server = subprocess.Popen(('tools/run-dev.py', '--test'),
+ run_dev_server_command = ['tools/run-dev.py', '--test']
+ if options.force:
+ run_dev_server_command.append('--force')
+ server = subprocess.Popen(run_dev_server_command,
stdout=log, stderr=log)
ret = 1
| Add a --force option to tools/test-all.
If present, it should pass the `--force` option on to the scripts that take it. I believe these are `lint-all`, `test-backend`, and `test-js-with-node`.
Currently, one can run each of the individual tests in `tools/test-all` without provisioning, but not directly via `tools/test-all --force`. Running `tools/test-all` without provisioning also gives the currently misleading instruction `If you really know what you are doing, use --force to run anyway.` (The message is being printed by `lint-all`.)
| Yeah this is a good idea.
Currently working at this.. | 2017-01-01T15:48:14 |
zulip/zulip | 3,139 | zulip__zulip-3139 | [
"2950"
] | 196cf4367b72bccc441c52e26e64b44b12f237c1 | diff --git a/tools/lib/html_branches.py b/tools/lib/html_branches.py
--- a/tools/lib/html_branches.py
+++ b/tools/lib/html_branches.py
@@ -4,6 +4,7 @@
from typing import Optional
import re
+from collections import defaultdict
from .template_parser import (
tokenize,
@@ -109,11 +110,38 @@ def get_tag_info(token):
m = re.search(regex, s)
if m:
for g in m.groups():
- lst += g.split()
+ lst += split_for_id_and_class(g)
return TagInfo(tag=tag, classes=classes, ids=ids, token=token)
+def split_for_id_and_class(element):
+ # type: (str) -> List[str]
+ # Here we split a given string which is expected to contain id or class
+ # attributes from HTML tags. This also takes care of template variables
+ # in string during splitting process. For eg. 'red black {{ a|b|c }}'
+ # is split as ['red', 'black', '{{ a|b|c }}']
+ outside_braces = True # type: bool
+ lst = []
+ s = ''
+
+ for ch in element:
+ if ch == '{':
+ outside_braces = False
+ if ch == '}':
+ outside_braces = True
+ if ch == ' ' and outside_braces:
+ if not s == '':
+ lst.append(s)
+ s = ''
+ else:
+ s += ch
+ if not s == '':
+ lst.append(s)
+
+ return lst
+
+
def html_branches(text, fn=None):
# type: (str, str) -> List[HtmlTreeBranch]
@@ -163,3 +191,21 @@ def html_tag_tree(text):
stack.pop()
return top_level
+
+
+def build_id_dict(templates):
+ # type: (List[str]) -> (Dict[str,List[str]])
+
+ template_id_dict = defaultdict(list) # type: (Dict[str,List[str]])
+
+ for fn in templates:
+ text = open(fn).read()
+ list_tags = tokenize(text)
+
+ for tag in list_tags:
+ info = get_tag_info(tag)
+
+ for ids in info.ids:
+ template_id_dict[ids].append("Line " + str(info.token.line) + ":" + fn)
+
+ return template_id_dict
| diff --git a/tools/tests/test_html_branches.py b/tools/tests/test_html_branches.py
--- a/tools/tests/test_html_branches.py
+++ b/tools/tests/test_html_branches.py
@@ -2,6 +2,7 @@
from __future__ import print_function
import unittest
+import os
import tools.lib.template_parser
@@ -9,6 +10,8 @@
get_tag_info,
html_branches,
html_tag_tree,
+ build_id_dict,
+ split_for_id_and_class,
)
@@ -100,3 +103,37 @@ def test_html_branches(self):
self.assertEqual(branches[0].staircase_text(), '\n html\n head\n title\n')
self.assertEqual(branches[1].staircase_text(), '\n html\n body\n p\n br\n')
self.assertEqual(branches[2].staircase_text(), '\n html\n body\n p\n')
+
+ def test_build_id_dict(self):
+ # type: () -> None
+ TEST_TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_template_data")
+ templates = ["test_template1.html", "test_template2.html"]
+ templates = [os.path.join(TEST_TEMPLATES_DIR, fn) for fn in templates]
+
+ template_id_dict = build_id_dict(templates)
+
+ self.assertEqual(list(template_id_dict.keys()), ['hello_{{ message }}', 'intro', 'below_navbar'])
+ self.assertEqual(template_id_dict['hello_{{ message }}'], [
+ 'Line 12:/srv/zulip/tools/tests/test_template_data/test_template1.html',
+ 'Line 12:/srv/zulip/tools/tests/test_template_data/test_template2.html'])
+ self.assertEqual(template_id_dict['intro'], [
+ 'Line 10:/srv/zulip/tools/tests/test_template_data/test_template1.html',
+ 'Line 11:/srv/zulip/tools/tests/test_template_data/test_template1.html',
+ 'Line 11:/srv/zulip/tools/tests/test_template_data/test_template2.html'])
+ self.assertEqual(template_id_dict['below_navbar'], ['Line 10:/srv/zulip/tools/tests/test_template_data/test_template2.html'])
+
+ def test_split_for_id_and_class(self):
+ # type: () -> None
+ id1 = "{{ red|blue }}"
+ id2 = "search_box_{{ page }}"
+
+ class1 = "chat_box message"
+ class2 = "stream_{{ topic }}"
+ class3 = "foo {{ a|b|c }} bar"
+
+ self.assertEqual(split_for_id_and_class(id1), ['{{ red|blue }}'])
+ self.assertEqual(split_for_id_and_class(id2), ['search_box_{{ page }}'])
+
+ self.assertEqual(split_for_id_and_class(class1), ['chat_box', 'message'])
+ self.assertEqual(split_for_id_and_class(class2), ['stream_{{ topic }}'])
+ self.assertEqual(split_for_id_and_class(class3), ['foo', '{{ a|b|c }}', 'bar'])
diff --git a/tools/tests/test_template_data/test_template1.html b/tools/tests/test_template_data/test_template1.html
new file mode 100644
--- /dev/null
+++ b/tools/tests/test_template_data/test_template1.html
@@ -0,0 +1,17 @@
+<!-- test -->
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Test</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="intro">
+ <p id="intro">
+ <span id="hello_{{ message }}">Hello World!!</span>
+ This is a test file for checking correct working of duplicate id detection module.
+ </p>
+ </div>
+ </body>
+ </html>
diff --git a/tools/tests/test_template_data/test_template2.html b/tools/tests/test_template_data/test_template2.html
new file mode 100644
--- /dev/null
+++ b/tools/tests/test_template_data/test_template2.html
@@ -0,0 +1,17 @@
+<!-- test -->
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Test</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="below_navbar">
+ <p id="intro">
+ <span id="hello_{{ message }}">Hello World!!</span>
+ This is a test file for checking correct working of duplicate id detection module.
+ </p>
+ </div>
+ </body>
+ </html>
| Lint for duplicate IDs in our HTML
We should have a lint rule that checks for duplicate IDs in our HTML templates.
This would avoid problems like ad513bab3342bbab7089eae20720b0dd9de6ed53.
| Is this looking for duplicate ids within a single template or across all templates?
The code in `tools/lib/html_branches.py` should be able to mostly solve this problem.
@timabbott I can take this up, please guide me to get started on this.
One can start by reading and understanding the script that @showell mentioned, testing it with some print statements, etc., until you understand how it works.
@mahim97 Once you get oriented to this code, check in on Zulip with @tommyip, who also expressed some interest in this issue (not sure how much): https://chat.zulip.org/#narrow/stream/tools/topic/duplicate.20HTML.20IDs
@mahim97 Please go ahead and do it! I was just poking around to see if there is anything I could help. | 2017-01-06T14:20:25 |
zulip/zulip | 3,190 | zulip__zulip-3190 | [
"2628"
] | e6c3aaae120c1cd818bfdbd6c8b8de2376965ac6 | diff --git a/zerver/context_processors.py b/zerver/context_processors.py
--- a/zerver/context_processors.py
+++ b/zerver/context_processors.py
@@ -61,6 +61,8 @@ def add_settings(request):
'development_environment': settings.DEVELOPMENT,
'support_email': settings.ZULIP_ADMINISTRATOR,
'find_team_link_disabled': settings.FIND_TEAM_LINK_DISABLED,
+ 'password_min_length': settings.PASSWORD_MIN_LENGTH,
+ 'password_min_quality': settings.PASSWORD_MIN_ZXCVBN_QUALITY,
}
diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.py
--- a/zproject/prod_settings_template.py
+++ b/zproject/prod_settings_template.py
@@ -121,6 +121,10 @@
# Session cookie expiry in seconds after the last page load
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # 2 weeks
+# Controls password strength requirements
+PASSWORD_MIN_LENGTH = 6
+PASSWORD_MIN_ZXCVBN_QUALITY = 0.4 # 0 to disable
+
# Controls whether or not there is a feedback button in the UI.
ENABLE_FEEDBACK = False
diff --git a/zproject/settings.py b/zproject/settings.py
--- a/zproject/settings.py
+++ b/zproject/settings.py
@@ -191,6 +191,8 @@ def get_secret(key):
'POST_MIGRATION_CACHE_FLUSHING': False,
'ENABLE_FILE_LINKS': False,
'USE_WEBSOCKETS': True,
+ 'PASSWORD_MIN_LENGTH': 6,
+ 'PASSWORD_MIN_ZXCVBN_QUALITY': 0.4,
}
for setting_name, setting_val in six.iteritems(DEFAULT_SETTINGS):
| diff --git a/frontend_tests/casper_tests/00-realm-creation.js b/frontend_tests/casper_tests/00-realm-creation.js
--- a/frontend_tests/casper_tests/00-realm-creation.js
+++ b/frontend_tests/casper_tests/00-realm-creation.js
@@ -63,7 +63,7 @@ casper.then(function () {
full_name: 'Alice',
realm_name: organization_name,
realm_subdomain: subdomain,
- password: 'password',
+ password: 'passwordwhichisreallyreallyreallycomplexandnotguessable',
terms: true,
}, true);
});
diff --git a/frontend_tests/node_tests/password.js b/frontend_tests/node_tests/password.js
new file mode 100644
--- /dev/null
+++ b/frontend_tests/node_tests/password.js
@@ -0,0 +1,70 @@
+add_dependencies({
+ zxcvbn: 'node_modules/zxcvbn/dist/zxcvbn.js',
+});
+
+var common = require("js/common.js");
+
+(function test_basics() {
+ var accepted;
+ var password;
+
+ var bar = (function () {
+ var self = {};
+
+ self.width = function (width) {
+ self.w = width;
+ return self;
+ };
+
+ self.removeClass = function (arg) {
+ assert.equal(arg, 'bar-success bar-danger');
+ return self;
+ };
+
+ self.addClass = function (arg) {
+ self.added_class = arg;
+ return self;
+ };
+
+ return self;
+ }());
+
+ password = 'plain';
+ accepted = common.password_quality(password, bar);
+ assert(!accepted);
+ assert.equal(bar.w, '10.654507557627486%');
+ assert.equal(bar.added_class, 'bar-danger');
+
+ password = 'z!X4@S_&';
+ accepted = common.password_quality(password, bar);
+ assert(accepted);
+ assert.equal(bar.w, '47.679074269445294%');
+ assert.equal(bar.added_class, 'bar-success');
+
+ function password_field(min_length, min_quality) {
+ var self = {};
+
+ self.data = function (field) {
+ if (field === 'minLength') {
+ return min_length;
+ } else if (field === 'minQuality') {
+ return min_quality;
+ }
+ };
+
+ return self;
+ }
+
+ password = 'z!X4@S_&';
+ accepted = common.password_quality(password, bar, password_field(10, 0.10));
+ assert(!accepted);
+ assert.equal(bar.w, '39.7%');
+ assert.equal(bar.added_class, 'bar-danger');
+
+
+ password = 'foo';
+ accepted = common.password_quality(password, bar, password_field(2, 0.001));
+ assert(accepted);
+ assert.equal(bar.w, '10.390277164940581%');
+ assert.equal(bar.added_class, 'bar-success');
+}());
| Set good zxcvbn defaults for production environments
We should add a new server setting controlling how strong passwords are required in Zulip, using zxcvbn's logic. We can make it a server-level configuration parameter (see http://zulip.readthedocs.io/en/latest/settings.html). `git grep zxcvbn` should make it easy to find the code needing modification to implement this.
It's important that we do the error messages for too-weak-passwords carefully.
| I guess I'm going to work on this one :smiley: | 2017-01-09T17:06:10 |
zulip/zulip | 3,217 | zulip__zulip-3217 | [
"3210"
] | 4d10c4274bf83d208ebb2d92727e3e203c19674c | diff --git a/contrib_bots/run.py b/contrib_bots/run.py
--- a/contrib_bots/run.py
+++ b/contrib_bots/run.py
@@ -6,6 +6,7 @@
import optparse
import os
import sys
+import time
our_dir = os.path.dirname(os.path.abspath(__file__))
@@ -15,11 +16,27 @@
from zulip import Client
+class RateLimit(object):
+ def __init__(self, message_limit, interval_limit):
+ self.message_limit = message_limit
+ self.interval_limit = interval_limit
+ self.message_list = []
+
+ def is_legal(self):
+ self.message_list.append(time.time())
+ if len(self.message_list) > self.message_limit:
+ self.message_list.pop(0)
+ time_diff = self.message_list[-1] - self.message_list[0]
+ return time_diff >= self.interval_limit
+ else:
+ return True
+
class RestrictedClient(object):
def __init__(self, client):
# Only expose a subset of our Client's functionality
user_profile = client.get_profile()
- self.send_message = client.send_message
+ self.rate_limit = RateLimit(20, 5)
+ self.client = client
try:
self.full_name = user_profile['full_name']
self.email = user_profile['email']
@@ -28,6 +45,15 @@ def __init__(self, client):
' up the zuliprc file correctly.')
sys.exit(1)
+ def send_message(self, *args, **kwargs):
+ if self.rate_limit.is_legal():
+ self.client.send_message(*args, **kwargs)
+ else:
+ logging.error('-----> !*!*!*MESSAGE RATE LIMIT REACHED, EXITING*!*!*! <-----\n'
+ 'Is your bot trapped in an infinite loop by reacting to'
+ ' its own messages?')
+ sys.exit(1)
+
def get_lib_module(lib_fn):
lib_fn = os.path.abspath(lib_fn)
if not os.path.dirname(lib_fn).startswith(os.path.join(our_dir, 'lib')):
| contrib_bots: Prevent runaway bots with rate limiting
It's possible to create a runaway bot if you have a bot send a message to certain stimuli that in turns becomes a stimulus for the bot to send another message and so on and so forth.
We can prevent that in `contrib_bots/run.py` by adding some logic to prevent runaway bots.
Right now RestrictedClient make self.send_message just be client.send_message, but we can instead have a wrapper like this:
```
def send_message(self, *args, **kwargs):
self.rate_limit()
self.client.send_message(*args, **kwargs)
```
And then have appropriate logic in `rate_limit()` and some state variable to make sure less than N messages have been sent in the last second. It might make sense to have a small class for rate limiting that RestrictedClient uses an instance of.
You can do a pretty naive rate limiting scheme where you just keep the last N timestamps in a Python list and truncate it off the front as new sends come in and the list grows to size N+1.
| Working on this :) | 2017-01-10T20:52:11 |
|
zulip/zulip | 3,275 | zulip__zulip-3275 | [
"3271"
] | b6476fdd81ccadb4c24b026025497472a3168f13 | diff --git a/api/zulip/__init__.py b/api/zulip/__init__.py
--- a/api/zulip/__init__.py
+++ b/api/zulip/__init__.py
@@ -681,7 +681,7 @@ def render_message(self, request=None):
'''
return self.call_endpoint(
url='messages/render',
- method='GET',
+ method='POST',
request=request,
)
diff --git a/zproject/urls.py b/zproject/urls.py
--- a/zproject/urls.py
+++ b/zproject/urls.py
@@ -213,7 +213,7 @@
{'GET': 'zerver.views.messages.json_fetch_raw_message',
'PATCH': 'zerver.views.messages.json_update_message'}),
url(r'^messages/render$', rest_dispatch,
- {'GET': 'zerver.views.messages.render_message_backend'}),
+ {'POST': 'zerver.views.messages.render_message_backend'}),
url(r'^messages/flags$', rest_dispatch,
{'POST': 'zerver.views.messages.update_message_flags'}),
| diff --git a/zerver/tests/test_bugdown.py b/zerver/tests/test_bugdown.py
--- a/zerver/tests/test_bugdown.py
+++ b/zerver/tests/test_bugdown.py
@@ -839,7 +839,7 @@ class BugdownApiTests(ZulipTestCase):
def test_render_message_api(self):
# type: () -> None
content = 'That is a **bold** statement'
- result = self.client_get(
+ result = self.client_post(
'/api/v1/messages/render',
dict(content=content),
**self.api_auth('[email protected]')
@@ -853,7 +853,7 @@ def test_render_mention_stream_api(self):
# type: () -> None
"""Determines whether we're correctly passing the realm context"""
content = 'This mentions #**Denmark** and @**King Hamlet**.'
- result = self.client_get(
+ result = self.client_post(
'/api/v1/messages/render',
dict(content=content),
**self.api_auth('[email protected]')
| Preview feature doesn't work with long messages
If you put this message into the compose box and click the preview button, it doesn't work, because we try to send the entire message body as a GET URL parameter, and we overflow maximum lengths for those.
We should move this into the body of the request (probably means switching it to POST), not URL parameters.
```
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678_012345678901234567890123456789012345678
```
| 2017-01-13T00:25:26 |
|
zulip/zulip | 3,286 | zulip__zulip-3286 | [
"3281"
] | b6476fdd81ccadb4c24b026025497472a3168f13 | diff --git a/api/zulip/__init__.py b/api/zulip/__init__.py
--- a/api/zulip/__init__.py
+++ b/api/zulip/__init__.py
@@ -659,11 +659,11 @@ def get_subscribers(self, **request):
'''
Example usage: client.get_subscribers(stream='devel')
'''
- request_stream_id = self.get_stream_id(request['stream'])
- try:
- stream_id = request_stream_id['stream_id']
- except KeyError:
- return request_stream_id
+ response = self.get_stream_id(request['stream'])
+ if response['result'] == 'error':
+ return response
+
+ stream_id = response['stream_id']
url = 'streams/%d/members' % (stream_id,)
return self.call_endpoint(
url=url,
| Followup Zulip API client `get_subscribers()`
See: https://chat.zulip.org/#narrow/near/125228/stream/backend/topic/Issue.20.231709
In Zulip API client, there is a function named `get_subscribers()`. This function has just been modified by a new commit that replace all `stream_name` with `stream_id` https://github.com/zulip/zulip/commit/d3ee53bdef75eb1fe6b71fb008c754b005a29ce2
And there is a exception, that's not handled correctly and hard to read.
```diff py
- stream = urllib.parse.quote(request['stream'], safe='')
- url = 'streams/%s/members' % (stream,)
+ request_stream_id = self.get_stream_id(request['stream'])
+ try:
+ stream_id = request_stream_id['stream_id']
+ except KeyError:
+ return request_stream_id
+ url = 'streams/%d/members' % (stream_id,)
```
Look at the `except KeyError:`, many developer will confused with that. The error handling here is not optimal, we could do something better than this..
| Working on this.. | 2017-01-13T11:52:22 |
|
zulip/zulip | 3,414 | zulip__zulip-3414 | [
"3403"
] | 15c4ae9ea94d416caf16230e7480af6c37068e67 | diff --git a/zproject/backends.py b/zproject/backends.py
--- a/zproject/backends.py
+++ b/zproject/backends.py
@@ -17,9 +17,9 @@
from apiclient.sample_tools import client as googleapiclient
from oauth2client.crypt import AppIdentityError
-from social.backends.github import GithubOAuth2, GithubOrganizationOAuth2, \
+from social_core.backends.github import GithubOAuth2, GithubOrganizationOAuth2, \
GithubTeamOAuth2
-from social.exceptions import AuthFailed
+from social_core.exceptions import AuthFailed
from django.contrib.auth import authenticate
from zerver.lib.utils import check_subdomain, get_subdomain
diff --git a/zproject/settings.py b/zproject/settings.py
--- a/zproject/settings.py
+++ b/zproject/settings.py
@@ -350,7 +350,7 @@ def get_secret(key):
'guardian',
'pipeline',
'zerver',
- 'social.apps.django_app.default',
+ 'social_django',
]
if USING_PGROONGA:
INSTALLED_APPS += ['pgroonga']
diff --git a/zproject/urls.py b/zproject/urls.py
--- a/zproject/urls.py
+++ b/zproject/urls.py
@@ -384,7 +384,7 @@
]
# Python Social Auth
-urls += [url(r'^', include('social.apps.django_app.urls', namespace='social'))]
+urls += [url(r'^', include('social_django.urls', namespace='social'))]
# User documentation site
urls += [url(r'^help/(?P<article>.*)$', HelpView.as_view(template_name='zerver/help/main.html'))]
| diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py
--- a/zerver/tests/test_auth_backends.py
+++ b/zerver/tests/test_auth_backends.py
@@ -36,10 +36,10 @@
from zerver.views.auth import maybe_send_to_registration
-from social.exceptions import AuthFailed
-from social.strategies.django_strategy import DjangoStrategy
-from social.storage.django_orm import BaseDjangoStorage
-from social.backends.github import GithubOrganizationOAuth2, GithubTeamOAuth2, \
+from social_core.exceptions import AuthFailed
+from social_django.strategy import DjangoStrategy
+from social_django.storage import BaseDjangoStorage
+from social_core.backends.github import GithubOrganizationOAuth2, GithubTeamOAuth2, \
GithubOAuth2
from six.moves import urllib
@@ -359,7 +359,7 @@ def test_full_name_with_missing_key(self):
def test_github_backend_do_auth_without_subdomains(self):
# type: () -> None
- with mock.patch('social.backends.github.GithubOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubOAuth2.do_auth',
side_effect=self.do_auth), \
mock.patch('zerver.views.auth.login'):
response = dict(email=self.email, name=self.name)
@@ -368,7 +368,7 @@ def test_github_backend_do_auth_without_subdomains(self):
def test_github_backend_do_auth_with_non_existing_subdomain(self):
# type: () -> None
- with mock.patch('social.backends.github.GithubOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubOAuth2.do_auth',
side_effect=self.do_auth):
with self.settings(REALMS_HAVE_SUBDOMAINS=True):
self.backend.strategy.session_set('subdomain', 'test')
@@ -378,7 +378,7 @@ def test_github_backend_do_auth_with_non_existing_subdomain(self):
def test_github_backend_do_auth_with_subdomains(self):
# type: () -> None
- with mock.patch('social.backends.github.GithubOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubOAuth2.do_auth',
side_effect=self.do_auth):
with self.settings(REALMS_HAVE_SUBDOMAINS=True):
self.backend.strategy.session_set('subdomain', 'zulip')
@@ -388,7 +388,7 @@ def test_github_backend_do_auth_with_subdomains(self):
def test_github_backend_do_auth_for_default(self):
# type: () -> None
- with mock.patch('social.backends.github.GithubOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubOAuth2.do_auth',
side_effect=self.do_auth), \
mock.patch('zproject.backends.SocialAuthMixin.process_do_auth') as result:
response = dict(email=self.email, name=self.name)
@@ -401,7 +401,7 @@ def test_github_backend_do_auth_for_default(self):
def test_github_backend_do_auth_for_team(self):
# type: () -> None
- with mock.patch('social.backends.github.GithubTeamOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubTeamOAuth2.do_auth',
side_effect=self.do_auth), \
mock.patch('zproject.backends.SocialAuthMixin.process_do_auth') as result:
response = dict(email=self.email, name=self.name)
@@ -415,7 +415,7 @@ def test_github_backend_do_auth_for_team(self):
def test_github_backend_do_auth_for_team_auth_failed(self):
# type: () -> None
- with mock.patch('social.backends.github.GithubTeamOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubTeamOAuth2.do_auth',
side_effect=AuthFailed('Not found')), \
mock.patch('logging.info'), \
mock.patch('zproject.backends.SocialAuthMixin.process_do_auth') as result:
@@ -429,7 +429,7 @@ def test_github_backend_do_auth_for_team_auth_failed(self):
def test_github_backend_do_auth_for_org(self):
# type: () -> None
- with mock.patch('social.backends.github.GithubOrganizationOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubOrganizationOAuth2.do_auth',
side_effect=self.do_auth), \
mock.patch('zproject.backends.SocialAuthMixin.process_do_auth') as result:
response = dict(email=self.email, name=self.name)
@@ -443,7 +443,7 @@ def test_github_backend_do_auth_for_org(self):
def test_github_backend_do_auth_for_org_auth_failed(self):
# type: () -> None
- with mock.patch('social.backends.github.GithubOrganizationOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubOrganizationOAuth2.do_auth',
side_effect=AuthFailed('Not found')), \
mock.patch('logging.info'), \
mock.patch('zproject.backends.SocialAuthMixin.process_do_auth') as result:
@@ -474,7 +474,7 @@ def do_auth_inactive(*args, **kwargs):
return self.user_profile
with mock.patch('zerver.views.auth.login_or_register_remote_user') as result, \
- mock.patch('social.backends.github.GithubOAuth2.do_auth',
+ mock.patch('social_core.backends.github.GithubOAuth2.do_auth',
side_effect=do_auth_inactive):
response = dict(email=self.email, name=self.name)
user = self.backend.do_auth(response=response)
@@ -495,7 +495,7 @@ def do_auth(*args, **kwargs):
return_data['valid_attestation'] = True
return None
- with mock.patch('social.backends.github.GithubOAuth2.do_auth',
+ with mock.patch('social_core.backends.github.GithubOAuth2.do_auth',
side_effect=do_auth):
response = dict(email='[email protected]', name='Ghost')
result = self.backend.do_auth(response=response)
| requirements: Upgrade python-social-auth to latest version
Upgrading python-social-auth (requirements/py2_socialauth.txt, requirements/py3_socialauth.txt) directly to the latest version should break the code. So you may have to make some changes in the codebase or add some extra dependencies for upgrading.
| I'm working on this
@sinwar Cool. You should take a look at this link then. https://github.com/omab/python-social-auth/blob/master/MIGRATING_TO_SOCIAL.md | 2017-01-21T15:54:48 |
zulip/zulip | 3,428 | zulip__zulip-3428 | [
"1778"
] | c49789778cafe8fb1d8a955c631daf4f137d8138 | diff --git a/tools/lib/pretty_print.py b/tools/lib/pretty_print.py
new file mode 100644
--- /dev/null
+++ b/tools/lib/pretty_print.py
@@ -0,0 +1,119 @@
+from __future__ import absolute_import
+from __future__ import print_function
+
+from typing import Any
+
+from .template_parser import (
+ tokenize,
+ Token,
+)
+from six.moves import range
+
+def pretty_print_html(html, num_spaces=4):
+ # type: (str, int) -> str
+ # We use 1-based indexing for both rows and columns.
+ tokens = tokenize(html)
+ lines = html.split('\n')
+
+ # We will keep a stack of "start" tags so that we know
+ # when HTML ranges end. Note that some start tags won't
+ # be blocks from an indentation standpoint.
+ stack = [] # type: List[Dict[str, Any]]
+
+ # Seed our stack with a pseudo entry to make depth calculations
+ # easier.
+ info = dict(
+ block=False,
+ depth=-1,
+ line=-1,
+ token_kind='html_start',
+ extra_indent=0)
+ stack.append(info)
+
+ # Our main job is to figure out offsets that we use to nudge lines
+ # over by.
+ offsets = {} # type: Dict[int, int]
+
+ # Loop through our start/end tokens, and calculate offsets. As
+ # we proceed, we will push/pop info dictionaries on/off a stack.
+ for token in tokens:
+
+ if token.kind in ('html_start', 'handlebars_start'):
+ # An HTML start tag should only cause a new indent if we
+ # are on a new line.
+ is_block = token.line > stack[-1]['line']
+
+ if is_block:
+ if token.kind == 'handlebars_start' and stack[-1]['token_kind'] == 'handlebars_start':
+ info = stack.pop()
+ info['depth'] = info['depth'] + 1
+ stack.append(info)
+ new_depth = stack[-1]['depth'] + 1
+ extra_indent = stack[-1]['extra_indent']
+ line = lines[token.line - 1]
+ adjustment = len(line)-len(line.lstrip()) + 1
+ offset = (1 + extra_indent + new_depth * num_spaces) - adjustment
+ info = dict(
+ block=True,
+ depth=new_depth,
+ actual_depth=new_depth,
+ line=token.line,
+ token_kind=token.kind,
+ offset=offset,
+ extra_indent=token.col - adjustment + extra_indent
+ )
+ if token.kind == 'handlebars_start':
+ info.update(dict(depth=new_depth - 1))
+ else:
+ info = dict(
+ block=False,
+ line=token.line
+ )
+ stack.append(info)
+ elif token.kind in ('html_end', 'handlebars_end'):
+ info = stack.pop()
+ if info['block']:
+ # We are at the end of an indentation block. We
+ # assume the whole block was formatted ok before, just
+ # possibly at an indentation that we don't like, so we
+ # nudge over all lines in the block by the same offset.
+ start_line = info['line']
+ end_line = token.line
+ offsets[start_line] = info['offset']
+ offsets[end_line] = info['offset']
+ if token.tag != 'pre':
+ for line_num in range(start_line + 1, end_line):
+ # Be careful not to override offsets that happened
+ # deeper in the HTML within our block.
+ if line_num not in offsets:
+ line = lines[line_num - 1]
+ new_depth = info['depth'] + 1
+ if line.lstrip().startswith('{{else}}'):
+ new_depth = info['actual_depth']
+ extra_indent = info['extra_indent']
+ adjustment = len(line)-len(line.lstrip()) + 1
+ offset = (1 + extra_indent + new_depth * num_spaces) - adjustment
+ offsets[line_num] = offset
+ else:
+ for line_num in range(start_line + 1, end_line):
+ if line_num not in offsets:
+ offsets[line_num] = info['offset']
+
+ # Now that we have all of our offsets calculated, we can just
+ # join all our lines together, fixing up offsets as needed.
+ formatted_lines = []
+ for i, line in enumerate(html.split('\n')):
+ row = i + 1
+ offset = offsets.get(row, 0)
+ pretty_line = line
+ if line.strip() == '':
+ pretty_line = ''
+ else:
+ if offset > 0:
+ pretty_line = (' ' * offset) + pretty_line
+ elif offset < 0:
+ pretty_line = pretty_line[-1 * offset:]
+ assert line.strip() == pretty_line.strip()
+ formatted_lines.append(pretty_line)
+
+ return '\n'.join(formatted_lines)
| diff --git a/tools/tests/test_pretty_print.py b/tools/tests/test_pretty_print.py
new file mode 100644
--- /dev/null
+++ b/tools/tests/test_pretty_print.py
@@ -0,0 +1,205 @@
+from __future__ import absolute_import
+from __future__ import print_function
+
+import unittest
+
+from tools.lib.pretty_print import pretty_print_html
+
+# Note that GOOD_HTML isn't necessarily beautiful HTML. Apart
+# from adjusting indentation, we mostly leave things alone to
+# respect whatever line-wrapping styles were in place before.
+
+BAD_HTML = """
+<!-- test -->
+<!DOCTYPE html>
+
+
+
+<html>
+ <!-- test -->
+ <head>
+ <title>Test</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div><p>Hello<br />world!</p></div>
+ <p>Goodbye<!-- test -->world!</p>
+ <table>
+ <tr>
+ <td>5</td>
+ </tr>
+ </table>
+ <pre>
+ print 'hello world'
+ </pre>
+ <div class = "foo"
+ id = "bar"
+ role = "whatever">{{ bla }}</div>
+ </body>
+</html>
+<!-- test -->
+"""
+
+GOOD_HTML = """
+<!-- test -->
+<!DOCTYPE html>
+
+
+
+<html>
+ <!-- test -->
+ <head>
+ <title>Test</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div><p>Hello<br />world!</p></div>
+ <p>Goodbye<!-- test -->world!</p>
+ <table>
+ <tr>
+ <td>5</td>
+ </tr>
+ </table>
+ <pre>
+ print 'hello world'
+ </pre>
+ <div class = "foo"
+ id = "bar"
+ role = "whatever">{{ bla }}</div>
+ </body>
+</html>
+<!-- test -->
+"""
+
+BAD_HTML1 = """
+<html>
+ <body>
+ foobarfoobarfoo<b>bar</b>
+ </body>
+</html>
+"""
+
+GOOD_HTML1 = """
+<html>
+ <body>
+ foobarfoobarfoo<b>bar</b>
+ </body>
+</html>
+"""
+
+BAD_HTML2 = """
+<html>
+ <body>
+ {{# foobar area}}
+ foobarfoobarfoo<b>bar</b>
+ {{/ foobar area}}
+ </body>
+</html>
+"""
+
+GOOD_HTML2 = """
+<html>
+ <body>
+ {{# foobar area}}
+ foobarfoobarfoo<b>bar</b>
+ {{/ foobar area}}
+ </body>
+</html>
+"""
+
+BAD_HTML3 = """
+<html>
+ <body>
+ {{# foobar area}}
+ foobarfoobar<blockquote>
+ <p>
+ FOOBAR
+ </p>
+ </blockquote>
+ {{/ foobar area}}
+ </body>
+</html>
+"""
+
+GOOD_HTML3 = """
+<html>
+ <body>
+ {{# foobar area}}
+ foobarfoobar<blockquote>
+ <p>
+ FOOBAR
+ </p>
+ </blockquote>
+ {{/ foobar area}}
+ </body>
+</html>
+"""
+
+BAD_HTML4 = """
+<div>
+ foo
+ <p>hello</p>
+ bar
+</div>
+"""
+
+GOOD_HTML4 = """
+<div>
+ foo
+ <p>hello</p>
+ bar
+</div>
+"""
+
+BAD_HTML5 = """
+<div>
+ foo
+ {{#if foobar}}
+ hello
+ {{else}}
+ bye
+ {{/if}}
+ bar
+</div>
+"""
+
+GOOD_HTML5 = """
+<div>
+ foo
+ {{#if foobar}}
+ hello
+ {{else}}
+ bye
+ {{/if}}
+ bar
+</div>
+"""
+
+BAD_HTML6 = """
+<div>
+ <p> <strong> <span class = "whatever">foobar </span> </strong></p>
+</div>
+"""
+
+GOOD_HTML6 = """
+<div>
+ <p> <strong> <span class = "whatever">foobar </span> </strong></p>
+</div>
+"""
+class TestPrettyPrinter(unittest.TestCase):
+ def compare(self, a, b):
+ # type: (str, str) -> None
+ self.assertEqual(a.split('\n'), b.split('\n'))
+
+ def test_pretty_print(self):
+ # type: () -> None
+ self.compare(pretty_print_html(GOOD_HTML), GOOD_HTML)
+ self.compare(pretty_print_html(BAD_HTML), GOOD_HTML)
+ self.compare(pretty_print_html(BAD_HTML1), GOOD_HTML1)
+ self.compare(pretty_print_html(BAD_HTML2), GOOD_HTML2)
+ self.compare(pretty_print_html(BAD_HTML3), GOOD_HTML3)
+ self.compare(pretty_print_html(BAD_HTML4), GOOD_HTML4)
+ self.compare(pretty_print_html(BAD_HTML5), GOOD_HTML5)
+ self.compare(pretty_print_html(BAD_HTML6), GOOD_HTML6)
| (wip) Add ability to pretty-print HTML (lib only).
| _Automated message from Dropbox CLA bot_
@showell, it looks like you've already signed the Dropbox CLA. Thanks!
ping @timabbott I'm leaving this open in the hopes of having somebody else take this to the finish line, but if it gets too stale and I have a little break between projects, I can finish this.
| 2017-01-22T15:02:06 |
zulip/zulip | 3,596 | zulip__zulip-3596 | [
"3508"
] | 7a174791f19f45cd99305ad9acbf3da089ac40ea | diff --git a/contrib_bots/bots/wikipedia/wikipedia.py b/contrib_bots/bots/wikipedia/wikipedia.py
--- a/contrib_bots/bots/wikipedia/wikipedia.py
+++ b/contrib_bots/bots/wikipedia/wikipedia.py
@@ -60,12 +60,12 @@ def handle_message(self, message, client, state_handler):
logging.error('unsuccessful data')
return
- search_string = data.json()['query']['search'][0]['title'].replace(' ', '_')
- url = 'https://wikipedia.org/wiki/' + search_string
new_content = 'For search term "' + query
if len(data.json()['query']['search']) == 0:
new_content = 'I am sorry. The search term you provided is not found :slightly_frowning_face:'
else:
+ search_string = data.json()['query']['search'][0]['title'].replace(' ', '_')
+ url = 'https://en.wikipedia.org/wiki/' + search_string
new_content = new_content + '", ' + url
client.send_message(dict(
| Wikipedia bot crashes when the query contains multiple word delimit by underscore.
The bot is under `contrib_bots/bots`. Some error handling is needed.
| @tommyip I edited your description to have a bit more context for someone not familiar with what this is (just the path to the file). It's good practice to include that sort of detail since it's generally fast to enter and can save a lot of time for someone picking up the project.
@tommyip could you give an example to what breaks the bot?
@lonerz
Works:
`multiple word`
Crash:
`multiple_word`
Has this issue been solved
When i tried to test it the wikipedia bot doesn't crash when the query contains multiple words separated by underscore | 2017-02-06T16:38:01 |
|
zulip/zulip | 3,693 | zulip__zulip-3693 | [
"3669"
] | 5f2e320feebe16caa8c84565bc2d43a529d91152 | diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.py
--- a/zproject/prod_settings_template.py
+++ b/zproject/prod_settings_template.py
@@ -68,21 +68,23 @@
# SSO_APPEND_DOMAIN = "example.com")
SSO_APPEND_DOMAIN = None # type: str
-# Configure the outgoing SMTP server below. For testing, you can skip
-# sending emails entirely by commenting out EMAIL_HOST, but you will
-# want to configure this to support email address confirmation emails,
-# missed message emails, onboarding follow-up emails, etc. To
-# configure SMTP, you will need to complete the following steps:
+# Configure the outgoing SMTP server below. You will need working
+# SMTP to complete the installation process, in addition to sending
+# email address confirmations, missed message notifications, onboarding
+# follow-ups, and other user needs. If you do not have an SMTP server
+# already, we recommend services intended for developers such as Mailgun.
+#
+# To configure SMTP, you will need to complete the following steps:
#
# (1) Fill out the outgoing email sending configuration below.
#
# (2) Put the SMTP password for EMAIL_HOST_USER in
# /etc/zulip/zulip-secrets.conf as email_password.
#
-# (3) If you are using a gmail account to send outgoing email, you
+# If you are using a gmail account to send outgoing email, you
# will likely need to read this Google support answer and configure
# that account as "less secure":
-# https://support.google.com/mail/answer/14257.
+# https://support.google.com/accounts/answer/6010255
#
# You can quickly test your sending email configuration using:
# su zulip
diff --git a/zproject/settings.py b/zproject/settings.py
--- a/zproject/settings.py
+++ b/zproject/settings.py
@@ -108,6 +108,7 @@ def get_secret(key):
'EMAIL_GATEWAY_IMAP_PORT': None,
'EMAIL_GATEWAY_IMAP_FOLDER': None,
'EMAIL_GATEWAY_EXTRA_PATTERN_HACK': None,
+ 'EMAIL_HOST': None,
'S3_KEY': '',
'S3_SECRET_KEY': '',
'S3_AVATAR_BUCKET': '',
| prod install fails if EMAIL_HOST isn't set
The comment in settings.py says you can leave EMAIL_HOST commented out, but when you try to initialize the database, you get an exception complaining EMAIL_HOST isn't defined.
Is the comment incorrect? Or should this work?
```
# Configure the outgoing SMTP server below. For testing, you can skip
# sending emails entirely by commenting out EMAIL_HOST, but you will
# want to configure this to support email address confirmation emails,
# missed message emails, onboarding follow-up emails, etc. To
# configure SMTP, you will need to complete the following steps:
#
# (1) Fill out the outgoing email sending configuration below.
#
# (2) Put the SMTP password for EMAIL_HOST_USER in
# /etc/zulip/zulip-secrets.conf as email_password.
#
# (3) If you are using a gmail account to send outgoing email, you
# will likely need to read this Google support answer and configure
# that account as "less secure":
# https://support.google.com/mail/answer/14257.
#
# You can quickly test your sending email configuration using:
# su zulip
# /home/zulip/deployments/current/manage.py send_test_email [email protected]
#
# A common problem is hosting providers that block outgoing SMTP traffic.
#
# With the exception of reading EMAIL_HOST_PASSWORD from
# email_password in the Zulip secrets file, Zulip uses Django's
# standard EmailBackend, so if you're having issues, you may want to
# search for documentation on using your email provider with Django.
```
```
root@minmi:~# su zulip -c /home/zulip/deployments/current/scripts/setup/initialize-database++ dirname /home/zulip/deployments/current/scripts/setup/initialize-database
+ cd /home/zulip/deployments/current/scripts/setup/../..
+ ./manage.py checkconfig
Traceback (most recent call last):
File "/home/zulip/deployments/2017-02-14-00-03-09/scripts/lib/log-management-command", line 15, in <module>
if not os.path.exists(settings.MANAGEMENT_LOG_PATH):
File "/home/zulip/deployments/2017-02-14-00-03-09/zulip-venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
self._setup(name)
File "/home/zulip/deployments/2017-02-14-00-03-09/zulip-venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/home/zulip/deployments/2017-02-14-00-03-09/zulip-venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 97, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/zulip/deployments/2017-02-14-00-03-09/zproject/settings.py", line 1098, in <module>
if not EMAIL_HOST and PRODUCTION:
NameError: name 'EMAIL_HOST' is not defined
Traceback (most recent call last):
File "./manage.py", line 22, in <module>
" ".join(sys.argv)])
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/zulip/deployments/2017-02-14-00-03-09/scripts/lib/log-management-command', './manage.py checkconfig']' returned non-zero exit status 1
```
| Nice find. I think we just need to add `EMAIL_HOST` with a default of None in DEFAULT_SETTINGS.
`'EMAIL_HOST': None` in the Django settings.py does let you get past that error. But you still need the confirmation email to finish creating your realm. I looked to see if it was logged, but I didn't see where.
After trying it, I think the comment is too encouraging. I set up working SMTP anyway to get the confirmation email.
If providing an easier "for testing" path is a goal, I'd rather have specific instructions for that. For example, it could include how to do it without real SSL certs and domain name. (Which is only noted at the bottom of the SSL certs page.)
Yeah, I think the comment is out of date; it predates the `manage.py generate_realm_creation_link` flow. | 2017-02-16T02:23:50 |
|
zulip/zulip | 3,742 | zulip__zulip-3742 | [
"1268"
] | 7a75ed9c4a8219e4ad1efe3f6863e13e2ffc1de6 | diff --git a/tools/lib/template_parser.py b/tools/lib/template_parser.py
--- a/tools/lib/template_parser.py
+++ b/tools/lib/template_parser.py
@@ -5,8 +5,19 @@
import re
class TemplateParserException(Exception):
- # TODO: Have callers pass in line numbers.
- pass
+ def __init__(self, message):
+ # type: (str) -> None
+ self.message = message
+
+ def __str__(self):
+ # type: () -> str
+ return self.message
+
+class TokenizationException(Exception):
+ def __init__(self, message, line_content=None):
+ # type: (str, str) -> None
+ self.message = message
+ self.line_content = line_content
class TokenizerState(object):
def __init__(self):
@@ -72,48 +83,53 @@ def looking_at_django_end():
tokens = []
while state.i < len(text):
- if looking_at_comment():
- s = get_html_comment(text, state.i)
- tag = s[4:-3]
- kind = 'html_comment'
- elif looking_at_html_start():
- s = get_html_tag(text, state.i)
- tag_parts = s[1:-1].split()
-
- if not tag_parts:
- raise TemplateParserException("Tag name missing")
-
- tag = tag_parts[0]
-
- if is_special_html_tag(s, tag):
- kind = 'html_special'
- elif s.endswith('/>'):
- kind = 'html_singleton'
+ try:
+ if looking_at_comment():
+ s = get_html_comment(text, state.i)
+ tag = s[4:-3]
+ kind = 'html_comment'
+ elif looking_at_html_start():
+ s = get_html_tag(text, state.i)
+ tag_parts = s[1:-1].split()
+
+ if not tag_parts:
+ raise TemplateParserException("Tag name missing")
+
+ tag = tag_parts[0]
+
+ if is_special_html_tag(s, tag):
+ kind = 'html_special'
+ elif s.endswith('/>'):
+ kind = 'html_singleton'
+ else:
+ kind = 'html_start'
+ elif looking_at_html_end():
+ s = get_html_tag(text, state.i)
+ tag = s[2:-1]
+ kind = 'html_end'
+ elif looking_at_handlebars_start():
+ s = get_handlebars_tag(text, state.i)
+ tag = s[3:-2].split()[0]
+ kind = 'handlebars_start'
+ elif looking_at_handlebars_end():
+ s = get_handlebars_tag(text, state.i)
+ tag = s[3:-2]
+ kind = 'handlebars_end'
+ elif looking_at_django_start():
+ s = get_django_tag(text, state.i)
+ tag = s[3:-2].split()[0]
+ kind = 'django_start'
+ elif looking_at_django_end():
+ s = get_django_tag(text, state.i)
+ tag = s[6:-3]
+ kind = 'django_end'
else:
- kind = 'html_start'
- elif looking_at_html_end():
- s = get_html_tag(text, state.i)
- tag = s[2:-1]
- kind = 'html_end'
- elif looking_at_handlebars_start():
- s = get_handlebars_tag(text, state.i)
- tag = s[3:-2].split()[0]
- kind = 'handlebars_start'
- elif looking_at_handlebars_end():
- s = get_handlebars_tag(text, state.i)
- tag = s[3:-2]
- kind = 'handlebars_end'
- elif looking_at_django_start():
- s = get_django_tag(text, state.i)
- tag = s[3:-2].split()[0]
- kind = 'django_start'
- elif looking_at_django_end():
- s = get_django_tag(text, state.i)
- tag = s[6:-3]
- kind = 'django_end'
- else:
- advance(1)
- continue
+ advance(1)
+ continue
+ except TokenizationException as e:
+ raise TemplateParserException('''%s at Line %d Col %d:"%s"''' %
+ (e.message, state.line, state.col,
+ e.line_content))
token = Token(
kind=kind,
@@ -249,7 +265,7 @@ def get_handlebars_tag(text, i):
while end < len(text) - 1 and text[end] != '}':
end += 1
if text[end] != '}' or text[end+1] != '}':
- raise TemplateParserException('Tag missing }}')
+ raise TokenizationException('Tag missing "}}"', text[i:end+2])
s = text[i:end+2]
return s
@@ -259,7 +275,7 @@ def get_django_tag(text, i):
while end < len(text) - 1 and text[end] != '%':
end += 1
if text[end] != '%' or text[end+1] != '}':
- raise TemplateParserException('Tag missing %}')
+ raise TokenizationException('Tag missing "%}"', text[i:end+2])
s = text[i:end+2]
return s
@@ -267,20 +283,31 @@ def get_html_tag(text, i):
# type: (str, int) -> str
quote_count = 0
end = i + 1
- while end < len(text) and (text[end] != '>' or quote_count % 2 != 0):
+ unclosed_end = 0
+ while end < len(text) and (text[end] != '>' or quote_count % 2 != 0 and text[end] != '<'):
if text[end] == '"':
quote_count += 1
+ if not unclosed_end and text[end] == '<':
+ unclosed_end = end
end += 1
+ if quote_count % 2 != 0:
+ if unclosed_end:
+ raise TokenizationException('Unbalanced Quotes', text[i:unclosed_end])
+ else:
+ raise TokenizationException('Unbalanced Quotes', text[i:end+1])
if end == len(text) or text[end] != '>':
- raise TemplateParserException('Tag missing >')
+ raise TokenizationException('Tag missing ">"', text[i:end+1])
s = text[i:end+1]
return s
def get_html_comment(text, i):
# type: (str, int) -> str
end = i + 7
+ unclosed_end = 0
while end <= len(text):
if text[end-3:end] == '-->':
return text[i:end]
+ if not unclosed_end and text[end] == '<':
+ unclosed_end = end
end += 1
- raise TemplateParserException('Unclosed comment')
+ raise TokenizationException('Unclosed comment', text[i:unclosed_end])
| diff --git a/tools/tests/test_template_parser.py b/tools/tests/test_template_parser.py
--- a/tools/tests/test_template_parser.py
+++ b/tools/tests/test_template_parser.py
@@ -112,42 +112,51 @@ def test_validate_incomplete_handlebars_tag_1(self):
my_html = '''
{{# foo
'''
- self._assert_validate_error('Tag missing }}', text=my_html)
+ self._assert_validate_error('''Tag missing "}}" at Line 2 Col 13:"{{# foo
+ "''', text=my_html)
def test_validate_incomplete_handlebars_tag_2(self):
# type: () -> None
my_html = '''
{{# foo }
'''
- self._assert_validate_error('Tag missing }}', text=my_html)
+ self._assert_validate_error('Tag missing "}}" at Line 2 Col 13:"{{# foo }\n"', text=my_html)
def test_validate_incomplete_django_tag_1(self):
# type: () -> None
my_html = '''
{% foo
'''
- self._assert_validate_error('Tag missing %}', text=my_html)
+ self._assert_validate_error('''Tag missing "%}" at Line 2 Col 13:"{% foo
+ "''', text=my_html)
def test_validate_incomplete_django_tag_2(self):
# type: () -> None
my_html = '''
{% foo %
'''
- self._assert_validate_error('Tag missing %}', text=my_html)
+ self._assert_validate_error('Tag missing "%}" at Line 2 Col 13:"{% foo %\n"', text=my_html)
def test_validate_incomplete_html_tag_1(self):
# type: () -> None
my_html = '''
<b
'''
- self._assert_validate_error('Tag missing >', text=my_html)
+ self._assert_validate_error('''Tag missing ">" at Line 2 Col 13:"<b
+ "''', text=my_html)
def test_validate_incomplete_html_tag_2(self):
# type: () -> None
my_html = '''
<a href="
'''
- self._assert_validate_error('Tag missing >', text=my_html)
+ my_html1 = '''
+ <a href=""
+ '''
+ self._assert_validate_error('''Tag missing ">" at Line 2 Col 13:"<a href=""
+ "''', text=my_html1)
+ self._assert_validate_error('''Unbalanced Quotes at Line 2 Col 13:"<a href="
+ "''', text=my_html)
def test_validate_empty_html_tag(self):
# type: () -> None
| Improve check-templates error handling for unbalanced quotes within a tag
Our template linter is good at flagging incorrect HTML, and provides blocks of offending lines in some cases, but if you delete (or add an extra) `"` in just about any tag, you get a fairly unhelpful exception like this from the linter:
```
Traceback (most recent call last):
File "tools/check-templates", line 260, in <module>
check_our_files()
File "tools/check-templates", line 194, in check_our_files
check_handlebar_templates(by_lang['handlebars'], options.modified)
File "tools/check-templates", line 203, in check_handlebar_templates
validate(fn, check_indent=True)
File "tools/check-templates", line 85, in validate
s = get_html_tag(text, state.i)
File "tools/check-templates", line 178, in get_html_tag
raise Exception('Tag missing >')
Exception: Tag missing >
```
`get_html_tag` has the offset of the start of the tag it's trying to match, and it'd be great to be able to indicate something clear to the user about where the error is (line number + the content of that line would probably be most useful; given how the code is setup we might find we want to write a little function `extract_line(text, offset)` that returns the line number and content of the line that offset is at within the function).
| If we don't end up merging #2859, we should still take a look at that PR for the initial approach that was used there.
@timabbott We actually have a about five places in the code where we report errors without the more detailed line/column info, and while we test-cover all the negative cases AFAIK, we don't test that the negative cases report line/column info even when they do.
So I kind of want to fix this holistically, and make sure we add test coverage for line/column failures, and also try to simplify the parser as much as possible in terms of handling errors. Instead of the `extract_line()` approach, I think what we want here is more of an approach where helpers can raise a simpler exception and then `tokenize()`, which has all the line/column state more easily available, can re-raise an exception with more detailed info.
I want to avoid what's happening in the current draft of #2859, which is that each helper still has to do a fair amount of boilerplate to handle simple errors.
OK, that makes sense | 2017-02-21T13:11:47 |
zulip/zulip | 4,356 | zulip__zulip-4356 | [
"4355"
] | 9aa77e491e45dd8002162ea2e9ef62a9cc414aff | diff --git a/zerver/lib/bulk_create.py b/zerver/lib/bulk_create.py
--- a/zerver/lib/bulk_create.py
+++ b/zerver/lib/bulk_create.py
@@ -21,7 +21,8 @@ def bulk_create_users(realm, users_raw, bot_type=None, tos_version=None):
profile = create_user_profile(realm, email,
initial_password(email), active, bot_type,
full_name, short_name, None, False, tos_version,
- tutorial_status=UserProfile.TUTORIAL_FINISHED)
+ tutorial_status=UserProfile.TUTORIAL_FINISHED,
+ enter_sends=True)
profiles_to_create.append(profile)
UserProfile.objects.bulk_create(profiles_to_create)
diff --git a/zerver/lib/create_user.py b/zerver/lib/create_user.py
--- a/zerver/lib/create_user.py
+++ b/zerver/lib/create_user.py
@@ -26,8 +26,9 @@ def random_api_key():
# Recipient objects
def create_user_profile(realm, email, password, active, bot_type, full_name,
short_name, bot_owner, is_mirror_dummy, tos_version,
- tutorial_status=UserProfile.TUTORIAL_WAITING):
- # type: (Realm, Text, Optional[Text], bool, Optional[int], Text, Text, Optional[UserProfile], bool, Optional[Text], Optional[Text]) -> UserProfile
+ tutorial_status=UserProfile.TUTORIAL_WAITING,
+ enter_sends=False):
+ # type: (Realm, Text, Optional[Text], bool, Optional[int], Text, Text, Optional[UserProfile], bool, Optional[Text], Optional[Text], bool) -> UserProfile
now = timezone.now()
email = UserManager.normalize_email(email)
@@ -38,6 +39,7 @@ def create_user_profile(realm, email, password, active, bot_type, full_name,
bot_owner=bot_owner, is_mirror_dummy=is_mirror_dummy,
tos_version=tos_version,
tutorial_status=tutorial_status,
+ enter_sends=enter_sends,
onboarding_steps=ujson.dumps([]),
default_language=realm.default_language)
| Enable enter to send in dev env
In dev environment every time we fresh login we have to check ```Enter to send``` to true. We should enable it by default for dev env only to increase testing speed.
```git grep enter_sends``` will help you.
| 2017-03-29T21:22:30 |
||
zulip/zulip | 5,188 | zulip__zulip-5188 | [
"5182"
] | 3905602da54dd43e2f1cfa707732ec479bbd9fcd | diff --git a/tools/lib/provision.py b/tools/lib/provision.py
--- a/tools/lib/provision.py
+++ b/tools/lib/provision.py
@@ -240,18 +240,28 @@ def main(options):
if not options.is_production_travis:
# These won't be used anyway
run(["scripts/setup/configure-rabbitmq"])
- run(["tools/setup/postgres-init-dev-db"])
- run(["tools/do-destroy-rebuild-database"])
# Need to set up Django before using is_template_database_current.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
import django
django.setup()
from zerver.lib.test_fixtures import is_template_database_current
+
+ if options.is_force or not is_template_database_current(
+ migration_status="var/migration_status_dev",
+ settings="zproject.settings",
+ database_name="zulip",
+ ):
+ run(["tools/setup/postgres-init-dev-db"])
+ run(["tools/do-destroy-rebuild-database"])
+ else:
+ print("No need to regenerate the dev DB.")
+
if options.is_force or not is_template_database_current():
run(["tools/setup/postgres-init-test-db"])
run(["tools/do-destroy-rebuild-test-database"])
else:
print("No need to regenerate the test DB.")
+
run(["./manage.py", "compilemessages"])
# Here we install nvm, node, and npm.
diff --git a/zproject/dev_urls.py b/zproject/dev_urls.py
--- a/zproject/dev_urls.py
+++ b/zproject/dev_urls.py
@@ -11,6 +11,10 @@
static_root = os.path.join(settings.DEPLOY_ROOT, 'prod-static/serve' if use_prod_static else 'static')
urls = [
+ # Serve static assets via the Django server
+ url(r'^static/(?P<path>.*)$', serve, {'document_root': static_root}),
+
+ # Serve useful development environment resources (docs, coverage reports, etc.)
url(r'^coverage/(?P<path>.*)$',
serve, {'document_root':
os.path.join(settings.DEPLOY_ROOT, 'var/coverage'),
@@ -18,7 +22,8 @@
url(r'^docs/(?P<path>.*)$',
serve, {'document_root':
os.path.join(settings.DEPLOY_ROOT, 'docs/_build/html')}),
- url(r'^static/(?P<path>.*)$', serve, {'document_root': static_root}),
+
+ # The special no-password login endpoint for development
url(r'^devlogin/$', zerver.views.auth.login_page,
{'template_name': 'zerver/dev_login.html'}, name='zerver.views.auth.login_page'),
]
| diff --git a/zerver/lib/test_fixtures.py b/zerver/lib/test_fixtures.py
--- a/zerver/lib/test_fixtures.py
+++ b/zerver/lib/test_fixtures.py
@@ -14,7 +14,6 @@
from django.utils.module_loading import module_has_submodule
FILENAME_SPLITTER = re.compile('[\W\-_]')
-TEST_DB_STATUS_DIR = 'var/test_db_status'
def database_exists(database_name, **options):
# type: (Text, **Any) -> bool
@@ -66,19 +65,19 @@ def are_migrations_the_same(migration_file, **options):
migration_content = f.read()
return migration_content == get_migration_status(**options)
-def _get_hash_file_path(source_file_path):
- # type: (str) -> str
+def _get_hash_file_path(source_file_path, status_dir):
+ # type: (str, str) -> str
basename = os.path.basename(source_file_path)
filename = '_'.join(FILENAME_SPLITTER.split(basename)).lower()
- return os.path.join(TEST_DB_STATUS_DIR, filename)
+ return os.path.join(status_dir, filename)
-def _check_hash(target_hash_file, **options):
- # type: (str, **Any) -> bool
+def _check_hash(target_hash_file, status_dir):
+ # type: (str, str) -> bool
"""
This function has a side effect of creating a new hash file or
updating the old hash file.
"""
- source_hash_file = _get_hash_file_path(target_hash_file)
+ source_hash_file = _get_hash_file_path(target_hash_file, status_dir)
with open(target_hash_file) as f:
target_hash_content = hashlib.sha1(f.read().encode('utf8')).hexdigest()
@@ -96,10 +95,11 @@ def _check_hash(target_hash_file, **options):
def is_template_database_current(
database_name='zulip_test_template',
- migration_status='var/migration-status',
+ migration_status='var/migration_status_test',
settings='zproject.test_settings',
+ status_dir='var/test_db_status',
check_files=None):
- # type: (Text, Text, Text, Optional[List[str]]) -> bool
+ # type: (str, str, str, str, Optional[List[str]]) -> bool
# Using str type for check_files because re.split doesn't accept unicode
if check_files is None:
check_files = [
@@ -108,14 +108,14 @@ def is_template_database_current(
'tools/setup/postgres-init-dev-db',
]
- if not os.path.exists(TEST_DB_STATUS_DIR):
- os.mkdir(TEST_DB_STATUS_DIR)
+ if not os.path.exists(status_dir):
+ os.mkdir(status_dir)
if database_exists(database_name):
# To ensure Python evaluates all the hash tests (and thus creates the
# hash files about the current state), we evaluate them in a
# list and then process the result
- hash_status = all([_check_hash(fn) for fn in check_files])
+ hash_status = all([_check_hash(fn, status_dir) for fn in check_files])
return are_migrations_the_same(migration_status, settings=settings) and hash_status
return False
| provision: Avoid spending 15s every no-op provision rebuilding the database
Currently, the no-op provision time is about 30s, and more than half of that is rebuilding the "manual testing" database.
This is unnecessary in most cases; we should only need to do that when there are new migrations (or perhaps old migrations being removed).
We've already done something similar to the work required with the `is_template_database_current` section in `tools/lib/provision.py`, where we only regenerate the unit testing database if the set of migrations present have changed (or `populate_db` has changed, etc.).
I think it might be possible to just call `is_template_database_current` with different options (we'll want to use different `migration_status` path files, at least, for test vs. dev), but we should test :).
This is, conceptually, the last specific item from #1461, which I'm going to close at this point in favor of these more specific issues.
| Hello @zulip/server-development members, this issue was labeled with the **area: provision** label, so you may want to check it out! | 2017-06-02T20:30:21 |
zulip/zulip | 5,385 | zulip__zulip-5385 | [
"5274"
] | 6c722843ef0279b89283f188a6048ca9deb0eaca | diff --git a/zproject/settings.py b/zproject/settings.py
--- a/zproject/settings.py
+++ b/zproject/settings.py
@@ -335,6 +335,8 @@ def get_secret(key):
})
non_html_template_engine_settings['OPTIONS'].update({
'autoescape': False,
+ 'trim_blocks': True,
+ 'lstrip_blocks': True,
})
# The order here is important; get_template and related/parent functions try
| diff --git a/zerver/views/test_emails.py b/zerver/views/test_emails.py
--- a/zerver/views/test_emails.py
+++ b/zerver/views/test_emails.py
@@ -48,6 +48,7 @@ def email_page(request):
},
'referrer_name': 'Road Runner',
'referrer_email': '[email protected]',
+ 'referrer_realm_name': 'Acme Corporation',
'realm_uri': realm.uri,
'server_uri': settings.SERVER_URI,
'old_email': '[email protected]',
| emails: Remove whitespace caused by jinja2 controls in non-HTML templates.
Jinja2 control tags like `{% name %}` add spaces and newlines to the body of plaintext emails. Jinja2 can be configured to strip this whitespace, and we should do so for our plaintext emails.
Some notes:
* This builds on #5248 (so if that hasn't been merged, work off of that branch)
* This is the diff to update the Jinja2 setting in `zproject/settings.py`:
```
non_html_template_engine_settings['OPTIONS'].update({
'autoescape': False,
+ 'trim_blocks': True,
+ 'lstrip_blocks': True,
})
```
You can read about the settings at http://jinja.pocoo.org/docs/2.9/templates/#whitespace-control
* All of our emails templates live in `templates/zerver/emails`. The affected files are the ones that end in `*.subject` and `*.txt`.
The main task is to go through all the affected files, and make sure:
* All control tags are on their own lines
* Spot check a few of the emails in the development environment, to make sure the `trim_blocks` and `lstrip_blocks` setting is working as expected.
| Hello @zulip/server-notifications members, this issue was labeled with the **area: notifications** label, so you may want to check it out!
@zulipbot claim
So far, the problems regarding control blocks not being aligned are in:
* `digest.txt`, `missed_message.txt` :these will be redone so will leave them for now
* `invitation_reminder.subject` : currently figuring out how to verify it | 2017-06-14T16:04:21 |
zulip/zulip | 5,403 | zulip__zulip-5403 | [
"5186"
] | 4f223c19d83c7d2ef32f9ae5218dbf76c61e0b27 | diff --git a/tools/lib/provision.py b/tools/lib/provision.py
--- a/tools/lib/provision.py
+++ b/tools/lib/provision.py
@@ -6,6 +6,7 @@
import argparse
import platform
import subprocess
+import hashlib
os.environ["PYTHONUNBUFFERED"] = "y"
@@ -183,12 +184,35 @@ def main(options):
# project.
os.chdir(ZULIP_PATH)
+ # setup-apt-repo does an `apt-get update`
+ # hash the apt dependencies
+ sha_sum = hashlib.sha1()
+
+ for apt_depedency in APT_DEPENDENCIES[codename]:
+ sha_sum.update(apt_depedency.encode('utf8'))
+ # hash the content of setup-apt-repo
+ sha_sum.update(open('scripts/lib/setup-apt-repo').read().encode('utf8'))
+
+ new_apt_dependencies_hash = sha_sum.hexdigest()
+ last_apt_dependencies_hash = None
+
try:
- install_apt_deps()
- except subprocess.CalledProcessError:
- # Might be a failure due to network connection issues. Retrying...
- print(WARNING + "`apt-get -y install` failed while installing dependencies; retrying..." + ENDC)
- install_apt_deps()
+ hash_file = open('var/apt_dependenices_hash', 'r+')
+ last_apt_dependencies_hash = hash_file.read()
+ except IOError:
+ run(['touch', 'var/apt_dependenices_hash'])
+ hash_file = open('var/apt_dependenices_hash', 'r+')
+
+ if (new_apt_dependencies_hash != last_apt_dependencies_hash):
+ try:
+ install_apt_deps()
+ except subprocess.CalledProcessError:
+ # Might be a failure due to network connection issues. Retrying...
+ print(WARNING + "`apt-get -y install` failed while installing dependencies; retrying..." + ENDC)
+ install_apt_deps()
+ hash_file.write(new_apt_dependencies_hash)
+ else:
+ print("No need to apt operations.")
if options.is_travis:
if PY2:
| provision: Avoiding spending ~3s on a no-op provision doing apt operations
We spend several seconds on every no-op provision doing apt setup and operations for things that largely don't change. We should be able to optimize this away in the common (not `--force`) case.
For example, the `apt-get install`, `apt-key add`, etc. operations should probably only run with `--force` unless their dependencies have changed (e.g. the script with the code, the list of files, etc.).
```
Jun 02 12:53:51 + mkdir -p /home/tabbott/zulip/var
Jun 02 12:53:51 Reading package lists...
Jun 02 12:53:51 Building dependency tree...
Jun 02 12:53:51 Reading state information...
Jun 02 12:53:52 lsb-release is already the newest version (9.20160110ubuntu0.2).
Jun 02 12:53:52 0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
Jun 02 12:53:52 + sudo ./scripts/lib/setup-apt-repo
Jun 02 12:53:52 + SOURCES_FILE=/etc/apt/sources.list.d/zulip.list
Jun 02 12:53:52 ++ shasum /etc/apt/sources.list.d/zulip.list
Jun 02 12:53:52 + zulip_source_hash='716d3aaf13728be1b7f04e674415335261d8d627 /etc/apt/sources.list.d/zulip.list'
Jun 02 12:53:52 + apt-get install -y lsb-release
Jun 02 12:53:52 Reading package lists...
Jun 02 12:53:52 Building dependency tree...
Jun 02 12:53:52 Reading state information...
Jun 02 12:53:52 lsb-release is already the newest version (9.20160110ubuntu0.2).
Jun 02 12:53:52 0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
Jun 02 12:53:52 +++ dirname ./scripts/lib/setup-apt-repo
Jun 02 12:53:52 ++ dirname ./scripts/lib
Jun 02 12:53:52 + SCRIPTS_PATH=./scripts
Jun 02 12:53:52 + apt-key add ./scripts/setup/zulip-ppa.asc
Jun 02 12:53:52 OK
Jun 02 12:53:52 + apt-key add ./scripts/setup/pgroonga-ppa.asc
Jun 02 12:53:53 OK
Jun 02 12:53:53 ++ lsb_release -sc
Jun 02 12:53:53 + release=xenial
Jun 02 12:53:53 + '[' xenial = trusty ']'
Jun 02 12:53:53 + '[' xenial = xenial ']'
Jun 02 12:53:53 + cat
Jun 02 12:53:53 ++ shasum /etc/apt/sources.list.d/zulip.list
Jun 02 12:53:53 + '[' '716d3aaf13728be1b7f04e674415335261d8d627 /etc/apt/sources.list.d/zulip.list' = '716d3aaf13728be1b7f04e674415335261d8d627 /etc/apt/sources.list.d/zulip.list' ']'
Jun 02 12:53:53 + echo 'zulip.list file did not change; skipping apt-get update'
Jun 02 12:53:53 zulip.list file did not change; skipping apt-get update
Jun 02 12:53:53 + sudo apt-get -y install --no-install-recommends closure-compiler memcached rabbitmq-server redis-server hunspell-en-us supervisor git libssl-dev yui-compressor wget ca-certificates puppet gettext curl netcat build-essential libffi-dev libfreetype6-dev libz-dev libjpeg-dev libldap2-dev libmemcached-dev python3-dev python-dev python-pip python-virtualenv libxml2-dev libxslt1-dev libpq-dev postgresql-9.5 postgresql-9.5-tsearch-extras postgresql-9.5-pgroonga
Jun 02 12:53:54 Reading package lists...
Jun 02 12:53:54 Building dependency tree...
Jun 02 12:53:54 Reading state information...
Jun 02 12:53:54 build-essential is already the newest version (12.1ubuntu2).
Jun 02 12:53:54 ca-certificates is already the newest version (20160104ubuntu1).
Jun 02 12:53:54 gettext is already the newest version (0.19.7-2ubuntu3).
Jun 02 12:53:54 hunspell-en-us is already the newest version (20070829-6ubuntu3).
Jun 02 12:53:54 libffi-dev is already the newest version (3.2.1-4).
Jun 02 12:53:54 libjpeg-dev is already the newest version (8c-2ubuntu8).
Jun 02 12:53:54 libmemcached-dev is already the newest version (1.0.18-4.1).
Jun 02 12:53:54 python-dev is already the newest version (2.7.11-1).
Jun 02 12:53:54 python3-dev is already the newest version (3.5.1-3).
Jun 02 12:53:54 closure-compiler is already the newest version (20130227+dfsg1-8).
Jun 02 12:53:54 netcat is already the newest version (1.10-41).
Jun 02 12:53:54 redis-server is already the newest version (2:3.0.6-1).
Jun 02 12:53:54 yui-compressor is already the newest version (2.4.7-2).
Jun 02 12:53:54 curl is already the newest version (7.47.0-1ubuntu2.2).
Jun 02 12:53:54 git is already the newest version (1:2.7.4-0ubuntu1.1).
Jun 02 12:53:54 libfreetype6-dev is already the newest version (2.6.1-0.1ubuntu2.3).
Jun 02 12:53:54 libldap2-dev is already the newest version (2.4.42+dfsg-2ubuntu3.2).
Jun 02 12:53:54 libpq-dev is already the newest version (9.5.7-0ubuntu0.16.04).
Jun 02 12:53:54 libssl-dev is already the newest version (1.0.2g-1ubuntu4.6).
Jun 02 12:53:54 libxml2-dev is already the newest version (2.9.3+dfsg1-1ubuntu0.2).
Jun 02 12:53:54 libxslt1-dev is already the newest version (1.1.28-2.1ubuntu0.1).
Jun 02 12:53:54 memcached is already the newest version (1.4.25-2ubuntu1.2).
Jun 02 12:53:54 postgresql-9.5 is already the newest version (9.5.7-0ubuntu0.16.04).
Jun 02 12:53:54 rabbitmq-server is already the newest version (3.5.7-1ubuntu0.16.04.1).
Jun 02 12:53:54 wget is already the newest version (1.17.1-1ubuntu1.2).
Jun 02 12:53:54 zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).
Jun 02 12:53:54 puppet is already the newest version (3.8.5-2ubuntu0.1).
Jun 02 12:53:54 python-pip is already the newest version (8.1.1-2ubuntu0.4).
Jun 02 12:53:54 python-virtualenv is already the newest version (15.0.1+ds-3ubuntu1).
Jun 02 12:53:54 supervisor is already the newest version (3.2.0-2ubuntu0.1).
Jun 02 12:53:54 postgresql-9.5-tsearch-extras is already the newest version (0.2).
Jun 02 12:53:54 postgresql-9.5-pgroonga is already the newest version (1.2.0-2~xenial1).
Jun 02 12:53:54 0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded.
```
This is extracted from #1461.
| Hello @zulip/server-development members, this issue was labeled with the **area: provision** label, so you may want to check it out!
@zulipbot claim.
@timabbott @femnad Should we add the hash same way in #5184 to check the dependencies have been changed or not?
That could work if you figure out some way produce a similar hash for apt dependencies.
So I think we can make a hash for all the dependencies of the `apt` commands (common case) and if it remains same then we'll not be running any of the `apt` command else we'll run all `apt` command because maintaining different hash for all the apt commands can be messy.
Does it sound ok?
Yeah, all or none sounds reasonable for this case.
Agreed all or none seems reasonable.
I think this is the only block we need to cover to fix this (the rest are mostly negligible):
```
run(["sudo", "./scripts/lib/setup-apt-repo"])
run(["sudo", "apt-get", "-y", "install", "--no-install-recommends"] + APT_DEPENDENCIES[codename])
```
I think hashing the (sorted) list of apt packages from APT_DEPENDENCIES[codename] plus the content of `scripts/lib/setup-apt-repo` seems correct; we should make sure this one respects the `--force` option, however, since one could want to force an update. | 2017-06-15T10:14:58 |
|
zulip/zulip | 5,407 | zulip__zulip-5407 | [
"5366"
] | 205d523ab2fb585c2f869729f32b509b47f2fb09 | diff --git a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py b/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
--- a/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
+++ b/tools/documentation_crawler/documentation_crawler/spiders/common/spiders.py
@@ -17,6 +17,8 @@
'https://calendar.google.com/calendar/[email protected]',
# Returns 409 errors to HEAD requests frequently
'https://medium.freecodecamp.com',
+ # Returns 404 to HEAD requests unconditionally
+ 'https://www.git-tower.com/blog/command-line-cheat-sheet/',
]
| Pull GCI docs into main Zulip repo.
Some of our assets, like git cheatsheets, currently live in the zulip-gci repo. We should move them to the main Zulip repo and link from appropriate places.
cc @synicalsyntax @lonerz @tommyip
| (move or copy, as appropriate)
Hello @zulip/server-development members, this issue was labeled with the **area: documentation (developer)** label, so you may want to check it out!
I'd probably move and just update the links in zulip-gci to point to the new place.
@zulipbot claim
should these go in the `docs/` folder or is there someplace more appropriate?
Yeah, and probably under the `DEVELOPER TUTORIALS` section.
@tommyip is [this](http://zulip.readthedocs.io/en/latest/reading-list.html) what you are referring to?
I belive @tommyip talks about the whole *Developer tutorials* in the docs structure. This means that the docs you'll be moving from the GCI repo should have their own entries here, in `docs/index.rst`:
```rst
74 .. _developer-tutorials:
75
76 .. toctree::
77 :maxdepth: 2
78 :caption: Developer tutorials
79
80 integration-guide
81 webhook-walkthrough
82 new-feature-tutorial
83 writing-views
84 life-of-a-request
85 reading-list
```
So you should basically copy them as new files inside `docs/`, add the new files' names to the abovementioned list in `index.rst`, and update the links as @timabbott pointed out (in a separate PR in the zulip-gci repo). | 2017-06-15T13:14:12 |
|
zulip/zulip | 5,423 | zulip__zulip-5423 | [
"5412",
"5412"
] | 081e0405dc42cbe0e5b8050f475cedf0bb7aa073 | diff --git a/zerver/lib/bugdown/fenced_code.py b/zerver/lib/bugdown/fenced_code.py
--- a/zerver/lib/bugdown/fenced_code.py
+++ b/zerver/lib/bugdown/fenced_code.py
@@ -98,7 +98,7 @@
(
\\{?\\.?
(?P<lang>
- [a-zA-Z0-9_+-]*
+ [a-zA-Z0-9_+-./#]*
) # "py" or "javascript"
\\}?
) # language, like ".py" or "{javascript}"
| diff --git a/frontend_tests/node_tests/markdown.js b/frontend_tests/node_tests/markdown.js
--- a/frontend_tests/node_tests/markdown.js
+++ b/frontend_tests/node_tests/markdown.js
@@ -87,6 +87,15 @@ var social = {
stream_data.add_sub('Denmark', denmark);
stream_data.add_sub('social', social);
+// Check the default behavior of fenced code blocks
+// works properly before markdown is initialized.
+(function test_fenced_block_defaults() {
+ var input = '\n```\nfenced code\n```\n\nand then after\n';
+ var expected = '\n\n<div class="codehilite"><pre><span></span>fenced code\n</pre></div>\n\n\n\nand then after\n\n';
+ var output = fenced_code.process_fenced_code(input);
+ assert.equal(output, expected);
+}());
+
var markdown = require('js/markdown.js');
markdown.initialize();
@@ -181,6 +190,10 @@ var bugdown_data = JSON.parse(fs.readFileSync(path.join(__dirname, '../../zerver
expected: '<div class="codehilite"><pre><span></span> fenced code trailing whitespace\n</pre></div>\n\n\n<p>and then after</p>'},
{input: '* a\n* list \n* here',
expected: '<ul>\n<li>a</li>\n<li>list </li>\n<li>here</li>\n</ul>'},
+ {input: '\n```c#\nfenced code special\n```\n\nand then after\n',
+ expected: '<div class="codehilite"><pre><span></span>fenced code special\n</pre></div>\n\n\n<p>and then after</p>'},
+ {input: '\n```vb.net\nfenced code dot\n```\n\nand then after\n',
+ expected: '<div class="codehilite"><pre><span></span>fenced code dot\n</pre></div>\n\n\n<p>and then after</p>'},
{input: 'Some text first\n* a\n* list \n* here\n\nand then after',
expected: '<p>Some text first</p>\n<ul>\n<li>a</li>\n<li>list </li>\n<li>here</li>\n</ul>\n<p>and then after</p>'},
{input: '1. an\n2. ordered \n3. list',
diff --git a/zerver/tests/test_bugdown.py b/zerver/tests/test_bugdown.py
--- a/zerver/tests/test_bugdown.py
+++ b/zerver/tests/test_bugdown.py
@@ -110,10 +110,13 @@ def test_serial_code(self):
'hello()',
'```',
'',
- '``` .py',
+ '```vb.net',
'goodbye()',
'```',
'',
+ '```c#',
+ 'weirdchar()',
+ '```',
''
]
expected = [
@@ -122,8 +125,11 @@ def test_serial_code(self):
'',
'',
'',
- '**py:goodbye()**',
+ '**vb.net:goodbye()**',
+ '',
+ '',
'',
+ '**c#:weirdchar()**',
'',
''
]
| Some of codeblock typeahead doesn't work
There are some codeblock typeaheads (from pygments) that doesn't work when I try it in Zulip, such as `c#`, I think `c#` breaks the codeblock syntax since there is an `#` in it. Btw, we could use `csharp` for alternative of `c#`.
~~--And why there's a `pycon` typeahead, I think it's not a programming language?~~
Edit: `pycon` is a abbreviation of `python console` so it's a normal behaviour
I think we could solve this by removing them (typeahead that doesn't work) from codeblock typeahead list (`tools/setup/lang.json`), and some places that generate those typeaheads..
![peek 2017-06-15 23-41](https://user-images.githubusercontent.com/20320125/27192362-4041332c-5225-11e7-8fd7-dd444d7acc6d.gif)
How to reproduce:
1. Type triple backticks (`) and type c.
2. Then there will appear some options, select c#
3. Type a code, and send the message
Some of codeblock typeahead doesn't work
There are some codeblock typeaheads (from pygments) that doesn't work when I try it in Zulip, such as `c#`, I think `c#` breaks the codeblock syntax since there is an `#` in it. Btw, we could use `csharp` for alternative of `c#`.
~~--And why there's a `pycon` typeahead, I think it's not a programming language?~~
Edit: `pycon` is a abbreviation of `python console` so it's a normal behaviour
I think we could solve this by removing them (typeahead that doesn't work) from codeblock typeahead list (`tools/setup/lang.json`), and some places that generate those typeaheads..
![peek 2017-06-15 23-41](https://user-images.githubusercontent.com/20320125/27192362-4041332c-5225-11e7-8fd7-dd444d7acc6d.gif)
How to reproduce:
1. Type triple backticks (`) and type c.
2. Then there will appear some options, select c#
3. Type a code, and send the message
| Hello @zulip/server-compose members, this issue was labeled with the **area: compose** label, so you may want to check it out!
`pycon` seems to be a lexer for the Python Console (read [pygments docs here](http://pygments.org/docs/lexers/?highlight=pycon)), so it's valid.
But I was able to reproduce this error, unfortunately. cc @cory2067 (the implementer of the typeahead syntax)
You can find all the types autocomplete supports at `/static/generated/pygments_data.js`.
After some testing, it seems that that the only non-alphanumeric characters that we support are `+` and `-`.
So things like `c#`, `ambienttalk/2` (whatever that is), `vb.net` have this issue.
We could change the typeahead to ignore the names with special characters, but I feel like that's kind of a cheap way out.
I think this is more so an issue with creating the code blocks themselves.
Well, the pycon typeahead issue is a bit mysterious and we should investigate.
The main bug here is in the markdown implementation; we're probably a bit too conservative with what other characters we allow to be on the same line. I suspect we just need to add `/#` to the list in `FENCE_RE` (in the backend), and maybe something similar in the frontend.
Definitely worth adding tests for both issues when we fix them.
@zulipbot claim
Hello @zulip/server-compose members, this issue was labeled with the **area: compose** label, so you may want to check it out!
`pycon` seems to be a lexer for the Python Console (read [pygments docs here](http://pygments.org/docs/lexers/?highlight=pycon)), so it's valid.
But I was able to reproduce this error, unfortunately. cc @cory2067 (the implementer of the typeahead syntax)
You can find all the types autocomplete supports at `/static/generated/pygments_data.js`.
After some testing, it seems that that the only non-alphanumeric characters that we support are `+` and `-`.
So things like `c#`, `ambienttalk/2` (whatever that is), `vb.net` have this issue.
We could change the typeahead to ignore the names with special characters, but I feel like that's kind of a cheap way out.
I think this is more so an issue with creating the code blocks themselves.
Well, the pycon typeahead issue is a bit mysterious and we should investigate.
The main bug here is in the markdown implementation; we're probably a bit too conservative with what other characters we allow to be on the same line. I suspect we just need to add `/#` to the list in `FENCE_RE` (in the backend), and maybe something similar in the frontend.
Definitely worth adding tests for both issues when we fix them.
@zulipbot claim | 2017-06-15T22:06:17 |
zulip/zulip | 5,457 | zulip__zulip-5457 | [
"1423"
] | 7e992623315534adfc3b5a44c926b3e28cf738f1 | diff --git a/zerver/lib/narrow.py b/zerver/lib/narrow.py
--- a/zerver/lib/narrow.py
+++ b/zerver/lib/narrow.py
@@ -43,6 +43,9 @@ def narrow_filter(event):
elif operator == "is" and operand in ["starred"]:
if operand not in flags:
return False
+ elif operator == "is" and operand == "unread":
+ if "read" in flags:
+ return False
elif operator == "is" and operand in ["alerted", "mentioned"]:
if "mentioned" not in flags:
return False
diff --git a/zerver/views/messages.py b/zerver/views/messages.py
--- a/zerver/views/messages.py
+++ b/zerver/views/messages.py
@@ -133,6 +133,9 @@ def by_is(self, query, operand, maybe_negate):
elif operand == 'starred':
cond = column("flags").op("&")(UserMessage.flags.starred.mask) != 0
return query.where(maybe_negate(cond))
+ elif operand == 'unread':
+ cond = column("flags").op("&")(UserMessage.flags.read.mask) == 0
+ return query.where(maybe_negate(cond))
elif operand == 'mentioned' or operand == 'alerted':
cond = column("flags").op("&")(UserMessage.flags.mentioned.mask) != 0
return query.where(maybe_negate(cond))
| diff --git a/frontend_tests/node_tests/filter.js b/frontend_tests/node_tests/filter.js
--- a/frontend_tests/node_tests/filter.js
+++ b/frontend_tests/node_tests/filter.js
@@ -2,6 +2,7 @@ add_dependencies({
people: 'js/people.js',
stream_data: 'js/stream_data.js',
util: 'js/util.js',
+ unread: 'js/unread.js',
});
set_global('page_params', {});
@@ -256,6 +257,10 @@ function make_sub(name, stream_id) {
assert(predicate({starred: true}));
assert(!predicate({starred: false}));
+ predicate = get_predicate([['is', 'unread']]);
+ assert(predicate({flags: ''}));
+ assert(!predicate({flags: 'read'}));
+
predicate = get_predicate([['is', 'alerted']]);
assert(predicate({alerted: true}));
assert(!predicate({alerted: false}));
@@ -512,6 +517,13 @@ function make_sub(name, stream_id) {
string = 'stream devel, starred messages';
assert.equal(Filter.describe(narrow), string);
+ narrow = [
+ {operator: 'stream', operand: 'river'},
+ {operator: 'is', operand: 'unread'},
+ ];
+ string = 'stream river, unread messages';
+ assert.equal(Filter.describe(narrow), string);
+
narrow = [
{operator: 'stream', operand: 'devel'},
{operator: 'topic', operand: 'JS'},
diff --git a/frontend_tests/node_tests/narrow.js b/frontend_tests/node_tests/narrow.js
--- a/frontend_tests/node_tests/narrow.js
+++ b/frontend_tests/node_tests/narrow.js
@@ -122,6 +122,11 @@ function set_filter(operators) {
assert.equal(hide_id,'.empty_feed_notice');
assert.equal(show_id, '#empty_narrow_all_private_message');
+ set_filter([['is', 'unread']]);
+ narrow.show_empty_narrow_message();
+ assert.equal(hide_id,'.empty_feed_notice');
+ assert.equal(show_id, '#no_unread_narrow_message');
+
set_filter([['pm-with', ['[email protected]', 'Yo']]]);
narrow.show_empty_narrow_message();
assert.equal(hide_id,'.empty_feed_notice');
diff --git a/frontend_tests/node_tests/search_suggestion.js b/frontend_tests/node_tests/search_suggestion.js
--- a/frontend_tests/node_tests/search_suggestion.js
+++ b/frontend_tests/node_tests/search_suggestion.js
@@ -179,11 +179,12 @@ global.stream_data.populate_stream_topics_for_tests({});
];
assert.deepEqual(suggestions.strings, expected);
- query = 'from:ted';
+ query = 'is:unread from:ted';
suggestions = search.get_suggestions(query);
expected = [
- "from:ted",
- "from:[email protected]",
+ "is:unread from:ted",
+ "is:unread from:[email protected]",
+ "is:unread",
];
assert.deepEqual(suggestions.strings, expected);
@@ -388,6 +389,7 @@ init();
"is:starred",
"is:mentioned",
"is:alerted",
+ "is:unread",
"sender:[email protected]",
"stream:devel",
"stream:office",
@@ -403,6 +405,7 @@ init();
assert.equal(describe('is:starred'), 'Starred messages');
assert.equal(describe('is:mentioned'), '@-mentions');
assert.equal(describe('is:alerted'), 'Alerted messages');
+ assert.equal(describe('is:unread'), 'Unread messages');
assert.equal(describe('sender:[email protected]'), 'Sent by me');
assert.equal(describe('stream:devel'), 'Stream <strong>devel</strong>');
}());
diff --git a/zerver/tests/test_narrow.py b/zerver/tests/test_narrow.py
--- a/zerver/tests/test_narrow.py
+++ b/zerver/tests/test_narrow.py
@@ -112,6 +112,16 @@ def test_add_term_using_is_operator_and_non_private_operand(self):
term = dict(operator='is', operand=operand)
self._do_add_term_test(term, 'WHERE (flags & :flags_1) != :param_1')
+ def test_add_term_using_is_operator_and_unread_operand(self):
+ # type: () -> None
+ term = dict(operator='is', operand='unread')
+ self._do_add_term_test(term, 'WHERE (flags & :flags_1) = :param_1')
+
+ def test_add_term_using_is_operator_and_unread_operand_and_negated(self): # NEGATED
+ # type: () -> None
+ term = dict(operator='is', operand='unread', negated=True)
+ self._do_add_term_test(term, 'WHERE (flags & :flags_1) != :param_1')
+
def test_add_term_using_is_operator_non_private_operand_and_negated(self): # NEGATED
# type: () -> None
for operand in ['starred', 'mentioned', 'alerted']:
@@ -335,7 +345,7 @@ def test_build_narrow_filter(self):
fixtures_path = os.path.join(os.path.dirname(__file__),
'../fixtures/narrow.json')
scenarios = ujson.loads(open(fixtures_path, 'r').read())
- self.assertTrue(len(scenarios) == 8)
+ self.assertTrue(len(scenarios) == 9)
for scenario in scenarios:
narrow = scenario['narrow']
accept_events = scenario['accept_events']
@@ -375,6 +385,12 @@ def test_ok_to_include_history(self):
]
self.assertFalse(ok_to_include_history(narrow, realm))
+ # History doesn't apply to unread messages.
+ narrow = [
+ dict(operator='is', operand='unread'),
+ ]
+ self.assertFalse(ok_to_include_history(narrow, realm))
+
# If we are looking for something like starred messages, there is
# no point in searching historical messages.
narrow = [
| Add narrowing by is:unread
I think one reasonable way of reading through zulip messages could be to narrow to various topics (e.g. the topic your cursor is currently on), reading the messages of the topic or otherwise marking the whole topic as read, and then going back to a home view where you see only unread messages. This especially makes sense if a large fraction of your messages are from bots (e.g. git commit messages), or high traffic social lists.
Currently we don't have a way to narrow to unread messages; adding `is:unread` functionality to search and a keyboard shortcut (maybe `u`?) would be great.
| Hello @zulip/server-search members, this issue was labeled with the **area: search** label, so you may want to check it out!
@zulipbot claim | 2017-06-19T02:12:31 |
zulip/zulip | 5,459 | zulip__zulip-5459 | [
"2360"
] | 79804620106b77a70c32fb6d885cbc8a7bbbc5ef | diff --git a/zerver/views/messages.py b/zerver/views/messages.py
--- a/zerver/views/messages.py
+++ b/zerver/views/messages.py
@@ -261,7 +261,8 @@ def by_pm_with(self, query, operand, maybe_negate):
if ',' in operand:
# Huddle
try:
- emails = [e.strip() for e in operand.split(',')]
+ # Ignore our own email if it is in this list
+ emails = [e.strip() for e in operand.split(',') if e.strip() != self.user_profile.email]
recipient = recipient_for_emails(emails, False,
self.user_profile, self.user_profile)
except ValidationError:
| diff --git a/frontend_tests/node_tests/filter.js b/frontend_tests/node_tests/filter.js
--- a/frontend_tests/node_tests/filter.js
+++ b/frontend_tests/node_tests/filter.js
@@ -310,6 +310,19 @@ function make_sub(name, stream_id) {
}));
assert(!predicate({type: 'stream'}));
+ predicate = get_predicate([['pm-with', '[email protected],[email protected]']]);
+ assert(predicate({
+ type: 'private',
+ display_recipient: [{user_id: joe.user_id}, {user_id: steve.user_id}],
+ }));
+
+ // Make sure your own email is ignored
+ predicate = get_predicate([['pm-with', '[email protected],[email protected],[email protected]']]);
+ assert(predicate({
+ type: 'private',
+ display_recipient: [{user_id: joe.user_id}, {user_id: steve.user_id}],
+ }));
+
predicate = get_predicate([['pm-with', '[email protected]']]);
assert(!predicate({
type: 'private',
| "Link to this conversation" with group pm conversations isn't shareable
If I have a conversation with [email protected] and [email protected], and want to email them a permanent link to the conversation using the "Link to this conversation" feature, it doesn't work, because we generate a link of the form:
`/#narrow/near/12345/pm-with/alice.40example.2Ecom.2Cbob.40example.2Ecom`
which doesn't contain me! We should probably change the structure so that those links contain oneself, the extra person of yourself just has no effect on the actual filter.
| @timabbott can i work on this?
Update: Thanks to a bunch of refactoring to support email address changes, the `pm-with` narrow tokens now contain an opaque list of user IDs; so I think we could now just add yourself to the list of user IDs to make these shareable. @showell does that approach makes sense to you?
Yep, without knowing the details too much, that approach makes sense to me.
We have a lot of code that deals with adding/removing yourself from the list of PM recipients--it would be nice to come up with a consistent philosophy on how to represent PMs, but that's beyond the scope of this ticket.
@zulipbot claim | 2017-06-19T08:18:58 |
zulip/zulip | 5,463 | zulip__zulip-5463 | [
"4757"
] | 23dc32a0f3c37454d0c28bcc4fff1442386eace2 | diff --git a/zerver/forms.py b/zerver/forms.py
--- a/zerver/forms.py
+++ b/zerver/forms.py
@@ -257,6 +257,12 @@ def clean_username(self):
settings.ZULIP_ADMINISTRATOR)
raise ValidationError(mark_safe(error_msg))
+ if not user_profile.is_active:
+ error_msg = (u"Sorry for the trouble, but your account has been "
+ u"deactivated. Please contact %s to reactivate "
+ u"it.") % (settings.ZULIP_ADMINISTRATOR,)
+ raise ValidationError(mark_safe(error_msg))
+
if not check_subdomain(get_subdomain(self.request), user_profile.realm.subdomain):
logging.warning("User %s attempted to password login to wrong subdomain %s" %
(user_profile.email, get_subdomain(self.request)))
| diff --git a/zerver/tests/test_decorators.py b/zerver/tests/test_decorators.py
--- a/zerver/tests/test_decorators.py
+++ b/zerver/tests/test_decorators.py
@@ -755,7 +755,9 @@ def test_login_deactivated_user(self):
do_deactivate_user(user_profile)
result = self.login_with_return(self.example_email("hamlet"))
- self.assert_in_response("Please enter a correct email and password", result)
+ self.assert_in_response(
+ "Sorry for the trouble, but your account has been deactivated",
+ result)
def test_webhook_deactivated_user(self):
# type: () -> None
| Too many redirects for a account during login of deactivated account
I deactivated my Zulip account and then signed up again and tried to sign in. For wrong password, it showed wrong password, when i entered correct credentials, chrome showed
```
chat.zulip.org redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
```
Clearing cookies did not work as a solution for it.
| Hello @zulip/server-authentication members, this issue was labeled with the **area: authentication** label, so you may want to check it out!
@AyushyaChitransh thanks for the bug report! It's not clear we want to always allow re-activating a deactivated account without administrator approval, but we certainly shouldn't just have this sort of redirect loop happen.
For your specific situation, I've reactivated your accounts on chat.zulip.org (you can re-deactivate whichever of the two you don't want).
At the very least, we need to provide a good error message for trying to login to a deactivated account, since this failure mode is really confusing. I think we want to the error message to say something like "Your Zulip account has been deactivated. If you'd like your account to be reactivated, please contact the administrators for your Zulip organization."
@umairwaheed can you take a look at doing that?
Sure. @zulipbot claim.
@AyushyaChitransh, so I have been trying to reproduce this issue. This is my procedure:
0. Enable EmailAuth authentication method.
1. Signup with an email, e.g. '[email protected]'.
2. Deactivate '[email protected]'.
3. Register again with '[email protected]'.
4. Click the link in the email. At this stage I get this error:
```
You've already registered with this email address. Please sign in below.
```
Is there anything I am missing?
For the time being, I am just changing the error message for the deactivated accounts.
@umairwaheed I tried to recreate the issue again and am getting the same thing. The steps were:
1. Visit https://chat.zulip.org/login/
2. I did have account so I tried to log in with the same, [email protected].
3. Deactivated the account [email protected]
4. Zulip redirected me to step 1, and there I tried to login with the same email id (here [email protected]) and password.
Results:
1. After step 2, I got 403, probably this needs to have a separate issue of its own. Message displayed was:
```
CSRF verification failed. Request aborted.
More information is available with DEBUG=True
```
2. After step 4, I received the same error as mentioned while opening the issue.
```
The chat.zulip.org page isn’t working
chat.zulip.org redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
```
Note:
I did not follow step 3, which says to register again. Maybe that may have been the reason for difference. | 2017-06-19T12:06:06 |
zulip/zulip | 5,478 | zulip__zulip-5478 | [
"5440"
] | bccd2caacba63b561a66ba3fa8591a2a54e6d845 | diff --git a/zerver/migrations/0085_fix_bots_with_none_bot_type.py b/zerver/migrations/0085_fix_bots_with_none_bot_type.py
new file mode 100644
--- /dev/null
+++ b/zerver/migrations/0085_fix_bots_with_none_bot_type.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.2 on 2017-06-20 10:31
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
+from django.db.migrations.state import StateApps
+
+def fix_bot_type(apps, schema_editor):
+ # type: (StateApps, DatabaseSchemaEditor) -> None
+ UserProfile = apps.get_model("zerver", "UserProfile")
+ bots = UserProfile.objects.filter(is_bot=True, bot_type=None)
+ for bot in bots:
+ bot.bot_type = 1
+ bot.save()
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('zerver', '0084_realmemoji_deactivated'),
+ ]
+
+ operations = [
+ migrations.RunPython(fix_bot_type),
+ ]
| Something is wrong with the default value for bot_type for bots
I appear to have some bots with no valid bot type on chat.zulip.org.
![image](https://user-images.githubusercontent.com/2746074/27241160-7c0284c6-528c-11e7-8861-3863959014f5.png)
I checked in the DB, and indeed the `bot_type` is None. Seems to be common among very old bots. So I think we need a migrate to set the `bot_type` of anything with `is_bot=True` and a `None` `bot_type` to `1` (the only bot type that existed until recently).
| Hello @zulip/server-bots members, this issue was labeled with the **area: bots** label, so you may want to check it out!
@zulipbot claim | 2017-06-20T11:33:52 |
|
zulip/zulip | 5,484 | zulip__zulip-5484 | [
"5482"
] | 4f223c19d83c7d2ef32f9ae5218dbf76c61e0b27 | diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -44,7 +44,7 @@
# General information about the project.
project = u'Zulip'
-copyright = u'2015-2016, The Zulip Team'
+copyright = u'2015-2017, The Zulip Team'
author = u'The Zulip Team'
# The version info for the project you're documenting, acts as replacement for
@@ -52,9 +52,9 @@
# built documents.
#
# The short X.Y version.
-version = '1.4'
+version = '1.6'
# The full version, including alpha/beta/rc tags.
-release = '1.4.0'
+release = '1.6.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
| docs: webpage titles for docs still say "Zulip 1.4.0 Documentation"
This is a bit out of date and appears as the title of webpages on the first page of Google search results for "Zulip." Screenshot attached.
<img width="960" alt="screenshot 2017-06-20 12 17 43" src="https://user-images.githubusercontent.com/5571464/27344430-3d0db896-55b4-11e7-8d01-0be10492a759.png">
| Hello @zulip/server-development members, this issue was labeled with the **area: documentation (developer)** label, so you may want to check it out!
@zulipbot claim | 2017-06-20T17:13:32 |