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

Dependency solver ignores python_version in required packages #5145

Closed
3 tasks done
m-dz opened this issue Feb 3, 2022 · 3 comments
Closed
3 tasks done

Dependency solver ignores python_version in required packages #5145

m-dz opened this issue Feb 3, 2022 · 3 comments
Labels
kind/bug Something isn't working as expected

Comments

@m-dz
Copy link

m-dz commented Feb 3, 2022

  • I am on the latest 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).

Issue

Running poetry install -vvv fails on dependencies resolving step for google-colab:

Resolving dependencies...
   1: fact: demo is 0.0.1
   1: derived: demo
   1: fact: demo depends on google-colab (*)
   1: fact: demo depends on numpy (*)
   1: fact: demo depends on pandas (>=1.3.0)
   1: selecting demo (0.0.1)
   1: derived: pandas (>=1.3.0)
   1: derived: numpy
   1: derived: google-colab
   1: fact: google-colab (1.0.0) depends on google-auth (>=1.4.0,<1.5.0)
   1: fact: google-colab (1.0.0) depends on ipykernel (>=4.6.0,<4.7.0)
   1: fact: google-colab (1.0.0) depends on ipython (>=5.5.0,<5.6.0)
   1: fact: google-colab (1.0.0) depends on notebook (>=5.2.0,<5.3.0)
   1: fact: google-colab (1.0.0) depends on six (>=1.12.0,<1.13.0)
   1: fact: google-colab (1.0.0) depends on pandas (>=0.24.0,<0.25.0)
   1: fact: google-colab (1.0.0) depends on portpicker (>=1.2.0,<1.3.0)
   1: fact: google-colab (1.0.0) depends on requests (>=2.21.0,<2.22.0)
   1: fact: google-colab (1.0.0) depends on tornado (>=4.5.0,<4.6.0)
   1: derived: not google-colab (==1.0.0)
   1: fact: no versions of google-colab match !=1.0.0
   1: conflict: no versions of google-colab match !=1.0.0
   1: !  google-colab (!=1.0.0) is partially satisfied by not  google-colab (1.0.0)
   1: ! which is caused by "google-colab (1.0.0) depends on pandas (>=0.24.0,<0.25.0)"
   1: ! thus: every version of google-colab requires pandas (>=0.24.0,<0.25.0)
   1: !  google-colab (*) is satisfied by  google-colab (*)
   1: ! which is caused by "demo depends on google-colab (*)"
   1: ! thus: pandas is required
   1: ! not  pandas (>=0.24.0,<0.25.0) is satisfied by  pandas (>=1.3.0)
   1: ! which is caused by "demo depends on pandas (>=1.3.0)"
   1: ! thus: version solving failed
   1: Version solving took 0.352 seconds.
   1: Tried 1 solutions.
  SolverProblemError

  Because no versions of google-colab match !=1.0.0
   and google-colab (1.0.0) depends on pandas (>=0.24.0,<0.25.0), every version of google-colab requires pandas (>=0.24.0,<0.25.0).
  So, because demo depends on both google-colab (*) and pandas (>=1.3.0), version solving failed.

  at ~/.local/share/pypoetry/venv/lib/python3.7/site-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

whereas google-colab 1.0.0 on Python 3.7.1 should use pandas>=1.1.0 according to https://github.com/googlecolab/colabtools/blob/main/setup.py#L30:

DEPENDENCIES = (
    [...]
    'pandas~=0.24.0; python_version < "3.0"',
    'pandas>=1.1.0; python_version >= "3.0"',
    [...]
)

Comments

I believe this might be related to #2187

@m-dz m-dz added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 3, 2022
@finswimmer
Copy link
Member

finswimmer commented Feb 3, 2022

Hey @m-dz,

the version in the github repo is not the same as the version available on pypi.

There you'll find this in the setup.py:

DEPENDENCIES = (
    # Note: these dependency versions should be kept in-sync with the versions
    # specified in the docker container requirements files.
    'google-auth~=1.4.0',
    'ipykernel~=4.6.0',
    'ipython~=5.5.0',
    'notebook~=5.2.0',
    'six~=1.12.0',
    'pandas~=0.24.0',
    'portpicker~=1.2.0',
    'requests~=2.21.0',
    'tornado~=4.5.0',
)

fin swimmer

@m-dz
Copy link
Author

m-dz commented Feb 3, 2022

Ugh, thank you and apologies for suspecting the fault of Poetry here. I'll try to raise this with the other side.

Copy link

github-actions bot commented Mar 2, 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants