github Azure/azure-sdk-for-python azure-core_1.31.0

latest releases: azure-cosmos_4.8.0, azure-ai-inference_1.0.0b6, azure-eventhub_5.13.0...
2 months ago

1.31.0 (2024-09-12)

Features Added

  • Added azure.core.AzureClouds enum to represent the different Azure clouds.
  • Added two new credential protocol classes, SupportsTokenInfo and AsyncSupportsTokenInfo, to offer more extensibility in supporting various token acquisition scenarios. #36565
    • Each new protocol class defines a get_token_info method that returns an AccessTokenInfo object.
  • Added a new TokenRequestOptions class, which is a TypedDict with optional parameters, that can be used to define options for token requests through the get_token_info method. #36565
  • Added a new AccessTokenInfo class, which is returned by get_token_info implementations. This class contains the token, its expiration time, and optional additional information like when a token should be refreshed. #36565
  • BearerTokenCredentialPolicy and AsyncBearerTokenCredentialPolicy now first check if a credential has the get_token_info method defined. If so, the get_token_info method is used to acquire a token. Otherwise, the get_token method is used. #36565
    • These policies now also check the refresh_on attribute when determining if a new token request should be made.

Other Changes

  • The Azure Core OpenTelemetry tracing plugin will now be the preferred tracing plugin over the OpenCensus plugin. If both plugins are installed and opentelemetry is imported, then OpenTelemetry will be used to trace Azure SDK operations. #35050

Don't miss a new azure-sdk-for-python release

NewReleases is sending notifications on new releases.