Skip to content

Commit d9598b6

Browse files
authored
SNOW-1620333: unpin cryptography and add deprecation detection (#2021)
1 parent 125a2db commit d9598b6

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

DESCRIPTION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
1010

1111
- v3.12.1(TBD)
1212
- Fixed a bug that session token is logged when renewing session.
13-
- Use `pathlib` instead of `os` for default config file location resolution.
1413
- Fixed a bug that disabling client telemetry does not work.
14+
- Use `pathlib` instead of `os` for default config file location resolution.
15+
- Removed upper `cryptogaphy` version pin.
1516

1617
- v3.12.0(July 24,2024)
1718
- Set default connection timeout of 10 seconds and socket read timeout of 10 minutes for HTTP calls in file transfer.

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ packages = find_namespace:
4545
install_requires =
4646
asn1crypto>0.24.0,<2.0.0
4747
cffi>=1.9,<2.0.0
48-
cryptography>=3.1.0,<43.0.0
48+
cryptography>=3.1.0
4949
pyOpenSSL>=16.2.0,<25.0.0
5050
pyjwt<3.0.0
5151
pytz

test/unit/test_dependencies.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright (c) 2012-2023 Snowflake Computing Inc. All rights reserved.
3+
#
4+
5+
import warnings
6+
7+
import cryptography.utils
8+
import pytest
9+
10+
11+
@pytest.mark.xfail(reason="Deprecation warning is expected to fail the test")
12+
def test_cryptography_deprecated():
13+
deprecate_warning = cryptography.utils.deprecated(
14+
cryptography.utils.CryptographyDeprecationWarning,
15+
"test",
16+
"test",
17+
cryptography.utils.CryptographyDeprecationWarning,
18+
)
19+
warnings.warn(
20+
deprecate_warning.message, deprecate_warning.warning_class, stacklevel=2
21+
)

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ addopts = -ra --strict-markers
155155
junit_family = legacy
156156
filterwarnings =
157157
error::UserWarning:cryptography.*
158+
error::cryptography.utils.CryptographyDeprecationWarning
158159
markers =
159160
# Optional dependency groups markers
160161
lambda: AWS lambda tests

0 commit comments

Comments
 (0)