Skip to content

Commit d76befa

Browse files
authored
[Identity] Update requirements (#43833)
PyPy 3.11 needs a later version of cryptography as 2.5 is too old and relies on CPython ABI symbols (PySlice_AdjustIndices) that is no longer supported. Update the minimum used for mindependency checks. Also disabling the broker package dependency for 3.14 until pymsalruntime can produce 3.14-compat whl files. Signed-off-by: Paul Van Eck <[email protected]>
1 parent e84b047 commit d76befa

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

eng/tox/install_depend_packages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"azure-core": "1.11.0",
4242
"requests": "2.19.0",
4343
"six": "1.12.0",
44-
"cryptography": "38.0.3",
44+
"cryptography": "41.0.0",
4545
"msal": "1.23.0",
4646
"azure-storage-file-datalake": "12.2.0",
4747
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
../../core/azure-core
2-
azure-identity-broker>=1.1.0 ; platform.python_implementation != "PyPy"
2+
azure-identity-broker>=1.1.0 ; platform.python_implementation != "PyPy" and python_version < '3.14.0'
33
aiohttp>=3.0
44
typing_extensions>=3.7.2
55
-e ../../../eng/tools/azure-sdk-tools

sdk/identity/azure-identity/tests/test_vscode_credential.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,12 @@ def test_invalid_auth_record(self):
7676
os.unlink(tmp_file.name)
7777

7878
def test_broker_credential_requirements_not_installed(self):
79-
"""Test that the credential w"""
79+
"""Test that the credential works without the broker installed."""
8080

8181
with patch.dict("sys.modules", {"azure.identity.broker": None}):
82-
with patch("azure.identity.broker.InteractiveBrowserBrokerCredential") as mock_credential:
83-
with pytest.raises(CredentialUnavailableError):
84-
# This should raise an error because the broker requirements are not installed.
85-
VisualStudioCodeCredential().get_token_info("https://management.azure.com/.default")
86-
87-
assert mock_credential.call_count == 0, "InteractiveBrowserBrokerCredential should not be instantiated"
82+
with pytest.raises(CredentialUnavailableError):
83+
# This should raise an error because the broker requirements are not installed.
84+
VisualStudioCodeCredential().get_token_info("https://management.azure.com/.default")
8885

8986

9087
class TestLoadVSCodeAuthRecord:

0 commit comments

Comments
 (0)