Skip to content

Poetry Update always re-installs *all* dependencies #2534

Closed

Description

@Imaclean74
  • 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).
  • **Linux 3.10.0-1062.21.1.el7.x86_64 **
  • 1.08:
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

Since upgrading to 1.0.8 poetry will "upgrade" every dependency to the same version as previously. ie after the dependency resolution / Version solving poetry thinks every single package in pyproject.toml ( and dependencies ) needs upgrading and proceeds to update them to exactly the same version as previously. I've tried deleting the venv and re-running and get consistent behavior every time.

bash-4.2$ poetry update
Updating dependencies
Resolving dependencies... (52.7s)

Package operations: 0 installs, 59 updates, 0 removals

- Updating pycparser (2.20 -> 2.20)
- Updating certifi (2020.4.5.2 -> 2020.4.5.2)
- Updating cffi (1.14.0 -> 1.14.0)
- Updating chardet (3.0.4 -> 3.0.4)
- Updating idna (2.9 -> 2.9)

Activity

  1. Imaclean74 commented on Jun 10, 2020

    @Imaclean74
    ContributorAuthor

    oh - and I'm working against a private internal pypi repo - which mirrors the public one.

  2. Imaclean74 commented on Jun 10, 2020

    @Imaclean74
    ContributorAuthor

    Not able to create a Gist - but this is essentially the contents of my pyproject.toml

    [tool.poetry]
    name = "myproject"
    version = "0.1.0"
    description = "."
    authors = [""]
    
    [tool.poetry.dependencies]
    python = "^3.7"
    redis = "^3.4.1"
    pyignite = "^0.3.4"
    sqlanydb = "^1.0.10"
    tabulate = "^0.8.7"
    pandas = "^1.0.3"
    dacite = "^1.4.0"
    pydantic = "^1.4"
    httpx = "^0.12.1"
    fastapi = "^0.54.1"
    uvicorn = "^0.11.3"
    loguru = "^0.4.1"
    pykerberos = "^1.2.1"
    typer = "^0.2.1"
    
    [tool.poetry.dev-dependencies]
    pytest = "^5.2"
    devtools = "^0.5.1"
    mypy = "^0.770"
    
    [[tool.poetry.source]]
    name = "internal,"
    url = "<internal url>"
    default = true
    
    [build-system]
    requires = ["poetry>=0.12"]
    build-backend = "poetry.masonry.api"
    
  3. mxab commented on Jun 10, 2020

    @mxab
    Contributor

    I think this is fixed in 1.0.9

  4. frankier commented on Jun 11, 2020

    @frankier

    It still occurs for me in 1.0.9 on Debian buster/Python 3.8. What about you @Imaclean74? Can you check on 1.0.9?

  5. Imaclean74 commented on Jun 12, 2020

    @Imaclean74
    ContributorAuthor

    looks better for me on 1.0.9. Thanks @mxab , @frankier

  6. Imaclean74 commented on Jun 16, 2020

    @Imaclean74
    ContributorAuthor

    @frankier - still an issue for you on Debian ? if not I'll close the ticket

  7. tlc28 commented on Jun 17, 2020

    @tlc28

    Hi,

    I have the same problem on Guix:

    $ poetry --version
    Poetry version 1.0.9
    
    $ poetry new my_project
    Created package my_project in my_project
    
    $ cd my_project
    
    $ poetry install
    Creating virtualenv my-project-lRhe0Mna-py3.8 in /home/t/.cache/pypoetry/virtualenvs
    Updating dependencies
    Resolving dependencies... (0.7s)
    Writing lock file
    Package operations: 5 installs, 4 updates, 0 removals
      - Updating pyparsing (2.4.6 /gnu/store/y4n225qk6limj4yxplscppwqcaan49hw-python-pyparsing-2.4.6/lib/python3.8/site-packages -> 2.4.7)
      - Updating six (1.14.0 /gnu/store/b0svsfz2vw2qwlfsi56k8fwbx4fzcfhk-python-six-1.14.0/lib/python3.8/site-packages -> 1.15.0)
      - Updating attrs (19.3.0 /gnu/store/1m1djqviznpmgk6z0wwqm5jj7q26f9vh-python-attrs-19.3.0/lib/python3.8/site-packages -> 19.3.0)
      - Updating more-itertools (8.2.0 /gnu/store/avamm2w7dw3hinrixx09h6dvw8m3mili-python-more-itertools-8.2.0/lib/python3.8/site-packages -> 8.4.0)
      - Installing packaging (20.4)
      - Installing pluggy (0.13.1)
      - Installing py (1.8.2)
      - Installing wcwidth (0.2.4)
      - Installing pytest (5.4.3)
      - Installing my_project (0.1.0)
    
    $ poetry install
    Installing dependencies from lock file
    Package operations: 0 installs, 9 updates, 0 removals
      - Updating pyparsing (2.4.6 /gnu/store/y4n225qk6limj4yxplscppwqcaan49hw-python-pyparsing-2.4.6/lib/python3.8/site-packages -> 2.4.7)
      - Updating six (1.14.0 /gnu/store/b0svsfz2vw2qwlfsi56k8fwbx4fzcfhk-python-six-1.14.0/lib/python3.8/site-packages -> 1.15.0)
      - Updating attrs (19.3.0 /gnu/store/1m1djqviznpmgk6z0wwqm5jj7q26f9vh-python-attrs-19.3.0/lib/python3.8/site-packages -> 19.3.0)
      - Updating more-itertools (8.2.0 /gnu/store/avamm2w7dw3hinrixx09h6dvw8m3mili-python-more-itertools-8.2.0/lib/python3.8/site-packages -> 8.4.0)
      - Updating packaging (20.4 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 20.4)
      - Updating pluggy (0.13.1 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 0.13.1)
      - Updating py (1.8.2 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 1.8.2)
      - Updating wcwidth (0.2.4 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 0.2.4)
      - Updating pytest (5.4.3 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 5.4.3)
      - Installing my_project (0.1.0)
    
    $ poetry update
    Updating dependencies
    Resolving dependencies... (0.4s)
    Package operations: 0 installs, 9 updates, 0 removals
      - Updating pyparsing (2.4.6 /gnu/store/y4n225qk6limj4yxplscppwqcaan49hw-python-pyparsing-2.4.6/lib/python3.8/site-packages -> 2.4.7)
      - Updating six (1.14.0 /gnu/store/b0svsfz2vw2qwlfsi56k8fwbx4fzcfhk-python-six-1.14.0/lib/python3.8/site-packages -> 1.15.0)
      - Updating attrs (19.3.0 /gnu/store/1m1djqviznpmgk6z0wwqm5jj7q26f9vh-python-attrs-19.3.0/lib/python3.8/site-packages -> 19.3.0)
      - Updating more-itertools (8.2.0 /gnu/store/avamm2w7dw3hinrixx09h6dvw8m3mili-python-more-itertools-8.2.0/lib/python3.8/site-packages -> 8.4.0)
      - Updating packaging (20.4 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 20.4)
      - Updating pluggy (0.13.1 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 0.13.1)
      - Updating py (1.8.2 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 1.8.2)
      - Updating wcwidth (0.2.4 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 0.2.4)
      - Updating pytest (5.4.3 /home/t/.cache/pypoetry/virtualenvs/my-project-lRhe0Mna-py3.8/lib/python3.8/site-packages -> 5.4.3)
    

    Could this be a problem with the version of some Poetry's dependencies?!

    Another question that might (not) be related: is it normal that it detects and uses python packages installed on my system (/gnu/store/[…]-python-six-1.14.0/lib/python3.8/site-packages) instead of installing them it the venv?!

  8. finswimmer commented on Jun 20, 2020

    @finswimmer
    Member

    Hello @tlc28 ,

    Another question that might (not) be related: is it normal that it detects and uses python packages installed on my system (/gnu/store/[…]-python-six-1.14.0/lib/python3.8/site-packages) instead of installing them it the venv?!

    no, this is not normal. I saw this somewhere before in other issue, but could not remember what was the cause there 🤔 How have you installed poetry? Try removing your venv completely and run poetry install again.

    fin swimmer

  9. abn commented on Jun 20, 2020

    @abn
    Member

    @tlc28 @frankier your issue might be related to #2225. This has been resolved in develop (#2360) you can test it out by installing that branch, do not think this is available in a pre-releae yet.

    pip install git+https://github.com/python-poetry/poetry.git@develop

    Can you verify if that was the issue?

  10. tlc28 commented on Jul 2, 2020

    @tlc28

    Hi @abn and sorry for the late reply!
    Seems to solve the problem, thanks!

  11. added and removed
    status/triageThis issue needs to be triaged
    on Jul 2, 2020
  12. abn commented on Jul 2, 2020

    @abn
    Member

    Duplicate of #2225

  13. github-actions commented on Mar 3, 2024

    @github-actions

    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.

  14. locked as resolved and limited conversation to collaborators on Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/duplicateDuplicate issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions