This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new db6e103947 More correctly work around `uv sync` issue with python
3.10+ only dep (#43227)
db6e103947 is described below
commit db6e10394731db5a4775f3414e70650e06bfb2bb
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Mon Oct 21 20:41:36 2024 +0100
More correctly work around `uv sync` issue with python 3.10+ only dep
(#43227)
Just having the python_version requirement doesn't seem to correctly make uv
"fork" the resolver path (Charlie's words/terms), so we either need to
specify
both module versions here. The other option that could work is putting this
in
our pyproject.toml
```
[tool.uv]
environments = ["python_version >= '3.10'", "python_version < '3.10'"]
```
But having both versions specified keeps the fix localized into the provider
so I have chosen this approach.
This is likely why the exclued-python-version setting we already had wasn't
working for uv sync.
https://github.com/astral-sh/uv/issues/4668
---
generated/provider_dependencies.json | 1 +
providers/src/airflow/providers/cloudant/provider.yaml | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/generated/provider_dependencies.json
b/generated/provider_dependencies.json
index 4457556be0..7bfbd76aca 100644
--- a/generated/provider_dependencies.json
+++ b/generated/provider_dependencies.json
@@ -353,6 +353,7 @@
"cloudant": {
"deps": [
"apache-airflow>=2.8.0",
+ "ibmcloudant==0.7.0 ; python_version < \"3.10\"",
"ibmcloudant==0.9.1 ; python_version >= \"3.10\""
],
"devel-deps": [],
diff --git a/providers/src/airflow/providers/cloudant/provider.yaml
b/providers/src/airflow/providers/cloudant/provider.yaml
index 01a0c0a15d..706a262106 100644
--- a/providers/src/airflow/providers/cloudant/provider.yaml
+++ b/providers/src/airflow/providers/cloudant/provider.yaml
@@ -48,9 +48,12 @@ versions:
dependencies:
- apache-airflow>=2.8.0
- # Even though 3.9 is excluded below, we need to make this python_version
aware so that `uv` can generate a
- # full lock file when building lock file from provider sources
+ # Even though 3.9 is excluded below, we need to make this python_version
aware so that `uv` (at least as of
+ # 0.4.25) can generate a full lock file when building lock file from
provider sources. Seeing the duplicate
+ # dep makes the UV resolver correctly "fork" and try to come up with
alternative solutions.
+ # https://github.com/astral-sh/uv/issues/4668
- 'ibmcloudant==0.9.1 ; python_version >= "3.10"'
+ - 'ibmcloudant==0.7.0 ; python_version < "3.10"'
excluded-python-versions:
# ibmcloudant transitively brings in urllib3 2.x, but the snowflake provider
has a dependency that pins