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

New resolver: can't install package with extras_require #8323

Closed
jcugat opened this issue May 26, 2020 · 2 comments
Closed

New resolver: can't install package with extras_require #8323

jcugat opened this issue May 26, 2020 · 2 comments
Labels
resolution: no action When the resolution is to not do anything

Comments

@jcugat
Copy link

jcugat commented May 26, 2020

Hi! I'm testing the new resolver as explained in this blogpost (@ei8fdb @nlhkabu)

I have the following empty package with setup.py:

from setuptools import find_packages, setup

install_requires = [
    "aiohttp~=3.6.2",
]

dev_requires = [
    "pytest==5.4.1",
]


setup(
    name="myprivateandinternalpackage",
    version="0.0.1",
    packages=find_packages(),
    include_package_data=True,
    platforms="any",
    install_requires=install_requires,
    python_requires=">=3.7",
    extras_require={"dev": dev_requires},
)

If I install it with pip install --unstable-feature=resolver "." everything works correctly:

$ pip install --unstable-feature=resolver "."
Processing /Users/josepcugat/workspace/piptest
Collecting aiohttp~=3.6.2
  Using cached aiohttp-3.6.2-cp37-cp37m-macosx_10_13_x86_64.whl (642 kB)
Collecting async-timeout<4.0,>=3.0
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting attrs>=17.3.0
  Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting chardet<4.0,>=2.0
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting multidict<5.0,>=4.5
  Using cached multidict-4.7.6-cp37-cp37m-macosx_10_14_x86_64.whl (48 kB)
Collecting yarl<2.0,>=1.0
  Using cached yarl-1.4.2-cp37-cp37m-macosx_10_13_x86_64.whl (125 kB)
Collecting idna>=2.0
  Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Using legacy setup.py install for myprivateandinternalpackage, since package 'wheel' is not installed.
Installing collected packages: multidict, idna, yarl, chardet, attrs, async-timeout, aiohttp, myprivateandinternalpackage
    Running setup.py install for myprivateandinternalpackage ... done
Successfully installed aiohttp-3.6.2 async-timeout-3.0.1 attrs-19.3.0 chardet-3.0.4 idna-2.9 multidict-4.7.6 myprivateandinternalpackage-0.0.1 yarl-1.4.2

But as soon as I add the dev extras like this pip install --unstable-feature=resolver ".[dev]" it fails:

$ pip install --unstable-feature=resolver ".[dev]"
Processing /Users/josepcugat/workspace/piptest
ERROR: Could not find a version that satisfies the requirement myprivateandinternalpackage==0.0.1 (from myprivateandinternalpackage[dev])
ERROR: No matching distribution found for myprivateandinternalpackage

Version information:

$ python -V
Python 3.7.6
$ pip -V
pip 20.2b1 from /Users/josepcugat/.pyenv/versions/3.7.6/envs/piptest/lib/python3.7/site-packages/pip (python 3.7)
$ pip list
Package    Version
---------- -------
pip        20.2b1
setuptools 46.4.0

It might be a duplicate of #8150 but don't know enough to confirm it.

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label May 26, 2020
@uranusjr
Copy link
Member

Can you try whether the master works here? I think #8291 may have solved this. The master can be installed with the following command:

python -m pip install -U "pip @ git+https://github.com/pypa/pip.git"

@jcugat
Copy link
Author

jcugat commented May 26, 2020

Yes, that works! Thanks @uranusjr 👏

Output for reference
$ python -m pip install -U "pip @ git+https://github.com/pypa/pip.git"
Looking in indexes: https://josepcugat:****@artifactory.skyscannertools.net/artifactory/api/pypi/pypi/simple, https://pypi.python.org/simple/
Collecting pip@ git+https://github.com/pypa/pip.git
  Cloning https://github.com/pypa/pip.git to /private/var/folders/45/0xpqxx110_75h3m1086vmrq40000gp/T/pip-install-9b54kv29/pip
  Running command git clone -q https://github.com/pypa/pip.git /private/var/folders/45/0xpqxx110_75h3m1086vmrq40000gp/T/pip-install-9b54kv29/pip
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pip
  Building wheel for pip (PEP 517) ... done
  Created wheel for pip: filename=pip-20.2.dev1-py2.py3-none-any.whl size=1495854 sha256=e70710cf5683f4bcf21c694685163f232cecd7c493ed636651c202e109c4f6bf
  Stored in directory: /private/var/folders/45/0xpqxx110_75h3m1086vmrq40000gp/T/pip-ephem-wheel-cache-sizzyhr4/wheels/78/23/38/69fd32b3e89cb27e0fcecb586a68db700444351bc9b75ff96d
