Skip to content

Commit

Permalink
The pull request at #736
Browse files Browse the repository at this point in the history
initially designated Pydantic as an optional dependency. However,
a subsequent pull request, #794,
introduced an implementation that requires Pydantic to be a mandatory
dependency for astronomer-cosmos. This pull request addresses the bug
encountered while running airflow db init, as described in issue
#936,
by enforcing Pydantic as a required dependency.

Furthermore, it's worth noting that Pydantic version 2 has known
issues with Airflow versions prior to 2.7.0. Given that the minimum
Airflow version supported by astronomer-cosmos is 2.3, we have
restricted the Pydantic version to be less than 2. Additionally,
a comment has been added indicating that we may remove this upper
bound once Airflow 2.7 becomes the minimum required version for
astronomer-cosmos.

closes: #936
  • Loading branch information
pankajkoti committed May 3, 2024
1 parent 3eadaeb commit c193080
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ dependencies = [
"apache-airflow>=2.3.0",
"importlib-metadata; python_version < '3.8'",
"Jinja2>=3.0.0",
# The issue regarding Airflow and Pydantic, documented in https://github.com/apache/airflow/issues/32311, was
# resolved through the pull request https://github.com/apache/airflow/pull/32366. This PR was included in the
# release of Airflow 2.7.0. Therefore, once we set here the minimum version of Airflow to 2.7.0, we can eliminate
# the upper bound constraint on the version of Pydantic.
"pydantic>=1.10.0,<2.0.0",
"typing-extensions; python_version < '3.8'",
"virtualenv",
]
Expand Down

0 comments on commit c193080

Please sign in to comment.