diff --git a/.chronus/changes/emitter-diff-tool-2026-7-2-0-0-0.md b/.chronus/changes/emitter-diff-tool-2026-7-2-0-0-0.md deleted file mode 100644 index 6fe5e5422a8..00000000000 --- a/.chronus/changes/emitter-diff-tool-2026-7-2-0-0-0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-client-python" ---- - -Add a `diff-spector-tests` script wired to the new language-agnostic emitter-diff tool, plus its PR CI workflow diff --git a/.chronus/changes/fix-typeddict-literal-builtin-corruption-2026-7-15-8-47-0.md b/.chronus/changes/fix-typeddict-literal-builtin-corruption-2026-7-15-8-47-0.md deleted file mode 100644 index 7cb17b79e9a..00000000000 --- a/.chronus/changes/fix-typeddict-literal-builtin-corruption-2026-7-15-8-47-0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Fix a bug where a TypedDict literal value that coincides with a Python builtin type name (e.g. `type: "type"`) was corrupted into `Literal["builtins.type"]` in the generated `types.py`. The builtin-shadowing workaround now ignores identifiers inside string literals (literal values and quoted forward references are left untouched) and detects shadowing against the actually-emitted annotation, so genuine sibling-builtin shadowing is still qualified while spurious `import builtins` statements are no longer emitted. diff --git a/.chronus/changes/http-client-python_fix-bytes-body-io-overload-2026-7-14-3-14-0.md b/.chronus/changes/http-client-python_fix-bytes-body-io-overload-2026-7-14-3-14-0.md deleted file mode 100644 index c404d49f8d4..00000000000 --- a/.chronus/changes/http-client-python_fix-bytes-body-io-overload-2026-7-14-3-14-0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -Add an `IO[bytes]` overload alongside `bytes` for binary `bytes` bodies, keeping backward compatibility for services migrating from swagger whose binary bodies were typed as `IO`. diff --git a/.chronus/changes/python-docstring-duplicate-fix-2026-7-16-22-38-0.md b/.chronus/changes/python-docstring-duplicate-fix-2026-7-16-22-38-0.md deleted file mode 100644 index b25638ff083..00000000000 --- a/.chronus/changes/python-docstring-duplicate-fix-2026-7-16-22-38-0.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -[Python] Fix duplicate `:keyword:`/`:paramtype:` lines in generated DPG model docstrings that duplicated the existing `:ivar:`/`:vartype:` entries diff --git a/.chronus/changes/python-docstring-guideline-checks-2026-7-14-11-30-0.md b/.chronus/changes/python-docstring-guideline-checks-2026-7-14-11-30-0.md deleted file mode 100644 index a2ca29b89fc..00000000000 --- a/.chronus/changes/python-docstring-guideline-checks-2026-7-14-11-30-0.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: fix -packages: - - "@typespec/http-client-python" ---- - -[Python] Generate model/client/config docstrings and targeted pylint suppressions that satisfy the updated `azure-pylint-guidelines-checker` docstring checks (`docstring-keyword-should-match-keyword-only`, `docstring-missing-param`) diff --git a/.chronus/changes/python-encode-boolean-test-2026-6-24-23-0-0.md b/.chronus/changes/python-encode-boolean-test-2026-6-24-23-0-0.md deleted file mode 100644 index 957491f4c9e..00000000000 --- a/.chronus/changes/python-encode-boolean-test-2026-6-24-23-0-0.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: feature -packages: - - "@typespec/http-client-python" ---- - -Add mock API test coverage for `@encode(string)` on boolean properties (`encode/boolean` Spector scenarios). Fix Python generator to correctly serialize and deserialize boolean values encoded as strings (case-insensitive `true`/`false`) diff --git a/.chronus/changes/vnext-bump-2026-6-7-22-13-32.md b/.chronus/changes/vnext-bump-2026-6-7-22-13-32.md deleted file mode 100644 index de10b60169f..00000000000 --- a/.chronus/changes/vnext-bump-2026-6-7-22-13-32.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: dependencies -packages: - - "@typespec/http-client-python" ---- - -[Python] Bump tool version targets: pylint 4.0.6, mypy 2.1.0, pyright 1.1.411, azure-pylint-guidelines-checker 0.5.9 diff --git a/packages/http-client-python/CHANGELOG.md b/packages/http-client-python/CHANGELOG.md index a0fb2874c00..c2a76804b1f 100644 --- a/packages/http-client-python/CHANGELOG.md +++ b/packages/http-client-python/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log - @typespec/http-client-python +## 0.35.0 + +### Features + +- [#11087](https://github.com/microsoft/typespec/pull/11087) Add mock API test coverage for `@encode(string)` on boolean properties (`encode/boolean` Spector scenarios). Fix Python generator to correctly serialize and deserialize boolean values encoded as strings (case-insensitive `true`/`false`) + +### Bug Fixes + +- [#11268](https://github.com/microsoft/typespec/pull/11268) Fix a bug where a TypedDict literal value that coincides with a Python builtin type name (e.g. `type: "type"`) was corrupted into `Literal["builtins.type"]` in the generated `types.py`. The builtin-shadowing workaround now ignores identifiers inside string literals (literal values and quoted forward references are left untouched) and detects shadowing against the actually-emitted annotation, so genuine sibling-builtin shadowing is still qualified while spurious `import builtins` statements are no longer emitted. +- [#11233](https://github.com/microsoft/typespec/pull/11233) Add an `IO[bytes]` overload alongside `bytes` for binary `bytes` bodies, keeping backward compatibility for services migrating from swagger whose binary bodies were typed as `IO`. +- [#11289](https://github.com/microsoft/typespec/pull/11289) [Python] Fix duplicate `:keyword:`/`:paramtype:` lines in generated DPG model docstrings that duplicated the existing `:ivar:`/`:vartype:` entries +- [#11197](https://github.com/microsoft/typespec/pull/11197) [Python] Generate model/client/config docstrings and targeted pylint suppressions that satisfy the updated `azure-pylint-guidelines-checker` docstring checks (`docstring-keyword-should-match-keyword-only`, `docstring-missing-param`) + + ## 0.34.2 ### Bug Fixes diff --git a/packages/http-client-python/package.json b/packages/http-client-python/package.json index 7abc4a4f869..25f1b0409a5 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.2", + "version": "0.35.0", "author": "Microsoft Corporation", "description": "TypeSpec emitter for Python SDKs", "homepage": "https://typespec.io",