Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .chronus/changes/failsafe_deserialize-2025-7-6-14-50-25.md

This file was deleted.

7 changes: 0 additions & 7 deletions .chronus/changes/failsafe_deserialize-2025-7-6-14-50-45.md

This file was deleted.

13 changes: 13 additions & 0 deletions packages/autorest.python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release

## 6.38.1

### Bump dependencies

- [#3168](https://github.com/Azure/autorest.python/pull/3168) Bump tsp 1.3.0 and 0.59.0
- [#3163](https://github.com/Azure/autorest.python/pull/3163) Bump dependency on `http-client-python`

### Bug Fixes

- [#3168](https://github.com/Azure/autorest.python/pull/3168) Don't include folder suffixes in documentation generated with `generation-subdir`
- [#3168](https://github.com/Azure/autorest.python/pull/3168) Exclude doc folder in pyproject.toml and update license as per PEP 639


## 6.38.0

### Features
Expand Down
4 changes: 2 additions & 2 deletions packages/autorest.python/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/python",
"version": "6.38.0",
"version": "6.38.1",
"description": "The Python extension for generators in AutoRest.",
"scripts": {
"start": "node ./scripts/run-python3.js ./scripts/start.py",
Expand Down Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
"dependencies": {
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE4NzMzOC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.0.tgz",
"@typespec/http-client-python": "~0.15.1",
"@autorest/system-requirements": "~1.0.2",
"fs-extra": "~11.2.0",
"tsx": "~4.19.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# --------------------------------------------------------------------------

[build-system]
requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version
requires = ["setuptools>=77.0.3", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -15,7 +15,7 @@ authors = [
{ name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" },
]
description = "Microsoft Corporation Azure Package Mode Batch Mgmt Plane Client Library for Python"
license = {text = "MIT License"}
license = "MIT"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
Expand All @@ -26,7 +26,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.9"
keywords = ["azure", "azure sdk"]
Expand All @@ -51,6 +50,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"}
exclude = [
"tests*",
"samples*",
"doc*",
"azure",
"azure.packagemode",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# --------------------------------------------------------------------------

[build-system]
requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version
requires = ["setuptools>=77.0.3", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -15,7 +15,7 @@ authors = [
{ name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" },
]
description = "Microsoft Corporation Azure Package Mode Data Plane Client Library for Python"
license = {text = "MIT License"}
license = "MIT"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
Expand All @@ -26,7 +26,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.9"
keywords = ["azure", "azure sdk"]
Expand All @@ -51,6 +50,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"}
exclude = [
"tests*",
"samples*",
"doc*",
"azure",
"azure.packagemode",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# --------------------------------------------------------------------------

[build-system]
requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version
requires = ["setuptools>=77.0.3", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -15,7 +15,7 @@ authors = [
{ name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" },
]
description = "Microsoft Corporation Azure Package Mode Client Library for Python"
license = {text = "MIT License"}
license = "MIT"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
Expand All @@ -26,7 +26,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.9"
keywords = ["azure", "azure sdk"]
Expand All @@ -51,6 +50,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"}
exclude = [
"tests*",
"samples*",
"doc*",
"azure",
"azure.package",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# --------------------------------------------------------------------------

[build-system]
requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version
requires = ["setuptools>=77.0.3", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -15,7 +15,7 @@ authors = [
{ name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" },
]
description = "Microsoft Corporation Azure Internal Operation Client Library for Python"
license = {text = "MIT License"}
license = "MIT"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
Expand All @@ -26,7 +26,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.9"
keywords = ["azure", "azure sdk"]
Expand All @@ -51,6 +50,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"}
exclude = [
"tests*",
"samples*",
"doc*",
]

[tool.setuptools.package-data]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# --------------------------------------------------------------------------

[build-system]
requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version
requires = ["setuptools>=77.0.3", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -15,7 +15,7 @@ authors = [
{ name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" },
]
description = "Microsoft Corporation Azure Package Mode Client Library for Python"
license = {text = "MIT License"}
license = "MIT"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
Expand All @@ -26,7 +26,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.9"
keywords = ["azure", "azure sdk"]
Expand All @@ -51,6 +50,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"}
exclude = [
"tests*",
"samples*",
"doc*",
]

[tool.setuptools.package-data]
Expand Down
13 changes: 13 additions & 0 deletions packages/typespec-python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release

## 0.48.1

### Bump dependencies

- [#3168](https://github.com/Azure/autorest.python/pull/3168) Bump tsp 1.3.0 and 0.59.0

### Bug Fixes

- [#3168](https://github.com/Azure/autorest.python/pull/3168) Don't include folder suffixes in documentation generated with `generation-subdir`
- [#3168](https://github.com/Azure/autorest.python/pull/3168) Exclude doc folder in pyproject.toml and update license as per PEP 639
- [#3163](https://github.com/Azure/autorest.python/pull/3163) Don't throw when deserializing error model responses


## 0.48.0

### Features
Expand Down
72 changes: 36 additions & 36 deletions packages/typespec-python/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-python",
"version": "0.48.0",
"version": "0.48.1",
"author": "Microsoft Corporation",
"description": "TypeSpec emitter for Python SDKs",
"homepage": "https://github.com/Azure/autorest.python",
Expand Down Expand Up @@ -48,54 +48,54 @@
"generator/**"
],
"peerDependencies": {
"@typespec/compiler": "^1.2.1",
"@typespec/http": "^1.2.1",
"@typespec/rest": ">=0.72.1 <1.0.0",
"@typespec/versioning": ">=0.72.1 <1.0.0",
"@typespec/openapi": "^1.2.1",
"@typespec/events": ">=0.72.1 <1.0.0",
"@typespec/sse": ">=0.72.1 <1.0.0",
"@typespec/streams": ">=0.72.1 <1.0.0",
"@typespec/xml": ">=0.72.1 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.58.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.58.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.58.0 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.58.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.58.0 <1.0.0"
"@typespec/compiler": "^1.3.0",
"@typespec/http": "^1.3.0",
"@typespec/rest": ">=0.73.0 <1.0.0",
"@typespec/versioning": ">=0.73.0 <1.0.0",
"@typespec/openapi": "^1.3.0",
"@typespec/events": ">=0.73.0 <1.0.0",
"@typespec/sse": ">=0.73.0 <1.0.0",
"@typespec/streams": ">=0.73.0 <1.0.0",
"@typespec/xml": ">=0.73.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.59.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.59.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.59.0 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.59.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.59.0 <1.0.0"
},
"dependencies": {
"js-yaml": "~4.1.0",
"semver": "~7.6.2",
"tsx": "~4.19.1",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE4NzMzOC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.15.0.tgz",
"@typespec/http-client-python": "~0.15.1",
"fs-extra": "~11.2.0"
},
"devDependencies": {
"@typespec/compiler": "^1.2.1",
"@typespec/http": "^1.2.1",
"@typespec/rest": "~0.72.1",
"@typespec/versioning": "~0.72.1",
"@typespec/openapi": "^1.2.1",
"@typespec/events": "~0.72.1",
"@typespec/sse": "~0.72.1",
"@typespec/streams": "~0.72.1",
"@typespec/compiler": "^1.3.0",
"@typespec/http": "^1.3.0",
"@typespec/rest": "~0.73.0",
"@typespec/versioning": "~0.73.0",
"@typespec/openapi": "^1.3.0",
"@typespec/events": "~0.73.0",
"@typespec/sse": "~0.73.0",
"@typespec/streams": "~0.73.0",
"@typespec/tspd": "~0.70.0",
"@typespec/xml": "~0.72.1",
"@azure-tools/typespec-azure-resource-manager": "~0.58.0",
"@azure-tools/typespec-azure-core": "~0.58.0",
"@azure-tools/typespec-azure-rulesets": "~0.58.0",
"@azure-tools/typespec-autorest": "~0.58.0",
"@azure-tools/typespec-client-generator-core": "~0.58.0",
"@azure-tools/azure-http-specs": "0.1.0-alpha.23",
"@typespec/http-specs": "0.1.0-alpha.24",
"@typespec/spector": "0.1.0-alpha.16",
"@typespec/spec-api": "0.1.0-alpha.7",
"@typespec/xml": "~0.73.0",
"@azure-tools/typespec-azure-resource-manager": "~0.59.0",
"@azure-tools/typespec-azure-core": "~0.59.0",
"@azure-tools/typespec-azure-rulesets": "~0.59.0",
"@azure-tools/typespec-autorest": "~0.59.0",
"@azure-tools/typespec-client-generator-core": "~0.59.0",
"@azure-tools/azure-http-specs": "0.1.0-alpha.25",
"@typespec/http-specs": "0.1.0-alpha.25",
"@typespec/spector": "0.1.0-alpha.17",
"@typespec/spec-api": "0.1.0-alpha.8",
"@types/js-yaml": "~4.0.5",
"@types/node": "~22.13.14",
"@types/node": "~24.1.0",
"@types/yargs": "~17.0.33",
"@types/semver": "7.5.8",
"c8": "^10.1.3",
"vitest": "^3.0.5",
"vitest": "^3.1.2",
"rimraf": "~6.0.1",
"typescript": "~5.8.2",
"typescript-eslint": "^8.21.0",
Expand Down
18 changes: 10 additions & 8 deletions packages/typespec-python/scripts/eng/regenerate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ interface TspCommand {
command: string;
}

// Add this near the top with other constants
const SKIP_SPECS = [
"type/union/discriminated",
"client-operation-group",
"azure/client-generator-core/api-version",
"azure/client-generator-core/hierarchy-building",
];

const AZURE_EMITTER_OPTIONS: Record<string, Record<string, string> | Record<string, string>[]> = {
"azure/client-generator-core/access": {
namespace: "specs.azure.clientgenerator.core.access",
Expand Down Expand Up @@ -313,14 +321,8 @@ async function getSubdirectories(baseDir: string, flags: RegenerateFlags): Promi

const mainTspRelativePath = toPosix(relative(baseDir, mainTspPath));

// after support discriminated union, remove this check
if (mainTspRelativePath.includes("type/union/discriminated")) return;

// after fix test generation for nested operation group, remove this check
if (mainTspRelativePath.includes("client-operation-group")) return;

// after https://github.com/Azure/autorest.python/issues/3043 fixed, remove this check
if (mainTspRelativePath.includes("azure/client-generator-core/api-version")) return;
// Replace the individual skip checks with:
if (SKIP_SPECS.some((skipSpec) => mainTspRelativePath.includes(skipSpec))) return;

const hasMainTsp = await promises
.access(mainTspPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from azure.core.pipeline import PipelineResponse
from azure.core.rest import HttpRequest, HttpResponse
from azure.core.tracing.decorator import distributed_trace
from azure.core.utils import case_insensitive_dict

from .. import models as _models
from .._configuration import ApiKeyClientConfiguration
Expand All @@ -43,17 +42,10 @@ def build_api_key_valid_request(**kwargs: Any) -> HttpRequest:


def build_api_key_invalid_request(**kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})

accept = _headers.pop("Accept", "application/json")

# Construct URL
_url = "/authentication/api-key/invalid"

# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")

return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
return HttpRequest(method="GET", url=_url, **kwargs)


class _ApiKeyClientOperationsMixin(
Expand Down
Loading
Loading