Coder Social home page Coder Social logo

Comments (3)

jaimergp avatar jaimergp commented on June 2, 2024

Originally posted by @costrouc in #141

This issue came up in #133. There is an upstream conda test tests/test_create.py::IntegrationTests::test_conda_pip_interop_conda_editable_package which fails.

This issue can be reproduced via

docker run --rm -it \
       -v /home/costrouc/p/conda/conda:/opt/conda-src \
       -v /home/costrouc/p/conda/conda-libmamba-solver:/opt/conda-libmamba-solver-src \
       -e TEST_SPLITS=3 \
       -e TEST_GROUP=1 \
       -e CONDA_SOLVER=libmamba \
       ghcr.io/conda/conda-ci:main-linux-python3.10-conda-forge \
       bash

Then running

source /opt/conda-libmamba-solver/dev/bashrc_linux.sh
cd /opt/conda-src
pytest tests/test_create.py::IntegrationTests::test_conda_pip_interop_conda_editable_package

Getting the following error

________ IntegrationTests.test_conda_pip_interop_conda_editable_package ________
Traceback (most recent call last):
  File "/opt/conda-src/tests/test_create.py", line 1688, in test_conda_pip_interop_conda_editable_package
    stdout, stderr, _ = run_command(Commands.INSTALL, prefix, "urllib3=1.20", "--dry-run")
  File "/opt/conda-src/conda/testing/integration.py", line 287, in run_command
    result = do_call(args, p)
  File "/opt/conda-src/conda/cli/conda_argparse.py", line 92, in do_call
    return getattr(module, func_name)(args, parser)
  File "/opt/conda-src/conda/notices/core.py", line 121, in wrapper
    return func(*args, **kwargs)
  File "/opt/conda-src/conda/cli/main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "/opt/conda-src/conda/cli/install.py", line 264, in install
    unlink_link_transaction = solver.solve_for_transaction(
  File "/opt/conda-src/conda/core/solve.py", line 130, in solve_for_transaction
    unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
  File "/opt/conda-src/conda/core/solve.py", line 182, in solve_for_diff
    raise RuntimeError("Cannot unlink unmanageable packages:%s"
RuntimeError: Cannot unlink unmanageable packages:
  - <develop>/pypi::urllib3-1.19.1-dev_0

Detailed logs here

Diving into the exact test which fails here

                # should raise an error
                with pytest.raises(PackagesNotFoundError):
                    # TODO: This raises PackagesNotFoundError, but the error should really explain
                    #       that we can't install urllib3 because it's already installed and
                    #       unmanageable. The error should suggest trying to use pip to uninstall it.
                    stdout, stderr, _ = run_command(Commands.INSTALL, prefix, "urllib3=1.20", "--dry-run")

The expect conda behaviour here assuming pip interop which is not an officially supported feature is to remove the urllib3=1.20 spec from being requested by the user since it is controlled by pip. Correctly an error is being thrown but it is not the one that conda expects. It looks as though libmamba-solver does attempt to recommend updating the pip version using conda-forge but conda catches this as an error after the final solve. See https://github.com/conda/conda/blob/main/conda/core/solve.py#L175-L184. Leaving this detailed issue so that in the future if pip interop is more explored we have a good starting point.

from conda-libmamba-solver.

jaimergp avatar jaimergp commented on June 2, 2024

The deselected tests will be handled a pytest plugin, available in dev/.

from conda-libmamba-solver.

jaimergp avatar jaimergp commented on June 2, 2024

I'll close this issue because the pytest collection plugin has the same info in code and more up-to-date. Otherwise we would periodically need to update this issue and that's prone to errors.

from conda-libmamba-solver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.