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

Install/update inconsistency #2080

Closed
3 tasks done
Ampretuzo opened this issue Feb 24, 2020 · 3 comments · Fixed by python-poetry/poetry-core#78 or #2887
Closed
3 tasks done

Install/update inconsistency #2080

Ampretuzo opened this issue Feb 24, 2020 · 3 comments · Fixed by python-poetry/poetry-core#78 or #2887
Labels
kind/bug Something isn't working as expected

Comments

@Ampretuzo
Copy link

Issue

I have single library dependency in pyproject.toml - google-cloud-ndb==1.0.1.
When I run poetry install in a fresh project, everything goes well: library is installed and I can import/use it as usual.
However, when I do poetry update right after poetry install, poetry removes grpcio.
That could be a systematic bug in dependency resolution (note that grpcio is marked as extra dependency for several packages: googleapis-common-protos, google-cloud-core, google-api-core).
To my understanding, updating a few seconds after fresh install should not do anything.

Follow these steps:

$ mkdir poetry_update_bug

$ cd poetry_update_bug

$ echo '
[tool.poetry]
name = "poetry_update_bug"
version = "0.1.0"
description = "Help reproduce install/update bug"
authors = ["Sergi Chalauri <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.8"
google-cloud-ndb = "1.0.1"

[tool.poetry.dev-dependencies]
# None needed

[build-system]
requires = ["poetry==1.0.3"]
build-backend = "poetry.masonry.api"
' > pyproject.toml


$ poetry install -vvv
Using virtualenv: /home/sergi/.cache/pypoetry/virtualenvs/poetry-update-bug-z958yr5R-py3.8
Updating dependencies
Resolving dependencies...
   1: fact: poetry-update-bug is 0.1.0
   1: derived: poetry-update-bug
   1: fact: poetry-update-bug depends on google-cloud-ndb (1.0.1)
   1: selecting poetry-update-bug (0.1.0)
   1: derived: google-cloud-ndb (1.0.1)
   1: fact: google-cloud-ndb (1.0.1) depends on google-cloud-datastore (>=1.7.0)
   1: fact: google-cloud-ndb (1.0.1) depends on redis (*)
   1: selecting google-cloud-ndb (1.0.1)
   1: derived: redis (*)
   1: derived: google-cloud-datastore (>=1.7.0)
   1: fact: google-cloud-datastore (1.10.0) depends on google-api-core (>=1.14.0,<2.0.0dev)
   1: fact: google-cloud-datastore (1.10.0) depends on google-cloud-core (>=1.0.3,<2.0dev)
   1: selecting google-cloud-datastore (1.10.0)
   1: derived: google-cloud-core (>=1.0.3,<2.0dev)
   1: derived: google-api-core (>=1.14.0,<2.0.0dev)
   1: fact: google-cloud-core (1.3.0) depends on google-api-core (>=1.16.0,<2.0.0dev)
   1: selecting google-cloud-core (1.3.0)
   1: derived: google-api-core (>=1.16.0,<2.0.0dev)
   1: fact: google-api-core (1.16.0) depends on googleapis-common-protos (>=1.6.0,<2.0dev)
   1: fact: google-api-core (1.16.0) depends on protobuf (>=3.4.0)
   1: fact: google-api-core (1.16.0) depends on google-auth (>=0.4.0,<2.0dev)
   1: fact: google-api-core (1.16.0) depends on requests (>=2.18.0,<3.0.0dev)
   1: fact: google-api-core (1.16.0) depends on six (>=1.10.0)
   1: fact: google-api-core (1.16.0) depends on pytz (*)
   1: fact: google-api-core (1.16.0) depends on grpcio (>=1.8.2,<2.0dev)
   1: selecting google-api-core (1.16.0)
   1: derived: grpcio (>=1.8.2,<2.0dev)
   1: derived: pytz (*)
   1: derived: six (>=1.10.0)
   1: derived: requests (>=2.18.0,<3.0.0dev)
   1: derived: google-auth (>=0.4.0,<2.0dev)
   1: derived: protobuf (>=3.4.0)
   1: derived: googleapis-common-protos (>=1.6.0,<2.0dev)
   1: fact: googleapis-common-protos (1.51.0) depends on protobuf (>=3.6.0)
   1: selecting googleapis-common-protos (1.51.0)
   1: derived: protobuf (>=3.6.0)
   1: selecting six (1.14.0)
   1: fact: requests (2.23.0) depends on chardet (>=3.0.2,<4)
   1: fact: requests (2.23.0) depends on idna (>=2.5,<3)
   1: fact: requests (2.23.0) depends on urllib3 (>=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26)
   1: fact: requests (2.23.0) depends on certifi (>=2017.4.17)
   1: selecting requests (2.23.0)
   1: derived: certifi (>=2017.4.17)
   1: derived: urllib3 (>=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26)
   1: derived: idna (>=2.5,<3)
   1: derived: chardet (>=3.0.2,<4)
   1: selecting chardet (3.0.4)
   1: selecting idna (2.9)
   1: fact: protobuf (3.11.3) depends on six (>=1.9)
   1: selecting protobuf (3.11.3)
   1: selecting certifi (2019.11.28)
   1: selecting urllib3 (1.25.8)
   1: fact: google-auth (1.11.2) depends on cachetools (>=2.0.0,<5.0)
   1: fact: google-auth (1.11.2) depends on pyasn1-modules (>=0.2.1)
   1: fact: google-auth (1.11.2) depends on rsa (>=3.1.4,<4.1)
   1: fact: google-auth (1.11.2) depends on six (>=1.9.0)
   1: selecting google-auth (1.11.2)
   1: derived: rsa (>=3.1.4,<4.1)
   1: derived: pyasn1-modules (>=0.2.1)
   1: derived: cachetools (>=2.0.0,<5.0)
   1: selecting cachetools (4.0.0)
   1: fact: pyasn1-modules (0.2.8) depends on pyasn1 (>=0.4.6,<0.5.0)
   1: selecting pyasn1-modules (0.2.8)
   1: derived: pyasn1 (>=0.4.6,<0.5.0)
   1: selecting pyasn1 (0.4.8)
   1: fact: rsa (4.0) depends on pyasn1 (>=0.1.3)
   1: selecting rsa (4.0)
   1: selecting redis (3.4.1)
   1: fact: grpcio (1.27.2) depends on six (>=1.5.2)
   1: selecting grpcio (1.27.2)
   1: selecting pytz (2019.3)
   1: Version solving took 4.463 seconds.
   1: Tried 1 solutions.

Writing lock file

No dependencies to install or update

  - Skipping pyasn1 (0.4.8) Already installed
  - Skipping six (1.14.0) Already installed
  - Skipping cachetools (4.0.0) Already installed
  - Skipping certifi (2019.11.28) Already installed
  - Skipping chardet (3.0.4) Already installed
  - Skipping idna (2.9) Already installed
  - Skipping protobuf (3.11.3) Already installed
  - Skipping pyasn1-modules (0.2.8) Already installed
  - Skipping rsa (4.0) Already installed
  - Skipping urllib3 (1.25.8) Already installed
  - Skipping google-auth (1.11.2) Already installed
  - Skipping googleapis-common-protos (1.51.0) Already installed
  - Skipping pytz (2019.3) Already installed
  - Skipping requests (2.23.0) Already installed
  - Skipping google-api-core (1.16.0) Already installed
  - Skipping grpcio (1.27.2) Already installed
  - Skipping google-cloud-core (1.3.0) Already installed
  - Skipping google-cloud-datastore (1.10.0) Already installed
  - Skipping redis (3.4.1) Already installed
  - Skipping google-cloud-ndb (1.0.1) Already installed


$ poetry update -vvv
Using virtualenv: /home/sergi/.cache/pypoetry/virtualenvs/poetry-update-bug-z958yr5R-py3.8
Updating dependencies
Resolving dependencies...
   1: fact: poetry-update-bug is 0.1.0
   1: derived: poetry-update-bug
   1: fact: poetry-update-bug depends on google-cloud-ndb (1.0.1)
   1: selecting poetry-update-bug (0.1.0)
   1: derived: google-cloud-ndb (1.0.1)
PyPI: 1 packages found for google-cloud-ndb 1.0.1
   1: fact: google-cloud-ndb (1.0.1) depends on google-cloud-datastore (>=1.7.0)
   1: fact: google-cloud-ndb (1.0.1) depends on redis (*)
   1: selecting google-cloud-ndb (1.0.1)
   1: derived: redis (*)
   1: derived: google-cloud-datastore (>=1.7.0)
PyPI: 61 packages found for redis *
   1: selecting redis (3.4.1)
PyPI: No release information found for google-cloud-datastore-0.0.1, skipping
PyPI: 8 packages found for google-cloud-datastore >=1.7.0
   1: fact: google-cloud-datastore (1.10.0) depends on google-api-core (>=1.14.0,<2.0.0dev)
   1: fact: google-cloud-datastore (1.10.0) depends on google-cloud-core (>=1.0.3,<2.0dev)
   1: selecting google-cloud-datastore (1.10.0)
   1: derived: google-cloud-core (>=1.0.3,<2.0dev)
   1: derived: google-api-core (>=1.14.0,<2.0.0dev)
PyPI: No release information found for google-cloud-core-0.0.1, skipping
PyPI: 4 packages found for google-cloud-core >=1.0.3,<2.0dev
   1: fact: google-cloud-core (1.3.0) depends on google-api-core (>=1.16.0,<2.0.0dev)
   1: selecting google-cloud-core (1.3.0)
   1: derived: google-api-core (>=1.16.0,<2.0.0dev)
PyPI: 1 packages found for google-api-core >=1.16.0,<2.0.0dev
   1: fact: google-api-core (1.16.0) depends on googleapis-common-protos (>=1.6.0,<2.0dev)
   1: fact: google-api-core (1.16.0) depends on protobuf (>=3.4.0)
   1: fact: google-api-core (1.16.0) depends on google-auth (>=0.4.0,<2.0dev)
   1: fact: google-api-core (1.16.0) depends on requests (>=2.18.0,<3.0.0dev)
   1: fact: google-api-core (1.16.0) depends on six (>=1.10.0)
   1: fact: google-api-core (1.16.0) depends on pytz (*)
   1: selecting google-api-core (1.16.0)
   1: derived: pytz (*)
   1: derived: six (>=1.10.0)
   1: derived: requests (>=2.18.0,<3.0.0dev)
   1: derived: google-auth (>=0.4.0,<2.0dev)
   1: derived: protobuf (>=3.4.0)
   1: derived: googleapis-common-protos (>=1.6.0,<2.0dev)
PyPI: 82 packages found for pytz *
   1: selecting pytz (2019.3)
PyPI: 5 packages found for six >=1.10.0
   1: selecting six (1.14.0)
PyPI: No release information found for requests-0.0.1, skipping
PyPI: No release information found for requests-0.12.01, skipping
PyPI: No release information found for requests-2.15.0, skipping
PyPI: 12 packages found for requests >=2.18.0,<3.0.0dev
   1: fact: requests (2.23.0) depends on chardet (>=3.0.2,<4)
   1: fact: requests (2.23.0) depends on idna (>=2.5,<3)
   1: fact: requests (2.23.0) depends on urllib3 (>=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26)
   1: fact: requests (2.23.0) depends on certifi (>=2017.4.17)
   1: selecting requests (2.23.0)
   1: derived: certifi (>=2017.4.17)
   1: derived: urllib3 (>=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26)
   1: derived: idna (>=2.5,<3)
   1: derived: chardet (>=3.0.2,<4)
PyPI: 37 packages found for google-auth >=0.4.0,<2.0dev
   1: fact: google-auth (1.11.2) depends on cachetools (>=2.0.0,<5.0)
   1: fact: google-auth (1.11.2) depends on pyasn1-modules (>=0.2.1)
   1: fact: google-auth (1.11.2) depends on rsa (>=3.1.4,<4.1)
   1: fact: google-auth (1.11.2) depends on six (>=1.9.0)
   1: selecting google-auth (1.11.2)
   1: derived: rsa (>=3.1.4,<4.1)
   1: derived: pyasn1-modules (>=0.2.1)
   1: derived: cachetools (>=2.0.0,<5.0)
PyPI: 18 packages found for protobuf >=3.4.0
   1: fact: protobuf (3.11.3) depends on six (>=1.9)
   1: selecting protobuf (3.11.3)
PyPI: 3 packages found for googleapis-common-protos >=1.6.0,<2.0dev
   1: fact: googleapis-common-protos (1.51.0) depends on protobuf (>=3.6.0)
   1: selecting googleapis-common-protos (1.51.0)
PyPI: No release information found for certifi-0, skipping
PyPI: 14 packages found for certifi >=2017.4.17
   1: selecting certifi (2019.11.28)
PyPI: No release information found for urllib3-0.3, skipping
PyPI: No release information found for urllib3-0.3.1, skipping
PyPI: No release information found for urllib3-0.4.0, skipping
PyPI: No release information found for urllib3-0.4.1, skipping
PyPI: 14 packages found for urllib3 >=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26
   1: selecting urllib3 (1.25.8)
PyPI: No release information found for idna-0.1, skipping
PyPI: 5 packages found for idna >=2.5,<3
   1: selecting idna (2.9)
PyPI: 3 packages found for chardet >=3.0.2,<4
   1: selecting chardet (3.0.4)
PyPI: No release information found for rsa-3.2.1, skipping
PyPI: 9 packages found for rsa >=3.1.4,<4.1
   1: fact: rsa (4.0) depends on pyasn1 (>=0.1.3)
   1: selecting rsa (4.0)
   1: derived: pyasn1 (>=0.1.3)
PyPI: 8 packages found for pyasn1-modules >=0.2.1
   1: fact: pyasn1-modules (0.2.8) depends on pyasn1 (>=0.4.6,<0.5.0)
   1: selecting pyasn1-modules (0.2.8)
   1: derived: pyasn1 (>=0.4.6,<0.5.0)
PyPI: 7 packages found for cachetools >=2.0.0,<5.0
   1: selecting cachetools (4.0.0)
PyPI: No release information found for pyasn1-0.0.6a, skipping
PyPI: 3 packages found for pyasn1 >=0.4.6,<0.5.0
   1: selecting pyasn1 (0.4.8)
   1: Version solving took 0.193 seconds.
   1: Tried 1 solutions.

Writing lock file


Package operations: 0 installs, 0 updates, 1 removal

  - Removing grpcio (1.27.2)
@Ampretuzo Ampretuzo added the kind/bug Something isn't working as expected label Feb 24, 2020
@ghost
Copy link

ghost commented Jun 11, 2020

Can reproduce with the following package (that has a dependency on dask[dataframe]):

$ poetry new test_proj
$ cd test_proj
$ poetry install
$ poetry add tsfresh  # here everything gets installed as it should
$ poetry update  # here fsspec, locket and partd are removed

Similar bug to #2494 and #2300 IMO

@absassi
Copy link

absassi commented Jun 22, 2020

Also similar to #1614

Copy link

github-actions bot commented Mar 3, 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 3, 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
2 participants