Skip to content

Commit 68d4cc1

Browse files
committed
fix(dbt): pin pyOpenSSL>=24.0.0 for dbt 1.6 and 1.7 test environments
In dbt 1.6/1.7 CI environments, snowflake-connector-python resolves to versions 3.0-3.7.x which require pyOpenSSL<24.0.0. When combined with cryptography>=42.0 (which removed the lib.GEN_EMAIL constant), importing the Snowflake connector raises AttributeError: module 'lib' has no attribute 'GEN_EMAIL', failing these tests: - test_snowflake_config (via SnowflakeConnectionConfig._validate_authenticator) - test_api_class_loading[snowflake] (via SnowflakeConfig.relation_class) pyOpenSSL>=24.0.0 forces pip/uv to resolve snowflake-connector-python to 3.8.0+ (which allows pyOpenSSL<25.0.0, thus including 24.x). pyOpenSSL 24.0.0 fixed the GEN_EMAIL incompatibility with cryptography>=42.0. dbt 1.3-1.5 and 1.8-1.10 are unaffected: earlier versions resolve connector packages that avoid this code path; later versions of the connector already widened cryptography's upper bound. Also collapses a multi-line docstring in classproperty to a single line. Signed-off-by: mday-io <mdaytn@gmail.com>
1 parent 8f092ac commit 68d4cc1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ install-dev-dbt-%:
4949
$(MAKE) install-dev; \
5050
if [ "$$version" = "1.6.0" ]; then \
5151
echo "Applying overrides for dbt 1.6.0"; \
52-
$(PIP) install 'pydantic>=2.0.0' 'google-cloud-bigquery==3.30.0' 'databricks-sdk==0.28.0' --reinstall; \
52+
$(PIP) install 'pydantic>=2.0.0' 'google-cloud-bigquery==3.30.0' 'databricks-sdk==0.28.0' \
53+
'pyOpenSSL>=24.0.0' --reinstall; \
5354
fi; \
5455
if [ "$$version" = "1.7.0" ]; then \
5556
echo "Applying overrides for dbt 1.7.0"; \
56-
$(PIP) install 'databricks-sdk==0.28.0' --reinstall; \
57+
$(PIP) install 'databricks-sdk==0.28.0' \
58+
'pyOpenSSL>=24.0.0' --reinstall; \
5759
fi; \
5860
if [ "$$version" = "1.5.0" ]; then \
5961
echo "Applying overrides for dbt 1.5.0"; \

sqlmesh/utils/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,7 @@ def wrap(*args: t.Any, **kwargs: t.Any) -> t.Any:
246246

247247

248248
class classproperty(property):
249-
"""
250-
Similar to a normal property but works for class methods
251-
"""
249+
"""Similar to a normal property but works for class methods"""
252250

253251
def __get__(self, obj: t.Any, owner: t.Any = None) -> t.Any:
254252
return classmethod(self.fget).__get__(None, owner)() # type: ignore

0 commit comments

Comments
 (0)