vincbeck commented on code in PR #76705:
URL: https://github.com/apache/airflow/pull/76705#discussion_r4633904751
##########
providers/snowflake/docs/operators/snowpark.rst:
##########
@@ -35,6 +35,15 @@ Use the :class:`SnowparkOperator
<airflow.providers.snowflake.operators.snowpark
Prerequisite Tasks
^^^^^^^^^^^^^^^^^^
+.. note::
Review Comment:
Should we add the same note to `decorators/snowpark.rst`? `@task.snowpark`
has the same problem on 3.14.
##########
providers/snowflake/pyproject.toml:
##########
@@ -73,15 +73,15 @@ dependencies = [
# declare no upper bound on cryptography, so an unconstrained resolve
pairs them with a
# cryptography they cannot import against. 22.1.0 is the first release
with a correct bound.
"pyOpenSSL>=22.1.0",
- # TODO(potiuk): We should bump the snowflake-connector-python to >=4.0.0
when sqlalchemy>=2.0 is required
# 3.17.0 is the first version with Workload Identity Federation
(WORKLOAD_IDENTITY authenticator).
"snowflake-connector-python>=3.17.0",
+ "snowflake-connector-python>=5.1.0; python_version >= '3.14'",
"snowflake-sqlalchemy>=1.7.0",
- # snowflake-sqlalchemy (up to 1.11.1) subclasses
sqlalchemy.orm.context.ORMSelectCompileState, which
- # SQLAlchemy 2.1 made private, so importing it fails; 2.0.0rc2 itself
declares sqlalchemy<2.1.
- # Remove the cap once snowflake-sqlalchemy supports SQLAlchemy 2.1;
- # tracked at https://github.com/apache/airflow/issues/75118
- "sqlalchemy>=1.4.54,<2.1",
+ "snowflake-sqlalchemy>=2.1.0; python_version >= '3.14'",
+ # Snowpark requires connector<5; the dialect supporting SQLAlchemy 2.1
requires connector>=5.1.
+ # https://github.com/apache/airflow/issues/75118
+ "sqlalchemy>=1.4.54,<2.1; python_version < '3.14'",
+ "sqlalchemy>=2.0.44; python_version >= '3.14'",
Review Comment:
Should we exclude 2.1.0 here like the other SQLAlchemy specs (#73865)? This
is the first Snowflake spec that allows 2.1.x.
```suggestion
"sqlalchemy>=2.0.44,!=2.1.0; python_version >= '3.14'",
```
##########
providers/snowflake/docs/operators/snowpark.rst:
##########
@@ -35,6 +35,15 @@ Use the :class:`SnowparkOperator
<airflow.providers.snowflake.operators.snowpark
Prerequisite Tasks
^^^^^^^^^^^^^^^^^^
+.. note::
+
+ On Python 3.14 or later, this provider requires
+ ``snowflake-connector-python>=5.1.0`` to support SQLAlchemy 2.1.
+ Snowpark 1.57.0 requires ``snowflake-connector-python<5`` and cannot be
Review Comment:
nit: I would not hardcode `1.57.0`, it will be outdated with the next
Snowpark release.
```suggestion
Current Snowpark releases require ``snowflake-connector-python<5`` and
cannot be
```
--
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]