question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extras of a dependency's dependency are not installed

See original GitHub issue
  • 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

Poetry does not install extras of a dependency’s dependency, if the dependency’s dependency is also referenced without the extra.

Here’s the pyproject.toml. The generated poetry.lock lockfile is here.

Pyproject.toml requires PyOTA package, which requires requests[security]. The security extra is not installed though. This can be observed by the fact the the lockfile has no pyOpenSSL entry, which is a part of the security extra of requests.

Note that we remove requests = "*" from pyproject.toml, then the security extra will be installed as expected. It seems the issue only occurs when the package that needs extras is referenced elsewhere with no mention of the extras.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:15
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mvoitkocommented, Oct 23, 2020

@abn updating helped

1reaction
sdispatercommented, Nov 22, 2019

The only way we can solve the extras issues currently is by always resolving the extra dependencies even though they were not opted in. That would fix the issue but it might introduce another which is that resolution conflict might be raised by extra dependencies even though they were never opted in.

I don’t see a perfect solution for this at the moment. The Python ecosystem is so unique and complex (some might say convoluted) that coming up with a perfect dependency resolver is almost impossible and will sometimes require the help of the end user by hinting it on how it should proceed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recursive Optional Dependencies in Python - Hynek Schlawack
A package's optional dependencies (also known as extras) are named sets of dependencies that are installed by putting their names inside ...
Read more >
Installing Python dependencies - AWS Documentation
A Python dependency is any package or distribution that is not included in the Apache Airflow base install for your Apache Airflow version...
Read more >
What is 'extra' in pypi dependency? - Stack Overflow
Extras are dependencies you can install in addition to the regular dependencies, if you ask for them explicitly. See them as optional ...
Read more >
Install extra ML.NET dependencies - Microsoft Learn
Learn how to install any native libraries that ML.NET packages are dependent on but do not get installed with the NuGet packages.
Read more >
Chapter 8. Troubleshooting Dependencies Red Hat Fuse 7.2
There are two basic causes of a missing dependency: either a required feature or bundle is not installed in the container; or your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found