potiuk commented on code in PR #25306:
URL: https://github.com/apache/airflow/pull/25306#discussion_r932021622
##########
dev/provider_packages/prepare_provider_packages.py:
##########
@@ -314,7 +314,20 @@ def get_install_requirements(provider_package_id: str,
version_suffix: str) -> s
:return: install requirements of the package
"""
- install_requires = ALL_DEPENDENCIES[provider_package_id][DEPS]
+
+ def apply_version_suffix(install_clause: str) -> str:
+ if install_clause.startswith("apache-airflow") and ">=" in
install_clause and version_suffix != "":
+ # This is workaround for `pip` bug. When you specify dependency as
>= X.Y.Z, and you
+ # Have packages X.Y.Zdev0 or X.Y.Zrc1, the "=" part does not
include the pre-release versions
+ # you need to explicitly specify >= X.Y.Za0 to include pre-release
versions.
+ # Therefore, when we are preparing pre-releases we always add a0
for airflow and other providers
+ # to Allow installing two packages released in rc* that depend on
each-other
Review Comment:
Yeah, I will experiment a bit with it. I do not like to remove the limits
altogether. Still it's a bit surprising it did not work when I put `>=1.1.0.a0`
-> I would imagine ".dev0" is higher than ".a0".
BTW. This is a bit experimental with `common.sql`, in the way that we have a
chance now to test how this case works - but we need to solve it 'well' for the
future - especially if we seriously think about splitting google provider -
this will introduce even more complex relations as there will likely be a
'google.common' or even 'alphabet,gcp.common` provider that other google
providers will depend on and it will be quite often that we will have to
released those together.
And we need to give a chance for our users to be able to test rc's when we
release them as well.
I am not sure if that one is because we are using wheel packages from local
folders only? Will that work the same when we release rc's in PyPI?. That will
make it a bit harder to test if our - in this case - `google8.1.0rc1 has >=
common.sql.1.1.0rc1 requirement" - will the user get the rc1 of common sql
installed (even if using pre?).
--
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]