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

Unable to resolve simple case w/o a hint on version #2171

Closed
3 tasks done
sandroden opened this issue Mar 10, 2020 · 2 comments
Closed
3 tasks done

Unable to resolve simple case w/o a hint on version #2171

sandroden opened this issue Mar 10, 2020 · 2 comments
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected status/duplicate Duplicate issues

Comments

@sandroden
Copy link

  • I am on the latest (1.0.5) Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Linux Ubuntu 19.10
  • Poetry version: 1.0.5

Issue

Startin with an empty project and setting python version to ^3.5 as in

[tool.poetry]
name = "testipy"
version = "0.1.0"
description = ""
authors = ["Sandro...]

[tool.poetry.dependencies]
python = "^3.5"

Now add request for ipython, it won't be resolved, adding the hint ipython=^7 will be resolved:

$ poetry add ipython --dry-run 
/home/sandro/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
The currently activated Python version 2.7.17 is not supported by the project (^3.5).
Trying to find and use a compatible version. 
Using python3 (3.7.5)
Using version ^7.13.0 for ipython

Updating dependencies
Resolving dependencies... (0.0s)

[SolverProblemError]
The current project's Python requirement (^3.5) is not compatible with some of the required packages Python requirement:
  - ipython requires Python >=3.6

Because no versions of ipython match >7.13.0,<8.0.0
 and ipython (7.13.0) requires Python >=3.6, ipython is forbidden.
So, because testipy depends on ipython (^7.13.0), version solving failed.

The temporary solution is to add a hint on the version:

$ poetry add ipython^7 --dry-run 
/home/sandro/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)
The currently activated Python version 2.7.17 is not supported by the project (^3.5).
Trying to find and use a compatible version. 
Using python3 (3.7.5)

Updating dependencies
Resolving dependencies... (1.3s)


Package operations: 14 installs, 0 updates, 0 removals, 2 skipped

  - Installing decorator (4.4.2)
  - Installing ipython-genutils (0.2.0)
  - Installing parso (0.6.2)
  - Installing ptyprocess (0.6.0)
  - Installing six (1.14.0)
  - Installing wcwidth (0.1.8)
  - Skipping appnope (0.1.0) Not needed for the current environment
  - Installing backcall (0.1.0)
  - Skipping colorama (0.4.3) Not needed for the current environment
  - Installing jedi (0.16.0)
  - Installing pexpect (4.8.0)
  - Installing pickleshare (0.7.5)
  - Installing prompt-toolkit (2.0.10)
  - Installing pygments (2.6.1)
  - Installing traitlets (4.3.3)
  - Installing ipython (7.9.0)

This time poetry correctly picks 7.9 that is the last release that supported Python3.5. It seems to me that is should have been able to get it even w/o any release constraint. I may not event know which is the last major that supported that python version.

@mkniewallner
Copy link
Member

Duplicate of #707.

@mkniewallner mkniewallner closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants