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

extra deps of dependency installed from source are lost #2428

Closed
3 tasks done
gaetano-guerriero opened this issue May 15, 2020 · 3 comments
Closed
3 tasks done

extra deps of dependency installed from source are lost #2428

gaetano-guerriero opened this issue May 15, 2020 · 3 comments
Labels
kind/bug Something isn't working as expected status/duplicate Duplicate issues

Comments

@gaetano-guerriero
Copy link

Issue

Updating a single dependency forgets the extras of another dependency
installed from source in the lock file.

Given pyproject.toml in the gist:

pendulum = "2.0.0"
requests = {git = "https://github.com/psf/requests.git", rev = "v2.23.0", extras = ["security"]}
$ poetry install

correctly installs cryptography and pyOpenSSL, the "security" extra dependency of requests

If I update pendulum:

$ poetry add pendulum==2.1.0

cryptography and pyOpenSSL are removed from poetry.lock file, after that poetry install fails:

$ poetry install -vvv
Using virtualenv: /tmp/foobar/.venv
Installing dependencies from lock file

[SolverProblemError]
Because no versions of requests match !=2.23.0
 and requests (2.23.0) depends on pyOpenSSL (>=0.14), every version of requests requires pyOpenSSL (>=0.14).
So, because no versions of pyopenssl match >=0.14
 and foobar depends on requests (*), version solving failed.

Traceback (most recent call last):
  File "/home/gaetano/.poetry/lib/poetry/_vendor/py3.7/clikit/console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "/home/gaetano/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "/home/gaetano/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "/home/gaetano/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/command.py", line 92, in wrap_handle
    return self.handle()
  File "/home/gaetano/.poetry/lib/poetry/console/commands/install.py", line 63, in handle
    return_code = installer.run()
  File "/home/gaetano/.poetry/lib/poetry/installation/installer.py", line 74, in run
    self._do_install(local_repo)
  File "/home/gaetano/.poetry/lib/poetry/installation/installer.py", line 225, in _do_install
    ops = solver.solve(use_latest=whitelist)
  File "/home/gaetano/.poetry/lib/poetry/puzzle/solver.py", line 36, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "/home/gaetano/.poetry/lib/poetry/puzzle/solver.py", line 190, in _solve
    raise SolverProblemError(e)
@gaetano-guerriero gaetano-guerriero added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 15, 2020
@finswimmer
Copy link
Member

Hello @gaetano-guerriero,

thanks a lot for reporting. However there is already in open issue for this: #1609

If you disagree, just leave a comment.

fin swimmer

@finswimmer finswimmer added status/duplicate Duplicate issues and removed status/triage This issue needs to be triaged labels May 17, 2020
@gaetano-guerriero
Copy link
Author

They are surely deeply related.
Anyway the core of my bug report is that with from pypi resolution works fine, with a source dependency its extra deps are sometimes lost.
The reporter of the other issue mentions this in a comment anyway.

tony added a commit to eduflow/uvicorn that referenced this issue Mar 25, 2021
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 status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

2 participants