Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Key Vault] Get default API version from sync client base #20379

Merged
merged 2 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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