-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Tables] Client and pipeline refactor #18045
Conversation
sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py
Outdated
Show resolved
Hide resolved
sdk/tables/azure-data-tables/azure/data/tables/aio/_base_client_async.py
Show resolved
Hide resolved
async def __aenter__(self): | ||
await self._client.__aenter__() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this inherits from the sync base client, will there be a weird behavior where you can use an async client as a sync context manager:
with TableClient(...) as tc:
await tc.get_entity(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope - the async client does not inherit from the sync base client. For exactly this reason. It only inherits from the AccountHostsMixin
sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py
Show resolved
Hide resolved
/azp run python - tables - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small things
_SUPPORTED_API_VERSIONS = ["2019-02-02", "2019-07-07"] | ||
|
||
|
||
def get_api_version(kwargs, default): | ||
# type: (Dict[str, Any], str) -> str | ||
api_version = kwargs.pop("api_version", None) | ||
if api_version and api_version not in _SUPPORTED_API_VERSIONS: | ||
versions = "\n".join(_SUPPORTED_API_VERSIONS) | ||
raise ValueError( | ||
"Unsupported API version '{}'. Please select from:\n{}".format( | ||
api_version, versions | ||
) | ||
) | ||
return api_version or default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we support multiple API versions now? Are there major differences between the two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the guidelines is that all SDKs support an API version parameter. So that part is mandatory. However in next stand up we should confirm what all languages are setting as the default API version.
Co-authored-by: Sean Kane <68240067+seankane-msft@users.noreply.github.com>
Co-authored-by: Sean Kane <68240067+seankane-msft@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
New API version to Microsoft.Security 2021-11-01 (Azure#18045) * Adds base for updating Microsoft.Security from version stable/2021-01-01 to version 2021-11-01 * Updates readme * Updates API version in new specs and examples * New API version to Microsoft.Security pick 5459ef18a7 New API version to Microsoft.Security pick c8462f9c60 [Microsoft.Security alerts] fix examples/Alerts/SimulateAlerts_example.json pick b5f4550d6b [Microsoft.Security alerts] add missing API to readme.md * [Microsoft.Security alerts] fix examples/Alerts/SimulateAlerts_example.json * [Microsoft.Security alerts] add missing API to readme.md * Fix readme.md file after rebase * Removing "x-ms-long-running-operation" header * Setting target package back to package-composite-v3 * Updating securityContacts.json to the latest version * Reverting securityContacts.json to equal main, should be updated by the relevant team Co-authored-by: Nitsan Bracha <nibracha@microsoft.com>
No description provided.