potiuk commented on code in PR #37789:
URL: https://github.com/apache/airflow/pull/37789#discussion_r1507931875
##########
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:
A bit more explanation:
For `--exclude`, you need to specify a specific package to exclude and in
our workflow we want to exclude **all** packages that are installed from
locally installed packages - for example in our case we have to exclude all
chicken-egg-providers and rather than excluding manually, I prefer to write
some post processing to exclude stuff. Besides we are also doing a lot more
post -processing with the `freeze` output - adding header, sorting it, so I
don't see much value in the limited `--exclude` flags.
Also I planned to add package hashes (which are already for quite some time
supported by pip - for better integrity checks - and for that we will likely
either have to do post-processing or wait until either `pip` or `uv` support
adding hashes. Most likely none of them will add them in the way we would like
to (because essentially our constraints are mutli-platform, so we would have to
extract and add hashes for all the packages (including .sdist) available for
every single one of our 610 dependencies.
If I were to bet on something - extracting hashes in freeze output will be
added by `uv` way before `pip` - they are a new project with almost no history
and baggege and a group of people who work full time on it and seem to be - for
now - moving with the speed of light - like ruff did and they are very
responsive, so I think betting on `uv` for our CI tooling at least is the way
to go.
--
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]