From 097f41f32bb996a857dffdbe625860f47ac2e602 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 30 Jun 2026 10:50:41 +0800 Subject: [PATCH] bump version Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../add-lossy-duration-tests-2026-6-23-9-24-23.md | 7 ------- ...-typeddict-single-overload-2026-6-26-12-56-0.md | 7 ------- .../changes/packagelockbump-2026-5-22-12-16-9.md | 7 ------- .../python-addGenerateSkill-2026-5-22-14-40-29.md | 7 ------- .../python-addTypedDict-2026-3-21-17-47-3.md | 8 -------- ...update-js-yaml-dependency-2026-6-24-18-17-42.md | 3 +-- packages/http-client-python/CHANGELOG.md | 11 +++++++++++ packages/http-client-python/package-lock.json | 14 +++++++------- packages/http-client-python/package.json | 6 +++--- 9 files changed, 22 insertions(+), 48 deletions(-) delete mode 100644 .chronus/changes/add-lossy-duration-tests-2026-6-23-9-24-23.md delete mode 100644 .chronus/changes/fix-typeddict-single-overload-2026-6-26-12-56-0.md delete mode 100644 .chronus/changes/packagelockbump-2026-5-22-12-16-9.md delete mode 100644 .chronus/changes/python-addGenerateSkill-2026-5-22-14-40-29.md delete mode 100644 .chronus/changes/python-addTypedDict-2026-3-21-17-47-3.md diff --git a/.chronus/changes/add-lossy-duration-tests-2026-6-23-9-24-23.md b/.chronus/changes/add-lossy-duration-tests-2026-6-23-9-24-23.md deleted file mode 100644 index c7682bfa634..00000000000 --- a/.chronus/changes/add-lossy-duration-tests-2026-6-23-9-24-23.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-client-python" ---- - -Add mock API test cases for encode/duration lossy scenarios (int32-seconds and int32-milliseconds) verifying that durations with fractional precision are serialized as integers diff --git a/.chronus/changes/fix-typeddict-single-overload-2026-6-26-12-56-0.md b/.chronus/changes/fix-typeddict-single-overload-2026-6-26-12-56-0.md deleted file mode 100644 index 140cabaf9bc..00000000000 --- a/.chronus/changes/fix-typeddict-single-overload-2026-6-26-12-56-0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Fix invalid lone `@overload` generated for body parameters in `models-mode: typeddict`. When the binary and JSON overloads are omitted, the single remaining body variant is now emitted as a plain parameter instead of a single `@overload`, which mypy rejects with "Single overload definition, multiple required". diff --git a/.chronus/changes/packagelockbump-2026-5-22-12-16-9.md b/.chronus/changes/packagelockbump-2026-5-22-12-16-9.md deleted file mode 100644 index acd53ba5cc3..00000000000 --- a/.chronus/changes/packagelockbump-2026-5-22-12-16-9.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-client-python" ---- - -updating package-lock \ No newline at end of file diff --git a/.chronus/changes/python-addGenerateSkill-2026-5-22-14-40-29.md b/.chronus/changes/python-addGenerateSkill-2026-5-22-14-40-29.md deleted file mode 100644 index 11d2d6bb808..00000000000 --- a/.chronus/changes/python-addGenerateSkill-2026-5-22-14-40-29.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-client-python" ---- - -Add skill for `generate-from-typespec`, to test generation of local tsp emitter against specs \ No newline at end of file diff --git a/.chronus/changes/python-addTypedDict-2026-3-21-17-47-3.md b/.chronus/changes/python-addTypedDict-2026-3-21-17-47-3.md deleted file mode 100644 index fae8e302e0b..00000000000 --- a/.chronus/changes/python-addTypedDict-2026-3-21-17-47-3.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: feature -packages: - - "@typespec/http-client-python" ---- - -[python] Always generate `TypedDict` typing hints for input models in the `types.py` file, and named union aliases in the `_unions.py` file diff --git a/.chronus/changes/update-js-yaml-dependency-2026-6-24-18-17-42.md b/.chronus/changes/update-js-yaml-dependency-2026-6-24-18-17-42.md index 0938bf8a6b7..83194718fa4 100644 --- a/.chronus/changes/update-js-yaml-dependency-2026-6-24-18-17-42.md +++ b/.chronus/changes/update-js-yaml-dependency-2026-6-24-18-17-42.md @@ -1,8 +1,7 @@ --- changeKind: dependencies packages: - - "@typespec/http-client-python" - "@typespec/http-client-java" --- -Update `js-yaml` dependency to `^4.2.0` +Update `js-yaml` dependency to `^4.2.0` \ No newline at end of file diff --git a/packages/http-client-python/CHANGELOG.md b/packages/http-client-python/CHANGELOG.md index 31558ac4c94..0b488738ab3 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.0 + +### Features + +- [#10439](https://github.com/microsoft/typespec/pull/10439) [python] Always generate `TypedDict` typing hints for input models in the `types.py` file, and named union aliases in the `_unions.py` file + +### Bug Fixes + +- [#10439](https://github.com/microsoft/typespec/pull/10439) Fix invalid lone `@overload` generated for body parameters in `models-mode: typeddict`. When the binary and JSON overloads are omitted, the single remaining body variant is now emitted as a plain parameter instead of a single `@overload`, which mypy rejects with "Single overload definition, multiple required". + + ## 0.33.0 ### Features diff --git a/packages/http-client-python/package-lock.json b/packages/http-client-python/package-lock.json index a91ae898188..d5a5570441c 100644 --- a/packages/http-client-python/package-lock.json +++ b/packages/http-client-python/package-lock.json @@ -1,12 +1,12 @@ { "name": "@typespec/http-client-python", - "version": "0.33.0", + "version": "0.34.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@typespec/http-client-python", - "version": "0.33.0", + "version": "0.34.0", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -22,7 +22,7 @@ "@azure-tools/typespec-azure-core": "~0.69.0", "@azure-tools/typespec-azure-resource-manager": "~0.69.1", "@azure-tools/typespec-azure-rulesets": "~0.69.1", - "@azure-tools/typespec-client-generator-core": "~0.69.0", + "@azure-tools/typespec-client-generator-core": "~0.69.1", "@types/js-yaml": "~4.0.5", "@types/node": "~25.0.2", "@types/semver": "7.5.8", @@ -53,7 +53,7 @@ "@azure-tools/typespec-azure-core": ">=0.69.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.69.1 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.69.1 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.69.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.69.1 <1.0.0", "@typespec/compiler": "^1.13.0", "@typespec/events": ">=0.83.0 <1.0.0", "@typespec/http": "^1.13.0", @@ -167,9 +167,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.69.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.69.0.tgz", - "integrity": "sha512-ro8zzOeiN/74r0wM19R77gzLtbfjIFgKgr1Rusii/vhCfJIoVC7IcqLxhbJl0RVkjyhRFKt4GCRAw4iurnrDnw==", + "version": "0.69.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.69.1.tgz", + "integrity": "sha512-v84ZTh9lffTyjUSfMzZMDPv+fHjXJO/LpYT+V73Zco9YL8fC6o7ou2hvSlWTnMW2KIIrymdM3AyXONxSIZUEBw==", "dev": true, "license": "MIT", "dependencies": { diff --git a/packages/http-client-python/package.json b/packages/http-client-python/package.json index e5b3c0a0d4a..74cc71d9eab 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.33.0", + "version": "0.34.0", "author": "Microsoft Corporation", "description": "TypeSpec emitter for Python SDKs", "homepage": "https://typespec.io", @@ -68,7 +68,7 @@ "@azure-tools/typespec-azure-core": ">=0.69.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.69.1 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.69.1 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.69.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.69.1 <1.0.0", "@typespec/compiler": "^1.13.0", "@typespec/http": "^1.13.0", "@typespec/openapi": "^1.13.0", @@ -106,7 +106,7 @@ "@azure-tools/typespec-azure-core": "~0.69.0", "@azure-tools/typespec-azure-resource-manager": "~0.69.1", "@azure-tools/typespec-azure-rulesets": "~0.69.1", - "@azure-tools/typespec-client-generator-core": "~0.69.0", + "@azure-tools/typespec-client-generator-core": "~0.69.1", "@azure-tools/azure-http-specs": "0.1.0-alpha.42", "@typespec/compiler": "^1.13.0", "@typespec/http": "^1.13.0",