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

Extras are not resolved without explicit version lock (due to pre-release presence in dependency tree) #2090

Closed
fridex opened this issue Apr 29, 2018 · 4 comments
Labels
Category: Dependency Resolution Issue relates to dependency resolution.

Comments

@fridex
Copy link
Contributor

fridex commented Apr 29, 2018

Pipenv fails resolution when extras are used.

$ python -m pipenv.help output

Pipenv version: '11.10.1'

Pipenv location: '/usr/lib/python3.6/site-packages/pipenv'

Python location: '/usr/bin/python3'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.6: /usr/bin/python3.6m

  • 3.6: /usr/bin/python3.6

  • 2.7.14: /usr/bin/python

  • 2.7.14: /usr/bin/python2

  • 3.6.3: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.3',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.13.15-200.fc26.x86_64',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Tue Nov 21 21:10:40 UTC 2017',
 'python_full_version': '3.6.3',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • XDG_RUNTIME_DIR
  • SSH_AUTH_SOCK
  • GIO_LAUNCHED_DESKTOP_FILE_PID
  • GUESTFISH_PS1
  • LANG
  • DISPLAY
  • SHLVL
  • LOGNAME
  • XDG_VTNR
  • PWD
  • SESSION_MANAGER
  • HISTSIZE
  • XAUTHORITY
  • QTDIR
  • JOURNAL_STREAM
  • DESKTOP_AUTOSTART_ID
  • COLORTERM
  • XDG_SESSION_ID
  • GIO_LAUNCHED_DESKTOP_FILE
  • DESKTOP_SESSION
  • XDG_SESSION_DESKTOP
  • GDMSESSION
  • USERNAME
  • TERMINATOR_UUID
  • WINDOWPATH
  • GUESTFISH_OUTPUT
  • GNOME_DESKTOP_SESSION_ID
  • VTE_VERSION
  • DBUS_SESSION_BUS_ADDRESS
  • MODULESHOME
  • MAIL
  • XDG_DATA_DIRS
  • LESSOPEN
  • HISTCONTROL
  • TERMINATOR_DBUS_NAME
  • XDG_MENU_PREFIX
  • TERMINATOR_DBUS_PATH
  • GDM_LANG
  • HOSTNAME
  • XDG_SESSION_TYPE
  • OLDPWD
  • TERM
  • QTLIB
  • XDG_CURRENT_DESKTOP
  • GUESTFISH_RESTORE
  • GUESTFISH_INIT
  • SHELL
  • MODULEPATH
  • HOME
  • XDG_SEAT
  • QT_IM_MODULE
  • USER
  • QTINC
  • SSH_ASKPASS
  • LOADEDMODULES
  • PATH
  • XMODIFIERS
  • LS_COLORS
  • ZSH
  • PAGER
  • LESS
  • LSCOLORS
  • VIRTUALENVWRAPPER_PROJECT_FILENAME
  • VIRTUALENVWRAPPER_WORKON_CD
  • VIRTUALENVWRAPPER_SCRIPT
  • WORKON_HOME
  • VIRTUALENVWRAPPER_HOOK_DIR
  • LC_CTYPE
  • GOPATH
  • _
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/fpokorny/bin:/usr/local/cuda-8.0/bin:/usr/local/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/fpokorny/bin
  • SHELL: /usr/bin/zsh
  • LANG: en_US.UTF-8
  • PWD: /tmp/ao

Contents of Pipfile ('/tmp/ao/Pipfile'):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
selinon = {extras = ["celery"], version = ">=0.1.0rc5"}

[dev-packages]

[requires]
python_version = "3.6"

$ pipenv install 'selinon[celery]'
Adding selinon[celery] to Pipfile's [packages]…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.Hint: try $ pipenv lock --pre if it is a pre-release dependency
Could not find a version that matches selinon[celery]
Tried: 0.1.0rc2, 0.1.0rc3, 0.1.0rc4, 0.1.0rc4, 0.1.0rc5, 0.1.0rc5, 0.1.0rc6, 0.1.0rc6, 0.1.0rc7, 0.1.0rc7, 0.1.0rc8, 0.1.0rc8, 0.1.0rc9, 0.1.0rc9, 1.0.0rc1, 1.0.0rc1, 1.0.0rc2, 1.0.0rc2, 1.0.0rc3, 1.0.0rc3, 1.0.0rc4, 1.0.0rc4
There are incompatible versions in the resolved dependencies.

However, if I explicitly specify version, the Pipfile.lock is correctly created:

$ pipenv install 'selinon[celery]==1.0.0rc4'
Expected result

The Pipenv.lock is correctly created even without specifying version explicitly.

Actual result

The lockfile is not correctly created, pipenv exits in ROUND 1 during resolution:

...
Using pip: -i https://pypi.org/simple

                          ROUND 1                           
Current constraints:

Finding the best candidates:

Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done

Locking [packages] dependencies…
Using pip: -i https://pypi.org/simple

                          ROUND 1                           
Current constraints:
  selinon[celery]

Finding the best candidates:
Using pip: -i https://pypi.org/simple

                          ROUND 1                           
Current constraints:
  selinon[celery]

Finding the best candidates:

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
...
Steps to replicate

Just try to install selinon[celery] in a new environment:

$ pipenv install 'selinon[celery]'
@techalchemy
Copy link
Member

Hey, sorry for the issue. Firstly, no need to use quotes for this, but secondly, this is not an issue with installing extras, it's an issue with installing pre-release candidates (note the rc<n> on the end).

See that as part of the error (which is missing a space I can see) it also says:

Hint: try $ pipenv lock --pre if it is a pre-release dependency

You should do that, I think your problems will be solved. Let me know if they arent, and again apologies, we are planning to make this 'just work' without requiring input if you are specifying only one thing (see #2022)

@techalchemy techalchemy changed the title Extras are not resolved without explicit version lock Extras are not resolved without explicit version lock (due to pre-release presence in dependency tree) Apr 29, 2018
@techalchemy techalchemy added the Category: Dependency Resolution Issue relates to dependency resolution. label Apr 29, 2018
@fridex
Copy link
Contributor Author

fridex commented Apr 29, 2018

Hey, sorry for the issue. Firstly, no need to use quotes for this

I use zsh where quotes are necessary - I just copy+paste the provided input.

, but secondly, this is not an issue with installing extras, it's an issue with installing pre-release candidates (note the rc on the end).

See that as part of the error (which is missing a space I can see) it also says:

Hint: try $ pipenv lock --pre if it is a pre-release dependency

You should do that, I think your problems will be solved. Let me know if they arent, and again apologies, we are planning to make this 'just work' without requiring input if you are specifying only one thing (see #2022)

Great, the -pre flag works. I searched opened issues, but I missed this one.

Thanks for such a prompt response!

@techalchemy
Copy link
Member

@fridex sure thing, I think there is a PR somewhere to improve the message / make it bolder. I think it's supposed to be on its own line as well, will fix that for sure. Sorry for the hiccup!

@fridex
Copy link
Contributor Author

fridex commented Apr 30, 2018

Sorry for the hiccup!

No problem at all. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Dependency Resolution Issue relates to dependency resolution.
Projects
None yet
Development

No branches or pull requests

2 participants