- #11964 Generate complete ETag handling for operations in nested operation groups.
- #11946 Fix named single-member unions to emit valid Python type aliases without generating lone overloads.
- #11919 Update dependencies for TypeSpec 1.16.0.
- #11823 Allow
no-sdk-clientswarnings to be suppressed by reporting them on the TypeSpec service namespace. - #11811 Fix playground bundle publish failing with esbuild errors ("Could not resolve child_process/crypto/fs/promises/os") by moving the browser-safe YAML serialization helper out of a module that also contains Node-only code
- #11594 Generate structured streaming client methods: operations whose HTTP response is a JSONL (
application/jsonl) or SSE (text/event-stream) stream now returnStream[T]/AsyncStream[T], yielding deserialized model instances instead of raw bytes.
- #11638 Fix invalid Python type annotations generated in
types.pyfiles. Internal enums used as TypedDict fields are now imported (as a bare symbol) from their private_enumssubmodule so the annotation resolves; duplicate runtime +TYPE_CHECKINGimports of the same symbol are deduplicated to avoidno-redef; and TypedDicts that change an inherited field's requiredness are emitted as a flat (non-inheriting) TypedDict to satisfy PEP 589. - #11300 Forward package index and Python mirror environment variables to tox test environments so tests can install dependencies from configured feeds.
- #11250 Always populate the operation
error_mapwith the standard azure-core error types (401 →ClientAuthenticationError, 404 →ResourceNotFoundError, 409 →ResourceExistsError, 304 →ResourceNotModifiedError), even when a customized error model covers those status codes. Previously, a standard status code covered by a customized ranged or default error model fell back to a genericHttpResponseError; it now raises its dedicated error type viamap_error. The customized error body continues to be deserialized and attached to theHttpResponseErrorraised for other (non-standard) status codes.
- #11372 Add a
generate-typeddictemitter option (defaulttrue) that controlsTypedDictgeneration independently ofmodels-mode.models-modenow toggles justdpgandnone; thetypeddictvalue is deprecated.
- #11622 Wrap wire names containing
@(e.g.@search.facets) in double backticks when they are used as Sphinx docstring field targets (:ivar/:vartype/:keyword/:paramtype/:param/:type) across models, TypedDicts, operations, and clients, so the generated docstrings render correctly without introducing an invalid escape sequence in the generated code. - #11637 Preserve Python boolean, integer, and bytes client types when using supported string, base64, or base64url wire encodings.
- #11507 Only boot the Pyodide runtime in the browser on the first emit instead of when the emitter module is imported. Hosts such as the TypeSpec playground import every available emitter up front, so the eager bootstrap downloaded a full CPython WebAssembly runtime and its wheels on every page load, which prevented the page from loading on mobile browsers.
- #11639 Only generate
TypedDictdefinitions intypes.pywhen they are referenced by operation inputs or required by those input models, omitting unused response-only models.
- #11371 Use wire names in TypedDict docstrings
- #11392 Fix the generated
_validation.py@api_version_validationdecorator so it reads the correct client config attribute for the API version. It previously hardcodedclient._config.api_version, but the attribute name is derived from the API-version parameter'sclient_name. For specs that name the versioning parameter something other thanapiVersion(e.g.self.version), the lookup raisedAttributeErrorthat 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 readsconfig.<name>directly. - #11272 Fix generated request builders serializing a
Nonecontent-typeheader for an operation with an optional body whose content-type is required/constant. Thecontent-typekwarg is now declaredOptional[str]and the header is omitted when it isNone, instead of raisingValueError: No value for given attribute.
- #11087 Add mock API test coverage for
@encode(string)on boolean properties (encode/booleanSpector scenarios). Fix Python generator to correctly serialize and deserialize boolean values encoded as strings (case-insensitivetrue/false)
- #11268 Fix a bug where a TypedDict literal value that coincides with a Python builtin type name (e.g.
type: "type") was corrupted intoLiteral["builtins.type"]in the generatedtypes.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 spuriousimport builtinsstatements are no longer emitted. - #11233 Add an
IO[bytes]overload alongsidebytesfor binarybytesbodies, keeping backward compatibility for services migrating from swagger whose binary bodies were typed asIO. - #11289 [Python] Fix duplicate
:keyword:/:paramtype:lines in generated DPG model docstrings that duplicated the existing:ivar:/:vartype:entries - #11197 [Python] Generate model/client/config docstrings and targeted pylint suppressions that satisfy the updated
azure-pylint-guidelines-checkerdocstring checks (docstring-keyword-should-match-keyword-only,docstring-missing-param)
- #11216 Clarify docstrings in the generated
_MyMutableMappingbase class in_model_base.pyso they no longer use the ambiguousDplaceholder (e.g.Remove all items from D.is nowRemove all items from the dictionary.) - #11229 Fix crash when generating with
models-mode=none. Options passed to theOptionsDictconstructor are now normalized through the same validation/transform path as__setitem__, somodels-mode=noneis correctly treated as falsy and a modelless client is produced instead of crashing. - #11212 Fix constant enum values referencing the nonexistent
_enumsmodule inmodels-mode: typeddict. In typeddict mode enums are emitted asLiteralaliases intypes.pyand_enums.pyis never generated, so a single constant enum value now annotates with its literal value (e.g.Literal["red"]) and no longer imports from_enums.
-
#11177 Fix Python SDK generation failure when
package-pprint-namecontains spaces. The shell-escaping quotes were baked into the option value and leaked into the Pyodide runtime, producing an invalidsetup.py(e.g.PACKAGE_PPRINT_NAME = ""Azure Web PubSub Chat Service"") thatblackcould not parse. Quoting is now applied only when building the native Python shell command. -
#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 as2020_01_01round-trip as strings instead of being read back as integers -
#11161 Fix dangling
_types.Xreferences when template-instantiated models (e.g.ResourceUpdateModel<Foo, FooProperties>) share acrossLanguageDefinitionId. The TypedDict deduplication now pairs each model with its own copy by name, so distinct models such asCacheUpdateandVolumeUpdateare all rendered intypes.py.Also stop emitting unused TypedDicts for response-only models in
types.py. Output-only models already render as classes inmodels/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 intypes.pyis 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 theInputflag) are still emitted, and any output-only model reachable from an input model — such as a discriminated subtype or an ARMSystemDataproperty — is kept so no forward reference is left undefined. This fixes aNameErrorat import time when an output-only union alias (e.g.Dinosaur = Union[TRex]) referenced an excluded subtype, and a pyrightreportUndefinedVariableerror when an input model referenced an excluded property type (e.g.SystemData).
- #10439 [python] Always generate
TypedDicttyping hints for input models in thetypes.pyfile, and named union aliases in the_unions.pyfile
- #10439 Fix invalid lone
@overloadgenerated for body parameters inmodels-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".
-
#10987 Add a
keep-pyproject-fieldsemitter option that selects which[project]fields to preserve in an existingpyproject.tomlinstead of overwriting them on regeneration. Supported fields:authors,description,classifiers,urls.# tspconfig.yaml options: "@typespec/http-client-python": keep-pyproject-fields: authors: true description: true
- #11013 Place docstring annotations such as
Required.in front of the description when it ends with an RST code block, and stop appending a sentence period inside the block. Previously the period landed on the code block's last line (e.g.].) andRequired.was appended after the block (]. Required.), both of which broke Sphinx rendering.
- #10947 Support
datetime.timedeltafordurationtypes encoded assecondsormilliseconds. SDK users can now pass adatetime.timedelta(instead of a rawint/float) and responses are deserialized back intodatetime.timedelta.
- #10957 Fix
UnboundLocalErrorfor paging operations with a flattened JSON model body. The request body is now constructed once outside theprepare_requestcallback (and before the body is serialized into the request content) instead of inside the closure, where assigningbodymade it an unbound local on every page fetch. - #10955 Fix Sphinx docstring rendering when a
Required.(or other) annotation followed a code block. The annotation is now inserted into the prose before the code block instead of being appended after it.
- Bump dependencies of
@typespec/*and@azure-tools/*to latest versions
- #10246 Add Python 3.14 classifier to generated pyproject.toml
- #10920 Support
exactclient names for enum members and operations
- #10843 Synthesize filename in multipart Content-Disposition for bare file inputs. When callers pass bare bytes/str/IO instead of a (filename, content) tuple for multipart file fields, the
prepare_multipart_form_datahelper now wraps them with a synthesized filename so servers that requirefilename=in the Content-Disposition header no longer reject the upload. - #10816 Fix
etag/match_conditionclientName collision when an operation has more than oneAzure.Core.eTag-typed header (e.g. Storage'scopyFromUrl, which has bothIf-Match/If-None-Matchandx-ms-source-if-match/x-ms-source-if-none-match). The standardIf-Match/If-None-Matchpair is now preferred for theetag/match_conditionslot, and any additional etag-typed headers retain their natural client name (e.g.source_if_match).
- #10750 add support for
exactclient names
- #10804 Lower
blackversion to24.4.0to be consistent with what's in main
- #10698 Improve generated XML deserialization performance in Python by avoiding unnecessary parent traversal during field lookup.
- #10668 Bump dependencies of
@typespec/*and@azure-tools/*to latest versions
- #10563 Fix TypeSpec
numericscalar type being emitted asintin Python; it is now emitted asfloat. - #10525 Fix typing in generated paging operations when an operation is named
listand the page item is a collection type. The return type annotation now correctly uses theListalias (e.g.AsyncItemPaged[List[str]]) instead of the built-inlist(which would shadow the operation name) to stay consistent with other annotations in the same file.
- #10500 Drop support for Python 3.9. The minimum supported Python version is now 3.10. Python 3.9 reached end-of-life and is no longer supported by upstream Python.
- #10378 Add "Use with AI tools" section to Azure packages README template
- #10587 add
CrossLanguageVersiontoapiview-properties.json
- #10399 Fix enum member names with hyphens generating invalid Python identifiers
- #10385 Fix grouped parameter attribute access for reserved words in code generation
- #10303 fix import for _validation.py/_types.py when "generation-subdir" is configured
- #10494 Support custom wire names for etags defined with
Azure.Core.eTag(e.g.x-ms-blob-if-match) - #10546 Fix serialization regression where
@clientDefaultValuedefaults on model properties were no longer included in the request body. Defaults are again materialized in the model's data dictionary at construction time so they are sent on the wire, while the attribute-access fallback for unset fields is preserved. - #10254 Contain emitter changes when used with
generation-subdirto solely within that subdirectory - #10328 Pass
headerskwarg through to next requests in paging calls - #10326 Fix padding of keys in splatted body parameter method signature
- #10557 Update Python emitter browser behavior to only load Pyodide once instead of on every emit
- #10348 Refine
api_versionargument doc to showNoneas default value and include note about operation's default API version being used when not set - #10545 Revert wrong code to avoid overwrite customized code when generation-subdir is set
- #10297 Bump dependencies of
@typespec/*and@azure-tools/*to latest versions
- #10167 Fix import of
_deserializein mix of xml and non-xml models
- #10084 Fix PermissionError when detecting package manager on WSL
- #10105 Remove
Nonefrom "Known values" inapi_versionparameter docstring since the parameter is typed asstrandNoneis not a valid API version value. - #10117 Fix model usage which is referred both in request and response
- #9898 Remove enum value padding because we generate our enum value names with upper case so there is no need
- #9778 Return empty list instead of None for non-optional unwrapped XML list fields during deserialization
- #9952 Fix extensible enum member names incorrectly getting an
Enumsuffix when the member name matched a Python reserved word (e.g.ANDEnum→AND,CLASSEnum→CLASS). - #9964 Remove includeRootSlash client option logic, which should be handled at the TypeSpec core level
- #9713 Upgrade dependencies to match root package.json versions (@types/node, rimraf, tsx, typescript, typescript-eslint, vitest)
- #9812 Fix
__eq__method in_MyMutableMappingto useisinstancecheck instead of attempting to construct a new instance from the other object. - #9776 Allow client options on child clients to override parent clients
- #9769 Add pylint disable for list of elem deserialization
- #9779 allow decompression in version tolerant
- #9587 Add support for
@clientOption("includeRootSlash")to control stripping of the slash after the root url
- #9573 Ignore all errors thrown during error deserialization, not just
DeserializationError
- #9517 Properly cache enum values
- #9482 Don't remove azure-sdk tool definitions from pyproject.toml
- #9466 Fix additional indentation issues
- #9488
_failsafe_deserialize_xmlxml errors
- #9456 Add support for xml paging
- #9464 Bump TCGC 0.64.4
- #9407 Support enum type for array encode
- #9417 support "apiVersions" of TCGC metadata
- #9298 Fix clients with
NoAuthcredentials to have optional generatedcredentialparameters
- #9256 Fix syntax error when model property is named "list" by using type alias to avoid naming conflicts
- #9255 Fix import error about apiversion validation for nested operation groups
- #9014 Fix import when body parameter is union of models
- #9334 Fix linting errors caused by too many vars, next-mypy issues
- #9219 fix client default value for special headers
- #9222 Persist mutations to mutable properties when accessed via attribute syntax
- #9206 Remove
# noseccomments from Python SDK to avoid security confusion
- #9146 Support encode for array of string in serialization and deserialization
- #8927 Fix bad indent
- #8767 Support SDK users defined customized serialization/deserialization function for external models
- #9017 Keep original client name for backcompat reasons when the name is only padded for tsp generations
- #9129 Fix for optional properties in flatten model to keep compatibility
- #9144 Fix multipart when files part is optional
- #9138 Fix serialization name for multipart
- #9112 Support customized http method to call next link for paging operation
- #9108 fix logic about which scenario to add msrest as dependency
- #9107 Fix @override to avoid duplicated subscriptionId or api-version signatures
- #8992 Bump typespec dependency
- #8948 Fix subscriptionId missing for override
- #8905 Avoid duplicated delete operation for autorest emitter
- 7eda352 [python] add flag for clear output folder and set default to false
- #8716 Add logic to clear output folder
- #8866 Fix bad indent
- #8867 Fix setting attribute of flattened property when flattened property's name is not
properties
- #8720 Fix api-version for @override
- #8806 Fix runtime error for constant query parameter
- #8749 Additional fixes to documentation with bullet points
- #8638 Bump dep of
@azure-tools/typespec-client-generator-coreto hotfix0.60.3
- #8647 Fix outputted bullet-point documentation to pass sphinx
- #8680 Fix indentation issue when deserializing internal error model
- #8679 Exclude
generated_samplesandgenerated_testsfrom wheel
- #8558 Support move method level signature to client level
- #8603 support
@overridecompletely - #8607 [python] ensure first line in param description wrap around is a space
- #8381 Fix bugs related to import and pylint for libraries with only internal models
- #8531 [python] fix peer reps
- #8454 Support nested nextLink for paging operation
- #8516 Add overload for operation when body type is array of model
- #8130 DPG model supports multi-layer discriminator.
- #8407 bump tsp
- #8339 fail installation when fail to create virtual environment
- #8376 fix black for windows os
- #8395 Fix line break across OS
- #8359 Fix import of typing
Listfor ARM SDK - #8349 Fix dependencies of pyproject.toml for ARM SDK
- #8319 Add imports for readonly and constant props for msrest model generation
- #8311 Deprecate multiapi
- #8209 Add keyword only signature
cloud_settinginto ARM client - #7824 Upgrade typing for dict, list, set, and tuple to be from stdlib
- #8233 Upgrade azure-http-specs version.
- #8189 fix to keep some existing parts of pyproject.toml
- #8248 Generated model which is not only used in paging response
- #8250 don't send content-type when no request body
- #8175 fix generated output folder for
generated_samples/generated_tests - #8117 keep declaration of pyproject.toml same with existing setup.py of ARM SDK
- #7911 [python] don't fail on response body consumption in
_failsafe_deserialize - #8124 Don't include folder suffixes in documentation generated with
generation-subdir - #8114 Exclude doc folder in pyproject.toml
- #7829 Adding pyproject.toml generation and optional keep-setup-py flag
- #7994 add
generation-subdirflag
- #8070 fix import for error model in multi namespace
- #8091 Don't hardcode
emit-cross-language-definition-fileastruefor azure generations - #8006 Ensure necessary typing imports for internal models
- #8058 fix outputfolder of packaging files for arm sdk
- #7820 Bump min dep of generated sdks on
azure-coreto1.35.0for backcompat serialization methods
- #7992 Import mixins from operations init file to get patch changes
- #8039 Don't hardcode client in sample to first client in list
- #7939 Pad
datetimeas a model property for typespec
- #7924 Support @override to reorder operation parameters
- #7924 bump typespec
- #7817 Make mixin operations classes private to remove from documentation
- #7760 [http-client-python] Add support for uv package manager alongside pip
- #7735 bump TCGC 0.57.2
- #7713 Allow discriminators in derived classes that are from a fixed enum class
- #7705 Validate api versions by looking at ordering of api versions from spec
- #7696 Add support for
validate-versioningflag, so users can toggle whether they get api versioning validation
- #7667 bump typespec
- #7613 bump typespec
- #7359 store apiVersion info in
_metadata.json
- #7325 Fix response type of paging operations from
IterabletoItemPaged - #7348 Reallow models-only packages
- e56daba Bump typespec 1.0.0
- Bump typespec and typespec-azure to latest version
- #6646 Reorder generated
_vendorfile into a_utils_folder - #7062 Remove warnings thrown if no
package-nameis specified, since this is the default behavior we want
- #6968 Support parameter promoting to client level and add tests.
- #6955 Support optional path parameter.
- #6979 Improve emitter performance by updating black plugin implementation.
- #7048 Align key in apiview mapping with apiview structure
- #5925 Improve user experience in multi clouds scenario
- #7005 Fix docstring type for multi namespaces
- #7007 Fix for setup.py
- #6977 add more hooks into setup.py template for users with custom templates
- #6974 Allow
_in namespaces
- Drop support for python3.8
- 6846 fix license header for legacy SDK
- #6549 Pass authentication flows info into credential policy for unbranded
- #5649 Always respect namespace from TCGC
- Bump
@typespec/*0.67.0
- #6242 support continuation token for paging
- 6579d19 pass combined types to python generator
- #5930 Report TCGC diagnostics after create SDK context.
- #6163 Fix sphinx syntax for raising
DeserializationErrorin serialization file - #6138 [python] remove useless docstring for models
- #6104 [python] Don't throw error directly when emitter crash
No changes, version bump only.
- #5739 Fix output folder of models when output folder is different with namespace in configuration
- #5862 Fix crash when value of
--package-pprint-namecontains space - #5764 Fix bug in indentation for wrapping a property description that includes a long url
- #5853 Improve logging by catching expected
ModuleNotFoundError
- Fix output folder of models when output folder is different with namespace in configuration
- Fix for scenario that output folder is different with namespace
- Improve XML serialization information in generated models
- Fix sphinx typing for raising documentation
- fix typing for class methods in _serialization.py
- Rename
apiview_mapping_python.jsoncross-language id file toapiview-properties.jsonfor cross-language compatibility - Order keyword-only args overload first in generated operations
- Only add type annotation during initialization for readonly
- Fix pylint issues
- Bump
@typespec/*0.64.0 and@azure-tools/*0.50.0
- Fix pack issue for typespec namespace
- Fix typing issue for unbranded test case
- Only import helpers for serialization if input body is not binary
- Unify descriptions for credentials in documentation
- Add type annotations for initialized properties in msrest model inits
- Add mypy typing to operation group inits
- Remove Python2 specific datetime logic from internal serialization.
- Don't automatically overwrite version in
_version.pyfile andsetup.pyfile if the existing version is newer
- Only add linting disables for a file with too many lines if the file doesn't already disable this linter rule
- Generate
__init__for internal models to allow for discriminator needs
- Add support for typespec namespace
- Only add linting disables for a file with too many lines if the file doesn't already disable this linter rule
- Do not do exception sort if there is no operation groups
- Add support for generation in enviroments without a Python installation
:code:in docstring should always be preceded by\
- Bump
@typespec/*0.63.0 and@azure-tools/*0.49.0
- Ignore models/enum only used as LRO envelope results
- Refine exception handling logic to keep compatibility for legacy SDK
- Ignore models only used as LRO envelope results because we don't do anything with them
- Refine exception handling logic and support exception with ranged status code (#5270)
- Filter out credential that python does not support for now (#5282)
- Fix
useless-object-inheritancepylint errors
- Pad special property name in model to avoid conflict
- Fix crash if no valid client define in typespec file
- Bump pyright and mypy dependencies
- Fix quote for string type
- Fix access for paging operation and lro
- Update dependencies to fix install
- Bump
@typespec/*0.62.0 and@azure-tools/*0.48.0
- Bump TCGC to 0.47.4
- Added ignore comment in
__init__.pyto avoid mypy error
- Fix pylint issue for useless suppressions
- Update generated code so there is no need to run the
postprocessscript when customizations are made #4718
- Avoid change original data when deserialize for polymorphic model
- Bump dependencies
- Fix CI to make sure generated SDK pass necessary check
- Fix lint issues
- Removed usage for some deprecated function of
@azure-tools/typespec-client-generator-core
- Initial release