Successfully built pip
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2b1
    Uninstalling pip-20.2b1:
      Successfully uninstalled pip-20.2b1
Successfully installed pip-20.2.dev1
$ pip -V
pip 20.2.dev1 from /Users/josepcugat/.pyenv/versions/piptest/lib/python3.7/site-packages/pip (python 3.7)
$ pip list
Package    Version
---------- ---------
pip        20.2.dev1
setuptools 46.4.0
$ pip install --unstable-feature=resolver ".[dev]"
Looking in indexes: https://josepcugat:****@artifactory.skyscannertools.net/artifactory/api/pypi/pypi/simple, https://pypi.python.org/simple/
Processing /Users/josepcugat/workspace/piptest
Collecting aiohttp~=3.6.2
  Using cached aiohttp-3.6.2-cp37-cp37m-macosx_10_13_x86_64.whl (642 kB)
Collecting pytest==5.4.1
  Downloading pytest-5.4.1-py3-none-any.whl (246 kB)
     |████████████████████████████████| 246 kB 469 kB/s
Collecting async-timeout<4.0,>=3.0
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting pluggy<1.0,>=0.12
  Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting attrs>=17.3.0
  Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting chardet<4.0,>=2.0
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting py>=1.5.0
  Downloading py-1.8.1-py2.py3-none-any.whl (83 kB)
     |████████████████████████████████| 83 kB 4.5 MB/s
Collecting wcwidth
  Downloading wcwidth-0.1.9-py2.py3-none-any.whl (19 kB)
Collecting multidict<5.0,>=4.5
  Using cached multidict-4.7.6-cp37-cp37m-macosx_10_14_x86_64.whl (48 kB)
Collecting yarl<2.0,>=1.0
  Using cached yarl-1.4.2-cp37-cp37m-macosx_10_13_x86_64.whl (125 kB)
Collecting idna>=2.0
  Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting more-itertools>=4.0.0
  Downloading more_itertools-8.3.0-py3-none-any.whl (44 kB)
     |████████████████████████████████| 44 kB 6.0 MB/s
Collecting importlib-metadata>=0.12
  Using cached importlib_metadata-1.6.0-py2.py3-none-any.whl (30 kB)
Collecting zipp>=0.5
  Using cached zipp-3.1.0-py3-none-any.whl (4.9 kB)
Collecting packaging
  Downloading packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting six
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pyparsing>=2.0.2
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
     |████████████████████████████████| 67 kB 7.3 MB/s
Using legacy setup.py install for myprivateandinternalpackage, since package 'wheel' is not installed.
Installing collected packages: zipp, multidict, idna, yarl, six, pyparsing, importlib-metadata, chardet, attrs, async-timeout, wcwidth, py, pluggy, packaging, more-itertools, aiohttp, pytest, myprivateandinternalpackage
    Running setup.py install for myprivateandinternalpackage ... done
Successfully installed aiohttp-3.6.2 async-timeout-3.0.1 attrs-19.3.0 chardet-3.0.4 idna-2.9 importlib-metadata-1.6.0 more-itertools-8.3.0 multidict-4.7.6 myprivateandinternalpackage-0.0.1 packaging-20.4 pluggy-0.13.1 py-1.8.1 pyparsing-2.4.7 pytest-5.4.1 six-1.15.0 wcwidth-0.1.9 yarl-1.4.2 zipp-3.1.0

@jcugat jcugat closed this as completed May 26, 2020
@pradyunsg pradyunsg added C: new resolver resolution: no action When the resolution is to not do anything labels May 26, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label May 26, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: no action When the resolution is to not do anything
Projects
None yet
Development

No branches or pull requests

3 participants