Taragolis commented on code in PR #37789:
URL: https://github.com/apache/airflow/pull/37789#discussion_r1507972621
##########
scripts/in_container/run_generate_constraints.py:
##########
@@ -132,21 +132,21 @@ def current_constraints_file(self) -> Path:
@cached_property
def get_freeze_command(self) -> list[str]:
if self.use_uv:
- return ["uv", "pip", "freeze"]
+ return ["uv", "pip", "freeze", "--python", sys.executable]
Review Comment:
Is it even valid option?
```console
apache-airflow-providers-fab==1.0.2.dev0 (from
file:///dist/apache_airflow_providers_fab-1.0.2.dev0-py3-none-any.whl)
```
packaging shows that no
```python
from packaging.requirements import Requirement
str_req = "apache-airflow-providers-fab==1.0.2.dev0 (from
file:///dist/apache_airflow_providers_fab-1.0.2.dev0-py3-none-any.whl)"
req = Requirement(str_req) # raise an error on parse
print(f"{req.name=!r}")
print(f"{req.specifier=!r}")
print(f"{req.url=!r}")
```
It should be something like that
```python
from packaging.requirements import Requirement
str_req = "apache-airflow-providers-fab @
file:///dist/apache_airflow_providers_fab-1.0.2.dev0-py3-none-any.whl"
req = Requirement(str_req)
print(f"{req.name=!r}")
print(f"{req.specifier=!r}")
print(f"{req.url=!r}")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]