Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package match spec with both a non equal operator and wildcards fails #6964

Open
1 of 2 tasks
teake opened this issue Mar 1, 2018 · 3 comments
Open
1 of 2 tasks

Package match spec with both a non equal operator and wildcards fails #6964

teake opened this issue Mar 1, 2018 · 3 comments
Labels
source::community catch-all for issues filed by community members stale::recovered [bot] recovered after being marked as stale type::feature request for a new feature or capability

Comments

@teake
Copy link
Contributor

teake commented Mar 1, 2018

I'm submitting a...

  • bug report
  • feature request

Current Behavior

Entering a package match spec with (multiple) wildcards and a non-equal operator fails when trying to install a package. #5021 is related.

Steps to Reproduce

$ conda install "numpy!=*rc*" --dry-run --no-deps

Output:

InvalidVersionSpecError: Invalid version spec: =!=*rc

Expected Behavior

I'd expect the following output:

Solving environment: done

## Package Plan ##

  environment location: /usr/local/var/pyenv/versions/miniconda3-4.3.27

  added / updated specs:
    - numpy


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    numpy-1.14.1               |   py36h8a80b8c_1         3.9 MB

The following NEW packages will be INSTALLED:

    numpy: 1.14.1-py36h8a80b8c_1

Especially since $ conda install "numpy==*rc*" --dry-run --no-deps does correctly resolve to numpy-1.7.0rc1.

Environment Information

`conda info` (excerpt)

     active environment : None
          conda version : 4.4.11
    conda-build version : 3.5.1
         python version : 3.6.2.final.0
       base environment : /usr/local/var/pyenv/versions/miniconda3-4.3.27  (writable)
               platform : osx-64
             user-agent : conda/4.4.11 requests/2.18.4 CPython/3.6.2 Darwin/17.4.0 OSX/10.13.3
                UID:GID : 502:20
             netrc file : None
           offline mode : False

@kalefranz
Copy link
Contributor

xref: #5021

@kalefranz kalefranz added source::community catch-all for issues filed by community members type::feature request for a new feature or capability labels Mar 2, 2018
@github-actions
Copy link

github-actions bot commented Aug 19, 2021

Hi there, thank you for your contribution to Conda!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue in the latest version of Conda
  2. Comment that the issue is still reproducible and include:
  • What version of Conda you reproduced the issue on
  • What OS and version you reproduced the issue on
  • What steps you followed to reproduce the issue
  1. It would also be helpful to have the output of the following commands available:
  • conda info
  • conda config --show-sources
  • conda list --show-channel-urls

NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue.

In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Aug 19, 2021
@teake
Copy link
Contributor Author

teake commented Aug 20, 2021

This still doesn't work as expected, although the behaviour has slightly changed.

Steps to reproduce

First determine the latest version of a package, e.g. numpy (currently 1.21.2 on conda-forge).
Then:

$ conda install "numpy!=*21.2" --dry-run --no-deps

Output:

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/teakewerk/miniconda3/envs/testenv

  added / updated specs:
    - numpy!=*21.2


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    numpy-1.21.2               |   py39h7eed0ac_0         5.7 MB  conda-forge
    ------------------------------------------------------------
                                           Total:         5.7 MB

The following NEW packages will be INSTALLED:

  numpy              conda-forge/osx-64::numpy-1.21.2-py39h7eed0ac_0



DryRunExit: Dry run. Exiting.

Expected output:

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/teakewerk/miniconda3/envs/testenv

  added / updated specs:
    - numpy!=*21.2


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    numpy-1.20.3               |   py39h7eed0ac_1         5.5 MB  conda-forge
    ------------------------------------------------------------
                                           Total:         5.5 MB

The following NEW packages will be INSTALLED:

  numpy              conda-forge/osx-64::numpy-1.20.3-py39h7eed0ac_1



DryRunExit: Dry run. Exiting.

Environment information

Tested on conda 4.10.3 (build py37hf985489_0 from conda-forge) on macOS 10.14.6.

conda info excerpt:

          conda version : 4.10.3
    conda-build version : 3.19.2
         python version : 3.7.6.final.0
       virtual packages : __osx=10.14.6=0
                          __unix=0=0
                          __archspec=1=x86_64
  conda av metadata url : None
               platform : osx-64
             user-agent : conda/4.10.3 requests/2.26.0 CPython/3.7.6 Darwin/18.7.0 OSX/10.14.6
                UID:GID : 502:20
             netrc file : None
           offline mode : False

@github-actions github-actions bot added stale::recovered [bot] recovered after being marked as stale and removed stale [bot] marked as stale due to inactivity labels Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source::community catch-all for issues filed by community members stale::recovered [bot] recovered after being marked as stale type::feature request for a new feature or capability
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants