Skip to content

Commit

Permalink
Get default API version from sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoyp committed Sep 29, 2021
1 parent b9211fb commit 65ec970
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@
from typing import TYPE_CHECKING
from azure.core.pipeline.policies import HttpLoggingPolicy
from . import AsyncChallengeAuthPolicy
from .client_base import ApiVersion
from .client_base import ApiVersion, DEFAULT_VERSION
from .._sdk_moniker import SDK_MONIKER
from .._generated.aio import KeyVaultClient as _KeyVaultClient

if TYPE_CHECKING:
try:
# pylint:disable=unused-import
from typing import Any
from azure.core.configuration import Configuration
from azure.core.pipeline.transport import AsyncHttpTransport
from azure.core.credentials_async import AsyncTokenCredential
except ImportError:
# AsyncTokenCredential is a typing_extensions.Protocol; we don't depend on that package
pass

DEFAULT_VERSION = ApiVersion.V7_3_PREVIEW

class AsyncKeyVaultClientBase(object):
def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: "Any") -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# pylint:disable=unused-import,ungrouped-imports
from typing import Any
from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpTransport
from azure.core.configuration import Configuration


class ApiVersion(str, Enum):
"""Key Vault API versions supported by this package"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@
from typing import TYPE_CHECKING
from azure.core.pipeline.policies import HttpLoggingPolicy
from . import AsyncChallengeAuthPolicy
from .client_base import ApiVersion
from .client_base import ApiVersion, DEFAULT_VERSION
from .._sdk_moniker import SDK_MONIKER
from .._generated.aio import KeyVaultClient as _KeyVaultClient

if TYPE_CHECKING:
try:
# pylint:disable=unused-import
from typing import Any
from azure.core.configuration import Configuration
from azure.core.pipeline.transport import AsyncHttpTransport
from azure.core.credentials_async import AsyncTokenCredential
except ImportError:
# AsyncTokenCredential is a typing_extensions.Protocol; we don't depend on that package
pass

DEFAULT_VERSION = ApiVersion.V7_3_PREVIEW

class AsyncKeyVaultClientBase(object):
def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: "Any") -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# pylint:disable=unused-import,ungrouped-imports
from typing import Any
from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpTransport
from azure.core.configuration import Configuration


class ApiVersion(str, Enum):
"""Key Vault API versions supported by this package"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@
from typing import TYPE_CHECKING
from azure.core.pipeline.policies import HttpLoggingPolicy
from . import AsyncChallengeAuthPolicy
from .client_base import ApiVersion
from .client_base import ApiVersion, DEFAULT_VERSION
from .._sdk_moniker import SDK_MONIKER
from .._generated.aio import KeyVaultClient as _KeyVaultClient

if TYPE_CHECKING:
try:
# pylint:disable=unused-import
from typing import Any
from azure.core.configuration import Configuration
from azure.core.pipeline.transport import AsyncHttpTransport
from azure.core.credentials_async import AsyncTokenCredential
except ImportError:
# AsyncTokenCredential is a typing_extensions.Protocol; we don't depend on that package
pass

DEFAULT_VERSION = ApiVersion.V7_3_PREVIEW

class AsyncKeyVaultClientBase(object):
def __init__(self, vault_url: str, credential: "AsyncTokenCredential", **kwargs: "Any") -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# pylint:disable=unused-import,ungrouped-imports
from typing import Any
from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpTransport
from azure.core.configuration import Configuration


class ApiVersion(str, Enum):
"""Key Vault API versions supported by this package"""
Expand Down

0 comments on commit 65ec970

Please sign in to comment.