Skip to content

Extra dependencies for package on private repo uninstalled when running poetry install. #3224

Closed

Description

@iksteen

Issue

After installing a package with extras from a private repository and running poetry install again, the extra dependencies are uninstalled. For easy reproducibility I've created a private repository that's publicly accessible and contains a single package (iksteen-aaa).

$ poetry add iksteen-aaa -E example
Using version ^0.1.0 for iksteen-aaa

Updating dependencies
Resolving dependencies... (1.6s)

Writing lock file

Package operations: 9 installs, 0 updates, 0 removals

  • Installing pycparser (2.20)
  • Installing cffi (1.14.3)
  • Installing pyasn1 (0.4.8)
  • Installing six (1.15.0)
  • Installing cryptography (3.1.1)
  • Installing ecdsa (0.14.1)
  • Installing rsa (4.6)
  • Installing python-jose (3.2.0)
  • Installing iksteen-aaa (0.1.0)
  • Run poetry install again and see the extra dependencies getting uninstalled:
$ poetry install
Installing dependencies from lock file

Package operations: 0 installs, 0 updates, 8 removals

  • Removing cffi (1.14.3)
  • Removing cryptography (3.1.1)
  • Removing ecdsa (0.14.1)
  • Removing pyasn1 (0.4.8)
  • Removing pycparser (2.20)
  • Removing python-jose (3.2.0)
  • Removing rsa (4.6)
  • Removing six (1.15.0)

When adding the package in a different way, f.e. by adding the wheel by its direct URL https://pypi.thegraveyard.org/api/package/iksteen-aaa/iksteen_aaa-0.1.0-py3-none-any.whl, the uninstalling of the extra dependencies does NOT occur.

Activity

  1. added
    kind/bugSomething isn't working as expected
    status/triageThis issue needs to be triaged
    on Oct 16, 2020
  2. abn commented on Oct 16, 2020

    @abn
    Member

    @iksteen first off, thank you for the extremely useful bug report! 👍

    Did a bit of digging; seems the issue is the way we parse the extras from the lock file. I have a hotfix for 1.1 and a proper fix for 1.2. Will put up a PR soon.

  3. iksteen commented on Oct 16, 2020

    @iksteen
    Author

    @abn That's awesome! Thanks for the quick triage!

  4. added a commit that references this issue on Oct 16, 2020
    a76b6d2
  5. abn commented on Oct 16, 2020

    @abn
    Member

    @iksteen Good bug reports help :)

    Can you please try the fix at #3229.

    Using pipx

    pipx install --suffix=@3229 'poetry @ git+https://github.com/python-poetry/poetry.git@refs/pull/3229/head'

    Using a container (podman | docker)

    podman run --rm -i --entrypoint bash python:3.8 <<EOF
    set -xe
    python -m pip install -q git+https://github.com/python-poetry/poetry.git@refs/pull/3229/head
    install -d foobar
    pushd foobar
    curl -sLO https://gist.githubusercontent.com/iksteen/83a3d5b55a8274bfbb434d72676fea70/raw/c981a55f957f61766be0ff7c77e169017aaf8d56/pyproject.toml
    poetry install --no-root
    poetry add iksteen-aaa -E example
    poetry install --no-root
    EOF
  6. iksteen commented on Oct 17, 2020

    @iksteen
    Author

    Works for me!

  7. added a commit that references this issue on Oct 23, 2020
    ff3e57e
  8. added a commit that references this issue on Feb 26, 2024
    89e1d7c
  9. github-actions commented on Mar 2, 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.

  10. locked as resolved and limited conversation to collaborators on Mar 2, 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 expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions