-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Summary
Hello,
I'm currently running several experiments to simulate the installation of various Python packages through time. The process is basically the following one: (1) Create an empty project called "root"; (2) Add the target package as a dependency; (3) Display the dependency tree. With this process, the dependency tree should be something like "root > target_package > [TREE of the target package]". However, I found many cases where additional packages are reported in the tree, at the same level than root.
Consider the following example with apache-airflow-providers-trino in version 4.3.0, whose installation is simulated on 2023-01-01 with Python 3.11. We start by creating the bare project:
uv init . --bare --name root --python 3.11
Then we add the target package as a dependency:
uv add apache-airflow-providers-trino==4.3.0 --exclude-newer 2023-01-01 --no-sync --python 3.11
A quick look at the pyproject.toml confirms that only apache-airflow-providers-trino was added as a direct dependency:
cat pyproject.toml returns:
[project]
name = "root"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"apache-airflow-providers-trino==4.3.0",
]
Then, I use uv tree to display the dependency tree. Since the tree is quite large, I limit its depth to 1 and truncate the output to the first few lines (this is enough to see the "issues"):
uv tree --no-dev --no-dedupe --quiet --depth 1 | head -5
This displays:
root v0.1.0
└── apache-airflow-providers-trino v4.3.0
apache-airflow-core v3.1.5
├── a2wsgi v1.10.10
├── aiosqlite v0.22.0
My question is: why is apache-airflow-core being reported at the same level than root? It should be somewhere nested below apache-airflow-providers-trino (and actually is reported there as well) only.
Thanks!
Platform
Linux 6.17.9-300.fc43.x86_64 x86_64 GNU/Linux
Version
uv 0.9.15
Python version
3.11