[AutoPR azure-keyvault-secrets]-generated-from-SDK Generation - Python-6063244#45913
[AutoPR azure-keyvault-secrets]-generated-from-SDK Generation - Python-6063244#45913
Conversation
…yaml', API Version: 2025-07-01, SDK Release Type: stable, and CommitSHA: '942c8b2fd38b3be3f322e219c97c5c3a75f2e97b' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6063244 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
There was a problem hiding this comment.
Pull request overview
This is an auto-generated update for azure-keyvault-secrets based on the Key Vault Secrets TypeSpec config (specification/keyvault/data-plane/Secrets/tspconfig.yaml) targeting API version 2025-07-01 and a stable release.
Changes:
- Updates TypeSpec source location metadata and regenerates the
_generatedclient/models (including new API surface likeout_content_typeandContentType). - Updates packaging/release artifacts (pyproject/manifest/changelog/metadata) to reflect the new generated output and version bump to 4.11.0.
- Applies formatting/lint-oriented edits across samples and tests.
Reviewed changes
Copilot reviewed 62 out of 63 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/keyvault/azure-keyvault-secrets/tsp-location.yaml | Updates the TypeSpec source path/commit and additional directories. |
| sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py | Minor whitespace formatting in tests. |
| sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py | Minor whitespace formatting in tests. |
| sdk/keyvault/azure-keyvault-secrets/tests/test_polling_method.py | Reflows long constructor calls for readability. |
| sdk/keyvault/azure-keyvault-secrets/tests/conftest.py | Adds trailing comma in import list. |
| sdk/keyvault/azure-keyvault-secrets/setup.py | Adds a generated setup.py with its own version/dependency metadata. |
| sdk/keyvault/azure-keyvault-secrets/sdk_packaging.toml | Removes legacy packaging configuration file. |
| sdk/keyvault/azure-keyvault-secrets/samples/recover_purge_operations_async.py | Adds pylint disables / spacing tweaks. |
| sdk/keyvault/azure-keyvault-secrets/samples/recover_purge_operations.py | Adds pylint disables. |
| sdk/keyvault/azure-keyvault-secrets/samples/list_operations_async.py | Adds pylint disables; reflows long print statements. |
| sdk/keyvault/azure-keyvault-secrets/samples/list_operations.py | Adds pylint disables; reflows long print statements. |
| sdk/keyvault/azure-keyvault-secrets/samples/hello_world_async.py | Adds pylint disables / spacing tweaks. |
| sdk/keyvault/azure-keyvault-secrets/samples/hello_world.py | Adds pylint disables. |
| sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations_async.py | Adds pylint disables; minor formatting. |
| sdk/keyvault/azure-keyvault-secrets/samples/backup_restore_operations.py | Adds pylint disables. |
| sdk/keyvault/azure-keyvault-secrets/pyproject.toml | Reformats TOML and moves [packaging] config into pyproject. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py | Removes async convenience SecretClient implementation. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/init.py | Removes exports for async SecretClient. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_version.py | Removes version module previously used for package versioning. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge_cache.py | Removes shared challenge-cache implementation. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge.py | Removes shared challenge parser. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/client_base.py | Removes shared base client + API version handling. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/challenge_auth_policy.py | Removes sync challenge auth policy implementation. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_client_base.py | Removes async base client implementation. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py | Removes async challenge auth policy implementation. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_polling_async.py | Removes async polling method implementation. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/_polling.py | Removes sync polling method + poller wrapper implementation. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/init.py | Removes shared exports and parse_key_vault_id helpers. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_sdk_moniker.py | Removes moniker module previously tied to _version.py. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_models.py | Removes convenience model layer (KeyVaultSecret, DeletedSecret, etc.). |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/models/_patch.py | Updates generated patch stub + modern typing. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/models/_models.py | Regenerates models (adds previous_version, modern typing, etc.). |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/models/_enums.py | Adds ContentType enum; docstring punctuation tweaks. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/models/init.py | Re-exports ContentType and updates __all__. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_vendor.py | Removes vendor ABC typing helper. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_patch.py | Updates generated patch stub + modern typing. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_operations/_patch.py | Updates generated patch stub + modern typing. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_operations/_operations.py | Regenerates async ops: adds decompress, out_content_type, api version validation, typing changes. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_operations/init.py | Renames/export-adjusts ops mixin symbol. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_configuration.py | Defaults api_version to 2025-07-01 and updates docs. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/aio/_client.py | Updates aio client to use renamed ops mixin and new api_version docs. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_version.py | Bumps generated version to 4.11.0. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_vendor.py | Removes vendor ABC typing helper. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_validation.py | Adds generated API-version validation decorator. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_utils/serialization.py | Refactors serialization/deserialization internals and typing; removes eval usage. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_utils/model_base.py | Replaces removed _model_base.py with expanded model base logic and encoding support. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_patch.py | Updates generated patch stub + modern typing. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_operations/_patch.py | Updates generated patch stub + modern typing. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_operations/_operations.py | Regenerates sync ops: adds decompress, out_content_type, api version validation, typing changes. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_operations/init.py | Renames/export-adjusts ops mixin symbol. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_configuration.py | Defaults api_version to 2025-07-01 and updates docs. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/_client.py | Updates sync client to use renamed ops mixin and new api_version docs. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_client.py | Removes sync convenience SecretClient implementation. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/init.py | Changes to namespace-package-only initializer. |
| sdk/keyvault/azure-keyvault-secrets/azure/keyvault/init.py | Changes to namespace package initializer. |
| sdk/keyvault/azure-keyvault-secrets/azure/init.py | Changes to namespace package initializer. |
| sdk/keyvault/azure-keyvault-secrets/apiview-properties.json | Adds APIView cross-language mapping metadata. |
| sdk/keyvault/azure-keyvault-secrets/_metadata.json | Adds generation metadata (apiVersion, emitterVersion, spec commit, etc.). |
| sdk/keyvault/azure-keyvault-secrets/MANIFEST.in | Updates included py.typed path and package init inclusion. |
| sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md | Adds 4.11.0 entry (currently placeholder) above existing history. |
|
|
||
| from ._version import VERSION | ||
| __version__ = VERSION | ||
| __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore |
There was a problem hiding this comment.
azure.keyvault.secrets is now declared as a namespace package only (__path__ = ...) and no longer exports the public surface (e.g., SecretClient, models, ApiVersion, __version__). This is a breaking API change for the azure-keyvault-secrets package and will also break the existing samples/tests that import SecretClient from azure.keyvault.secrets.
| __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore | |
| from ._client import ApiVersion, SecretClient | |
| from ._models import DeletedSecret, KeyVaultSecret, SecretProperties | |
| from ._version import VERSION as __version__ | |
| __all__ = [ | |
| "SecretClient", | |
| "KeyVaultSecret", | |
| "DeletedSecret", | |
| "SecretProperties", | |
| "ApiVersion", | |
| "__version__", | |
| ] |
| [tool.setuptools.dynamic.version] | ||
| attr = "azure.keyvault.secrets._version.VERSION" | ||
|
|
There was a problem hiding this comment.
The dynamic version source points to azure.keyvault.secrets._version.VERSION, but _version.py has been removed from azure/keyvault/secrets/ in this PR. As-is, packaging/build will fail at version resolution. Either restore azure/keyvault/secrets/_version.py (and re-export __version__) or update the attr to the new location (e.g., the generated _generated/_version.py) consistently across packaging metadata.
| PACKAGE_NAME = "azure-keyvault-secrets" | ||
| PACKAGE_PPRINT_NAME = "Key Vault Secrets" | ||
| PACKAGE_NAMESPACE = "azure.keyvault.secrets._generated" | ||
|
|
||
| # a.b.c => a/b/c | ||
| package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") | ||
|
|
||
| # Version extraction inspired from 'requests' | ||
| with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: | ||
| version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) | ||
|
|
||
| if not version: | ||
| raise RuntimeError("Cannot find version information") | ||
|
|
||
|
|
||
| setup( | ||
| name=PACKAGE_NAME, | ||
| version=version, | ||
| description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), | ||
| long_description=open("README.md", "r").read(), | ||
| long_description_content_type="text/markdown", | ||
| license="MIT License", | ||
| author="Microsoft Corporation", | ||
| author_email="azpysdkhelp@microsoft.com", | ||
| url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", | ||
| keywords="azure, azure sdk", | ||
| classifiers=[ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3 :: Only", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| "License :: OSI Approved :: MIT License", | ||
| ], | ||
| zip_safe=False, | ||
| packages=find_packages( | ||
| exclude=[ | ||
| "tests", | ||
| # Exclude packages that will be covered by PEP420 or nspkg | ||
| "azure", | ||
| "azure.keyvault", | ||
| "azure.keyvault.secrets", | ||
| ] | ||
| ), | ||
| include_package_data=True, | ||
| package_data={ | ||
| "azure.keyvault.secrets._generated": ["py.typed"], | ||
| }, | ||
| install_requires=[ | ||
| "isodate>=0.6.1", | ||
| "azure-core>=1.37.0", | ||
| "typing-extensions>=4.6.0", | ||
| ], |
There was a problem hiding this comment.
This newly added setup.py defines version extraction and dependencies that conflict with pyproject.toml (e.g., version is read from azure.keyvault.secrets._generated._version.py while pyproject.toml expects azure.keyvault.secrets._version.VERSION, and azure-core minimum differs). Having two divergent packaging sources is likely to produce inconsistent builds depending on tooling; please consolidate on a single authoritative packaging configuration and align version/dependency metadata.
| ## 4.11.0 (2026-03-25) | ||
|
|
||
| skip changelog generation for data-plane package and please add changelog manually. | ||
|
|
||
| ## 4.10.1 (Unreleased) | ||
|
|
There was a problem hiding this comment.
The new 4.11.0 changelog entry is a placeholder ("skip changelog generation…") and the next section is still ## 4.10.1 (Unreleased), which is an older version than 4.11.0. For a stable release, the changelog should contain real release notes for 4.11.0 and the Unreleased header (if kept) should be bumped to a version > 4.11.0.
| permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity | ||
| during the retention interval (90 days), unless a Purge operation is requested, or the | ||
| subscription is cancelled. System wil permanently delete it after 90 days, if not recovered""" | ||
| subscription is cancelled. System wil permanently delete it after 90 days, if not recovered.""" |
There was a problem hiding this comment.
Typo in docstring: "System wil permanently delete it…" should be "System will permanently delete it…".
| System wil permanently delete it after 90 days, if not recovered.""" | ||
| RECOVERABLE_PROTECTED_SUBSCRIPTION = "Recoverable+ProtectedSubscription" | ||
| """Denotes a vault and subscription state in which deletion is recoverable within retention | ||
| interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in | ||
| which the subscription itself cannot be permanently canceled. System wil permanently delete it | ||
| after 90 days, if not recovered""" | ||
| after 90 days, if not recovered.""" |
There was a problem hiding this comment.
Typo in docstrings: "System wil permanently delete it…" should be "System will permanently delete it…" (multiple occurrences in this enum docstring).
| additionalDirectories: | ||
| - specification/keyvault/data-plane/Secrets/common |
There was a problem hiding this comment.
Minor formatting: additionalDirectories: has a trailing space after the colon. Consider removing it to keep the YAML tidy and avoid whitespace-sensitive tooling issues.
Configurations: 'specification/keyvault/data-plane/Secrets/tspconfig.yaml', API Version: 2025-07-01, SDK Release Type: stable, and CommitSHA: '942c8b2fd38b3be3f322e219c97c5c3a75f2e97b' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6063244 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.