From 8879806fb993eb17d2a79facd86ab7fe0ef95c61 Mon Sep 17 00:00:00 2001 From: Libba Lawrence Date: Mon, 6 Jul 2026 16:18:42 -0700 Subject: [PATCH] bump2 --- .../doc-generation-subdir-examples-2026-6-30-0-0-0.md | 7 ------- ...x-pprint-name-shell-quote-leak-2026-7-6-14-56-0.md | 7 ------- ...p-client-python-non-string-description-2026-7-2.md | 7 ------- ...python-fix-typeddict-shared-clid-2026-6-2-0-0-0.md | 9 --------- packages/http-client-python/CHANGELOG.md | 11 +++++++++++ packages/http-client-python/package.json | 2 +- 6 files changed, 12 insertions(+), 31 deletions(-) delete mode 100644 .chronus/changes/doc-generation-subdir-examples-2026-6-30-0-0-0.md delete mode 100644 .chronus/changes/fix-pprint-name-shell-quote-leak-2026-7-6-14-56-0.md delete mode 100644 .chronus/changes/http-client-python-non-string-description-2026-7-2.md delete mode 100644 .chronus/changes/python-fix-typeddict-shared-clid-2026-6-2-0-0-0.md diff --git a/.chronus/changes/doc-generation-subdir-examples-2026-6-30-0-0-0.md b/.chronus/changes/doc-generation-subdir-examples-2026-6-30-0-0-0.md deleted file mode 100644 index 61a9de834db..00000000000 --- a/.chronus/changes/doc-generation-subdir-examples-2026-6-30-0-0-0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-client-python" ---- - -Add usage examples for the `generation-subdir` emitter option in the docs. diff --git a/.chronus/changes/fix-pprint-name-shell-quote-leak-2026-7-6-14-56-0.md b/.chronus/changes/fix-pprint-name-shell-quote-leak-2026-7-6-14-56-0.md deleted file mode 100644 index d63c8a80df2..00000000000 --- a/.chronus/changes/fix-pprint-name-shell-quote-leak-2026-7-6-14-56-0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Fix Python SDK generation failure when `package-pprint-name` contains spaces. The shell-escaping quotes were baked into the option value and leaked into the Pyodide runtime, producing an invalid `setup.py` (e.g. `PACKAGE_PPRINT_NAME = ""Azure Web PubSub Chat Service""`) that `black` could not parse. Quoting is now applied only when building the native Python shell command. diff --git a/.chronus/changes/http-client-python-non-string-description-2026-7-2.md b/.chronus/changes/http-client-python-non-string-description-2026-7-2.md deleted file mode 100644 index d4f98f7dc45..00000000000 --- a/.chronus/changes/http-client-python-non-string-description-2026-7-2.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Fix enum member names derived from date-like TypeSpec labels (e.g. `` `2020-01-01` ``) being corrupted by the js-yaml (YAML 1.2) to PyYAML (YAML 1.1) boundary. String scalars are now force-quoted when serializing the code model so names such as `2020_01_01` round-trip as strings instead of being read back as integers diff --git a/.chronus/changes/python-fix-typeddict-shared-clid-2026-6-2-0-0-0.md b/.chronus/changes/python-fix-typeddict-shared-clid-2026-6-2-0-0-0.md deleted file mode 100644 index 5dd91200351..00000000000 --- a/.chronus/changes/python-fix-typeddict-shared-clid-2026-6-2-0-0-0.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Fix dangling `_types.X` references when template-instantiated models (e.g. `ResourceUpdateModel`) share a `crossLanguageDefinitionId`. The TypedDict deduplication now pairs each model with its own copy by name, so distinct models such as `CacheUpdate` and `VolumeUpdate` are all rendered in `types.py`. - -Also stop emitting unused TypedDicts for response-only models in `types.py`. Output-only models already render as classes in `models/` and are referenced via `_models.X`, so their TypedDict copies (e.g. `GetResponse`) were dead code. The set of TypedDicts (and discriminated-base union aliases) rendered in `types.py` is now the transitive closure of the request-body input models over their base classes, discriminated subtypes and property types. Input body overloads (including spread bodies whose usage lacks the `Input` flag) are still emitted, and any output-only model reachable from an input model — such as a discriminated subtype or an ARM `SystemData` property — is kept so no forward reference is left undefined. This fixes a `NameError` at import time when an output-only union alias (e.g. `Dinosaur = Union[TRex]`) referenced an excluded subtype, and a pyright `reportUndefinedVariable` error when an input model referenced an excluded property type (e.g. `SystemData`). diff --git a/packages/http-client-python/CHANGELOG.md b/packages/http-client-python/CHANGELOG.md index 0b488738ab3..6b8b78c06dc 100644 --- a/packages/http-client-python/CHANGELOG.md +++ b/packages/http-client-python/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log - @typespec/http-client-python +## 0.34.1 + +### Bug Fixes + +- [#11177](https://github.com/microsoft/typespec/pull/11177) Fix Python SDK generation failure when `package-pprint-name` contains spaces. The shell-escaping quotes were baked into the option value and leaked into the Pyodide runtime, producing an invalid `setup.py` (e.g. `PACKAGE_PPRINT_NAME = ""Azure Web PubSub Chat Service""`) that `black` could not parse. Quoting is now applied only when building the native Python shell command. +- [#11162](https://github.com/microsoft/typespec/pull/11162) Fix enum member names derived from date-like TypeSpec labels (e.g. `` `2020-01-01` ``) being corrupted by the js-yaml (YAML 1.2) to PyYAML (YAML 1.1) boundary. String scalars are now force-quoted when serializing the code model so names such as `2020_01_01` round-trip as strings instead of being read back as integers +- [#11161](https://github.com/microsoft/typespec/pull/11161) Fix dangling `_types.X` references when template-instantiated models (e.g. `ResourceUpdateModel`) share a `crossLanguageDefinitionId`. The TypedDict deduplication now pairs each model with its own copy by name, so distinct models such as `CacheUpdate` and `VolumeUpdate` are all rendered in `types.py`. + + Also stop emitting unused TypedDicts for response-only models in `types.py`. Output-only models already render as classes in `models/` and are referenced via `_models.X`, so their TypedDict copies (e.g. `GetResponse`) were dead code. The set of TypedDicts (and discriminated-base union aliases) rendered in `types.py` is now the transitive closure of the request-body input models over their base classes, discriminated subtypes and property types. Input body overloads (including spread bodies whose usage lacks the `Input` flag) are still emitted, and any output-only model reachable from an input model — such as a discriminated subtype or an ARM `SystemData` property — is kept so no forward reference is left undefined. This fixes a `NameError` at import time when an output-only union alias (e.g. `Dinosaur = Union[TRex]`) referenced an excluded subtype, and a pyright `reportUndefinedVariable` error when an input model referenced an excluded property type (e.g. `SystemData`). + + ## 0.34.0 ### Features diff --git a/packages/http-client-python/package.json b/packages/http-client-python/package.json index 74cc71d9eab..d220de9eb89 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.34.0", + "version": "0.34.1", "author": "Microsoft Corporation", "description": "TypeSpec emitter for Python SDKs", "homepage": "https://typespec.io",