From 9c3438a3f3802899a60306d437726f3d438410d3 Mon Sep 17 00:00:00 2001 From: Libba Lawrence Date: Thu, 30 Jul 2026 08:24:45 -0700 Subject: [PATCH] release of python emitter 0.35.1 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: caac437e-a2b9-40bf-b219-0454afb02bbf --- ...eddict-camelcase-docstrings-2026-6-24-17-40-35.md | 7 ------- ...-api-version-validation-attr-2026-7-24-11-30-0.md | 7 ------- ...fix-optional-body-content-type-2026-7-16-0-0-0.md | 10 ---------- .../python-regeneration-fixtures-2026-7-28.md | 7 ------- packages/http-client-python/CHANGELOG.md | 12 ++++++++++++ packages/http-client-python/package.json | 2 +- 6 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 .chronus/changes/copilot-fix-typeddict-camelcase-docstrings-2026-6-24-17-40-35.md delete mode 100644 .chronus/changes/fix-api-version-validation-attr-2026-7-24-11-30-0.md delete mode 100644 .chronus/changes/http-client-python_fix-optional-body-content-type-2026-7-16-0-0-0.md delete mode 100644 .chronus/changes/python-regeneration-fixtures-2026-7-28.md diff --git a/.chronus/changes/copilot-fix-typeddict-camelcase-docstrings-2026-6-24-17-40-35.md b/.chronus/changes/copilot-fix-typeddict-camelcase-docstrings-2026-6-24-17-40-35.md deleted file mode 100644 index c630f2e8060..00000000000 --- a/.chronus/changes/copilot-fix-typeddict-camelcase-docstrings-2026-6-24-17-40-35.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Use wire names in TypedDict docstrings \ No newline at end of file diff --git a/.chronus/changes/fix-api-version-validation-attr-2026-7-24-11-30-0.md b/.chronus/changes/fix-api-version-validation-attr-2026-7-24-11-30-0.md deleted file mode 100644 index 449eb014807..00000000000 --- a/.chronus/changes/fix-api-version-validation-attr-2026-7-24-11-30-0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Fix the generated `_validation.py` `@api_version_validation` decorator so it reads the correct client config attribute for the API version. It previously hardcoded `client._config.api_version`, but the attribute name is derived from the API-version parameter's `client_name`. For specs that name the versioning parameter something other than `apiVersion` (e.g. `self.version`), the lookup raised `AttributeError` that the decorator silently swallowed, disabling all API-version validation for those clients. The emitter now bakes the real attribute name into the generated decorator so it reads `config.` directly. diff --git a/.chronus/changes/http-client-python_fix-optional-body-content-type-2026-7-16-0-0-0.md b/.chronus/changes/http-client-python_fix-optional-body-content-type-2026-7-16-0-0-0.md deleted file mode 100644 index 9756bdce836..00000000000 --- a/.chronus/changes/http-client-python_fix-optional-body-content-type-2026-7-16-0-0-0.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Fix generated request builders serializing a `None` `content-type` header for an -operation with an optional body whose content-type is required/constant. The -`content-type` kwarg is now declared `Optional[str]` and the header is omitted -when it is `None`, instead of raising `ValueError: No value for given attribute`. diff --git a/.chronus/changes/python-regeneration-fixtures-2026-7-28.md b/.chronus/changes/python-regeneration-fixtures-2026-7-28.md deleted file mode 100644 index a2ce1204e28..00000000000 --- a/.chronus/changes/python-regeneration-fixtures-2026-7-28.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-client-python" ---- - -Track only hand-authored test fixture files instead of whole generated packages, and clean generated test code with `git clean` during regeneration. diff --git a/packages/http-client-python/CHANGELOG.md b/packages/http-client-python/CHANGELOG.md index c2a76804b1f..9db06c0c329 100644 --- a/packages/http-client-python/CHANGELOG.md +++ b/packages/http-client-python/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log - @typespec/http-client-python +## 0.35.1 + +### Bug Fixes + +- [#11371](https://github.com/microsoft/typespec/pull/11371) Use wire names in TypedDict docstrings +- [#11392](https://github.com/microsoft/typespec/pull/11392) Fix the generated `_validation.py` `@api_version_validation` decorator so it reads the correct client config attribute for the API version. It previously hardcoded `client._config.api_version`, but the attribute name is derived from the API-version parameter's `client_name`. For specs that name the versioning parameter something other than `apiVersion` (e.g. `self.version`), the lookup raised `AttributeError` that the decorator silently swallowed, disabling all API-version validation for those clients. The emitter now bakes the real attribute name into the generated decorator so it reads `config.` directly. +- [#11272](https://github.com/microsoft/typespec/pull/11272) Fix generated request builders serializing a `None` `content-type` header for an + operation with an optional body whose content-type is required/constant. The + `content-type` kwarg is now declared `Optional[str]` and the header is omitted + when it is `None`, instead of raising `ValueError: No value for given attribute`. + + ## 0.35.0 ### Features diff --git a/packages/http-client-python/package.json b/packages/http-client-python/package.json index 3cba5c7892e..d3d837fcad5 100644 --- a/packages/http-client-python/package.json +++ b/packages/http-client-python/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/http-client-python", - "version": "0.35.0", + "version": "0.35.1", "author": "Microsoft Corporation", "description": "TypeSpec emitter for Python SDKs", "homepage": "https://typespec.io",