potiuk commented on code in PR #48223:
URL: https://github.com/apache/airflow/pull/48223#discussion_r2022135813
##########
providers/common/sql/pyproject.toml:
##########
@@ -86,6 +86,10 @@ dev = [
"apache-airflow-devel-common",
"apache-airflow-providers-openlineage",
# Additional devel dependencies (do not remove this line and add extra
development dependencies)
+ "apache-airflow-providers-common-sql[pandas]",
Review Comment:
THis is perfectly fine to have circular dependencies in Python packaging. It
works just fine and we already have a lot of that (all preinstalled packages
have circular dependencies)
That dependency is merely so that "pandas" optional dependency of common-sql
is installed, because some of the tests in the providers expect pandas to be
installed.
And this is only a "dev" dependency - so it is not installed "normally" - it
is only installed when you run `uv sync` - by default `uv sync` installs
development depenendencies and the package you install in editable mode (as
expected - this is a development tool) - so what this definition really means
is
> also install pandas optional dependency when you install common-sql for
development purpose so that you can run tests without installing anything else
And referring to own package in pyproject.toml is absolutely normal and
encouraged - especially in cases when you install optional extras this way. For
example this is pretty normal - there was a discussion about it 2 years ago and
while pip officially supports it (it's allowed by the standard and encouraged),
it's not properly documented
https://discuss.python.org/t/where-is-nested-recursive-optional-dependencies-documented/35648
But this is exactly how we should use it :)
--
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]