From 8cb460edcd840667126b15011e89e283553d0c7d Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Fri, 18 Jul 2025 15:33:59 +0000 Subject: [PATCH 01/48] Update dependencies --- packages/autorest.python/package.json | 4 ++-- packages/typespec-python/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 8d5c2dd15d7..79336cfcfdd 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/autorest.python/blob/main/README.md", "dependencies": { - "@typespec/http-client-python": "~0.14.0", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" @@ -47,4 +47,4 @@ "requirements.txt", "generator/" ] -} +} \ No newline at end of file diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 4f97e72a9a3..61710f31260 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "js-yaml": "~4.1.0", "semver": "~7.6.2", "tsx": "~4.19.1", - "@typespec/http-client-python": "~0.14.0", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file", "fs-extra": "~11.2.0" }, "devDependencies": { @@ -103,4 +103,4 @@ "chalk": "5.3.0", "@types/fs-extra": "11.0.4" } -} +} \ No newline at end of file From 2c16d38d829019b1888c6cc0d875ffb5c3fa5b96 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Fri, 18 Jul 2025 15:19:44 -0400 Subject: [PATCH 02/48] bump package --- packages/autorest.python/package.json | 4 ++-- packages/typespec-python/package.json | 4 ++-- pnpm-lock.yaml | 15 ++++++++------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 79336cfcfdd..6f2942f6aef 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" @@ -47,4 +47,4 @@ "requirements.txt", "generator/" ] -} \ No newline at end of file +} diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 61710f31260..123e4767ade 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { @@ -103,4 +103,4 @@ "chalk": "5.3.0", "@types/fs-extra": "11.0.4" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70753168fcc..9d99c6e6b4f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: ~0.14.0 - version: 0.14.0(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: ~0.14.0 - version: 0.14.0(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1668,8 +1668,9 @@ packages: peerDependencies: '@typespec/compiler': ^1.2.1 - '@typespec/http-client-python@0.14.0': - resolution: {integrity: sha512-JJ9dWy64bC7fQvYcxlBixJJ/raaPYWLbjqh5BZ725y/xRjHqHSwscAK2fXZIrNwrEdvF03y9XNlOnf3Zj0V4GA==} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz} + version: 0.14.0 engines: {node: '>=20.0.0'} peerDependencies: '@azure-tools/typespec-autorest': '>=0.58.0 <1.0.0' @@ -6421,7 +6422,7 @@ snapshots: dependencies: '@typespec/compiler': 1.2.1(@types/node@22.13.17) - '@typespec/http-client-python@0.14.0(iurth4uuk4s6znzuuc7ncenk2q)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q)': dependencies: '@azure-tools/typespec-autorest': 0.58.0(vddu6w2yloigenmssnpyjivoim) '@azure-tools/typespec-azure-core': 0.58.0(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))(@typespec/rest@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))) From 4aa004d4b98e21b7c9fce2925f409c1ea9ea9db4 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Fri, 18 Jul 2025 19:31:04 +0000 Subject: [PATCH 03/48] Update dependencies --- packages/autorest.python/package.json | 4 ++-- packages/typespec-python/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 6f2942f6aef..79336cfcfdd 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" @@ -47,4 +47,4 @@ "requirements.txt", "generator/" ] -} +} \ No newline at end of file diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 123e4767ade..61710f31260 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file", "fs-extra": "~11.2.0" }, "devDependencies": { @@ -103,4 +103,4 @@ "chalk": "5.3.0", "@types/fs-extra": "11.0.4" } -} +} \ No newline at end of file From 073bc031a7e3b1c2d4e501e84018ad0a0c7121b9 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Fri, 18 Jul 2025 17:39:14 -0400 Subject: [PATCH 04/48] fix package json --- packages/autorest.python/package.json | 4 ++-- packages/typespec-python/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 79336cfcfdd..6f2942f6aef 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" @@ -47,4 +47,4 @@ "requirements.txt", "generator/" ] -} \ No newline at end of file +} diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 61710f31260..123e4767ade 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { @@ -103,4 +103,4 @@ "chalk": "5.3.0", "@types/fs-extra": "11.0.4" } -} \ No newline at end of file +} From c2c83413c2ba5e51a7266eabe8af2c03ce0b7045 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Fri, 18 Jul 2025 17:45:36 -0400 Subject: [PATCH 05/48] regen --- .../azure_key_credential/generated/setup.py | 33 - .../specification/basic/generated/setup.py | 33 - .../directives/generated/setup.py | 33 - .../management/generated/setup.py | 33 - .../AzureBodyDuration/setup.py | 33 - .../AzureParameterGrouping/setup.py | 33 - .../AcceptanceTests/AzureReport/setup.py | 33 - .../AcceptanceTests/AzureSpecials/setup.py | 33 - .../AcceptanceTests/CustomBaseUri/setup.py | 33 - .../CustomPollerPager/setup.py | 33 - .../AcceptanceTests/CustomUrlPaging/setup.py | 33 - .../Expected/AcceptanceTests/Head/setup.py | 33 - .../AcceptanceTests/HeadExceptions/setup.py | 33 - .../HeadWithAzureKeyCredentialPolicy/setup.py | 33 - .../Expected/AcceptanceTests/Lro/setup.py | 33 - .../LroWithParameterizedEndpoints/setup.py | 33 - .../AcceptanceTests/MixedApiVersion/setup.py | 33 - .../PackageModeBatch/pyproject.toml | 57 + .../AcceptanceTests/PackageModeBatch/setup.py | 70 - .../PackageModeDataPlane/pyproject.toml | 57 + .../PackageModeDataPlane/setup.py | 70 - .../PackageModeMgmtPlane/pyproject.toml | 57 + .../PackageModeMgmtPlane/setup.py | 70 - .../Expected/AcceptanceTests/Paging/setup.py | 33 - .../SecurityAadSwagger/setup.py | 33 - .../SecurityKeySwagger/setup.py | 33 - .../StorageManagementClient/setup.py | 33 - .../SubscriptionIdApiVersion/setup.py | 33 - .../AzureBodyDurationVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../AzureReportVersionTolerant/setup.py | 33 - .../AzureSpecialsVersionTolerant/setup.py | 33 - .../CustomBaseUriVersionTolerant/setup.py | 33 - .../CustomPollerPagerVersionTolerant/setup.py | 33 - .../CustomUrlPagingVersionTolerant/setup.py | 33 - .../HeadExceptionsVersionTolerant/setup.py | 33 - .../HeadVersionTolerant/setup.py | 33 - .../LroPagingVersionTolerant/setup.py | 34 - .../LroVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../PagingVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../setup.py | 33 - .../setup.py | 33 - .../setup.py | 33 - .../setup.py | 33 - .../setup.py | 33 - .../DPGTestModelsVersionTolerant/setup.py | 33 - .../AcceptanceTests/Multiapi/setup.py | 42 - .../MultiapiCredentialDefaultPolicy/setup.py | 42 - .../MultiapiCustomBaseUrl/setup.py | 42 - .../MultiapiDataPlane/setup.py | 42 - .../MultiapiKeywordOnly/setup.py | 42 - .../AcceptanceTests/MultiapiNoAsync/setup.py | 42 - .../AcceptanceTests/MultiapiSecurity/setup.py | 42 - .../MultiapiWithSubmodule/setup.py | 42 - .../AdditionalProperties/setup.py | 33 - .../AcceptanceTests/Anything/setup.py | 34 - .../AcceptanceTests/BodyArray/setup.py | 33 - .../BodyArrayWithNamespaceFolders/setup.py | 33 - .../AcceptanceTests/BodyBinary/setup.py | 33 - .../AcceptanceTests/BodyBoolean/setup.py | 33 - .../AcceptanceTests/BodyByte/setup.py | 33 - .../BodyByteWithPackageName/setup.py | 33 - .../AcceptanceTests/BodyComplex/setup.py | 33 - .../AcceptanceTests/BodyDate/setup.py | 33 - .../AcceptanceTests/BodyDateTime/setup.py | 33 - .../BodyDateTimeRfc1123/setup.py | 33 - .../AcceptanceTests/BodyDictionary/setup.py | 33 - .../AcceptanceTests/BodyDuration/setup.py | 33 - .../AcceptanceTests/BodyFile/setup.py | 33 - .../AcceptanceTests/BodyFormData/setup.py | 33 - .../BodyFormUrlEncodedData/setup.py | 33 - .../AcceptanceTests/BodyInteger/setup.py | 33 - .../AcceptanceTests/BodyNumber/setup.py | 33 - .../AcceptanceTests/BodyString/setup.py | 33 - .../AcceptanceTests/BodyTime/setup.py | 33 - .../AcceptanceTests/ClientEnum/setup.py | 33 - .../AcceptanceTests/Constants/setup.py | 33 - .../AcceptanceTests/CustomBaseUri/setup.py | 33 - .../CustomBaseUriMoreOptions/setup.py | 33 - .../AcceptanceTests/ErrorWithSecrets/setup.py | 33 - .../AcceptanceTests/ExtensibleEnums/setup.py | 33 - .../Expected/AcceptanceTests/Header/setup.py | 33 - .../Expected/AcceptanceTests/Http/setup.py | 33 - .../IncorrectErrorResponse/setup.py | 33 - .../InternalOperation/pyproject.toml | 55 + .../InternalOperation/setup.py | 67 - .../AcceptanceTests/MediaTypes/setup.py | 33 - .../AcceptanceTests/MergePatchJson/setup.py | 33 - .../AcceptanceTests/ModelFlattening/setup.py | 33 - .../MultipleInheritance/setup.py | 33 - .../AcceptanceTests/NoOperations/setup.py | 33 - .../AcceptanceTests/NonStringEnums/setup.py | 33 - .../AcceptanceTests/ObjectType/setup.py | 33 - .../PackageModeDataPlane/pyproject.toml | 55 + .../PackageModeDataPlane/setup.py | 67 - .../ParameterFlattening/setup.py | 33 - .../ParameterizedEndpoint/setup.py | 33 - .../Expected/AcceptanceTests/Report/setup.py | 33 - .../AcceptanceTests/RequiredOptional/setup.py | 33 - .../AcceptanceTests/ReservedWords/setup.py | 33 - .../SecurityAadSwagger/setup.py | 33 - .../SecurityAadSwaggerCredentialFlag/setup.py | 33 - .../SecurityKeySwagger/setup.py | 33 - .../SecurityKeySwaggerCredentialFlag/setup.py | 33 - .../Expected/AcceptanceTests/Url/setup.py | 33 - .../UrlMultiCollectionFormat/setup.py | 33 - .../AcceptanceTests/Validation/setup.py | 33 - .../Expected/AcceptanceTests/Xml/setup.py | 33 - .../AcceptanceTests/XmsErrorResponse/setup.py | 33 - .../setup.py | 33 - .../AnythingVersionTolerant/setup.py | 34 - .../BodyArrayVersionTolerant/setup.py | 33 - .../BodyBinaryVersionTolerant/setup.py | 33 - .../BodyBooleanVersionTolerant/setup.py | 33 - .../BodyByteVersionTolerant/setup.py | 33 - .../BodyComplexVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../BodyDateTimeVersionTolerant/setup.py | 33 - .../BodyDateVersionTolerant/setup.py | 33 - .../BodyDictionaryVersionTolerant/setup.py | 33 - .../BodyDurationVersionTolerant/setup.py | 33 - .../BodyFileVersionTolerant/setup.py | 33 - .../BodyFormDataVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../BodyIntegerVersionTolerant/setup.py | 33 - .../BodyNumberVersionTolerant/setup.py | 33 - .../BodyStringVersionTolerant/setup.py | 33 - .../BodyTimeVersionTolerant/setup.py | 33 - .../ClientEnumVersionTolerant/setup.py | 33 - .../ConstantsVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../CustomBaseUriVersionTolerant/setup.py | 33 - .../ErrorWithSecretsVersionTolerant/setup.py | 33 - .../ExtensibleEnumsVersionTolerant/setup.py | 33 - .../HeaderVersionTolerant/setup.py | 33 - .../HttpVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../MediaTypesVersionTolerant/setup.py | 33 - .../MergePatchJsonVersionTolerant/setup.py | 33 - .../ModelFlatteningVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../NoNamespaceFlagVersionTolerant/setup.py | 34 - .../NoOperationsVersionTolerant/setup.py | 33 - .../NonStringEnumsVersionTolerant/setup.py | 33 - .../ObjectTypeVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../setup.py | 33 - .../ReportVersionTolerant/setup.py | 33 - .../RequiredOptionalVersionTolerant/setup.py | 33 - .../ReservedWordsVersionTolerant/setup.py | 33 - .../setup.py | 33 - .../setup.py | 33 - .../setup.py | 33 - .../UrlVersionTolerant/setup.py | 33 - .../ValidationVersionTolerant/setup.py | 33 - .../XmlVersionTolerant/setup.py | 33 - .../XmsErrorResponseVersionTolerant/setup.py | 33 - .../authentication-api-key/pyproject.toml | 56 + .../generated/authentication-api-key/setup.py | 70 - .../authentication-oauth2/pyproject.toml | 56 + .../generated/authentication-oauth2/setup.py | 70 - .../authentication-union/pyproject.toml | 56 + .../generated/authentication-union/setup.py | 70 - .../azure-core-lro-rpc/pyproject.toml | 59 + .../generated/azure-core-lro-rpc/setup.py | 73 - .../generated/client-namespace/CHANGELOG.md | 5 - .../azure/generated/client-namespace/LICENSE | 21 - .../generated/client-namespace/MANIFEST.in | 6 - .../generated/client-namespace/README.md | 43 - .../client-namespace/apiview-properties.json | 12 - .../client-namespace/client/__init__.py | 1 - .../client/clientnamespace/__init__.py | 32 - .../client/clientnamespace/_client.py | 94 - .../client/clientnamespace/_configuration.py | 42 - .../clientnamespace/_operations/__init__.py | 22 - .../_operations/_operations.py | 112 - .../clientnamespace/_operations/_patch.py | 21 - .../client/clientnamespace/_patch.py | 21 - .../client/clientnamespace/_utils/__init__.py | 6 - .../clientnamespace/_utils/model_base.py | 1232 ---------- .../clientnamespace/_utils/serialization.py | 2032 ---------------- .../client/clientnamespace/_utils/utils.py | 25 - .../client/clientnamespace/_version.py | 9 - .../client/clientnamespace/aio/__init__.py | 29 - .../client/clientnamespace/aio/_client.py | 96 - .../clientnamespace/aio/_configuration.py | 42 - .../aio/_operations/__init__.py | 22 - .../aio/_operations/_operations.py | 95 - .../clientnamespace/aio/_operations/_patch.py | 21 - .../client/clientnamespace/aio/_patch.py | 21 - .../client/clientnamespace/first/__init__.py | 1 - .../clientnamespace/first/models/__init__.py | 27 - .../clientnamespace/first/models/_models.py | 40 - .../clientnamespace/first/models/_patch.py | 21 - .../client/clientnamespace/py.typed | 1 - .../client/clientnamespace/second/__init__.py | 32 - .../client/clientnamespace/second/_client.py | 94 - .../clientnamespace/second/_configuration.py | 42 - .../second/_operations/__init__.py | 22 - .../second/_operations/_operations.py | 112 - .../second/_operations/_patch.py | 21 - .../client/clientnamespace/second/_patch.py | 21 - .../clientnamespace/second/_utils/__init__.py | 6 - .../second/_utils/model_base.py | 1232 ---------- .../second/_utils/serialization.py | 2032 ---------------- .../clientnamespace/second/_utils/utils.py | 25 - .../clientnamespace/second/aio/__init__.py | 29 - .../clientnamespace/second/aio/_client.py | 96 - .../second/aio/_configuration.py | 42 - .../second/aio/_operations/__init__.py | 22 - .../second/aio/_operations/_operations.py | 95 - .../second/aio/_operations/_patch.py | 21 - .../clientnamespace/second/aio/_patch.py | 21 - .../clientnamespace/second/models/__init__.py | 27 - .../clientnamespace/second/models/_models.py | 45 - .../clientnamespace/second/models/_patch.py | 21 - .../clientnamespace/second/sub/__init__.py | 1 - .../second/sub/models/__init__.py | 27 - .../second/sub/models/_enums.py | 16 - .../second/sub/models/_patch.py | 21 - .../client-namespace/dev_requirements.txt | 3 - .../generated_tests/conftest.py | 52 - .../generated_tests/test_namespace_first.py | 22 - .../test_namespace_first_async.py | 23 - .../generated_tests/test_namespace_second.py | 22 - .../test_namespace_second_async.py | 23 - .../generated_tests/testpreparer.py | 43 - .../generated_tests/testpreparer_async.py | 32 - .../azure/generated/client-namespace/setup.py | 70 - .../generated/encode-bytes/pyproject.toml | 56 + .../azure/generated/encode-bytes/setup.py | 70 - .../generated/encode-datetime/pyproject.toml | 56 + .../azure/generated/encode-datetime/setup.py | 70 - .../generated/encode-duration/pyproject.toml | 56 + .../azure/generated/encode-duration/setup.py | 70 - .../generated/encode-numeric/pyproject.toml | 56 + .../azure/generated/encode-numeric/setup.py | 70 - .../generated/parameters-basic/pyproject.toml | 56 + .../azure/generated/parameters-basic/setup.py | 70 - .../pyproject.toml | 56 + .../parameters-body-optionality/setup.py | 70 - .../pyproject.toml | 56 + .../parameters-collection-format/setup.py | 70 - .../generated/parameters-path/pyproject.toml | 56 + .../azure/generated/parameters-path/setup.py | 70 - .../parameters-spread/pyproject.toml | 56 + .../generated/parameters-spread/setup.py | 70 - .../pyproject.toml | 56 + .../payload-content-negotiation/setup.py | 70 - .../payload-json-merge-patch/pyproject.toml | 56 + .../payload-json-merge-patch/setup.py | 70 - .../payload-media-type/pyproject.toml | 56 + .../generated/payload-media-type/setup.py | 70 - .../payload-multipart/pyproject.toml | 56 + .../generated/payload-multipart/setup.py | 70 - .../generated/payload-pageable/pyproject.toml | 56 + .../azure/generated/payload-pageable/setup.py | 70 - .../generated/payload-xml/pyproject.toml | 56 + .../test/azure/generated/payload-xml/setup.py | 70 - .../response-status-code-range/pyproject.toml | 56 + .../response-status-code-range/setup.py | 70 - .../azure/generated/routes/pyproject.toml | 55 + .../test/azure/generated/routes/setup.py | 68 - .../generated/special-words/pyproject.toml | 55 + .../azure/generated/special-words/setup.py | 68 - .../generated/streaming-jsonl/pyproject.toml | 56 + .../azure/generated/streaming-jsonl/setup.py | 70 - .../generated/typetest-array/pyproject.toml | 56 + .../azure/generated/typetest-array/setup.py | 70 - .../typetest-dictionary/CHANGELOG.md | 5 - .../generated/typetest-dictionary/LICENSE | 21 - .../generated/typetest-dictionary/MANIFEST.in | 6 - .../generated/typetest-dictionary/README.md | 43 - .../apiview-properties.json | 50 - .../typetest-dictionary/dev_requirements.txt | 3 - .../generated_tests/conftest.py | 35 - ...est_dictionary_boolean_value_operations.py | 33 - ...ctionary_boolean_value_operations_async.py | 34 - ...st_dictionary_datetime_value_operations.py | 33 - ...tionary_datetime_value_operations_async.py | 34 - ...st_dictionary_duration_value_operations.py | 33 - ...tionary_duration_value_operations_async.py | 34 - ...est_dictionary_float32_value_operations.py | 33 - ...ctionary_float32_value_operations_async.py | 34 - .../test_dictionary_int32_value_operations.py | 33 - ...dictionary_int32_value_operations_async.py | 34 - .../test_dictionary_int64_value_operations.py | 33 - ...dictionary_int64_value_operations_async.py | 34 - .../test_dictionary_model_value_operations.py | 33 - ...dictionary_model_value_operations_async.py | 34 - ...tionary_nullable_float_value_operations.py | 33 - ...y_nullable_float_value_operations_async.py | 34 - ...ionary_recursive_model_value_operations.py | 33 - ..._recursive_model_value_operations_async.py | 34 - ...test_dictionary_string_value_operations.py | 33 - ...ictionary_string_value_operations_async.py | 34 - ...est_dictionary_unknown_value_operations.py | 33 - ...ctionary_unknown_value_operations_async.py | 34 - .../generated_tests/testpreparer.py | 26 - .../generated_tests/testpreparer_async.py | 20 - .../generated/typetest-dictionary/setup.py | 70 - .../typetest-dictionary/typetest/__init__.py | 1 - .../typetest/dictionary/__init__.py | 32 - .../typetest/dictionary/_client.py | 141 -- .../typetest/dictionary/_configuration.py | 42 - .../typetest/dictionary/_patch.py | 21 - .../typetest/dictionary/_utils/__init__.py | 6 - .../typetest/dictionary/_utils/model_base.py | 1232 ---------- .../dictionary/_utils/serialization.py | 2032 ---------------- .../typetest/dictionary/_version.py | 9 - .../typetest/dictionary/aio/__init__.py | 29 - .../typetest/dictionary/aio/_client.py | 144 -- .../typetest/dictionary/aio/_configuration.py | 42 - .../typetest/dictionary/aio/_patch.py | 21 - .../dictionary/aio/operations/__init__.py | 45 - .../dictionary/aio/operations/_operations.py | 1807 -------------- .../dictionary/aio/operations/_patch.py | 21 - .../typetest/dictionary/models/__init__.py | 27 - .../typetest/dictionary/models/_models.py | 49 - .../typetest/dictionary/models/_patch.py | 21 - .../dictionary/operations/__init__.py | 45 - .../dictionary/operations/_operations.py | 2114 ----------------- .../typetest/dictionary/operations/_patch.py | 21 - .../typetest/dictionary/py.typed | 1 - .../generated/versioning-added/pyproject.toml | 56 + .../azure/generated/versioning-added/setup.py | 70 - .../versioning-madeoptional/pyproject.toml | 56 + .../versioning-madeoptional/setup.py | 70 - .../versioning-removed/pyproject.toml | 56 + .../generated/versioning-removed/setup.py | 70 - .../versioning-renamedfrom/pyproject.toml | 56 + .../generated/versioning-renamedfrom/setup.py | 70 - .../pyproject.toml | 56 + .../versioning-returntypechangedfrom/setup.py | 70 - .../versioning-typechangedfrom/pyproject.toml | 56 + .../versioning-typechangedfrom/setup.py | 70 - 338 files changed, 1962 insertions(+), 24920 deletions(-) delete mode 100644 packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py delete mode 100644 packages/autorest.python/samples/specification/basic/generated/setup.py delete mode 100644 packages/autorest.python/samples/specification/directives/generated/setup.py delete mode 100644 packages/autorest.python/samples/specification/management/generated/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py delete mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py delete mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py delete mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py create mode 100644 packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/authentication-api-key/setup.py create mode 100644 packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/authentication-oauth2/setup.py create mode 100644 packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/authentication-union/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-core-lro-rpc/setup.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/CHANGELOG.md delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/LICENSE delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/MANIFEST.in delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/README.md delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/apiview-properties.json delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_configuration.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/model_base.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/serialization.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/utils.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_version.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_configuration.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_models.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/py.typed delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_configuration.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/model_base.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/serialization.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/utils.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_configuration.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_enums.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/dev_requirements.txt delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/conftest.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first_async.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second_async.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer_async.py delete mode 100644 packages/typespec-python/test/azure/generated/client-namespace/setup.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/setup.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/setup.py create mode 100644 packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/encode-duration/setup.py create mode 100644 packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/encode-numeric/setup.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/parameters-basic/setup.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/parameters-body-optionality/setup.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/parameters-collection-format/setup.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/parameters-path/setup.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/parameters-spread/setup.py create mode 100644 packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/payload-content-negotiation/setup.py create mode 100644 packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/payload-json-merge-patch/setup.py create mode 100644 packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/payload-media-type/setup.py create mode 100644 packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/payload-multipart/setup.py create mode 100644 packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/payload-pageable/setup.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/payload-xml/setup.py create mode 100644 packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/response-status-code-range/setup.py create mode 100644 packages/typespec-python/test/azure/generated/routes/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/routes/setup.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/special-words/setup.py create mode 100644 packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/streaming-jsonl/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-array/setup.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/CHANGELOG.md delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/LICENSE delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/MANIFEST.in delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/README.md delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/dev_requirements.txt delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/conftest.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer_async.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/setup.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/model_base.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/serialization.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_version.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_patch.py delete mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/py.typed create mode 100644 packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/versioning-added/setup.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/versioning-madeoptional/setup.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/versioning-removed/setup.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/versioning-renamedfrom/setup.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/setup.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/versioning-typechangedfrom/setup.py diff --git a/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py b/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py deleted file mode 100644 index 79425cd2e78..00000000000 --- a/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-key-credential-sample" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="azure-key-credential-sample", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/samples/specification/basic/generated/setup.py b/packages/autorest.python/samples/specification/basic/generated/setup.py deleted file mode 100644 index e9896b084f6..00000000000 --- a/packages/autorest.python/samples/specification/basic/generated/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-basic-sample" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="azure-basic-sample", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/samples/specification/directives/generated/setup.py b/packages/autorest.python/samples/specification/directives/generated/setup.py deleted file mode 100644 index 8e362ea59d6..00000000000 --- a/packages/autorest.python/samples/specification/directives/generated/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-directives-sample" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="azure-directives-sample", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Show polling and paging generation. - """, -) diff --git a/packages/autorest.python/samples/specification/management/generated/setup.py b/packages/autorest.python/samples/specification/management/generated/setup.py deleted file mode 100644 index 2086b103a4d..00000000000 --- a/packages/autorest.python/samples/specification/management/generated/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-mgmt-sample" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="azure-mgmt-sample", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py deleted file mode 100644 index 51d310be79c..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestdurationtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestDurationTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py deleted file mode 100644 index 242933502fc..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparametergroupingtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterGroupingTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py deleted file mode 100644 index 424415fb046..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestreportserviceforazure" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestReportServiceForAzure", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py deleted file mode 100644 index 1828e65e8e4..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestazurespecialparameterstestclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestAzureSpecialParametersTestClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py deleted file mode 100644 index 776c9edb733..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterizedhosttestclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterizedHostTestClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py deleted file mode 100644 index cf0320bb5fa..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "custompollerpager" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="custompollerpager", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Long-running Operation for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py deleted file mode 100644 index 57aa85cce20..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterizedhosttestpagingclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterizedHostTestPagingClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py deleted file mode 100644 index 8460273b9a9..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestheadtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestHeadTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py deleted file mode 100644 index b781208d50b..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestheadexceptiontestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestHeadExceptionTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py deleted file mode 100644 index 8460273b9a9..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestheadtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestHeadTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py deleted file mode 100644 index b3ad7670f04..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestlongrunningoperationtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestLongRunningOperationTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Long-running Operation for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py deleted file mode 100644 index c15e03fb538..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "lrowithparamaterizedendpoints" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="LROWithParamaterizedEndpoints", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py deleted file mode 100644 index c3845da1124..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "mixedapiversion" -version = "1.0.0b1" - - -setup( - name=PACKAGE_NAME, - version=version, - description="mixedapiversion", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml new file mode 100644 index 00000000000..884339c4ffa --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-packagemode-batch" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Package Mode Batch Mgmt Plane Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.packagemode.batch._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.packagemode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/setup.py deleted file mode 100644 index f172afd65c1..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-packagemode-batch" -PACKAGE_PPRINT_NAME = "Azure Package Mode Batch Mgmt Plane" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.packagemode", - ] - ), - include_package_data=True, - package_data={ - "azure.packagemode.batch.paging": ["py.typed"], - }, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml new file mode 100644 index 00000000000..3a258f545a3 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-packagemode-dataplane" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Package Mode Data Plane Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.packagemode.dataplane._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.packagemode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py deleted file mode 100644 index fe03a8c4764..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-packagemode-dataplane" -PACKAGE_PPRINT_NAME = "Azure Package Mode Data Plane" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.packagemode", - ] - ), - include_package_data=True, - package_data={ - "azure.packagemode.dataplane": ["py.typed"], - }, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml new file mode 100644 index 00000000000..31584fc7312 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-package-mode" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Package Mode Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.package.mode._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.package", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/setup.py deleted file mode 100644 index 4cbb73d4238..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-package-mode" -PACKAGE_PPRINT_NAME = "Azure Package Mode" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.package", - ] - ), - include_package_data=True, - package_data={ - "azure.package.mode": ["py.typed"], - }, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py deleted file mode 100644 index 751424a3b08..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestpagingtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestPagingTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Long-running Operation for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py deleted file mode 100644 index f5833b6e9d9..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestsecurityaad" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutorestSecurityAad", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Autorest Security Aad REST APIs. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py deleted file mode 100644 index 911380f7b18..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestsecuritykey" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutorestSecurityKey", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Autorest Security Key REST APIs. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py deleted file mode 100644 index 1c86fa28abe..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "storagemanagementclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="StorageManagementClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - StorageManagementClient. - """, -) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py deleted file mode 100644 index 771918e8e42..00000000000 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "microsoftazuretesturl" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="MicrosoftAzureTestUrl", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Some cool documentation. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py deleted file mode 100644 index 400b90dee36..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestdurationtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestDurationTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py deleted file mode 100644 index 71c9ada660d..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparametergroupingtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterGroupingTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py deleted file mode 100644 index 7c18c0ffbd0..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestreportserviceforazure" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestReportServiceForAzure", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py deleted file mode 100644 index 4c99b5a59e5..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestazurespecialparameterstestclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestAzureSpecialParametersTestClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py deleted file mode 100644 index fb2cea48e37..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterizedhosttestclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterizedHostTestClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py deleted file mode 100644 index 18925d862ff..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "custompollerpagerversiontolerant" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="custompollerpagerversiontolerant", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Long-running Operation for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py deleted file mode 100644 index ed5bc12c318..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterizedhosttestpagingclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterizedHostTestPagingClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py deleted file mode 100644 index a2114e63fe9..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestheadexceptiontestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestHeadExceptionTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py deleted file mode 100644 index 2e702b5d420..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestheadtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestHeadTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py deleted file mode 100644 index b1a063b8890..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "lropagingversiontolerant" -version = "1.0.0b1" - - -setup( - name=PACKAGE_NAME, - version=version, - description="lropagingversiontolerant", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py deleted file mode 100644 index 1fa17b82ee2..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestlongrunningoperationtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestLongRunningOperationTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Long-running Operation for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py deleted file mode 100644 index 1a280855d1c..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "lrowithparamaterizedendpoints" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="LROWithParamaterizedEndpoints", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py deleted file mode 100644 index 3331e707db0..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestpagingtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestPagingTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Long-running Operation for AutoRest. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py deleted file mode 100644 index c0a39668cb1..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "storagemanagementclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="StorageManagementClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - StorageManagementClient. - """, -) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py deleted file mode 100644 index f3c3ea18adb..00000000000 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "microsoftazuretesturl" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="MicrosoftAzureTestUrl", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Some cool documentation. - """, -) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py deleted file mode 100644 index c23af9f512c..00000000000 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "dpgcustomizationcustomized" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="dpgcustomizationcustomized", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - DPG Swagger that tests our ability to grow up. - """, -) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py deleted file mode 100644 index 889fcb7e225..00000000000 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "dpgcustomizationinitial" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="dpgcustomizationinitial", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - DPG Swagger that tests our ability to grow up. - """, -) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py deleted file mode 100644 index 49b4eb793d9..00000000000 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "dpgservicedriveninitial" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="dpgservicedriveninitial", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - DPG Swagger, this is the initial swagger a service could do. - """, -) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py deleted file mode 100644 index 90ebdfbfd32..00000000000 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "dpgservicedrivenupdateone" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="dpgservicedrivenupdateone", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - DPG Swagger, this is the initial swagger a service could do. - """, -) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py deleted file mode 100644 index 7b2a3db6c73..00000000000 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "dpgtestmodels" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="dpgtestmodels", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - DPG Swagger that tests our ability to grow up. - """, -) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py deleted file mode 100644 index 56b1c25baf0..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "multiapi" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="multiapi", - author_email="", - url="", - keywords=["Swagger", "multiapi"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - """ -) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py deleted file mode 100644 index 2d4cdb23283..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "multiapicredentialdefaultpolicy" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="multiapi with a non BearerTokenCredentialPolicy auth policy", - author_email="", - url="", - keywords=["Swagger", "multiapicredentialdefaultpolicy"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - """ -) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py deleted file mode 100644 index aceae3fc0ed..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "multiapicustombaseurl" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="multiapi custom base url", - author_email="", - url="", - keywords=["Swagger", "multiapicustombaseurl"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - """ -) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py deleted file mode 100644 index bdf3207721e..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "multiapidataplane" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="multiapi data plane", - author_email="", - url="", - keywords=["Swagger", "multiapidataplane"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - """ -) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py deleted file mode 100644 index b79c0895e7f..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "multiapikeywordonly" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="multiapi custom base url", - author_email="", - url="", - keywords=["Swagger", "multiapikeywordonly"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - """ -) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py deleted file mode 100644 index 3815c124281..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "multiapinoasync" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="multiapinoasync", - author_email="", - url="", - keywords=["Swagger", "multiapinoasync"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - """ -) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py deleted file mode 100644 index 5466ba46ec5..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "multiapisecurity" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="multiapisecurity", - author_email="", - url="", - keywords=["Swagger", "multiapisecurity"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - """ -) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py deleted file mode 100644 index 88c5ed83436..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -# coding: utf-8 - -from setuptools import setup, find_packages - -NAME = "multiapiwithsubmodule" -VERSION = "0.1.0" - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] - -setup( - name=NAME, - version=VERSION, - description="multiapiwithsubmodule", - author_email="", - url="", - keywords=["Swagger", "multiapiwithsubmodule"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - """ -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py deleted file mode 100644 index 4e5a9cb677f..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "additionalpropertiesclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AdditionalPropertiesClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py deleted file mode 100644 index f3f7fab84e4..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "anythingclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AnythingClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py deleted file mode 100644 index 3591d75b611..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatarrayservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATArrayService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py deleted file mode 100644 index 3591d75b611..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatarrayservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATArrayService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py deleted file mode 100644 index d481e6765ea..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "binarywithcontenttypeapplicationjson" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="BinaryWithContentTypeApplicationJson", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Sample for file with json and binary content type. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py deleted file mode 100644 index 688f20e6e69..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestbooltestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestBoolTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py deleted file mode 100644 index c19ff067a90..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatbyteservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATByteService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py deleted file mode 100644 index 3adce84b2b0..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "packagename" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="packagename", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py deleted file mode 100644 index d5fd29c14c4..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestcomplextestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestComplexTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py deleted file mode 100644 index f350db858d9..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestdatetestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestDateTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py deleted file mode 100644 index a6d46ea08d1..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestdatetimetestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestDateTimeTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py deleted file mode 100644 index 02600cb9476..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestrfc1123datetimetestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestRFC1123DateTimeTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py deleted file mode 100644 index 57822ed5acb..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatdictionaryservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATDictionaryService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py deleted file mode 100644 index 51d310be79c..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestdurationtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestDurationTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py deleted file mode 100644 index 3e52ce075aa..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatfileservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATFileService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py deleted file mode 100644 index 45ec7dbe609..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatformdataservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATFormDataService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py deleted file mode 100644 index ac42ab58b6c..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "bodyformsdataurlencoded" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="BodyFormsDataURLEncoded", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py deleted file mode 100644 index ffe4f7810d5..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestintegertestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestIntegerTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py deleted file mode 100644 index 679b4661e47..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestnumbertestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestNumberTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py deleted file mode 100644 index c141bac7ab4..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py deleted file mode 100644 index f29b3ccad04..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autoresttimetestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestTimeTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py deleted file mode 100644 index 59fc02c049d..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "clientwithenum" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ClientWithEnum", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test client with enum variable. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py deleted file mode 100644 index 6e9e0380601..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerconstantservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerConstantService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger Constant. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py deleted file mode 100644 index 776c9edb733..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterizedhosttestclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterizedHostTestClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py deleted file mode 100644 index 1aaaed971ff..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterizedcustomhosttestclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterizedCustomHostTestClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py deleted file mode 100644 index a4c461c083a..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "errorwithsecrets" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ErrorWithSecrets", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Tests whether loggers/tracers redact secrets and PII within error responses. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py deleted file mode 100644 index 1c0323fca33..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "petstoreinc" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="PetStoreInc", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - PetStore. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py deleted file mode 100644 index 97b5c3a5b5f..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatheaderservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATHeaderService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py deleted file mode 100644 index 29a75656e2a..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autoresthttpinfrastructuretestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestHttpInfrastructureTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py deleted file mode 100644 index 10eb713af21..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "incorrectreturnederrormodel" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="IncorrectReturnedErrorModel", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test to see when throwing an HttpResponseError whether we swallow error model deserialization errors. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml new file mode 100644 index 00000000000..bbb7753fe0c --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "internaloperation" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Internal Operation Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "internaloperation._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/setup.py deleted file mode 100644 index 92797456503..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/setup.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "internaloperation" -PACKAGE_PPRINT_NAME = "Internal Operation" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "internaloperation": ["py.typed"], - }, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py deleted file mode 100644 index 63f39798790..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "mediatypesclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="MediaTypesClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Play with produces/consumes and media-types in general. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py deleted file mode 100644 index 1cb779fd90d..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "mergepatchjsonclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="MergePatchJsonClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing merge patch json. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py deleted file mode 100644 index 1098909a796..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestresourceflatteningtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestResourceFlatteningTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Resource Flattening for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py deleted file mode 100644 index 24b447fd4e9..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "multipleinheritanceserviceclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="MultipleInheritanceServiceClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for multiinheritance client testing. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py deleted file mode 100644 index bf08d4328ac..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "nooperationsserviceclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="NoOperationsServiceClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client with no operations. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py deleted file mode 100644 index 99adff7d2c2..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "nonstringenumsclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="NonStringEnumsClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Testing non-string enums. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py deleted file mode 100644 index f81ec7c7005..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "objecttypeclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ObjectTypeClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing basic type: object swaggers. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml new file mode 100644 index 00000000000..2aafcc9eabf --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "packagemode" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Package Mode Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "packagemode._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py deleted file mode 100644 index a1d3f8a3b17..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/setup.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "packagemode" -PACKAGE_PPRINT_NAME = "Azure Package Mode" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "packagemode": ["py.typed"], - }, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py deleted file mode 100644 index 558fbf1fc4e..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterflattening" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterFlattening", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Resource Flattening for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py deleted file mode 100644 index 524ec102acd..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parmaterizedendpointclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ParmaterizedEndpointClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing parameterized hosts with the name 'endpoint'. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py deleted file mode 100644 index f8a3dddcd1e..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestreportservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestReportService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py deleted file mode 100644 index f924e27dfe2..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestrequiredoptionaltestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestRequiredOptionalTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py deleted file mode 100644 index bc83d8d534d..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "reservedwordsclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ReservedWordsClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Swagger that has operation groups etc. with reserved words. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py deleted file mode 100644 index 19948e1caa7..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestsecurityaad" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutorestSecurityAad", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Autorest Security Aad REST APIs. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py deleted file mode 100644 index 1e4025c78fd..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "securityaadswaggercredentialflag" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="SecurityAadSwaggerCredentialFlag", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Autorest Security Aad REST APIs. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py deleted file mode 100644 index 5a5f344d2ff..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestsecuritykey" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutorestSecurityKey", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Autorest Security Key REST APIs. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py deleted file mode 100644 index d88b08ed49f..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "securitykeyswaggercredentialflag" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="SecurityKeySwaggerCredentialFlag", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Autorest Security Key REST APIs. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py deleted file mode 100644 index 9913cf9a106..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autoresturltestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestUrlTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py deleted file mode 100644 index 0aa4e4b2fb5..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autoresturlmutlicollectionformattestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestUrlMutliCollectionFormatTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py deleted file mode 100644 index 3dde62c4285..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestvalidationtest" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestValidationTest", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. No server backend exists for these tests. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py deleted file mode 100644 index c320e2f7335..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatxmlservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATXMLService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py deleted file mode 100644 index 63298db94cb..00000000000 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "xmserrorresponseextensions" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="XMSErrorResponseExtensions", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - XMS Error Response Extensions. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py deleted file mode 100644 index 5a40fcb0ab8..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "additionalpropertiesclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AdditionalPropertiesClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py deleted file mode 100644 index 30034d83c6d..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "anythingclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AnythingClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py deleted file mode 100644 index 3288447fb8a..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatarrayservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATArrayService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py deleted file mode 100644 index 5f06103f0e9..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "binarywithcontenttypeapplicationjson" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="BinaryWithContentTypeApplicationJson", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Sample for file with json and binary content type. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py deleted file mode 100644 index 242a9371671..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestbooltestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestBoolTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py deleted file mode 100644 index 3d7baf22ccd..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatbyteservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATByteService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py deleted file mode 100644 index e1cc3889509..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestcomplextestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestComplexTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py deleted file mode 100644 index ea37e96529b..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestrfc1123datetimetestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestRFC1123DateTimeTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py deleted file mode 100644 index 3772b30b471..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestdatetimetestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestDateTimeTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py deleted file mode 100644 index c487af06187..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestdatetestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestDateTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py deleted file mode 100644 index f6386b0f2e0..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatdictionaryservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATDictionaryService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py deleted file mode 100644 index 400b90dee36..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestdurationtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestDurationTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py deleted file mode 100644 index 29134ca1b10..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatfileservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATFileService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py deleted file mode 100644 index 7f7d419fd79..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatformdataservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATFormDataService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py deleted file mode 100644 index daa487136fa..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "bodyformsdataurlencoded" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="BodyFormsDataURLEncoded", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py deleted file mode 100644 index 293e7858e06..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestintegertestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestIntegerTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py deleted file mode 100644 index 3c3b3e2d3b3..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestnumbertestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestNumberTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py deleted file mode 100644 index 5443f89a881..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py deleted file mode 100644 index 8197d64f66f..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autoresttimetestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestTimeTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py deleted file mode 100644 index 8807d0de347..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "clientwithenum" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ClientWithEnum", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test client with enum variable. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py deleted file mode 100644 index 43ab422bc31..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerconstantservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerConstantService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger Constant. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py deleted file mode 100644 index 1dc42f910a7..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterizedcustomhosttestclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterizedCustomHostTestClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py deleted file mode 100644 index fb2cea48e37..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterizedhosttestclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterizedHostTestClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py deleted file mode 100644 index e3c2ed83aac..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "errorwithsecrets" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ErrorWithSecrets", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Tests whether loggers/tracers redact secrets and PII within error responses. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py deleted file mode 100644 index ce05cbf78c7..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "petstoreinc" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="PetStoreInc", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - PetStore. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py deleted file mode 100644 index a474e0ff66a..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatheaderservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATHeaderService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py deleted file mode 100644 index f87eb21c235..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autoresthttpinfrastructuretestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestHttpInfrastructureTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py deleted file mode 100644 index 07a3372ab15..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "incorrectreturnederrormodel" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="IncorrectReturnedErrorModel", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test to see when throwing an HttpResponseError whether we swallow error model deserialization errors. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py deleted file mode 100644 index 57fd24719cd..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "mediatypesclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="MediaTypesClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Play with produces/consumes and media-types in general. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py deleted file mode 100644 index 9a3d60523aa..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "mergepatchjsonclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="MergePatchJsonClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing merge patch json. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py deleted file mode 100644 index 468ba5f8987..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestresourceflatteningtestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestResourceFlatteningTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Resource Flattening for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py deleted file mode 100644 index ba3246fc65e..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "multipleinheritanceserviceclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="MultipleInheritanceServiceClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for multiinheritance client testing. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py deleted file mode 100644 index f50b4996cda..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "nonamespaceflag" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="nonamespaceflag", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py deleted file mode 100644 index 6c90c5c86c5..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "nooperationsserviceclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="NoOperationsServiceClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client with no operations. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py deleted file mode 100644 index 7676cfb4f96..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "nonstringenumsclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="NonStringEnumsClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Testing non-string enums. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py deleted file mode 100644 index 10d2ca3d6be..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "objecttypeclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ObjectTypeClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing basic type: object swaggers. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py deleted file mode 100644 index b95414e70ea..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestparameterflattening" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestParameterFlattening", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Resource Flattening for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py deleted file mode 100644 index 2ae7effd091..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parmaterizedendpointclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ParmaterizedEndpointClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Service client for testing parameterized hosts with the name 'endpoint'. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py deleted file mode 100644 index e844f289d7e..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestreportservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestReportService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py deleted file mode 100644 index 5d78d91beec..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestrequiredoptionaltestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestRequiredOptionalTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py deleted file mode 100644 index 1282c0d24d0..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "reservedwordsclient" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="ReservedWordsClient", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Swagger that has operation groups etc. with reserved words. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py deleted file mode 100644 index 5b88f7f5b54..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestsecurityaad" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutorestSecurityAad", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Autorest Security Aad REST APIs. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py deleted file mode 100644 index 83c81bb0cf6..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestsecuritykey" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutorestSecurityKey", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Autorest Security Key REST APIs. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py deleted file mode 100644 index 7816f0697d0..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autoresturlmutlicollectionformattestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestUrlMutliCollectionFormatTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py deleted file mode 100644 index fdc3396da09..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autoresturltestservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestUrlTestService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py deleted file mode 100644 index 9508ff2fc4e..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestvalidationtest" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestValidationTest", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest. No server backend exists for these tests. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py deleted file mode 100644 index 24bc8897ffd..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "autorestswaggerbatxmlservice" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="AutoRestSwaggerBATXMLService", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - Test Infrastructure for AutoRest Swagger BAT. - """, -) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py deleted file mode 100644 index 7dde5c58c42..00000000000 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from setuptools import setup, find_packages - - -PACKAGE_NAME = "xmserrorresponseextensions" -version = "0.1.0" - - -setup( - name=PACKAGE_NAME, - version=version, - description="XMSErrorResponseExtensions", - author_email="", - url="", - keywords="azure, azure sdk", - packages=find_packages(), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - long_description="""\ - XMS Error Response Extensions. - """, -) diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml new file mode 100644 index 00000000000..dfb199927a2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "authentication-apikey" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Authentication Apikey Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "authentication.apikey._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "authentication", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/setup.py b/packages/typespec-python/test/azure/generated/authentication-api-key/setup.py deleted file mode 100644 index a60616a34be..00000000000 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "authentication-apikey" -PACKAGE_PPRINT_NAME = "Authentication Apikey" -PACKAGE_NAMESPACE = "authentication.apikey" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "authentication", - ] - ), - include_package_data=True, - package_data={ - "authentication.apikey": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml new file mode 100644 index 00000000000..8029fed7914 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "authentication-oauth2" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Authentication Oauth2 Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "authentication.oauth2._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "authentication", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/setup.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/setup.py deleted file mode 100644 index 653cda41466..00000000000 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "authentication-oauth2" -PACKAGE_PPRINT_NAME = "Authentication Oauth2" -PACKAGE_NAMESPACE = "authentication.oauth2" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "authentication", - ] - ), - include_package_data=True, - package_data={ - "authentication.oauth2": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml new file mode 100644 index 00000000000..bad9e26fdab --- /dev/null +++ b/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "authentication-union" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Authentication Union Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "authentication.union._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "authentication", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/authentication-union/setup.py b/packages/typespec-python/test/azure/generated/authentication-union/setup.py deleted file mode 100644 index 0615f6be9af..00000000000 --- a/packages/typespec-python/test/azure/generated/authentication-union/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "authentication-union" -PACKAGE_PPRINT_NAME = "Authentication Union" -PACKAGE_NAMESPACE = "authentication.union" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "authentication", - ] - ), - include_package_data=True, - package_data={ - "authentication.union": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml new file mode 100644 index 00000000000..071d9ee7d5b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-core-lro-rpc" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Core Lro Rpc Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.core.lro.rpc._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.core", + "specs.azure.core.lro", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/setup.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/setup.py deleted file mode 100644 index f2438bb7f0a..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-core-lro-rpc" -PACKAGE_PPRINT_NAME = "Specs Azure Core Lro Rpc" -PACKAGE_NAMESPACE = "specs.azure.core.lro.rpc" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.core", - "specs.azure.core.lro", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.core.lro.rpc": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/CHANGELOG.md b/packages/typespec-python/test/azure/generated/client-namespace/CHANGELOG.md deleted file mode 100644 index 628743d283a..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Release History - -## 1.0.0b1 (1970-01-01) - -- Initial version diff --git a/packages/typespec-python/test/azure/generated/client-namespace/LICENSE b/packages/typespec-python/test/azure/generated/client-namespace/LICENSE deleted file mode 100644 index 63447fd8bbb..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) Microsoft Corporation. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-namespace/MANIFEST.in b/packages/typespec-python/test/azure/generated/client-namespace/MANIFEST.in deleted file mode 100644 index 381b472228a..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include *.md -include LICENSE -include client/clientnamespace/py.typed -recursive-include tests *.py -recursive-include samples *.py *.md -include client/__init__.py diff --git a/packages/typespec-python/test/azure/generated/client-namespace/README.md b/packages/typespec-python/test/azure/generated/client-namespace/README.md deleted file mode 100644 index a1d890f76fe..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Client Clientnamespace client library for Python - - -## Getting started - -### Install the package - -```bash -python -m pip install client-clientnamespace -``` - -#### Prequisites - -- Python 3.9 or later is required to use this package. -- You need an [Azure subscription][azure_sub] to use this package. -- An existing Client Clientnamespace instance. - - -## Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit https://cla.microsoft.com. - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, -see the Code of Conduct FAQ or contact opencode@microsoft.com with any -additional questions or comments. - - -[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ -[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token -[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials -[azure_identity_pip]: https://pypi.org/project/azure-identity/ -[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential -[pip]: https://pypi.org/project/pip/ -[azure_sub]: https://azure.microsoft.com/free/ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/apiview-properties.json b/packages/typespec-python/test/azure/generated/client-namespace/apiview-properties.json deleted file mode 100644 index 8519c2a50ab..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/apiview-properties.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "CrossLanguagePackageId": "Client.ClientNamespace", - "CrossLanguageDefinitionId": { - "client.clientnamespace.first.models.FirstClientResult": "Client.ClientNamespace.FirstModel.FirstClientResult", - "client.clientnamespace.second.models.SecondClientResult": "Client.ClientNamespace.Second.Model.SecondClientResult", - "client.clientnamespace.models.SecondClientEnumType": "Client.ClientNamespace.Second.Model.SecondClientEnumType", - "client.clientnamespace.ClientNamespaceFirstClient.get_first": "ClientNameSpaceClient.ClientNamespaceFirstClient.getFirst", - "client.clientnamespace.aio.ClientNamespaceFirstClient.get_first": "ClientNameSpaceClient.ClientNamespaceFirstClient.getFirst", - "client.clientnamespace.ClientNamespaceSecondClient.get_second": "ClientNameSpaceClient.ClientNamespaceSecondClient.getSecond", - "client.clientnamespace.aio.ClientNamespaceSecondClient.get_second": "ClientNameSpaceClient.ClientNamespaceSecondClient.getSecond" - } -} \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/__init__.py deleted file mode 100644 index d55ccad1f57..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/__init__.py deleted file mode 100644 index 3f7d2e99360..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._client import ClientNamespaceFirstClient # type: ignore -from ._version import VERSION - -__version__ = VERSION - -try: - from ._patch import __all__ as _patch_all - from ._patch import * -except ImportError: - _patch_all = [] -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "ClientNamespaceFirstClient", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore - -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py deleted file mode 100644 index bfb80c07d61..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any -from typing_extensions import Self - -from azure.core import PipelineClient -from azure.core.pipeline import policies -from azure.core.rest import HttpRequest, HttpResponse - -from ._configuration import ClientNamespaceFirstClientConfiguration -from ._operations._operations import _ClientNamespaceFirstClientOperationsMixin -from ._utils.serialization import Deserializer, Serializer - - -class ClientNamespaceFirstClient( - _ClientNamespaceFirstClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword - """ClientNamespaceFirstClient. - - :keyword endpoint: Service host. Default value is "http://localhost:3000". - :paramtype endpoint: str - """ - - def __init__( # pylint: disable=missing-client-constructor-parameter-credential - self, *, endpoint: str = "http://localhost:3000", **kwargs: Any - ) -> None: - _endpoint = "{endpoint}" - self._config = ClientNamespaceFirstClientConfiguration(endpoint=endpoint, **kwargs) - - _policies = kwargs.pop("policies", None) - if _policies is None: - _policies = [ - policies.RequestIdPolicy(**kwargs), - self._config.headers_policy, - self._config.user_agent_policy, - self._config.proxy_policy, - policies.ContentDecodePolicy(**kwargs), - self._config.redirect_policy, - self._config.retry_policy, - self._config.authentication_policy, - self._config.custom_hook_policy, - self._config.logging_policy, - policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, - self._config.http_logging_policy, - ] - self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) - - self._serialize = Serializer() - self._deserialize = Deserializer() - self._serialize.client_side_validation = False - - def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse - """ - - request_copy = deepcopy(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore - - def close(self) -> None: - self._client.close() - - def __enter__(self) -> Self: - self._client.__enter__() - return self - - def __exit__(self, *exc_details: Any) -> None: - self._client.__exit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_configuration.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_configuration.py deleted file mode 100644 index 89c01e16124..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_configuration.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.pipeline import policies - -from ._version import VERSION - - -class ClientNamespaceFirstClientConfiguration: # pylint: disable=too-many-instance-attributes - """Configuration for ClientNamespaceFirstClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: Service host. Default value is "http://localhost:3000". - :type endpoint: str - """ - - def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: - - self.endpoint = endpoint - kwargs.setdefault("sdk_moniker", "client-clientnamespace/{}".format(VERSION)) - self.polling_interval = kwargs.get("polling_interval", 30) - self._configure(**kwargs) - - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py deleted file mode 100644 index 933fcd7d1b5..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py deleted file mode 100644 index 0b6a5ce619c..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -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 .._configuration import ClientNamespaceFirstClientConfiguration -from .._utils.model_base import _deserialize -from .._utils.serialization import Serializer -from .._utils.utils import ClientMixinABC -from ..first import models as _first_models2 - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_client_namespace_first_get_first_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/client/client-namespace/first" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -class _ClientNamespaceFirstClientOperationsMixin( - ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], ClientNamespaceFirstClientConfiguration] -): - - @distributed_trace - def get_first(self, **kwargs: Any) -> _first_models2.FirstClientResult: - """get_first. - - :return: FirstClientResult. The FirstClientResult is compatible with MutableMapping - :rtype: ~client.clientnamespace.first.models.FirstClientResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_first_models2.FirstClientResult] = kwargs.pop("cls", None) - - _request = build_client_namespace_first_get_first_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_first_models2.FirstClientResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/__init__.py deleted file mode 100644 index 8026245c2ab..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/model_base.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/model_base.py deleted file mode 100644 index 49d5c725938..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/model_base.py +++ /dev/null @@ -1,1232 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=protected-access, broad-except - -import copy -import calendar -import decimal -import functools -import sys -import logging -import base64 -import re -import typing -import enum -import email.utils -from datetime import datetime, date, time, timedelta, timezone -from json import JSONEncoder -import xml.etree.ElementTree as ET -from collections.abc import MutableMapping -from typing_extensions import Self -import isodate -from azure.core.exceptions import DeserializationError -from azure.core import CaseInsensitiveEnumMeta -from azure.core.pipeline import PipelineResponse -from azure.core.serialization import _Null - -_LOGGER = logging.getLogger(__name__) - -__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] - -TZ_UTC = timezone.utc -_T = typing.TypeVar("_T") - - -def _timedelta_as_isostr(td: timedelta) -> str: - """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' - - Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython - - :param timedelta td: The timedelta to convert - :rtype: str - :return: ISO8601 version of this timedelta - """ - - # Split seconds to larger units - seconds = td.total_seconds() - minutes, seconds = divmod(seconds, 60) - hours, minutes = divmod(minutes, 60) - days, hours = divmod(hours, 24) - - days, hours, minutes = list(map(int, (days, hours, minutes))) - seconds = round(seconds, 6) - - # Build date - date_str = "" - if days: - date_str = "%sD" % days - - if hours or minutes or seconds: - # Build time - time_str = "T" - - # Hours - bigger_exists = date_str or hours - if bigger_exists: - time_str += "{:02}H".format(hours) - - # Minutes - bigger_exists = bigger_exists or minutes - if bigger_exists: - time_str += "{:02}M".format(minutes) - - # Seconds - try: - if seconds.is_integer(): - seconds_string = "{:02}".format(int(seconds)) - else: - # 9 chars long w/ leading 0, 6 digits after decimal - seconds_string = "%09.6f" % seconds - # Remove trailing zeros - seconds_string = seconds_string.rstrip("0") - except AttributeError: # int.is_integer() raises - seconds_string = "{:02}".format(seconds) - - time_str += "{}S".format(seconds_string) - else: - time_str = "" - - return "P" + date_str + time_str - - -def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: - encoded = base64.b64encode(o).decode() - if format == "base64url": - return encoded.strip("=").replace("+", "-").replace("/", "_") - return encoded - - -def _serialize_datetime(o, format: typing.Optional[str] = None): - if hasattr(o, "year") and hasattr(o, "hour"): - if format == "rfc7231": - return email.utils.format_datetime(o, usegmt=True) - if format == "unix-timestamp": - return int(calendar.timegm(o.utctimetuple())) - - # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) - if not o.tzinfo: - iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() - else: - iso_formatted = o.astimezone(TZ_UTC).isoformat() - # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) - return iso_formatted.replace("+00:00", "Z") - # Next try datetime.date or datetime.time - return o.isoformat() - - -def _is_readonly(p): - try: - return p._visibility == ["read"] - except AttributeError: - return False - - -class SdkJSONEncoder(JSONEncoder): - """A JSON encoder that's capable of serializing datetime objects and bytes.""" - - def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): - super().__init__(*args, **kwargs) - self.exclude_readonly = exclude_readonly - self.format = format - - def default(self, o): # pylint: disable=too-many-return-statements - if _is_model(o): - if self.exclude_readonly: - readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] - return {k: v for k, v in o.items() if k not in readonly_props} - return dict(o.items()) - try: - return super(SdkJSONEncoder, self).default(o) - except TypeError: - if isinstance(o, _Null): - return None - if isinstance(o, decimal.Decimal): - return float(o) - if isinstance(o, (bytes, bytearray)): - return _serialize_bytes(o, self.format) - try: - # First try datetime.datetime - return _serialize_datetime(o, self.format) - except AttributeError: - pass - # Last, try datetime.timedelta - try: - return _timedelta_as_isostr(o) - except AttributeError: - # This will be raised when it hits value.total_seconds in the method above - pass - return super(SdkJSONEncoder, self).default(o) - - -_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") -_VALID_RFC7231 = re.compile( - r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" - r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" -) - - -def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: - """Deserialize ISO-8601 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - attr = attr.upper() - match = _VALID_DATE.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - check_decimal = attr.split(".") - if len(check_decimal) > 1: - decimal_str = "" - for digit in check_decimal[1]: - if digit.isdigit(): - decimal_str += digit - else: - break - if len(decimal_str) > 6: - attr = attr.replace(decimal_str, decimal_str[0:6]) - - date_obj = isodate.parse_datetime(attr) - test_utc = date_obj.utctimetuple() - if test_utc.tm_year > 9999 or test_utc.tm_year < 1: - raise OverflowError("Hit max or min date") - return date_obj - - -def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: - """Deserialize RFC7231 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - match = _VALID_RFC7231.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - return email.utils.parsedate_to_datetime(attr) - - -def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: - """Deserialize unix timestamp into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - return datetime.fromtimestamp(attr, TZ_UTC) - - -def _deserialize_date(attr: typing.Union[str, date]) -> date: - """Deserialize ISO-8601 formatted string into Date object. - :param str attr: response string to be deserialized. - :rtype: date - :returns: The date object from that input - """ - # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - if isinstance(attr, date): - return attr - return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore - - -def _deserialize_time(attr: typing.Union[str, time]) -> time: - """Deserialize ISO-8601 formatted string into time object. - - :param str attr: response string to be deserialized. - :rtype: datetime.time - :returns: The time object from that input - """ - if isinstance(attr, time): - return attr - return isodate.parse_time(attr) - - -def _deserialize_bytes(attr): - if isinstance(attr, (bytes, bytearray)): - return attr - return bytes(base64.b64decode(attr)) - - -def _deserialize_bytes_base64(attr): - if isinstance(attr, (bytes, bytearray)): - return attr - padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore - attr = attr + padding # type: ignore - encoded = attr.replace("-", "+").replace("_", "/") - return bytes(base64.b64decode(encoded)) - - -def _deserialize_duration(attr): - if isinstance(attr, timedelta): - return attr - return isodate.parse_duration(attr) - - -def _deserialize_decimal(attr): - if isinstance(attr, decimal.Decimal): - return attr - return decimal.Decimal(str(attr)) - - -def _deserialize_int_as_str(attr): - if isinstance(attr, int): - return attr - return int(attr) - - -_DESERIALIZE_MAPPING = { - datetime: _deserialize_datetime, - date: _deserialize_date, - time: _deserialize_time, - bytes: _deserialize_bytes, - bytearray: _deserialize_bytes, - timedelta: _deserialize_duration, - typing.Any: lambda x: x, - decimal.Decimal: _deserialize_decimal, -} - -_DESERIALIZE_MAPPING_WITHFORMAT = { - "rfc3339": _deserialize_datetime, - "rfc7231": _deserialize_datetime_rfc7231, - "unix-timestamp": _deserialize_datetime_unix_timestamp, - "base64": _deserialize_bytes, - "base64url": _deserialize_bytes_base64, -} - - -def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): - if annotation is int and rf and rf._format == "str": - return _deserialize_int_as_str - if rf and rf._format: - return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) - return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore - - -def _get_type_alias_type(module_name: str, alias_name: str): - types = { - k: v - for k, v in sys.modules[module_name].__dict__.items() - if isinstance(v, typing._GenericAlias) # type: ignore - } - if alias_name not in types: - return alias_name - return types[alias_name] - - -def _get_model(module_name: str, model_name: str): - models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} - module_end = module_name.rsplit(".", 1)[0] - models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) - if isinstance(model_name, str): - model_name = model_name.split(".")[-1] - if model_name not in models: - return model_name - return models[model_name] - - -_UNSET = object() - - -class _MyMutableMapping(MutableMapping[str, typing.Any]): - def __init__(self, data: typing.Dict[str, typing.Any]) -> None: - self._data = data - - def __contains__(self, key: typing.Any) -> bool: - return key in self._data - - def __getitem__(self, key: str) -> typing.Any: - return self._data.__getitem__(key) - - def __setitem__(self, key: str, value: typing.Any) -> None: - self._data.__setitem__(key, value) - - def __delitem__(self, key: str) -> None: - self._data.__delitem__(key) - - def __iter__(self) -> typing.Iterator[typing.Any]: - return self._data.__iter__() - - def __len__(self) -> int: - return self._data.__len__() - - def __ne__(self, other: typing.Any) -> bool: - return not self.__eq__(other) - - def keys(self) -> typing.KeysView[str]: - """ - :returns: a set-like object providing a view on D's keys - :rtype: ~typing.KeysView - """ - return self._data.keys() - - def values(self) -> typing.ValuesView[typing.Any]: - """ - :returns: an object providing a view on D's values - :rtype: ~typing.ValuesView - """ - return self._data.values() - - def items(self) -> typing.ItemsView[str, typing.Any]: - """ - :returns: set-like object providing a view on D's items - :rtype: ~typing.ItemsView - """ - return self._data.items() - - def get(self, key: str, default: typing.Any = None) -> typing.Any: - """ - Get the value for key if key is in the dictionary, else default. - :param str key: The key to look up. - :param any default: The value to return if key is not in the dictionary. Defaults to None - :returns: D[k] if k in D, else d. - :rtype: any - """ - try: - return self[key] - except KeyError: - return default - - @typing.overload - def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ - - @typing.overload - def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs - - @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs - - def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: - """ - Removes specified key and return the corresponding value. - :param str key: The key to pop. - :param any default: The value to return if key is not in the dictionary - :returns: The value corresponding to the key. - :rtype: any - :raises KeyError: If key is not found and default is not given. - """ - if default is _UNSET: - return self._data.pop(key) - return self._data.pop(key, default) - - def popitem(self) -> typing.Tuple[str, typing.Any]: - """ - Removes and returns some (key, value) pair - :returns: The (key, value) pair. - :rtype: tuple - :raises KeyError: if D is empty. - """ - return self._data.popitem() - - def clear(self) -> None: - """ - Remove all items from D. - """ - self._data.clear() - - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ - """ - Updates D from mapping/iterable E and F. - :param any args: Either a mapping object or an iterable of key-value pairs. - """ - self._data.update(*args, **kwargs) - - @typing.overload - def setdefault(self, key: str, default: None = None) -> None: ... - - @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs - - def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: - """ - Same as calling D.get(k, d), and setting D[k]=d if k not found - :param str key: The key to look up. - :param any default: The value to set if key is not in the dictionary - :returns: D[k] if k in D, else d. - :rtype: any - """ - if default is _UNSET: - return self._data.setdefault(key) - return self._data.setdefault(key, default) - - def __eq__(self, other: typing.Any) -> bool: - try: - other_model = self.__class__(other) - except Exception: - return False - return self._data == other_model._data - - def __repr__(self) -> str: - return str(self._data) - - -def _is_model(obj: typing.Any) -> bool: - return getattr(obj, "_is_model", False) - - -def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements - if isinstance(o, list): - return [_serialize(x, format) for x in o] - if isinstance(o, dict): - return {k: _serialize(v, format) for k, v in o.items()} - if isinstance(o, set): - return {_serialize(x, format) for x in o} - if isinstance(o, tuple): - return tuple(_serialize(x, format) for x in o) - if isinstance(o, (bytes, bytearray)): - return _serialize_bytes(o, format) - if isinstance(o, decimal.Decimal): - return float(o) - if isinstance(o, enum.Enum): - return o.value - if isinstance(o, int): - if format == "str": - return str(o) - return o - try: - # First try datetime.datetime - return _serialize_datetime(o, format) - except AttributeError: - pass - # Last, try datetime.timedelta - try: - return _timedelta_as_isostr(o) - except AttributeError: - # This will be raised when it hits value.total_seconds in the method above - pass - return o - - -def _get_rest_field( - attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str -) -> typing.Optional["_RestField"]: - try: - return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) - except StopIteration: - return None - - -def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: - if not rf: - return _serialize(value, None) - if rf._is_multipart_file_input: - return value - if rf._is_model: - return _deserialize(rf._type, value) - if isinstance(value, ET.Element): - value = _deserialize(rf._type, value) - return _serialize(value, rf._format) - - -class Model(_MyMutableMapping): - _is_model = True - # label whether current class's _attr_to_rest_field has been calculated - # could not see _attr_to_rest_field directly because subclass inherits it from parent class - _calculated: typing.Set[str] = set() - - def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: - class_name = self.__class__.__name__ - if len(args) > 1: - raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") - dict_to_pass = { - rest_field._rest_name: rest_field._default - for rest_field in self._attr_to_rest_field.values() - if rest_field._default is not _UNSET - } - if args: # pylint: disable=too-many-nested-blocks - if isinstance(args[0], ET.Element): - existed_attr_keys = [] - model_meta = getattr(self, "_xml", {}) - - for rf in self._attr_to_rest_field.values(): - prop_meta = getattr(rf, "_xml", {}) - xml_name = prop_meta.get("name", rf._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - # attribute - if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) - continue - - # unwrapped element is array - if prop_meta.get("unwrapped", False): - # unwrapped array could either use prop items meta/prop meta - if prop_meta.get("itemsName"): - xml_name = prop_meta.get("itemsName") - xml_ns = prop_meta.get("itemNs") - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - items = args[0].findall(xml_name) # pyright: ignore - if len(items) > 0: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) - continue - - # text element is primitive type - if prop_meta.get("text", False): - if args[0].text is not None: - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) - continue - - # wrapped element could be normal property or array, it should only have one element - item = args[0].find(xml_name) - if item is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) - - # rest thing is additional properties - for e in args[0]: - if e.tag not in existed_attr_keys: - dict_to_pass[e.tag] = _convert_element(e) - else: - dict_to_pass.update( - {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} - ) - else: - non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] - if non_attr_kwargs: - # actual type errors only throw the first wrong keyword arg they see, so following that. - raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") - dict_to_pass.update( - { - self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) - for k, v in kwargs.items() - if v is not None - } - ) - super().__init__(dict_to_pass) - - def copy(self) -> "Model": - return Model(self.__dict__) - - def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: - if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: - # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', - # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' - mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order - attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property - k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") - } - annotations = { - k: v - for mro_class in mros - if hasattr(mro_class, "__annotations__") - for k, v in mro_class.__annotations__.items() - } - for attr, rf in attr_to_rest_field.items(): - rf._module = cls.__module__ - if not rf._type: - rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) - if not rf._rest_name_input: - rf._rest_name_input = attr - cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) - cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - - return super().__new__(cls) - - def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: - for base in cls.__bases__: - if hasattr(base, "__mapping__"): - base.__mapping__[discriminator or cls.__name__] = cls # type: ignore - - @classmethod - def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: - for v in cls.__dict__.values(): - if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: - return v - return None - - @classmethod - def _deserialize(cls, data, exist_discriminators): - if not hasattr(cls, "__mapping__"): - return cls(data) - discriminator = cls._get_discriminator(exist_discriminators) - if discriminator is None: - return cls(data) - exist_discriminators.append(discriminator._rest_name) - if isinstance(data, ET.Element): - model_meta = getattr(cls, "_xml", {}) - prop_meta = getattr(discriminator, "_xml", {}) - xml_name = prop_meta.get("name", discriminator._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - if data.get(xml_name) is not None: - discriminator_value = data.get(xml_name) - else: - discriminator_value = data.find(xml_name).text # pyright: ignore - else: - discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member - return mapped_cls._deserialize(data, exist_discriminators) - - def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be turned into json using json.dump. - - :keyword bool exclude_readonly: Whether to remove the readonly properties. - :returns: A dict JSON compatible object - :rtype: dict - """ - - result = {} - readonly_props = [] - if exclude_readonly: - readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] - for k, v in self.items(): - if exclude_readonly and k in readonly_props: # pyright: ignore - continue - is_multipart_file_input = False - try: - is_multipart_file_input = next( - rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k - )._is_multipart_file_input - except StopIteration: - pass - result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) - return result - - @staticmethod - def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: - if v is None or isinstance(v, _Null): - return None - if isinstance(v, (list, tuple, set)): - return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) - if isinstance(v, dict): - return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} - return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v - - -def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): - if _is_model(obj): - return obj - return _deserialize(model_deserializer, obj) - - -def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): - if obj is None: - return obj - return _deserialize_with_callable(if_obj_deserializer, obj) - - -def _deserialize_with_union(deserializers, obj): - for deserializer in deserializers: - try: - return _deserialize(deserializer, obj) - except DeserializationError: - pass - raise DeserializationError() - - -def _deserialize_dict( - value_deserializer: typing.Optional[typing.Callable], - module: typing.Optional[str], - obj: typing.Dict[typing.Any, typing.Any], -): - if obj is None: - return obj - if isinstance(obj, ET.Element): - obj = {child.tag: child for child in obj} - return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} - - -def _deserialize_multiple_sequence( - entry_deserializers: typing.List[typing.Optional[typing.Callable]], - module: typing.Optional[str], - obj, -): - if obj is None: - return obj - return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) - - -def _deserialize_sequence( - deserializer: typing.Optional[typing.Callable], - module: typing.Optional[str], - obj, -): - if obj is None: - return obj - if isinstance(obj, ET.Element): - obj = list(obj) - return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) - - -def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: - return sorted( - types, - key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), - ) - - -def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches - annotation: typing.Any, - module: typing.Optional[str], - rf: typing.Optional["_RestField"] = None, -) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: - if not annotation: - return None - - # is it a type alias? - if isinstance(annotation, str): - if module is not None: - annotation = _get_type_alias_type(module, annotation) - - # is it a forward ref / in quotes? - if isinstance(annotation, (str, typing.ForwardRef)): - try: - model_name = annotation.__forward_arg__ # type: ignore - except AttributeError: - model_name = annotation - if module is not None: - annotation = _get_model(module, model_name) # type: ignore - - try: - if module and _is_model(annotation): - if rf: - rf._is_model = True - - return functools.partial(_deserialize_model, annotation) # pyright: ignore - except Exception: - pass - - # is it a literal? - try: - if annotation.__origin__ is typing.Literal: # pyright: ignore - return None - except AttributeError: - pass - - # is it optional? - try: - if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore - if len(annotation.__args__) <= 2: # pyright: ignore - if_obj_deserializer = _get_deserialize_callable_from_annotation( - next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore - ) - - return functools.partial(_deserialize_with_optional, if_obj_deserializer) - # the type is Optional[Union[...]], we need to remove the None type from the Union - annotation_copy = copy.copy(annotation) - annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore - return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) - except AttributeError: - pass - - # is it union? - if getattr(annotation, "__origin__", None) is typing.Union: - # initial ordering is we make `string` the last deserialization option, because it is often them most generic - deserializers = [ - _get_deserialize_callable_from_annotation(arg, module, rf) - for arg in _sorted_annotations(annotation.__args__) # pyright: ignore - ] - - return functools.partial(_deserialize_with_union, deserializers) - - try: - if annotation._name == "Dict": # pyright: ignore - value_deserializer = _get_deserialize_callable_from_annotation( - annotation.__args__[1], module, rf # pyright: ignore - ) - - return functools.partial( - _deserialize_dict, - value_deserializer, - module, - ) - except (AttributeError, IndexError): - pass - try: - if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore - if len(annotation.__args__) > 1: # pyright: ignore - entry_deserializers = [ - _get_deserialize_callable_from_annotation(dt, module, rf) - for dt in annotation.__args__ # pyright: ignore - ] - return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) - deserializer = _get_deserialize_callable_from_annotation( - annotation.__args__[0], module, rf # pyright: ignore - ) - - return functools.partial(_deserialize_sequence, deserializer, module) - except (TypeError, IndexError, AttributeError, SyntaxError): - pass - - def _deserialize_default( - deserializer, - obj, - ): - if obj is None: - return obj - try: - return _deserialize_with_callable(deserializer, obj) - except Exception: - pass - return obj - - if get_deserializer(annotation, rf): - return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) - - return functools.partial(_deserialize_default, annotation) - - -def _deserialize_with_callable( - deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], - value: typing.Any, -): # pylint: disable=too-many-return-statements - try: - if value is None or isinstance(value, _Null): - return None - if isinstance(value, ET.Element): - if deserializer is str: - return value.text or "" - if deserializer is int: - return int(value.text) if value.text else None - if deserializer is float: - return float(value.text) if value.text else None - if deserializer is bool: - return value.text == "true" if value.text else None - if deserializer is None: - return value - if deserializer in [int, float, bool]: - return deserializer(value) - if isinstance(deserializer, CaseInsensitiveEnumMeta): - try: - return deserializer(value) - except ValueError: - # for unknown value, return raw value - return value - if isinstance(deserializer, type) and issubclass(deserializer, Model): - return deserializer._deserialize(value, []) - return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) - except Exception as e: - raise DeserializationError() from e - - -def _deserialize( - deserializer: typing.Any, - value: typing.Any, - module: typing.Optional[str] = None, - rf: typing.Optional["_RestField"] = None, - format: typing.Optional[str] = None, -) -> typing.Any: - if isinstance(value, PipelineResponse): - value = value.http_response.json() - if rf is None and format: - rf = _RestField(format=format) - if not isinstance(deserializer, functools.partial): - deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) - return _deserialize_with_callable(deserializer, value) - - -def _failsafe_deserialize( - deserializer: typing.Any, - value: typing.Any, - module: typing.Optional[str] = None, - rf: typing.Optional["_RestField"] = None, - format: typing.Optional[str] = None, -) -> typing.Any: - try: - return _deserialize(deserializer, value, module, rf, format) - except DeserializationError: - _LOGGER.warning( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - -def _failsafe_deserialize_xml( - deserializer: typing.Any, - value: typing.Any, -) -> typing.Any: - try: - return _deserialize_xml(deserializer, value) - except DeserializationError: - _LOGGER.warning( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - -class _RestField: - def __init__( - self, - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - is_discriminator: bool = False, - visibility: typing.Optional[typing.List[str]] = None, - default: typing.Any = _UNSET, - format: typing.Optional[str] = None, - is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, - ): - self._type = type - self._rest_name_input = name - self._module: typing.Optional[str] = None - self._is_discriminator = is_discriminator - self._visibility = visibility - self._is_model = False - self._default = default - self._format = format - self._is_multipart_file_input = is_multipart_file_input - self._xml = xml if xml is not None else {} - - @property - def _class_type(self) -> typing.Any: - return getattr(self._type, "args", [None])[0] - - @property - def _rest_name(self) -> str: - if self._rest_name_input is None: - raise ValueError("Rest name was never set") - return self._rest_name_input - - def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin - # by this point, type and rest_name will have a value bc we default - # them in __new__ of the Model class - item = obj.get(self._rest_name) - if item is None: - return item - if self._is_model: - return item - return _deserialize(self._type, _serialize(item, self._format), rf=self) - - def __set__(self, obj: Model, value) -> None: - if value is None: - # we want to wipe out entries if users set attr to None - try: - obj.__delitem__(self._rest_name) - except KeyError: - pass - return - if self._is_model: - if not _is_model(value): - value = _deserialize(self._type, value) - obj.__setitem__(self._rest_name, value) - return - obj.__setitem__(self._rest_name, _serialize(value, self._format)) - - def _get_deserialize_callable_from_annotation( - self, annotation: typing.Any - ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: - return _get_deserialize_callable_from_annotation(annotation, self._module, self) - - -def rest_field( - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, - default: typing.Any = _UNSET, - format: typing.Optional[str] = None, - is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, -) -> typing.Any: - return _RestField( - name=name, - type=type, - visibility=visibility, - default=default, - format=format, - is_multipart_file_input=is_multipart_file_input, - xml=xml, - ) - - -def rest_discriminator( - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, -) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) - - -def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: - """Serialize a model to XML. - - :param Model model: The model to serialize. - :param bool exclude_readonly: Whether to exclude readonly properties. - :returns: The XML representation of the model. - :rtype: str - """ - return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore - - -def _get_element( - o: typing.Any, - exclude_readonly: bool = False, - parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, - wrapped_element: typing.Optional[ET.Element] = None, -) -> typing.Union[ET.Element, typing.List[ET.Element]]: - if _is_model(o): - model_meta = getattr(o, "_xml", {}) - - # if prop is a model, then use the prop element directly, else generate a wrapper of model - if wrapped_element is None: - wrapped_element = _create_xml_element( - model_meta.get("name", o.__class__.__name__), - model_meta.get("prefix"), - model_meta.get("ns"), - ) - - readonly_props = [] - if exclude_readonly: - readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] - - for k, v in o.items(): - # do not serialize readonly properties - if exclude_readonly and k in readonly_props: - continue - - prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) - if prop_rest_field: - prop_meta = getattr(prop_rest_field, "_xml").copy() - # use the wire name as xml name if no specific name is set - if prop_meta.get("name") is None: - prop_meta["name"] = k - else: - # additional properties will not have rest field, use the wire name as xml name - prop_meta = {"name": k} - - # if no ns for prop, use model's - if prop_meta.get("ns") is None and model_meta.get("ns"): - prop_meta["ns"] = model_meta.get("ns") - prop_meta["prefix"] = model_meta.get("prefix") - - if prop_meta.get("unwrapped", False): - # unwrapped could only set on array - wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) - elif prop_meta.get("text", False): - # text could only set on primitive type - wrapped_element.text = _get_primitive_type_value(v) - elif prop_meta.get("attribute", False): - xml_name = prop_meta.get("name", k) - if prop_meta.get("ns"): - ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore - xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore - # attribute should be primitive type - wrapped_element.set(xml_name, _get_primitive_type_value(v)) - else: - # other wrapped prop element - wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) - return wrapped_element - if isinstance(o, list): - return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore - if isinstance(o, dict): - result = [] - for k, v in o.items(): - result.append( - _get_wrapped_element( - v, - exclude_readonly, - { - "name": k, - "ns": parent_meta.get("ns") if parent_meta else None, - "prefix": parent_meta.get("prefix") if parent_meta else None, - }, - ) - ) - return result - - # primitive case need to create element based on parent_meta - if parent_meta: - return _get_wrapped_element( - o, - exclude_readonly, - { - "name": parent_meta.get("itemsName", parent_meta.get("name")), - "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), - "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), - }, - ) - - raise ValueError("Could not serialize value into xml: " + o) - - -def _get_wrapped_element( - v: typing.Any, - exclude_readonly: bool, - meta: typing.Optional[typing.Dict[str, typing.Any]], -) -> ET.Element: - wrapped_element = _create_xml_element( - meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None - ) - if isinstance(v, (dict, list)): - wrapped_element.extend(_get_element(v, exclude_readonly, meta)) - elif _is_model(v): - _get_element(v, exclude_readonly, meta, wrapped_element) - else: - wrapped_element.text = _get_primitive_type_value(v) - return wrapped_element - - -def _get_primitive_type_value(v) -> str: - if v is True: - return "true" - if v is False: - return "false" - if isinstance(v, _Null): - return "" - return str(v) - - -def _create_xml_element(tag, prefix=None, ns=None): - if prefix and ns: - ET.register_namespace(prefix, ns) - if ns: - return ET.Element("{" + ns + "}" + tag) - return ET.Element(tag) - - -def _deserialize_xml( - deserializer: typing.Any, - value: str, -) -> typing.Any: - element = ET.fromstring(value) # nosec - return _deserialize(deserializer, element) - - -def _convert_element(e: ET.Element): - # dict case - if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: - dict_result: typing.Dict[str, typing.Any] = {} - for child in e: - if dict_result.get(child.tag) is not None: - if isinstance(dict_result[child.tag], list): - dict_result[child.tag].append(_convert_element(child)) - else: - dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] - else: - dict_result[child.tag] = _convert_element(child) - dict_result.update(e.attrib) - return dict_result - # array case - if len(e) > 0: - array_result: typing.List[typing.Any] = [] - for child in e: - array_result.append(_convert_element(child)) - return array_result - # primitive case - return e.text diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/serialization.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/serialization.py deleted file mode 100644 index eb86ea23c96..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/serialization.py +++ /dev/null @@ -1,2032 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -# pyright: reportUnnecessaryTypeIgnoreComment=false - -from base64 import b64decode, b64encode -import calendar -import datetime -import decimal -import email -from enum import Enum -import json -import logging -import re -import sys -import codecs -from typing import ( - Dict, - Any, - cast, - Optional, - Union, - AnyStr, - IO, - Mapping, - Callable, - MutableMapping, - List, -) - -try: - from urllib import quote # type: ignore -except ImportError: - from urllib.parse import quote -import xml.etree.ElementTree as ET - -import isodate # type: ignore -from typing_extensions import Self - -from azure.core.exceptions import DeserializationError, SerializationError -from azure.core.serialization import NULL as CoreNull - -_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") - -JSON = MutableMapping[str, Any] - - -class RawDeserializer: - - # Accept "text" because we're open minded people... - JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") - - # Name used in context - CONTEXT_NAME = "deserialized_data" - - @classmethod - def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: - """Decode data according to content-type. - - Accept a stream of data as well, but will be load at once in memory for now. - - If no content-type, will return the string version (not bytes, not stream) - - :param data: Input, could be bytes or stream (will be decoded with UTF8) or text - :type data: str or bytes or IO - :param str content_type: The content type. - :return: The deserialized data. - :rtype: object - """ - if hasattr(data, "read"): - # Assume a stream - data = cast(IO, data).read() - - if isinstance(data, bytes): - data_as_str = data.decode(encoding="utf-8-sig") - else: - # Explain to mypy the correct type. - data_as_str = cast(str, data) - - # Remove Byte Order Mark if present in string - data_as_str = data_as_str.lstrip(_BOM) - - if content_type is None: - return data - - if cls.JSON_REGEXP.match(content_type): - try: - return json.loads(data_as_str) - except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) from err - elif "xml" in (content_type or []): - try: - - try: - if isinstance(data, unicode): # type: ignore - # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string - data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore - except NameError: - pass - - return ET.fromstring(data_as_str) # nosec - except ET.ParseError as err: - # It might be because the server has an issue, and returned JSON with - # content-type XML.... - # So let's try a JSON load, and if it's still broken - # let's flow the initial exception - def _json_attemp(data): - try: - return True, json.loads(data) - except ValueError: - return False, None # Don't care about this one - - success, json_result = _json_attemp(data) - if success: - return json_result - # If i'm here, it's not JSON, it's not XML, let's scream - # and raise the last context in this block (the XML exception) - # The function hack is because Py2.7 messes up with exception - # context otherwise. - _LOGGER.critical("Wasn't XML not JSON, failing") - raise DeserializationError("XML is invalid") from err - elif content_type.startswith("text/"): - return data_as_str - raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) - - @classmethod - def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: - """Deserialize from HTTP response. - - Use bytes and headers to NOT use any requests/aiohttp or whatever - specific implementation. - Headers will tested for "content-type" - - :param bytes body_bytes: The body of the response. - :param dict headers: The headers of the response. - :returns: The deserialized data. - :rtype: object - """ - # Try to use content-type from headers if available - content_type = None - if "content-type" in headers: - content_type = headers["content-type"].split(";")[0].strip().lower() - # Ouch, this server did not declare what it sent... - # Let's guess it's JSON... - # Also, since Autorest was considering that an empty body was a valid JSON, - # need that test as well.... - else: - content_type = "application/json" - - if body_bytes: - return cls.deserialize_from_text(body_bytes, content_type) - return None - - -_LOGGER = logging.getLogger(__name__) - -try: - _long_type = long # type: ignore -except NameError: - _long_type = int - -TZ_UTC = datetime.timezone.utc - -_FLATTEN = re.compile(r"(? None: - self.additional_properties: Optional[Dict[str, Any]] = {} - for k in kwargs: # pylint: disable=consider-using-dict-items - if k not in self._attribute_map: - _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) - elif k in self._validation and self._validation[k].get("readonly", False): - _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) - else: - setattr(self, k, kwargs[k]) - - def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes. - - :param object other: The object to compare - :returns: True if objects are equal - :rtype: bool - """ - if isinstance(other, self.__class__): - return self.__dict__ == other.__dict__ - return False - - def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes. - - :param object other: The object to compare - :returns: True if objects are not equal - :rtype: bool - """ - return not self.__eq__(other) - - def __str__(self) -> str: - return str(self.__dict__) - - @classmethod - def enable_additional_properties_sending(cls) -> None: - cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} - - @classmethod - def is_xml_model(cls) -> bool: - try: - cls._xml_map # type: ignore - except AttributeError: - return False - return True - - @classmethod - def _create_xml_node(cls): - """Create XML node. - - :returns: The XML node - :rtype: xml.etree.ElementTree.Element - """ - try: - xml_map = cls._xml_map # type: ignore - except AttributeError: - xml_map = {} - - return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - - def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: - """Return the JSON that would be sent to server from this model. - - This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. - - If you want XML serialization, you can pass the kwargs is_xml=True. - - :param bool keep_readonly: If you want to serialize the readonly attributes - :returns: A dict JSON compatible object - :rtype: dict - """ - serializer = Serializer(self._infer_class_models()) - return serializer._serialize( # type: ignore # pylint: disable=protected-access - self, keep_readonly=keep_readonly, **kwargs - ) - - def as_dict( - self, - keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, - **kwargs: Any - ) -> JSON: - """Return a dict that can be serialized using json.dump. - - Advanced usage might optionally use a callback as parameter: - - .. code::python - - def my_key_transformer(key, attr_desc, value): - return key - - Key is the attribute name used in Python. Attr_desc - is a dict of metadata. Currently contains 'type' with the - msrest type and 'key' with the RestAPI encoded key. - Value is the current value in this object. - - The string returned will be used to serialize the key. - If the return type is a list, this is considered hierarchical - result dict. - - See the three examples in this file: - - - attribute_transformer - - full_restapi_key_transformer - - last_restapi_key_transformer - - If you want XML serialization, you can pass the kwargs is_xml=True. - - :param bool keep_readonly: If you want to serialize the readonly attributes - :param function key_transformer: A key transformer function. - :returns: A dict JSON compatible object - :rtype: dict - """ - serializer = Serializer(self._infer_class_models()) - return serializer._serialize( # type: ignore # pylint: disable=protected-access - self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs - ) - - @classmethod - def _infer_class_models(cls): - try: - str_models = cls.__module__.rsplit(".", 1)[0] - models = sys.modules[str_models] - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - if cls.__name__ not in client_models: - raise ValueError("Not Autorest generated code") - except Exception: # pylint: disable=broad-exception-caught - # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. - client_models = {cls.__name__: cls} - return client_models - - @classmethod - def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: - """Parse a str using the RestAPI syntax and return a model. - - :param str data: A str using RestAPI structure. JSON by default. - :param str content_type: JSON by default, set application/xml if XML. - :returns: An instance of this model - :raises DeserializationError: if something went wrong - :rtype: Self - """ - deserializer = Deserializer(cls._infer_class_models()) - return deserializer(cls.__name__, data, content_type=content_type) # type: ignore - - @classmethod - def from_dict( - cls, - data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, - content_type: Optional[str] = None, - ) -> Self: - """Parse a dict using given key extractor return a model. - - By default consider key - extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor - and last_rest_key_case_insensitive_extractor) - - :param dict data: A dict using RestAPI structure - :param function key_extractors: A key extractor function. - :param str content_type: JSON by default, set application/xml if XML. - :returns: An instance of this model - :raises DeserializationError: if something went wrong - :rtype: Self - """ - deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( # type: ignore - [ # type: ignore - attribute_key_case_insensitive_extractor, - rest_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor, - ] - if key_extractors is None - else key_extractors - ) - return deserializer(cls.__name__, data, content_type=content_type) # type: ignore - - @classmethod - def _flatten_subtype(cls, key, objects): - if "_subtype_map" not in cls.__dict__: - return {} - result = dict(cls._subtype_map[key]) - for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access - return result - - @classmethod - def _classify(cls, response, objects): - """Check the class _subtype_map for any child classes. - We want to ignore any inherited _subtype_maps. - - :param dict response: The initial data - :param dict objects: The class objects - :returns: The class to be used - :rtype: class - """ - for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): - subtype_value = None - - if not isinstance(response, ET.Element): - rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) - else: - subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) - if subtype_value: - # Try to match base class. Can be class name only - # (bug to fix in Autorest to support x-ms-discriminator-name) - if cls.__name__ == subtype_value: - return cls - flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) - try: - return objects[flatten_mapping_type[subtype_value]] # type: ignore - except KeyError: - _LOGGER.warning( - "Subtype value %s has no mapping, use base class %s.", - subtype_value, - cls.__name__, - ) - break - else: - _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) - break - return cls - - @classmethod - def _get_rest_key_parts(cls, attr_key): - """Get the RestAPI key of this attr, split it and decode part - :param str attr_key: Attribute key must be in attribute_map. - :returns: A list of RestAPI part - :rtype: list - """ - rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) - return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] - - -def _decode_attribute_map_key(key): - """This decode a key in an _attribute_map to the actual key we want to look at - inside the received data. - - :param str key: A key string from the generated code - :returns: The decoded key - :rtype: str - """ - return key.replace("\\.", ".") - - -class Serializer: # pylint: disable=too-many-public-methods - """Request object model serializer.""" - - basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - - _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} - days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} - months = { - 1: "Jan", - 2: "Feb", - 3: "Mar", - 4: "Apr", - 5: "May", - 6: "Jun", - 7: "Jul", - 8: "Aug", - 9: "Sep", - 10: "Oct", - 11: "Nov", - 12: "Dec", - } - validation = { - "min_length": lambda x, y: len(x) < y, - "max_length": lambda x, y: len(x) > y, - "minimum": lambda x, y: x < y, - "maximum": lambda x, y: x > y, - "minimum_ex": lambda x, y: x <= y, - "maximum_ex": lambda x, y: x >= y, - "min_items": lambda x, y: len(x) < y, - "max_items": lambda x, y: len(x) > y, - "pattern": lambda x, y: not re.match(y, x, re.UNICODE), - "unique": lambda x, y: len(x) != len(set(x)), - "multiple": lambda x, y: x % y != 0, - } - - def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: - self.serialize_type = { - "iso-8601": Serializer.serialize_iso, - "rfc-1123": Serializer.serialize_rfc, - "unix-time": Serializer.serialize_unix, - "duration": Serializer.serialize_duration, - "date": Serializer.serialize_date, - "time": Serializer.serialize_time, - "decimal": Serializer.serialize_decimal, - "long": Serializer.serialize_long, - "bytearray": Serializer.serialize_bytearray, - "base64": Serializer.serialize_base64, - "object": self.serialize_object, - "[]": self.serialize_iter, - "{}": self.serialize_dict, - } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} - self.key_transformer = full_restapi_key_transformer - self.client_side_validation = True - - def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals - self, target_obj, data_type=None, **kwargs - ): - """Serialize data into a string according to type. - - :param object target_obj: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str, dict - :raises SerializationError: if serialization fails. - :returns: The serialized data. - """ - key_transformer = kwargs.get("key_transformer", self.key_transformer) - keep_readonly = kwargs.get("keep_readonly", False) - if target_obj is None: - return None - - attr_name = None - class_name = target_obj.__class__.__name__ - - if data_type: - return self.serialize_data(target_obj, data_type, **kwargs) - - if not hasattr(target_obj, "_attribute_map"): - data_type = type(target_obj).__name__ - if data_type in self.basic_types.values(): - return self.serialize_data(target_obj, data_type, **kwargs) - - # Force "is_xml" kwargs if we detect a XML model - try: - is_xml_model_serialization = kwargs["is_xml"] - except KeyError: - is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) - - serialized = {} - if is_xml_model_serialization: - serialized = target_obj._create_xml_node() # pylint: disable=protected-access - try: - attributes = target_obj._attribute_map # pylint: disable=protected-access - for attr, attr_desc in attributes.items(): - attr_name = attr - if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access - attr_name, {} - ).get("readonly", False): - continue - - if attr_name == "additional_properties" and attr_desc["key"] == "": - if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) - continue - try: - - orig_attr = getattr(target_obj, attr) - if is_xml_model_serialization: - pass # Don't provide "transformer" for XML for now. Keep "orig_attr" - else: # JSON - keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) - keys = keys if isinstance(keys, list) else [keys] - - kwargs["serialization_ctxt"] = attr_desc - new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) - - if is_xml_model_serialization: - xml_desc = attr_desc.get("xml", {}) - xml_name = xml_desc.get("name", attr_desc["key"]) - xml_prefix = xml_desc.get("prefix", None) - xml_ns = xml_desc.get("ns", None) - if xml_desc.get("attr", False): - if xml_ns: - ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - serialized.set(xml_name, new_attr) # type: ignore - continue - if xml_desc.get("text", False): - serialized.text = new_attr # type: ignore - continue - if isinstance(new_attr, list): - serialized.extend(new_attr) # type: ignore - elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, - # we MUST replace the tag with the local tag. But keeping the namespaces. - if "name" not in getattr(orig_attr, "_xml_map", {}): - splitted_tag = new_attr.tag.split("}") - if len(splitted_tag) == 2: # Namespace - new_attr.tag = "}".join([splitted_tag[0], xml_name]) - else: - new_attr.tag = xml_name - serialized.append(new_attr) # type: ignore - else: # That's a basic type - # Integrate namespace if necessary - local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) - local_node.text = str(new_attr) - serialized.append(local_node) # type: ignore - else: # JSON - for k in reversed(keys): # type: ignore - new_attr = {k: new_attr} - - _new_attr = new_attr - _serialized = serialized - for k in keys: # type: ignore - if k not in _serialized: - _serialized.update(_new_attr) # type: ignore - _new_attr = _new_attr[k] # type: ignore - _serialized = _serialized[k] - except ValueError as err: - if isinstance(err, SerializationError): - raise - - except (AttributeError, KeyError, TypeError) as err: - msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) - raise SerializationError(msg) from err - return serialized - - def body(self, data, data_type, **kwargs): - """Serialize data intended for a request body. - - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: dict - :raises SerializationError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized request body - """ - - # Just in case this is a dict - internal_data_type_str = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type_str, None) - try: - is_xml_model_serialization = kwargs["is_xml"] - except KeyError: - if internal_data_type and issubclass(internal_data_type, Model): - is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) - else: - is_xml_model_serialization = False - if internal_data_type and not isinstance(internal_data_type, Enum): - try: - deserializer = Deserializer(self.dependencies) - # Since it's on serialization, it's almost sure that format is not JSON REST - # We're not able to deal with additional properties for now. - deserializer.additional_properties_detection = False - if is_xml_model_serialization: - deserializer.key_extractors = [ # type: ignore - attribute_key_case_insensitive_extractor, - ] - else: - deserializer.key_extractors = [ - rest_key_case_insensitive_extractor, - attribute_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor, - ] - data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access - except DeserializationError as err: - raise SerializationError("Unable to build a model: " + str(err)) from err - - return self._serialize(data, data_type, **kwargs) - - def url(self, name, data, data_type, **kwargs): - """Serialize data intended for a URL path. - - :param str name: The name of the URL path parameter. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str - :returns: The serialized URL path - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - """ - try: - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - - if kwargs.get("skip_quote") is True: - output = str(output) - output = output.replace("{", quote("{")).replace("}", quote("}")) - else: - output = quote(str(output), safe="") - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return output - - def query(self, name, data, data_type, **kwargs): - """Serialize data intended for a URL query. - - :param str name: The name of the query parameter. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str, list - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized query parameter - """ - try: - # Treat the list aside, since we don't want to encode the div separator - if data_type.startswith("["): - internal_data_type = data_type[1:-1] - do_quote = not kwargs.get("skip_quote", False) - return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) - - # Not a list, regular serialization - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - if kwargs.get("skip_quote") is True: - output = str(output) - else: - output = quote(str(output), safe="") - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return str(output) - - def header(self, name, data, data_type, **kwargs): - """Serialize data intended for a request header. - - :param str name: The name of the header. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized header - """ - try: - if data_type in ["[str]"]: - data = ["" if d is None else d for d in data] - - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return str(output) - - def serialize_data(self, data, data_type, **kwargs): - """Serialize generic data according to supplied data type. - - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :raises AttributeError: if required data is None. - :raises ValueError: if data is None - :raises SerializationError: if serialization fails. - :returns: The serialized data. - :rtype: str, int, float, bool, dict, list - """ - if data is None: - raise ValueError("No value for given attribute") - - try: - if data is CoreNull: - return None - if data_type in self.basic_types.values(): - return self.serialize_basic(data, data_type, **kwargs) - - if data_type in self.serialize_type: - return self.serialize_type[data_type](data, **kwargs) - - # If dependencies is empty, try with current data class - # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) - if issubclass(enum_type, Enum): - return Serializer.serialize_enum(data, enum_obj=enum_type) - - iter_type = data_type[0] + data_type[-1] - if iter_type in self.serialize_type: - return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) - - except (ValueError, TypeError) as err: - msg = "Unable to serialize value: {!r} as type: {!r}." - raise SerializationError(msg.format(data, data_type)) from err - return self._serialize(data, **kwargs) - - @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements - custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) - if custom_serializer: - return custom_serializer - if kwargs.get("is_xml", False): - return cls._xml_basic_types_serializers.get(data_type) - - @classmethod - def serialize_basic(cls, data, data_type, **kwargs): - """Serialize basic builting data type. - Serializes objects to str, int, float or bool. - - Possible kwargs: - - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - - is_xml bool : If set, use xml_basic_types_serializers - - :param obj data: Object to be serialized. - :param str data_type: Type of object in the iterable. - :rtype: str, int, float, bool - :return: serialized object - """ - custom_serializer = cls._get_custom_serializers(data_type, **kwargs) - if custom_serializer: - return custom_serializer(data) - if data_type == "str": - return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec # pylint: disable=eval-used - - @classmethod - def serialize_unicode(cls, data): - """Special handling for serializing unicode strings in Py2. - Encode to UTF-8 if unicode, otherwise handle as a str. - - :param str data: Object to be serialized. - :rtype: str - :return: serialized object - """ - try: # If I received an enum, return its value - return data.value - except AttributeError: - pass - - try: - if isinstance(data, unicode): # type: ignore - # Don't change it, JSON and XML ElementTree are totally able - # to serialize correctly u'' strings - return data - except NameError: - return str(data) - return str(data) - - def serialize_iter(self, data, iter_type, div=None, **kwargs): - """Serialize iterable. - - Supported kwargs: - - serialization_ctxt dict : The current entry of _attribute_map, or same format. - serialization_ctxt['type'] should be same as data_type. - - is_xml bool : If set, serialize as XML - - :param list data: Object to be serialized. - :param str iter_type: Type of object in the iterable. - :param str div: If set, this str will be used to combine the elements - in the iterable into a combined string. Default is 'None'. - Defaults to False. - :rtype: list, str - :return: serialized iterable - """ - if isinstance(data, str): - raise SerializationError("Refuse str type as a valid iter type.") - - serialization_ctxt = kwargs.get("serialization_ctxt", {}) - is_xml = kwargs.get("is_xml", False) - - serialized = [] - for d in data: - try: - serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError as err: - if isinstance(err, SerializationError): - raise - serialized.append(None) - - if kwargs.get("do_quote", False): - serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] - - if div: - serialized = ["" if s is None else str(s) for s in serialized] - serialized = div.join(serialized) - - if "xml" in serialization_ctxt or is_xml: - # XML serialization is more complicated - xml_desc = serialization_ctxt.get("xml", {}) - xml_name = xml_desc.get("name") - if not xml_name: - xml_name = serialization_ctxt["key"] - - # Create a wrap node if necessary (use the fact that Element and list have "append") - is_wrapped = xml_desc.get("wrapped", False) - node_name = xml_desc.get("itemsName", xml_name) - if is_wrapped: - final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - else: - final_result = [] - # All list elements to "local_node" - for el in serialized: - if isinstance(el, ET.Element): - el_node = el - else: - el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - if el is not None: # Otherwise it writes "None" :-p - el_node.text = str(el) - final_result.append(el_node) - return final_result - return serialized - - def serialize_dict(self, attr, dict_type, **kwargs): - """Serialize a dictionary of objects. - - :param dict attr: Object to be serialized. - :param str dict_type: Type of object in the dictionary. - :rtype: dict - :return: serialized dictionary - """ - serialization_ctxt = kwargs.get("serialization_ctxt", {}) - serialized = {} - for key, value in attr.items(): - try: - serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError as err: - if isinstance(err, SerializationError): - raise - serialized[self.serialize_unicode(key)] = None - - if "xml" in serialization_ctxt: - # XML serialization is more complicated - xml_desc = serialization_ctxt["xml"] - xml_name = xml_desc["name"] - - final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - for key, value in serialized.items(): - ET.SubElement(final_result, key).text = value - return final_result - - return serialized - - def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements - """Serialize a generic object. - This will be handled as a dictionary. If object passed in is not - a basic type (str, int, float, dict, list) it will simply be - cast to str. - - :param dict attr: Object to be serialized. - :rtype: dict or str - :return: serialized object - """ - if attr is None: - return None - if isinstance(attr, ET.Element): - return attr - obj_type = type(attr) - if obj_type in self.basic_types: - return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) - if obj_type is _long_type: - return self.serialize_long(attr) - if obj_type is str: - return self.serialize_unicode(attr) - if obj_type is datetime.datetime: - return self.serialize_iso(attr) - if obj_type is datetime.date: - return self.serialize_date(attr) - if obj_type is datetime.time: - return self.serialize_time(attr) - if obj_type is datetime.timedelta: - return self.serialize_duration(attr) - if obj_type is decimal.Decimal: - return self.serialize_decimal(attr) - - # If it's a model or I know this dependency, serialize as a Model - if obj_type in self.dependencies.values() or isinstance(attr, Model): - return self._serialize(attr) - - if obj_type == dict: - serialized = {} - for key, value in attr.items(): - try: - serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) - except ValueError: - serialized[self.serialize_unicode(key)] = None - return serialized - - if obj_type == list: - serialized = [] - for obj in attr: - try: - serialized.append(self.serialize_object(obj, **kwargs)) - except ValueError: - pass - return serialized - return str(attr) - - @staticmethod - def serialize_enum(attr, enum_obj=None): - try: - result = attr.value - except AttributeError: - result = attr - try: - enum_obj(result) # type: ignore - return result - except ValueError as exc: - for enum_value in enum_obj: # type: ignore - if enum_value.value.lower() == str(attr).lower(): - return enum_value.value - error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) from exc - - @staticmethod - def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument - """Serialize bytearray into base-64 string. - - :param str attr: Object to be serialized. - :rtype: str - :return: serialized base64 - """ - return b64encode(attr).decode() - - @staticmethod - def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument - """Serialize str into base-64 string. - - :param str attr: Object to be serialized. - :rtype: str - :return: serialized base64 - """ - encoded = b64encode(attr).decode("ascii") - return encoded.strip("=").replace("+", "-").replace("/", "_") - - @staticmethod - def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Decimal object to float. - - :param decimal attr: Object to be serialized. - :rtype: float - :return: serialized decimal - """ - return float(attr) - - @staticmethod - def serialize_long(attr, **kwargs): # pylint: disable=unused-argument - """Serialize long (Py2) or int (Py3). - - :param int attr: Object to be serialized. - :rtype: int/long - :return: serialized long - """ - return _long_type(attr) - - @staticmethod - def serialize_date(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Date object into ISO-8601 formatted string. - - :param Date attr: Object to be serialized. - :rtype: str - :return: serialized date - """ - if isinstance(attr, str): - attr = isodate.parse_date(attr) - t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) - return t - - @staticmethod - def serialize_time(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Time object into ISO-8601 formatted string. - - :param datetime.time attr: Object to be serialized. - :rtype: str - :return: serialized time - """ - if isinstance(attr, str): - attr = isodate.parse_time(attr) - t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) - if attr.microsecond: - t += ".{:02}".format(attr.microsecond) - return t - - @staticmethod - def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument - """Serialize TimeDelta object into ISO-8601 formatted string. - - :param TimeDelta attr: Object to be serialized. - :rtype: str - :return: serialized duration - """ - if isinstance(attr, str): - attr = isodate.parse_duration(attr) - return isodate.duration_isoformat(attr) - - @staticmethod - def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into RFC-1123 formatted string. - - :param Datetime attr: Object to be serialized. - :rtype: str - :raises TypeError: if format invalid. - :return: serialized rfc - """ - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - utc = attr.utctimetuple() - except AttributeError as exc: - raise TypeError("RFC1123 object must be valid Datetime object.") from exc - - return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( - Serializer.days[utc.tm_wday], - utc.tm_mday, - Serializer.months[utc.tm_mon], - utc.tm_year, - utc.tm_hour, - utc.tm_min, - utc.tm_sec, - ) - - @staticmethod - def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into ISO-8601 formatted string. - - :param Datetime attr: Object to be serialized. - :rtype: str - :raises SerializationError: if format invalid. - :return: serialized iso - """ - if isinstance(attr, str): - attr = isodate.parse_datetime(attr) - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - utc = attr.utctimetuple() - if utc.tm_year > 9999 or utc.tm_year < 1: - raise OverflowError("Hit max or min date") - - microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") - if microseconds: - microseconds = "." + microseconds - date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( - utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec - ) - return date + microseconds + "Z" - except (ValueError, OverflowError) as err: - msg = "Unable to serialize datetime object." - raise SerializationError(msg) from err - except AttributeError as err: - msg = "ISO-8601 object must be valid Datetime object." - raise TypeError(msg) from err - - @staticmethod - def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into IntTime format. - This is represented as seconds. - - :param Datetime attr: Object to be serialized. - :rtype: int - :raises SerializationError: if format invalid - :return: serialied unix - """ - if isinstance(attr, int): - return attr - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - return int(calendar.timegm(attr.utctimetuple())) - except AttributeError as exc: - raise TypeError("Unix time object must be valid Datetime object.") from exc - - -def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - key = attr_desc["key"] - working_data = data - - while "." in key: - # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) - if len(dict_keys) == 1: - key = _decode_attribute_map_key(dict_keys[0]) - break - working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = working_data.get(working_key, data) - if working_data is None: - # If at any point while following flatten JSON path see None, it means - # that all properties under are None as well - return None - key = ".".join(dict_keys[1:]) - - return working_data.get(key) - - -def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements - attr, attr_desc, data -): - key = attr_desc["key"] - working_data = data - - while "." in key: - dict_keys = _FLATTEN.split(key) - if len(dict_keys) == 1: - key = _decode_attribute_map_key(dict_keys[0]) - break - working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) - if working_data is None: - # If at any point while following flatten JSON path see None, it means - # that all properties under are None as well - return None - key = ".".join(dict_keys[1:]) - - if working_data: - return attribute_key_case_insensitive_extractor(key, None, working_data) - - -def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - """Extract the attribute in "data" based on the last part of the JSON path key. - - :param str attr: The attribute to extract - :param dict attr_desc: The attribute description - :param dict data: The data to extract from - :rtype: object - :returns: The extracted attribute - """ - key = attr_desc["key"] - dict_keys = _FLATTEN.split(key) - return attribute_key_extractor(dict_keys[-1], None, data) - - -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - """Extract the attribute in "data" based on the last part of the JSON path key. - - This is the case insensitive version of "last_rest_key_extractor" - :param str attr: The attribute to extract - :param dict attr_desc: The attribute description - :param dict data: The data to extract from - :rtype: object - :returns: The extracted attribute - """ - key = attr_desc["key"] - dict_keys = _FLATTEN.split(key) - return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) - - -def attribute_key_extractor(attr, _, data): - return data.get(attr) - - -def attribute_key_case_insensitive_extractor(attr, _, data): - found_key = None - lower_attr = attr.lower() - for key in data: - if lower_attr == key.lower(): - found_key = key - break - - return data.get(found_key) - - -def _extract_name_from_internal_type(internal_type): - """Given an internal type XML description, extract correct XML name with namespace. - - :param dict internal_type: An model type - :rtype: tuple - :returns: A tuple XML name + namespace dict - """ - internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - xml_name = internal_type_xml_map.get("name", internal_type.__name__) - xml_ns = internal_type_xml_map.get("ns", None) - if xml_ns: - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - return xml_name - - -def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements - if isinstance(data, dict): - return None - - # Test if this model is XML ready first - if not isinstance(data, ET.Element): - return None - - xml_desc = attr_desc.get("xml", {}) - xml_name = xml_desc.get("name", attr_desc["key"]) - - # Look for a children - is_iter_type = attr_desc["type"].startswith("[") - is_wrapped = xml_desc.get("wrapped", False) - internal_type = attr_desc.get("internalType", None) - internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - - # Integrate namespace if necessary - xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) - if xml_ns: - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - - # If it's an attribute, that's simple - if xml_desc.get("attr", False): - return data.get(xml_name) - - # If it's x-ms-text, that's simple too - if xml_desc.get("text", False): - return data.text - - # Scenario where I take the local name: - # - Wrapped node - # - Internal type is an enum (considered basic types) - # - Internal type has no XML/Name node - if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): - children = data.findall(xml_name) - # If internal type has a local name and it's not a list, I use that name - elif not is_iter_type and internal_type and "name" in internal_type_xml_map: - xml_name = _extract_name_from_internal_type(internal_type) - children = data.findall(xml_name) - # That's an array - else: - if internal_type: # Complex type, ignore itemsName and use the complex type name - items_name = _extract_name_from_internal_type(internal_type) - else: - items_name = xml_desc.get("itemsName", xml_name) - children = data.findall(items_name) - - if len(children) == 0: - if is_iter_type: - if is_wrapped: - return None # is_wrapped no node, we want None - return [] # not wrapped, assume empty list - return None # Assume it's not there, maybe an optional node. - - # If is_iter_type and not wrapped, return all found children - if is_iter_type: - if not is_wrapped: - return children - # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) - ) - return list(children[0]) # Might be empty list and that's ok. - - # Here it's not a itertype, we should have found one element only or empty - if len(children) > 1: - raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) - return children[0] - - -class Deserializer: - """Response object model deserializer. - - :param dict classes: Class type dictionary for deserializing complex types. - :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. - """ - - basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - - def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: - self.deserialize_type = { - "iso-8601": Deserializer.deserialize_iso, - "rfc-1123": Deserializer.deserialize_rfc, - "unix-time": Deserializer.deserialize_unix, - "duration": Deserializer.deserialize_duration, - "date": Deserializer.deserialize_date, - "time": Deserializer.deserialize_time, - "decimal": Deserializer.deserialize_decimal, - "long": Deserializer.deserialize_long, - "bytearray": Deserializer.deserialize_bytearray, - "base64": Deserializer.deserialize_base64, - "object": self.deserialize_object, - "[]": self.deserialize_iter, - "{}": self.deserialize_dict, - } - self.deserialize_expected_types = { - "duration": (isodate.Duration, datetime.timedelta), - "iso-8601": (datetime.datetime), - } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} - self.key_extractors = [rest_key_extractor, xml_key_extractor] - # Additional properties only works if the "rest_key_extractor" is used to - # extract the keys. Making it to work whatever the key extractor is too much - # complicated, with no real scenario for now. - # So adding a flag to disable additional properties detection. This flag should be - # used if your expect the deserialization to NOT come from a JSON REST syntax. - # Otherwise, result are unexpected - self.additional_properties_detection = True - - def __call__(self, target_obj, response_data, content_type=None): - """Call the deserializer to process a REST response. - - :param str target_obj: Target data type to deserialize to. - :param requests.Response response_data: REST response object. - :param str content_type: Swagger "produces" if available. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - data = self._unpack_content(response_data, content_type) - return self._deserialize(target_obj, data) - - def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements - """Call the deserializer on a model. - - Data needs to be already deserialized as JSON or XML ElementTree - - :param str target_obj: Target data type to deserialize to. - :param object data: Object to deserialize. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - # This is already a model, go recursive just in case - if hasattr(data, "_attribute_map"): - constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] - try: - for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access - if attr in constants: - continue - value = getattr(data, attr) - if value is None: - continue - local_type = mapconfig["type"] - internal_data_type = local_type.strip("[]{}") - if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): - continue - setattr(data, attr, self._deserialize(local_type, value)) - return data - except AttributeError: - return - - response, class_name = self._classify_target(target_obj, data) - - if isinstance(response, str): - return self.deserialize_data(data, response) - if isinstance(response, type) and issubclass(response, Enum): - return self.deserialize_enum(data, response) - - if data is None or data is CoreNull: - return data - try: - attributes = response._attribute_map # type: ignore # pylint: disable=protected-access - d_attrs = {} - for attr, attr_desc in attributes.items(): - # Check empty string. If it's not empty, someone has a real "additionalProperties"... - if attr == "additional_properties" and attr_desc["key"] == "": - continue - raw_value = None - # Enhance attr_desc with some dynamic data - attr_desc = attr_desc.copy() # Do a copy, do not change the real one - internal_data_type = attr_desc["type"].strip("[]{}") - if internal_data_type in self.dependencies: - attr_desc["internalType"] = self.dependencies[internal_data_type] - - for key_extractor in self.key_extractors: - found_value = key_extractor(attr, attr_desc, data) - if found_value is not None: - if raw_value is not None and raw_value != found_value: - msg = ( - "Ignoring extracted value '%s' from %s for key '%s'" - " (duplicate extraction, follow extractors order)" - ) - _LOGGER.warning(msg, found_value, key_extractor, attr) - continue - raw_value = found_value - - value = self.deserialize_data(raw_value, attr_desc["type"]) - d_attrs[attr] = value - except (AttributeError, TypeError, KeyError) as err: - msg = "Unable to deserialize to object: " + class_name # type: ignore - raise DeserializationError(msg) from err - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) - - def _build_additional_properties(self, attribute_map, data): - if not self.additional_properties_detection: - return None - if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": - # Check empty string. If it's not empty, someone has a real "additionalProperties" - return None - if isinstance(data, ET.Element): - data = {el.tag: el.text for el in data} - - known_keys = { - _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) - for desc in attribute_map.values() - if desc["key"] != "" - } - present_keys = set(data.keys()) - missing_keys = present_keys - known_keys - return {key: data[key] for key in missing_keys} - - def _classify_target(self, target, data): - """Check to see whether the deserialization target object can - be classified into a subclass. - Once classification has been determined, initialize object. - - :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deserialize. - :return: The classified target object and its class name. - :rtype: tuple - """ - if target is None: - return None, None - - if isinstance(target, str): - try: - target = self.dependencies[target] - except KeyError: - return target, target - - try: - target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access - except AttributeError: - pass # Target is not a Model, no classify - return target, target.__class__.__name__ # type: ignore - - def failsafe_deserialize(self, target_obj, data, content_type=None): - """Ignores any errors encountered in deserialization, - and falls back to not deserializing the object. Recommended - for use in error deserialization, as we want to return the - HttpResponseError to users, and not have them deal with - a deserialization error. - - :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deserialize. - :param str content_type: Swagger "produces" if available. - :return: Deserialized object. - :rtype: object - """ - try: - return self(target_obj, data, content_type=content_type) - except: # pylint: disable=bare-except - _LOGGER.debug( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - @staticmethod - def _unpack_content(raw_data, content_type=None): - """Extract the correct structure for deserialization. - - If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. - if we can't, raise. Your Pipeline should have a RawDeserializer. - - If not a pipeline response and raw_data is bytes or string, use content-type - to decode it. If no content-type, try JSON. - - If raw_data is something else, bypass all logic and return it directly. - - :param obj raw_data: Data to be processed. - :param str content_type: How to parse if raw_data is a string/bytes. - :raises JSONDecodeError: If JSON is requested and parsing is impossible. - :raises UnicodeDecodeError: If bytes is not UTF8 - :rtype: object - :return: Unpacked content. - """ - # Assume this is enough to detect a Pipeline Response without importing it - context = getattr(raw_data, "context", {}) - if context: - if RawDeserializer.CONTEXT_NAME in context: - return context[RawDeserializer.CONTEXT_NAME] - raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") - - # Assume this is enough to recognize universal_http.ClientResponse without importing it - if hasattr(raw_data, "body"): - return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) - - # Assume this enough to recognize requests.Response without importing it. - if hasattr(raw_data, "_content_consumed"): - return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) - - if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): - return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore - return raw_data - - def _instantiate_model(self, response, attrs, additional_properties=None): - """Instantiate a response model passing in deserialized args. - - :param Response response: The response model class. - :param dict attrs: The deserialized response attributes. - :param dict additional_properties: Additional properties to be set. - :rtype: Response - :return: The instantiated response model. - """ - if callable(response): - subtype = getattr(response, "_subtype_map", {}) - try: - readonly = [ - k - for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore - if v.get("readonly") - ] - const = [ - k - for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore - if v.get("constant") - ] - kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} - response_obj = response(**kwargs) - for attr in readonly: - setattr(response_obj, attr, attrs.get(attr)) - if additional_properties: - response_obj.additional_properties = additional_properties # type: ignore - return response_obj - except TypeError as err: - msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) from err - else: - try: - for attr, value in attrs.items(): - setattr(response, attr, value) - return response - except Exception as exp: - msg = "Unable to populate response model. " - msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) from exp - - def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements - """Process data for deserialization according to data type. - - :param str data: The response string to be deserialized. - :param str data_type: The type to deserialize to. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - if data is None: - return data - - try: - if not data_type: - return data - if data_type in self.basic_types.values(): - return self.deserialize_basic(data, data_type) - if data_type in self.deserialize_type: - if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): - return data - - is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment - "object", - "[]", - r"{}", - ] - if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: - return None - data_val = self.deserialize_type[data_type](data) - return data_val - - iter_type = data_type[0] + data_type[-1] - if iter_type in self.deserialize_type: - return self.deserialize_type[iter_type](data, data_type[1:-1]) - - obj_type = self.dependencies[data_type] - if issubclass(obj_type, Enum): - if isinstance(data, ET.Element): - data = data.text - return self.deserialize_enum(data, obj_type) - - except (ValueError, TypeError, AttributeError) as err: - msg = "Unable to deserialize response data." - msg += " Data: {}, {}".format(data, data_type) - raise DeserializationError(msg) from err - return self._deserialize(obj_type, data) - - def deserialize_iter(self, attr, iter_type): - """Deserialize an iterable. - - :param list attr: Iterable to be deserialized. - :param str iter_type: The type of object in the iterable. - :return: Deserialized iterable. - :rtype: list - """ - if attr is None: - return None - if isinstance(attr, ET.Element): # If I receive an element here, get the children - attr = list(attr) - if not isinstance(attr, (list, set)): - raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) - return [self.deserialize_data(a, iter_type) for a in attr] - - def deserialize_dict(self, attr, dict_type): - """Deserialize a dictionary. - - :param dict/list attr: Dictionary to be deserialized. Also accepts - a list of key, value pairs. - :param str dict_type: The object type of the items in the dictionary. - :return: Deserialized dictionary. - :rtype: dict - """ - if isinstance(attr, list): - return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} - - if isinstance(attr, ET.Element): - # Transform value into {"Key": "value"} - attr = {el.tag: el.text for el in attr} - return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - - def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements - """Deserialize a generic object. - This will be handled as a dictionary. - - :param dict attr: Dictionary to be deserialized. - :return: Deserialized object. - :rtype: dict - :raises TypeError: if non-builtin datatype encountered. - """ - if attr is None: - return None - if isinstance(attr, ET.Element): - # Do no recurse on XML, just return the tree as-is - return attr - if isinstance(attr, str): - return self.deserialize_basic(attr, "str") - obj_type = type(attr) - if obj_type in self.basic_types: - return self.deserialize_basic(attr, self.basic_types[obj_type]) - if obj_type is _long_type: - return self.deserialize_long(attr) - - if obj_type == dict: - deserialized = {} - for key, value in attr.items(): - try: - deserialized[key] = self.deserialize_object(value, **kwargs) - except ValueError: - deserialized[key] = None - return deserialized - - if obj_type == list: - deserialized = [] - for obj in attr: - try: - deserialized.append(self.deserialize_object(obj, **kwargs)) - except ValueError: - pass - return deserialized - - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) - - def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements - """Deserialize basic builtin data type from string. - Will attempt to convert to str, int, float and bool. - This function will also accept '1', '0', 'true' and 'false' as - valid bool values. - - :param str attr: response string to be deserialized. - :param str data_type: deserialization data type. - :return: Deserialized basic type. - :rtype: str, int, float or bool - :raises TypeError: if string format is not valid. - """ - # If we're here, data is supposed to be a basic type. - # If it's still an XML node, take the text - if isinstance(attr, ET.Element): - attr = attr.text - if not attr: - if data_type == "str": - # None or '', node is empty string. - return "" - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None - - if data_type == "bool": - if attr in [True, False, 1, 0]: - return bool(attr) - if isinstance(attr, str): - if attr.lower() in ["true", "1"]: - return True - if attr.lower() in ["false", "0"]: - return False - raise TypeError("Invalid boolean value: {}".format(attr)) - - if data_type == "str": - return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used - - @staticmethod - def deserialize_unicode(data): - """Preserve unicode objects in Python 2, otherwise return data - as a string. - - :param str data: response string to be deserialized. - :return: Deserialized string. - :rtype: str or unicode - """ - # We might be here because we have an enum modeled as string, - # and we try to deserialize a partial dict with enum inside - if isinstance(data, Enum): - return data - - # Consider this is real string - try: - if isinstance(data, unicode): # type: ignore - return data - except NameError: - return str(data) - return str(data) - - @staticmethod - def deserialize_enum(data, enum_obj): - """Deserialize string into enum object. - - If the string is not a valid enum value it will be returned as-is - and a warning will be logged. - - :param str data: Response string to be deserialized. If this value is - None or invalid it will be returned as-is. - :param Enum enum_obj: Enum object to deserialize to. - :return: Deserialized enum object. - :rtype: Enum - """ - if isinstance(data, enum_obj) or data is None: - return data - if isinstance(data, Enum): - data = data.value - if isinstance(data, int): - # Workaround. We might consider remove it in the future. - try: - return list(enum_obj.__members__.values())[data] - except IndexError as exc: - error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) from exc - try: - return enum_obj(str(data)) - except ValueError: - for enum_value in enum_obj: - if enum_value.value.lower() == str(data).lower(): - return enum_value - # We don't fail anymore for unknown value, we deserialize as a string - _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) - return Deserializer.deserialize_unicode(data) - - @staticmethod - def deserialize_bytearray(attr): - """Deserialize string into bytearray. - - :param str attr: response string to be deserialized. - :return: Deserialized bytearray - :rtype: bytearray - :raises TypeError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - return bytearray(b64decode(attr)) # type: ignore - - @staticmethod - def deserialize_base64(attr): - """Deserialize base64 encoded string into string. - - :param str attr: response string to be deserialized. - :return: Deserialized base64 string - :rtype: bytearray - :raises TypeError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore - attr = attr + padding # type: ignore - encoded = attr.replace("-", "+").replace("_", "/") - return b64decode(encoded) - - @staticmethod - def deserialize_decimal(attr): - """Deserialize string into Decimal object. - - :param str attr: response string to be deserialized. - :return: Deserialized decimal - :raises DeserializationError: if string format invalid. - :rtype: decimal - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - return decimal.Decimal(str(attr)) # type: ignore - except decimal.DecimalException as err: - msg = "Invalid decimal {}".format(attr) - raise DeserializationError(msg) from err - - @staticmethod - def deserialize_long(attr): - """Deserialize string into long (Py2) or int (Py3). - - :param str attr: response string to be deserialized. - :return: Deserialized int - :rtype: long or int - :raises ValueError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - return _long_type(attr) # type: ignore - - @staticmethod - def deserialize_duration(attr): - """Deserialize ISO-8601 formatted string into TimeDelta object. - - :param str attr: response string to be deserialized. - :return: Deserialized duration - :rtype: TimeDelta - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - duration = isodate.parse_duration(attr) - except (ValueError, OverflowError, AttributeError) as err: - msg = "Cannot deserialize duration object." - raise DeserializationError(msg) from err - return duration - - @staticmethod - def deserialize_date(attr): - """Deserialize ISO-8601 formatted string into Date object. - - :param str attr: response string to be deserialized. - :return: Deserialized date - :rtype: Date - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError("Date must have only digits and -. Received: %s" % attr) - # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - return isodate.parse_date(attr, defaultmonth=0, defaultday=0) - - @staticmethod - def deserialize_time(attr): - """Deserialize ISO-8601 formatted string into time object. - - :param str attr: response string to be deserialized. - :return: Deserialized time - :rtype: datetime.time - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError("Date must have only digits and -. Received: %s" % attr) - return isodate.parse_time(attr) - - @staticmethod - def deserialize_rfc(attr): - """Deserialize RFC-1123 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :return: Deserialized RFC datetime - :rtype: Datetime - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - parsed_date = email.utils.parsedate_tz(attr) # type: ignore - date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) - ) - if not date_obj.tzinfo: - date_obj = date_obj.astimezone(tz=TZ_UTC) - except ValueError as err: - msg = "Cannot deserialize to rfc datetime object." - raise DeserializationError(msg) from err - return date_obj - - @staticmethod - def deserialize_iso(attr): - """Deserialize ISO-8601 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :return: Deserialized ISO datetime - :rtype: Datetime - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - attr = attr.upper() # type: ignore - match = Deserializer.valid_date.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - check_decimal = attr.split(".") - if len(check_decimal) > 1: - decimal_str = "" - for digit in check_decimal[1]: - if digit.isdigit(): - decimal_str += digit - else: - break - if len(decimal_str) > 6: - attr = attr.replace(decimal_str, decimal_str[0:6]) - - date_obj = isodate.parse_datetime(attr) - test_utc = date_obj.utctimetuple() - if test_utc.tm_year > 9999 or test_utc.tm_year < 1: - raise OverflowError("Hit max or min date") - except (ValueError, OverflowError, AttributeError) as err: - msg = "Cannot deserialize datetime object." - raise DeserializationError(msg) from err - return date_obj - - @staticmethod - def deserialize_unix(attr): - """Serialize Datetime object into IntTime format. - This is represented as seconds. - - :param int attr: Object to be serialized. - :return: Deserialized datetime - :rtype: Datetime - :raises DeserializationError: if format invalid - """ - if isinstance(attr, ET.Element): - attr = int(attr.text) # type: ignore - try: - attr = int(attr) - date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) - except ValueError as err: - msg = "Cannot deserialize to unix datetime object." - raise DeserializationError(msg) from err - return date_obj diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/utils.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/utils.py deleted file mode 100644 index 35c9c836f85..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/utils.py +++ /dev/null @@ -1,25 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from abc import ABC -from typing import Generic, TYPE_CHECKING, TypeVar - -if TYPE_CHECKING: - from .serialization import Deserializer, Serializer - - -TClient = TypeVar("TClient") -TConfig = TypeVar("TConfig") - - -class ClientMixinABC(ABC, Generic[TClient, TConfig]): - """DO NOT use this class. It is for internal typing use only.""" - - _client: TClient - _config: TConfig - _serialize: "Serializer" - _deserialize: "Deserializer" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_version.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_version.py deleted file mode 100644 index be71c81bd28..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "1.0.0b1" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/__init__.py deleted file mode 100644 index 3856e72bfda..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._client import ClientNamespaceFirstClient # type: ignore - -try: - from ._patch import __all__ as _patch_all - from ._patch import * -except ImportError: - _patch_all = [] -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "ClientNamespaceFirstClient", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore - -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py deleted file mode 100644 index 46eb766121e..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Awaitable -from typing_extensions import Self - -from azure.core import AsyncPipelineClient -from azure.core.pipeline import policies -from azure.core.rest import AsyncHttpResponse, HttpRequest - -from .._utils.serialization import Deserializer, Serializer -from ._configuration import ClientNamespaceFirstClientConfiguration -from ._operations._operations import _ClientNamespaceFirstClientOperationsMixin - - -class ClientNamespaceFirstClient( - _ClientNamespaceFirstClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword - """ClientNamespaceFirstClient. - - :keyword endpoint: Service host. Default value is "http://localhost:3000". - :paramtype endpoint: str - """ - - def __init__( # pylint: disable=missing-client-constructor-parameter-credential - self, *, endpoint: str = "http://localhost:3000", **kwargs: Any - ) -> None: - _endpoint = "{endpoint}" - self._config = ClientNamespaceFirstClientConfiguration(endpoint=endpoint, **kwargs) - - _policies = kwargs.pop("policies", None) - if _policies is None: - _policies = [ - policies.RequestIdPolicy(**kwargs), - self._config.headers_policy, - self._config.user_agent_policy, - self._config.proxy_policy, - policies.ContentDecodePolicy(**kwargs), - self._config.redirect_policy, - self._config.retry_policy, - self._config.authentication_policy, - self._config.custom_hook_policy, - self._config.logging_policy, - policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, - self._config.http_logging_policy, - ] - self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) - - self._serialize = Serializer() - self._deserialize = Deserializer() - self._serialize.client_side_validation = False - - def send_request( - self, request: HttpRequest, *, stream: bool = False, **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse - """ - - request_copy = deepcopy(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> Self: - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details: Any) -> None: - await self._client.__aexit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_configuration.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_configuration.py deleted file mode 100644 index 2d59c0fc0de..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_configuration.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.pipeline import policies - -from .._version import VERSION - - -class ClientNamespaceFirstClientConfiguration: # pylint: disable=too-many-instance-attributes - """Configuration for ClientNamespaceFirstClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: Service host. Default value is "http://localhost:3000". - :type endpoint: str - """ - - def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: - - self.endpoint = endpoint - kwargs.setdefault("sdk_moniker", "client-clientnamespace/{}".format(VERSION)) - self.polling_interval = kwargs.get("polling_interval", 30) - self._configure(**kwargs) - - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py deleted file mode 100644 index 933fcd7d1b5..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py deleted file mode 100644 index d8f8c6e474e..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py +++ /dev/null @@ -1,95 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async - -from ..._operations._operations import build_client_namespace_first_get_first_request -from ..._utils.model_base import _deserialize -from ..._utils.utils import ClientMixinABC -from ...first import models as _first_models3 -from .._configuration import ClientNamespaceFirstClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class _ClientNamespaceFirstClientOperationsMixin( - ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], ClientNamespaceFirstClientConfiguration] -): - - @distributed_trace_async - async def get_first(self, **kwargs: Any) -> _first_models3.FirstClientResult: - """get_first. - - :return: FirstClientResult. The FirstClientResult is compatible with MutableMapping - :rtype: ~client.clientnamespace.first.models.FirstClientResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_first_models3.FirstClientResult] = kwargs.pop("cls", None) - - _request = build_client_namespace_first_get_first_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_first_models3.FirstClientResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/__init__.py deleted file mode 100644 index d55ccad1f57..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/__init__.py deleted file mode 100644 index d2634721e6c..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._models import ( # type: ignore - FirstClientResult, -) -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "FirstClientResult", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_models.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_models.py deleted file mode 100644 index d105c9fda60..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_models.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=useless-super-delegation - -from typing import Any, Mapping, overload - -from ..._utils.model_base import Model as _Model, rest_field - - -class FirstClientResult(_Model): - """FirstClientResult. - - :ivar name: Required. - :vartype name: str - """ - - name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Required.""" - - @overload - def __init__( - self, - *, - name: str, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/py.typed b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/__init__.py deleted file mode 100644 index 0f7106f0faf..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._client import ClientNamespaceSecondClient # type: ignore -from .._version import VERSION - -__version__ = VERSION - -try: - from ._patch import __all__ as _patch_all - from ._patch import * -except ImportError: - _patch_all = [] -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "ClientNamespaceSecondClient", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore - -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py deleted file mode 100644 index 66234c859e5..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any -from typing_extensions import Self - -from azure.core import PipelineClient -from azure.core.pipeline import policies -from azure.core.rest import HttpRequest, HttpResponse - -from .._utils.serialization import Deserializer, Serializer -from ._configuration import ClientNamespaceSecondClientConfiguration -from ._operations._operations import _ClientNamespaceSecondClientOperationsMixin - - -class ClientNamespaceSecondClient( - _ClientNamespaceSecondClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword - """ClientNamespaceSecondClient. - - :keyword endpoint: Service host. Default value is "http://localhost:3000". - :paramtype endpoint: str - """ - - def __init__( # pylint: disable=missing-client-constructor-parameter-credential - self, *, endpoint: str = "http://localhost:3000", **kwargs: Any - ) -> None: - _endpoint = "{endpoint}" - self._config = ClientNamespaceSecondClientConfiguration(endpoint=endpoint, **kwargs) - - _policies = kwargs.pop("policies", None) - if _policies is None: - _policies = [ - policies.RequestIdPolicy(**kwargs), - self._config.headers_policy, - self._config.user_agent_policy, - self._config.proxy_policy, - policies.ContentDecodePolicy(**kwargs), - self._config.redirect_policy, - self._config.retry_policy, - self._config.authentication_policy, - self._config.custom_hook_policy, - self._config.logging_policy, - policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, - self._config.http_logging_policy, - ] - self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) - - self._serialize = Serializer() - self._deserialize = Deserializer() - self._serialize.client_side_validation = False - - def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse - """ - - request_copy = deepcopy(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore - - def close(self) -> None: - self._client.close() - - def __enter__(self) -> Self: - self._client.__enter__() - return self - - def __exit__(self, *exc_details: Any) -> None: - self._client.__exit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_configuration.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_configuration.py deleted file mode 100644 index 412ef516a62..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_configuration.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.pipeline import policies - -from .._version import VERSION - - -class ClientNamespaceSecondClientConfiguration: # pylint: disable=too-many-instance-attributes - """Configuration for ClientNamespaceSecondClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: Service host. Default value is "http://localhost:3000". - :type endpoint: str - """ - - def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: - - self.endpoint = endpoint - kwargs.setdefault("sdk_moniker", "client-clientnamespace/{}".format(VERSION)) - self.polling_interval = kwargs.get("polling_interval", 30) - self._configure(**kwargs) - - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py deleted file mode 100644 index 933fcd7d1b5..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py deleted file mode 100644 index 354b8d1b7a2..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -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 _models1 -from ..._utils.model_base import _deserialize -from ..._utils.serialization import Serializer -from ..._utils.utils import ClientMixinABC -from .._configuration import ClientNamespaceSecondClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_client_namespace_second_get_second_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/client/client-namespace/second" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -class _ClientNamespaceSecondClientOperationsMixin( - ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], ClientNamespaceSecondClientConfiguration] -): - - @distributed_trace - def get_second(self, **kwargs: Any) -> _models1.SecondClientResult: - """get_second. - - :return: SecondClientResult. The SecondClientResult is compatible with MutableMapping - :rtype: ~client.clientnamespace.second.models.SecondClientResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models1.SecondClientResult] = kwargs.pop("cls", None) - - _request = build_client_namespace_second_get_second_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models1.SecondClientResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/__init__.py deleted file mode 100644 index 8026245c2ab..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/model_base.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/model_base.py deleted file mode 100644 index 49d5c725938..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/model_base.py +++ /dev/null @@ -1,1232 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=protected-access, broad-except - -import copy -import calendar -import decimal -import functools -import sys -import logging -import base64 -import re -import typing -import enum -import email.utils -from datetime import datetime, date, time, timedelta, timezone -from json import JSONEncoder -import xml.etree.ElementTree as ET -from collections.abc import MutableMapping -from typing_extensions import Self -import isodate -from azure.core.exceptions import DeserializationError -from azure.core import CaseInsensitiveEnumMeta -from azure.core.pipeline import PipelineResponse -from azure.core.serialization import _Null - -_LOGGER = logging.getLogger(__name__) - -__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] - -TZ_UTC = timezone.utc -_T = typing.TypeVar("_T") - - -def _timedelta_as_isostr(td: timedelta) -> str: - """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' - - Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython - - :param timedelta td: The timedelta to convert - :rtype: str - :return: ISO8601 version of this timedelta - """ - - # Split seconds to larger units - seconds = td.total_seconds() - minutes, seconds = divmod(seconds, 60) - hours, minutes = divmod(minutes, 60) - days, hours = divmod(hours, 24) - - days, hours, minutes = list(map(int, (days, hours, minutes))) - seconds = round(seconds, 6) - - # Build date - date_str = "" - if days: - date_str = "%sD" % days - - if hours or minutes or seconds: - # Build time - time_str = "T" - - # Hours - bigger_exists = date_str or hours - if bigger_exists: - time_str += "{:02}H".format(hours) - - # Minutes - bigger_exists = bigger_exists or minutes - if bigger_exists: - time_str += "{:02}M".format(minutes) - - # Seconds - try: - if seconds.is_integer(): - seconds_string = "{:02}".format(int(seconds)) - else: - # 9 chars long w/ leading 0, 6 digits after decimal - seconds_string = "%09.6f" % seconds - # Remove trailing zeros - seconds_string = seconds_string.rstrip("0") - except AttributeError: # int.is_integer() raises - seconds_string = "{:02}".format(seconds) - - time_str += "{}S".format(seconds_string) - else: - time_str = "" - - return "P" + date_str + time_str - - -def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: - encoded = base64.b64encode(o).decode() - if format == "base64url": - return encoded.strip("=").replace("+", "-").replace("/", "_") - return encoded - - -def _serialize_datetime(o, format: typing.Optional[str] = None): - if hasattr(o, "year") and hasattr(o, "hour"): - if format == "rfc7231": - return email.utils.format_datetime(o, usegmt=True) - if format == "unix-timestamp": - return int(calendar.timegm(o.utctimetuple())) - - # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) - if not o.tzinfo: - iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() - else: - iso_formatted = o.astimezone(TZ_UTC).isoformat() - # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) - return iso_formatted.replace("+00:00", "Z") - # Next try datetime.date or datetime.time - return o.isoformat() - - -def _is_readonly(p): - try: - return p._visibility == ["read"] - except AttributeError: - return False - - -class SdkJSONEncoder(JSONEncoder): - """A JSON encoder that's capable of serializing datetime objects and bytes.""" - - def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): - super().__init__(*args, **kwargs) - self.exclude_readonly = exclude_readonly - self.format = format - - def default(self, o): # pylint: disable=too-many-return-statements - if _is_model(o): - if self.exclude_readonly: - readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] - return {k: v for k, v in o.items() if k not in readonly_props} - return dict(o.items()) - try: - return super(SdkJSONEncoder, self).default(o) - except TypeError: - if isinstance(o, _Null): - return None - if isinstance(o, decimal.Decimal): - return float(o) - if isinstance(o, (bytes, bytearray)): - return _serialize_bytes(o, self.format) - try: - # First try datetime.datetime - return _serialize_datetime(o, self.format) - except AttributeError: - pass - # Last, try datetime.timedelta - try: - return _timedelta_as_isostr(o) - except AttributeError: - # This will be raised when it hits value.total_seconds in the method above - pass - return super(SdkJSONEncoder, self).default(o) - - -_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") -_VALID_RFC7231 = re.compile( - r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" - r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" -) - - -def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: - """Deserialize ISO-8601 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - attr = attr.upper() - match = _VALID_DATE.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - check_decimal = attr.split(".") - if len(check_decimal) > 1: - decimal_str = "" - for digit in check_decimal[1]: - if digit.isdigit(): - decimal_str += digit - else: - break - if len(decimal_str) > 6: - attr = attr.replace(decimal_str, decimal_str[0:6]) - - date_obj = isodate.parse_datetime(attr) - test_utc = date_obj.utctimetuple() - if test_utc.tm_year > 9999 or test_utc.tm_year < 1: - raise OverflowError("Hit max or min date") - return date_obj - - -def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: - """Deserialize RFC7231 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - match = _VALID_RFC7231.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - return email.utils.parsedate_to_datetime(attr) - - -def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: - """Deserialize unix timestamp into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - return datetime.fromtimestamp(attr, TZ_UTC) - - -def _deserialize_date(attr: typing.Union[str, date]) -> date: - """Deserialize ISO-8601 formatted string into Date object. - :param str attr: response string to be deserialized. - :rtype: date - :returns: The date object from that input - """ - # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - if isinstance(attr, date): - return attr - return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore - - -def _deserialize_time(attr: typing.Union[str, time]) -> time: - """Deserialize ISO-8601 formatted string into time object. - - :param str attr: response string to be deserialized. - :rtype: datetime.time - :returns: The time object from that input - """ - if isinstance(attr, time): - return attr - return isodate.parse_time(attr) - - -def _deserialize_bytes(attr): - if isinstance(attr, (bytes, bytearray)): - return attr - return bytes(base64.b64decode(attr)) - - -def _deserialize_bytes_base64(attr): - if isinstance(attr, (bytes, bytearray)): - return attr - padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore - attr = attr + padding # type: ignore - encoded = attr.replace("-", "+").replace("_", "/") - return bytes(base64.b64decode(encoded)) - - -def _deserialize_duration(attr): - if isinstance(attr, timedelta): - return attr - return isodate.parse_duration(attr) - - -def _deserialize_decimal(attr): - if isinstance(attr, decimal.Decimal): - return attr - return decimal.Decimal(str(attr)) - - -def _deserialize_int_as_str(attr): - if isinstance(attr, int): - return attr - return int(attr) - - -_DESERIALIZE_MAPPING = { - datetime: _deserialize_datetime, - date: _deserialize_date, - time: _deserialize_time, - bytes: _deserialize_bytes, - bytearray: _deserialize_bytes, - timedelta: _deserialize_duration, - typing.Any: lambda x: x, - decimal.Decimal: _deserialize_decimal, -} - -_DESERIALIZE_MAPPING_WITHFORMAT = { - "rfc3339": _deserialize_datetime, - "rfc7231": _deserialize_datetime_rfc7231, - "unix-timestamp": _deserialize_datetime_unix_timestamp, - "base64": _deserialize_bytes, - "base64url": _deserialize_bytes_base64, -} - - -def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): - if annotation is int and rf and rf._format == "str": - return _deserialize_int_as_str - if rf and rf._format: - return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) - return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore - - -def _get_type_alias_type(module_name: str, alias_name: str): - types = { - k: v - for k, v in sys.modules[module_name].__dict__.items() - if isinstance(v, typing._GenericAlias) # type: ignore - } - if alias_name not in types: - return alias_name - return types[alias_name] - - -def _get_model(module_name: str, model_name: str): - models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} - module_end = module_name.rsplit(".", 1)[0] - models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) - if isinstance(model_name, str): - model_name = model_name.split(".")[-1] - if model_name not in models: - return model_name - return models[model_name] - - -_UNSET = object() - - -class _MyMutableMapping(MutableMapping[str, typing.Any]): - def __init__(self, data: typing.Dict[str, typing.Any]) -> None: - self._data = data - - def __contains__(self, key: typing.Any) -> bool: - return key in self._data - - def __getitem__(self, key: str) -> typing.Any: - return self._data.__getitem__(key) - - def __setitem__(self, key: str, value: typing.Any) -> None: - self._data.__setitem__(key, value) - - def __delitem__(self, key: str) -> None: - self._data.__delitem__(key) - - def __iter__(self) -> typing.Iterator[typing.Any]: - return self._data.__iter__() - - def __len__(self) -> int: - return self._data.__len__() - - def __ne__(self, other: typing.Any) -> bool: - return not self.__eq__(other) - - def keys(self) -> typing.KeysView[str]: - """ - :returns: a set-like object providing a view on D's keys - :rtype: ~typing.KeysView - """ - return self._data.keys() - - def values(self) -> typing.ValuesView[typing.Any]: - """ - :returns: an object providing a view on D's values - :rtype: ~typing.ValuesView - """ - return self._data.values() - - def items(self) -> typing.ItemsView[str, typing.Any]: - """ - :returns: set-like object providing a view on D's items - :rtype: ~typing.ItemsView - """ - return self._data.items() - - def get(self, key: str, default: typing.Any = None) -> typing.Any: - """ - Get the value for key if key is in the dictionary, else default. - :param str key: The key to look up. - :param any default: The value to return if key is not in the dictionary. Defaults to None - :returns: D[k] if k in D, else d. - :rtype: any - """ - try: - return self[key] - except KeyError: - return default - - @typing.overload - def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ - - @typing.overload - def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs - - @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs - - def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: - """ - Removes specified key and return the corresponding value. - :param str key: The key to pop. - :param any default: The value to return if key is not in the dictionary - :returns: The value corresponding to the key. - :rtype: any - :raises KeyError: If key is not found and default is not given. - """ - if default is _UNSET: - return self._data.pop(key) - return self._data.pop(key, default) - - def popitem(self) -> typing.Tuple[str, typing.Any]: - """ - Removes and returns some (key, value) pair - :returns: The (key, value) pair. - :rtype: tuple - :raises KeyError: if D is empty. - """ - return self._data.popitem() - - def clear(self) -> None: - """ - Remove all items from D. - """ - self._data.clear() - - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ - """ - Updates D from mapping/iterable E and F. - :param any args: Either a mapping object or an iterable of key-value pairs. - """ - self._data.update(*args, **kwargs) - - @typing.overload - def setdefault(self, key: str, default: None = None) -> None: ... - - @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs - - def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: - """ - Same as calling D.get(k, d), and setting D[k]=d if k not found - :param str key: The key to look up. - :param any default: The value to set if key is not in the dictionary - :returns: D[k] if k in D, else d. - :rtype: any - """ - if default is _UNSET: - return self._data.setdefault(key) - return self._data.setdefault(key, default) - - def __eq__(self, other: typing.Any) -> bool: - try: - other_model = self.__class__(other) - except Exception: - return False - return self._data == other_model._data - - def __repr__(self) -> str: - return str(self._data) - - -def _is_model(obj: typing.Any) -> bool: - return getattr(obj, "_is_model", False) - - -def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements - if isinstance(o, list): - return [_serialize(x, format) for x in o] - if isinstance(o, dict): - return {k: _serialize(v, format) for k, v in o.items()} - if isinstance(o, set): - return {_serialize(x, format) for x in o} - if isinstance(o, tuple): - return tuple(_serialize(x, format) for x in o) - if isinstance(o, (bytes, bytearray)): - return _serialize_bytes(o, format) - if isinstance(o, decimal.Decimal): - return float(o) - if isinstance(o, enum.Enum): - return o.value - if isinstance(o, int): - if format == "str": - return str(o) - return o - try: - # First try datetime.datetime - return _serialize_datetime(o, format) - except AttributeError: - pass - # Last, try datetime.timedelta - try: - return _timedelta_as_isostr(o) - except AttributeError: - # This will be raised when it hits value.total_seconds in the method above - pass - return o - - -def _get_rest_field( - attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str -) -> typing.Optional["_RestField"]: - try: - return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) - except StopIteration: - return None - - -def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: - if not rf: - return _serialize(value, None) - if rf._is_multipart_file_input: - return value - if rf._is_model: - return _deserialize(rf._type, value) - if isinstance(value, ET.Element): - value = _deserialize(rf._type, value) - return _serialize(value, rf._format) - - -class Model(_MyMutableMapping): - _is_model = True - # label whether current class's _attr_to_rest_field has been calculated - # could not see _attr_to_rest_field directly because subclass inherits it from parent class - _calculated: typing.Set[str] = set() - - def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: - class_name = self.__class__.__name__ - if len(args) > 1: - raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") - dict_to_pass = { - rest_field._rest_name: rest_field._default - for rest_field in self._attr_to_rest_field.values() - if rest_field._default is not _UNSET - } - if args: # pylint: disable=too-many-nested-blocks - if isinstance(args[0], ET.Element): - existed_attr_keys = [] - model_meta = getattr(self, "_xml", {}) - - for rf in self._attr_to_rest_field.values(): - prop_meta = getattr(rf, "_xml", {}) - xml_name = prop_meta.get("name", rf._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - # attribute - if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) - continue - - # unwrapped element is array - if prop_meta.get("unwrapped", False): - # unwrapped array could either use prop items meta/prop meta - if prop_meta.get("itemsName"): - xml_name = prop_meta.get("itemsName") - xml_ns = prop_meta.get("itemNs") - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - items = args[0].findall(xml_name) # pyright: ignore - if len(items) > 0: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) - continue - - # text element is primitive type - if prop_meta.get("text", False): - if args[0].text is not None: - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) - continue - - # wrapped element could be normal property or array, it should only have one element - item = args[0].find(xml_name) - if item is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) - - # rest thing is additional properties - for e in args[0]: - if e.tag not in existed_attr_keys: - dict_to_pass[e.tag] = _convert_element(e) - else: - dict_to_pass.update( - {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} - ) - else: - non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] - if non_attr_kwargs: - # actual type errors only throw the first wrong keyword arg they see, so following that. - raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") - dict_to_pass.update( - { - self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) - for k, v in kwargs.items() - if v is not None - } - ) - super().__init__(dict_to_pass) - - def copy(self) -> "Model": - return Model(self.__dict__) - - def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: - if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: - # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', - # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' - mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order - attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property - k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") - } - annotations = { - k: v - for mro_class in mros - if hasattr(mro_class, "__annotations__") - for k, v in mro_class.__annotations__.items() - } - for attr, rf in attr_to_rest_field.items(): - rf._module = cls.__module__ - if not rf._type: - rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) - if not rf._rest_name_input: - rf._rest_name_input = attr - cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) - cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - - return super().__new__(cls) - - def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: - for base in cls.__bases__: - if hasattr(base, "__mapping__"): - base.__mapping__[discriminator or cls.__name__] = cls # type: ignore - - @classmethod - def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: - for v in cls.__dict__.values(): - if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: - return v - return None - - @classmethod - def _deserialize(cls, data, exist_discriminators): - if not hasattr(cls, "__mapping__"): - return cls(data) - discriminator = cls._get_discriminator(exist_discriminators) - if discriminator is None: - return cls(data) - exist_discriminators.append(discriminator._rest_name) - if isinstance(data, ET.Element): - model_meta = getattr(cls, "_xml", {}) - prop_meta = getattr(discriminator, "_xml", {}) - xml_name = prop_meta.get("name", discriminator._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - if data.get(xml_name) is not None: - discriminator_value = data.get(xml_name) - else: - discriminator_value = data.find(xml_name).text # pyright: ignore - else: - discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member - return mapped_cls._deserialize(data, exist_discriminators) - - def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be turned into json using json.dump. - - :keyword bool exclude_readonly: Whether to remove the readonly properties. - :returns: A dict JSON compatible object - :rtype: dict - """ - - result = {} - readonly_props = [] - if exclude_readonly: - readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] - for k, v in self.items(): - if exclude_readonly and k in readonly_props: # pyright: ignore - continue - is_multipart_file_input = False - try: - is_multipart_file_input = next( - rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k - )._is_multipart_file_input - except StopIteration: - pass - result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) - return result - - @staticmethod - def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: - if v is None or isinstance(v, _Null): - return None - if isinstance(v, (list, tuple, set)): - return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) - if isinstance(v, dict): - return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} - return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v - - -def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): - if _is_model(obj): - return obj - return _deserialize(model_deserializer, obj) - - -def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): - if obj is None: - return obj - return _deserialize_with_callable(if_obj_deserializer, obj) - - -def _deserialize_with_union(deserializers, obj): - for deserializer in deserializers: - try: - return _deserialize(deserializer, obj) - except DeserializationError: - pass - raise DeserializationError() - - -def _deserialize_dict( - value_deserializer: typing.Optional[typing.Callable], - module: typing.Optional[str], - obj: typing.Dict[typing.Any, typing.Any], -): - if obj is None: - return obj - if isinstance(obj, ET.Element): - obj = {child.tag: child for child in obj} - return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} - - -def _deserialize_multiple_sequence( - entry_deserializers: typing.List[typing.Optional[typing.Callable]], - module: typing.Optional[str], - obj, -): - if obj is None: - return obj - return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) - - -def _deserialize_sequence( - deserializer: typing.Optional[typing.Callable], - module: typing.Optional[str], - obj, -): - if obj is None: - return obj - if isinstance(obj, ET.Element): - obj = list(obj) - return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) - - -def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: - return sorted( - types, - key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), - ) - - -def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches - annotation: typing.Any, - module: typing.Optional[str], - rf: typing.Optional["_RestField"] = None, -) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: - if not annotation: - return None - - # is it a type alias? - if isinstance(annotation, str): - if module is not None: - annotation = _get_type_alias_type(module, annotation) - - # is it a forward ref / in quotes? - if isinstance(annotation, (str, typing.ForwardRef)): - try: - model_name = annotation.__forward_arg__ # type: ignore - except AttributeError: - model_name = annotation - if module is not None: - annotation = _get_model(module, model_name) # type: ignore - - try: - if module and _is_model(annotation): - if rf: - rf._is_model = True - - return functools.partial(_deserialize_model, annotation) # pyright: ignore - except Exception: - pass - - # is it a literal? - try: - if annotation.__origin__ is typing.Literal: # pyright: ignore - return None - except AttributeError: - pass - - # is it optional? - try: - if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore - if len(annotation.__args__) <= 2: # pyright: ignore - if_obj_deserializer = _get_deserialize_callable_from_annotation( - next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore - ) - - return functools.partial(_deserialize_with_optional, if_obj_deserializer) - # the type is Optional[Union[...]], we need to remove the None type from the Union - annotation_copy = copy.copy(annotation) - annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore - return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) - except AttributeError: - pass - - # is it union? - if getattr(annotation, "__origin__", None) is typing.Union: - # initial ordering is we make `string` the last deserialization option, because it is often them most generic - deserializers = [ - _get_deserialize_callable_from_annotation(arg, module, rf) - for arg in _sorted_annotations(annotation.__args__) # pyright: ignore - ] - - return functools.partial(_deserialize_with_union, deserializers) - - try: - if annotation._name == "Dict": # pyright: ignore - value_deserializer = _get_deserialize_callable_from_annotation( - annotation.__args__[1], module, rf # pyright: ignore - ) - - return functools.partial( - _deserialize_dict, - value_deserializer, - module, - ) - except (AttributeError, IndexError): - pass - try: - if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore - if len(annotation.__args__) > 1: # pyright: ignore - entry_deserializers = [ - _get_deserialize_callable_from_annotation(dt, module, rf) - for dt in annotation.__args__ # pyright: ignore - ] - return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) - deserializer = _get_deserialize_callable_from_annotation( - annotation.__args__[0], module, rf # pyright: ignore - ) - - return functools.partial(_deserialize_sequence, deserializer, module) - except (TypeError, IndexError, AttributeError, SyntaxError): - pass - - def _deserialize_default( - deserializer, - obj, - ): - if obj is None: - return obj - try: - return _deserialize_with_callable(deserializer, obj) - except Exception: - pass - return obj - - if get_deserializer(annotation, rf): - return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) - - return functools.partial(_deserialize_default, annotation) - - -def _deserialize_with_callable( - deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], - value: typing.Any, -): # pylint: disable=too-many-return-statements - try: - if value is None or isinstance(value, _Null): - return None - if isinstance(value, ET.Element): - if deserializer is str: - return value.text or "" - if deserializer is int: - return int(value.text) if value.text else None - if deserializer is float: - return float(value.text) if value.text else None - if deserializer is bool: - return value.text == "true" if value.text else None - if deserializer is None: - return value - if deserializer in [int, float, bool]: - return deserializer(value) - if isinstance(deserializer, CaseInsensitiveEnumMeta): - try: - return deserializer(value) - except ValueError: - # for unknown value, return raw value - return value - if isinstance(deserializer, type) and issubclass(deserializer, Model): - return deserializer._deserialize(value, []) - return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) - except Exception as e: - raise DeserializationError() from e - - -def _deserialize( - deserializer: typing.Any, - value: typing.Any, - module: typing.Optional[str] = None, - rf: typing.Optional["_RestField"] = None, - format: typing.Optional[str] = None, -) -> typing.Any: - if isinstance(value, PipelineResponse): - value = value.http_response.json() - if rf is None and format: - rf = _RestField(format=format) - if not isinstance(deserializer, functools.partial): - deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) - return _deserialize_with_callable(deserializer, value) - - -def _failsafe_deserialize( - deserializer: typing.Any, - value: typing.Any, - module: typing.Optional[str] = None, - rf: typing.Optional["_RestField"] = None, - format: typing.Optional[str] = None, -) -> typing.Any: - try: - return _deserialize(deserializer, value, module, rf, format) - except DeserializationError: - _LOGGER.warning( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - -def _failsafe_deserialize_xml( - deserializer: typing.Any, - value: typing.Any, -) -> typing.Any: - try: - return _deserialize_xml(deserializer, value) - except DeserializationError: - _LOGGER.warning( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - -class _RestField: - def __init__( - self, - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - is_discriminator: bool = False, - visibility: typing.Optional[typing.List[str]] = None, - default: typing.Any = _UNSET, - format: typing.Optional[str] = None, - is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, - ): - self._type = type - self._rest_name_input = name - self._module: typing.Optional[str] = None - self._is_discriminator = is_discriminator - self._visibility = visibility - self._is_model = False - self._default = default - self._format = format - self._is_multipart_file_input = is_multipart_file_input - self._xml = xml if xml is not None else {} - - @property - def _class_type(self) -> typing.Any: - return getattr(self._type, "args", [None])[0] - - @property - def _rest_name(self) -> str: - if self._rest_name_input is None: - raise ValueError("Rest name was never set") - return self._rest_name_input - - def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin - # by this point, type and rest_name will have a value bc we default - # them in __new__ of the Model class - item = obj.get(self._rest_name) - if item is None: - return item - if self._is_model: - return item - return _deserialize(self._type, _serialize(item, self._format), rf=self) - - def __set__(self, obj: Model, value) -> None: - if value is None: - # we want to wipe out entries if users set attr to None - try: - obj.__delitem__(self._rest_name) - except KeyError: - pass - return - if self._is_model: - if not _is_model(value): - value = _deserialize(self._type, value) - obj.__setitem__(self._rest_name, value) - return - obj.__setitem__(self._rest_name, _serialize(value, self._format)) - - def _get_deserialize_callable_from_annotation( - self, annotation: typing.Any - ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: - return _get_deserialize_callable_from_annotation(annotation, self._module, self) - - -def rest_field( - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, - default: typing.Any = _UNSET, - format: typing.Optional[str] = None, - is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, -) -> typing.Any: - return _RestField( - name=name, - type=type, - visibility=visibility, - default=default, - format=format, - is_multipart_file_input=is_multipart_file_input, - xml=xml, - ) - - -def rest_discriminator( - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, -) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) - - -def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: - """Serialize a model to XML. - - :param Model model: The model to serialize. - :param bool exclude_readonly: Whether to exclude readonly properties. - :returns: The XML representation of the model. - :rtype: str - """ - return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore - - -def _get_element( - o: typing.Any, - exclude_readonly: bool = False, - parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, - wrapped_element: typing.Optional[ET.Element] = None, -) -> typing.Union[ET.Element, typing.List[ET.Element]]: - if _is_model(o): - model_meta = getattr(o, "_xml", {}) - - # if prop is a model, then use the prop element directly, else generate a wrapper of model - if wrapped_element is None: - wrapped_element = _create_xml_element( - model_meta.get("name", o.__class__.__name__), - model_meta.get("prefix"), - model_meta.get("ns"), - ) - - readonly_props = [] - if exclude_readonly: - readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] - - for k, v in o.items(): - # do not serialize readonly properties - if exclude_readonly and k in readonly_props: - continue - - prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) - if prop_rest_field: - prop_meta = getattr(prop_rest_field, "_xml").copy() - # use the wire name as xml name if no specific name is set - if prop_meta.get("name") is None: - prop_meta["name"] = k - else: - # additional properties will not have rest field, use the wire name as xml name - prop_meta = {"name": k} - - # if no ns for prop, use model's - if prop_meta.get("ns") is None and model_meta.get("ns"): - prop_meta["ns"] = model_meta.get("ns") - prop_meta["prefix"] = model_meta.get("prefix") - - if prop_meta.get("unwrapped", False): - # unwrapped could only set on array - wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) - elif prop_meta.get("text", False): - # text could only set on primitive type - wrapped_element.text = _get_primitive_type_value(v) - elif prop_meta.get("attribute", False): - xml_name = prop_meta.get("name", k) - if prop_meta.get("ns"): - ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore - xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore - # attribute should be primitive type - wrapped_element.set(xml_name, _get_primitive_type_value(v)) - else: - # other wrapped prop element - wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) - return wrapped_element - if isinstance(o, list): - return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore - if isinstance(o, dict): - result = [] - for k, v in o.items(): - result.append( - _get_wrapped_element( - v, - exclude_readonly, - { - "name": k, - "ns": parent_meta.get("ns") if parent_meta else None, - "prefix": parent_meta.get("prefix") if parent_meta else None, - }, - ) - ) - return result - - # primitive case need to create element based on parent_meta - if parent_meta: - return _get_wrapped_element( - o, - exclude_readonly, - { - "name": parent_meta.get("itemsName", parent_meta.get("name")), - "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), - "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), - }, - ) - - raise ValueError("Could not serialize value into xml: " + o) - - -def _get_wrapped_element( - v: typing.Any, - exclude_readonly: bool, - meta: typing.Optional[typing.Dict[str, typing.Any]], -) -> ET.Element: - wrapped_element = _create_xml_element( - meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None - ) - if isinstance(v, (dict, list)): - wrapped_element.extend(_get_element(v, exclude_readonly, meta)) - elif _is_model(v): - _get_element(v, exclude_readonly, meta, wrapped_element) - else: - wrapped_element.text = _get_primitive_type_value(v) - return wrapped_element - - -def _get_primitive_type_value(v) -> str: - if v is True: - return "true" - if v is False: - return "false" - if isinstance(v, _Null): - return "" - return str(v) - - -def _create_xml_element(tag, prefix=None, ns=None): - if prefix and ns: - ET.register_namespace(prefix, ns) - if ns: - return ET.Element("{" + ns + "}" + tag) - return ET.Element(tag) - - -def _deserialize_xml( - deserializer: typing.Any, - value: str, -) -> typing.Any: - element = ET.fromstring(value) # nosec - return _deserialize(deserializer, element) - - -def _convert_element(e: ET.Element): - # dict case - if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: - dict_result: typing.Dict[str, typing.Any] = {} - for child in e: - if dict_result.get(child.tag) is not None: - if isinstance(dict_result[child.tag], list): - dict_result[child.tag].append(_convert_element(child)) - else: - dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] - else: - dict_result[child.tag] = _convert_element(child) - dict_result.update(e.attrib) - return dict_result - # array case - if len(e) > 0: - array_result: typing.List[typing.Any] = [] - for child in e: - array_result.append(_convert_element(child)) - return array_result - # primitive case - return e.text diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/serialization.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/serialization.py deleted file mode 100644 index eb86ea23c96..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/serialization.py +++ /dev/null @@ -1,2032 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -# pyright: reportUnnecessaryTypeIgnoreComment=false - -from base64 import b64decode, b64encode -import calendar -import datetime -import decimal -import email -from enum import Enum -import json -import logging -import re -import sys -import codecs -from typing import ( - Dict, - Any, - cast, - Optional, - Union, - AnyStr, - IO, - Mapping, - Callable, - MutableMapping, - List, -) - -try: - from urllib import quote # type: ignore -except ImportError: - from urllib.parse import quote -import xml.etree.ElementTree as ET - -import isodate # type: ignore -from typing_extensions import Self - -from azure.core.exceptions import DeserializationError, SerializationError -from azure.core.serialization import NULL as CoreNull - -_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") - -JSON = MutableMapping[str, Any] - - -class RawDeserializer: - - # Accept "text" because we're open minded people... - JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") - - # Name used in context - CONTEXT_NAME = "deserialized_data" - - @classmethod - def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: - """Decode data according to content-type. - - Accept a stream of data as well, but will be load at once in memory for now. - - If no content-type, will return the string version (not bytes, not stream) - - :param data: Input, could be bytes or stream (will be decoded with UTF8) or text - :type data: str or bytes or IO - :param str content_type: The content type. - :return: The deserialized data. - :rtype: object - """ - if hasattr(data, "read"): - # Assume a stream - data = cast(IO, data).read() - - if isinstance(data, bytes): - data_as_str = data.decode(encoding="utf-8-sig") - else: - # Explain to mypy the correct type. - data_as_str = cast(str, data) - - # Remove Byte Order Mark if present in string - data_as_str = data_as_str.lstrip(_BOM) - - if content_type is None: - return data - - if cls.JSON_REGEXP.match(content_type): - try: - return json.loads(data_as_str) - except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) from err - elif "xml" in (content_type or []): - try: - - try: - if isinstance(data, unicode): # type: ignore - # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string - data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore - except NameError: - pass - - return ET.fromstring(data_as_str) # nosec - except ET.ParseError as err: - # It might be because the server has an issue, and returned JSON with - # content-type XML.... - # So let's try a JSON load, and if it's still broken - # let's flow the initial exception - def _json_attemp(data): - try: - return True, json.loads(data) - except ValueError: - return False, None # Don't care about this one - - success, json_result = _json_attemp(data) - if success: - return json_result - # If i'm here, it's not JSON, it's not XML, let's scream - # and raise the last context in this block (the XML exception) - # The function hack is because Py2.7 messes up with exception - # context otherwise. - _LOGGER.critical("Wasn't XML not JSON, failing") - raise DeserializationError("XML is invalid") from err - elif content_type.startswith("text/"): - return data_as_str - raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) - - @classmethod - def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: - """Deserialize from HTTP response. - - Use bytes and headers to NOT use any requests/aiohttp or whatever - specific implementation. - Headers will tested for "content-type" - - :param bytes body_bytes: The body of the response. - :param dict headers: The headers of the response. - :returns: The deserialized data. - :rtype: object - """ - # Try to use content-type from headers if available - content_type = None - if "content-type" in headers: - content_type = headers["content-type"].split(";")[0].strip().lower() - # Ouch, this server did not declare what it sent... - # Let's guess it's JSON... - # Also, since Autorest was considering that an empty body was a valid JSON, - # need that test as well.... - else: - content_type = "application/json" - - if body_bytes: - return cls.deserialize_from_text(body_bytes, content_type) - return None - - -_LOGGER = logging.getLogger(__name__) - -try: - _long_type = long # type: ignore -except NameError: - _long_type = int - -TZ_UTC = datetime.timezone.utc - -_FLATTEN = re.compile(r"(? None: - self.additional_properties: Optional[Dict[str, Any]] = {} - for k in kwargs: # pylint: disable=consider-using-dict-items - if k not in self._attribute_map: - _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) - elif k in self._validation and self._validation[k].get("readonly", False): - _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) - else: - setattr(self, k, kwargs[k]) - - def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes. - - :param object other: The object to compare - :returns: True if objects are equal - :rtype: bool - """ - if isinstance(other, self.__class__): - return self.__dict__ == other.__dict__ - return False - - def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes. - - :param object other: The object to compare - :returns: True if objects are not equal - :rtype: bool - """ - return not self.__eq__(other) - - def __str__(self) -> str: - return str(self.__dict__) - - @classmethod - def enable_additional_properties_sending(cls) -> None: - cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} - - @classmethod - def is_xml_model(cls) -> bool: - try: - cls._xml_map # type: ignore - except AttributeError: - return False - return True - - @classmethod - def _create_xml_node(cls): - """Create XML node. - - :returns: The XML node - :rtype: xml.etree.ElementTree.Element - """ - try: - xml_map = cls._xml_map # type: ignore - except AttributeError: - xml_map = {} - - return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - - def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: - """Return the JSON that would be sent to server from this model. - - This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. - - If you want XML serialization, you can pass the kwargs is_xml=True. - - :param bool keep_readonly: If you want to serialize the readonly attributes - :returns: A dict JSON compatible object - :rtype: dict - """ - serializer = Serializer(self._infer_class_models()) - return serializer._serialize( # type: ignore # pylint: disable=protected-access - self, keep_readonly=keep_readonly, **kwargs - ) - - def as_dict( - self, - keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, - **kwargs: Any - ) -> JSON: - """Return a dict that can be serialized using json.dump. - - Advanced usage might optionally use a callback as parameter: - - .. code::python - - def my_key_transformer(key, attr_desc, value): - return key - - Key is the attribute name used in Python. Attr_desc - is a dict of metadata. Currently contains 'type' with the - msrest type and 'key' with the RestAPI encoded key. - Value is the current value in this object. - - The string returned will be used to serialize the key. - If the return type is a list, this is considered hierarchical - result dict. - - See the three examples in this file: - - - attribute_transformer - - full_restapi_key_transformer - - last_restapi_key_transformer - - If you want XML serialization, you can pass the kwargs is_xml=True. - - :param bool keep_readonly: If you want to serialize the readonly attributes - :param function key_transformer: A key transformer function. - :returns: A dict JSON compatible object - :rtype: dict - """ - serializer = Serializer(self._infer_class_models()) - return serializer._serialize( # type: ignore # pylint: disable=protected-access - self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs - ) - - @classmethod - def _infer_class_models(cls): - try: - str_models = cls.__module__.rsplit(".", 1)[0] - models = sys.modules[str_models] - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - if cls.__name__ not in client_models: - raise ValueError("Not Autorest generated code") - except Exception: # pylint: disable=broad-exception-caught - # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. - client_models = {cls.__name__: cls} - return client_models - - @classmethod - def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: - """Parse a str using the RestAPI syntax and return a model. - - :param str data: A str using RestAPI structure. JSON by default. - :param str content_type: JSON by default, set application/xml if XML. - :returns: An instance of this model - :raises DeserializationError: if something went wrong - :rtype: Self - """ - deserializer = Deserializer(cls._infer_class_models()) - return deserializer(cls.__name__, data, content_type=content_type) # type: ignore - - @classmethod - def from_dict( - cls, - data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, - content_type: Optional[str] = None, - ) -> Self: - """Parse a dict using given key extractor return a model. - - By default consider key - extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor - and last_rest_key_case_insensitive_extractor) - - :param dict data: A dict using RestAPI structure - :param function key_extractors: A key extractor function. - :param str content_type: JSON by default, set application/xml if XML. - :returns: An instance of this model - :raises DeserializationError: if something went wrong - :rtype: Self - """ - deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( # type: ignore - [ # type: ignore - attribute_key_case_insensitive_extractor, - rest_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor, - ] - if key_extractors is None - else key_extractors - ) - return deserializer(cls.__name__, data, content_type=content_type) # type: ignore - - @classmethod - def _flatten_subtype(cls, key, objects): - if "_subtype_map" not in cls.__dict__: - return {} - result = dict(cls._subtype_map[key]) - for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access - return result - - @classmethod - def _classify(cls, response, objects): - """Check the class _subtype_map for any child classes. - We want to ignore any inherited _subtype_maps. - - :param dict response: The initial data - :param dict objects: The class objects - :returns: The class to be used - :rtype: class - """ - for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): - subtype_value = None - - if not isinstance(response, ET.Element): - rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) - else: - subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) - if subtype_value: - # Try to match base class. Can be class name only - # (bug to fix in Autorest to support x-ms-discriminator-name) - if cls.__name__ == subtype_value: - return cls - flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) - try: - return objects[flatten_mapping_type[subtype_value]] # type: ignore - except KeyError: - _LOGGER.warning( - "Subtype value %s has no mapping, use base class %s.", - subtype_value, - cls.__name__, - ) - break - else: - _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) - break - return cls - - @classmethod - def _get_rest_key_parts(cls, attr_key): - """Get the RestAPI key of this attr, split it and decode part - :param str attr_key: Attribute key must be in attribute_map. - :returns: A list of RestAPI part - :rtype: list - """ - rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) - return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] - - -def _decode_attribute_map_key(key): - """This decode a key in an _attribute_map to the actual key we want to look at - inside the received data. - - :param str key: A key string from the generated code - :returns: The decoded key - :rtype: str - """ - return key.replace("\\.", ".") - - -class Serializer: # pylint: disable=too-many-public-methods - """Request object model serializer.""" - - basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - - _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} - days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} - months = { - 1: "Jan", - 2: "Feb", - 3: "Mar", - 4: "Apr", - 5: "May", - 6: "Jun", - 7: "Jul", - 8: "Aug", - 9: "Sep", - 10: "Oct", - 11: "Nov", - 12: "Dec", - } - validation = { - "min_length": lambda x, y: len(x) < y, - "max_length": lambda x, y: len(x) > y, - "minimum": lambda x, y: x < y, - "maximum": lambda x, y: x > y, - "minimum_ex": lambda x, y: x <= y, - "maximum_ex": lambda x, y: x >= y, - "min_items": lambda x, y: len(x) < y, - "max_items": lambda x, y: len(x) > y, - "pattern": lambda x, y: not re.match(y, x, re.UNICODE), - "unique": lambda x, y: len(x) != len(set(x)), - "multiple": lambda x, y: x % y != 0, - } - - def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: - self.serialize_type = { - "iso-8601": Serializer.serialize_iso, - "rfc-1123": Serializer.serialize_rfc, - "unix-time": Serializer.serialize_unix, - "duration": Serializer.serialize_duration, - "date": Serializer.serialize_date, - "time": Serializer.serialize_time, - "decimal": Serializer.serialize_decimal, - "long": Serializer.serialize_long, - "bytearray": Serializer.serialize_bytearray, - "base64": Serializer.serialize_base64, - "object": self.serialize_object, - "[]": self.serialize_iter, - "{}": self.serialize_dict, - } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} - self.key_transformer = full_restapi_key_transformer - self.client_side_validation = True - - def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals - self, target_obj, data_type=None, **kwargs - ): - """Serialize data into a string according to type. - - :param object target_obj: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str, dict - :raises SerializationError: if serialization fails. - :returns: The serialized data. - """ - key_transformer = kwargs.get("key_transformer", self.key_transformer) - keep_readonly = kwargs.get("keep_readonly", False) - if target_obj is None: - return None - - attr_name = None - class_name = target_obj.__class__.__name__ - - if data_type: - return self.serialize_data(target_obj, data_type, **kwargs) - - if not hasattr(target_obj, "_attribute_map"): - data_type = type(target_obj).__name__ - if data_type in self.basic_types.values(): - return self.serialize_data(target_obj, data_type, **kwargs) - - # Force "is_xml" kwargs if we detect a XML model - try: - is_xml_model_serialization = kwargs["is_xml"] - except KeyError: - is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) - - serialized = {} - if is_xml_model_serialization: - serialized = target_obj._create_xml_node() # pylint: disable=protected-access - try: - attributes = target_obj._attribute_map # pylint: disable=protected-access - for attr, attr_desc in attributes.items(): - attr_name = attr - if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access - attr_name, {} - ).get("readonly", False): - continue - - if attr_name == "additional_properties" and attr_desc["key"] == "": - if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) - continue - try: - - orig_attr = getattr(target_obj, attr) - if is_xml_model_serialization: - pass # Don't provide "transformer" for XML for now. Keep "orig_attr" - else: # JSON - keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) - keys = keys if isinstance(keys, list) else [keys] - - kwargs["serialization_ctxt"] = attr_desc - new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) - - if is_xml_model_serialization: - xml_desc = attr_desc.get("xml", {}) - xml_name = xml_desc.get("name", attr_desc["key"]) - xml_prefix = xml_desc.get("prefix", None) - xml_ns = xml_desc.get("ns", None) - if xml_desc.get("attr", False): - if xml_ns: - ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - serialized.set(xml_name, new_attr) # type: ignore - continue - if xml_desc.get("text", False): - serialized.text = new_attr # type: ignore - continue - if isinstance(new_attr, list): - serialized.extend(new_attr) # type: ignore - elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, - # we MUST replace the tag with the local tag. But keeping the namespaces. - if "name" not in getattr(orig_attr, "_xml_map", {}): - splitted_tag = new_attr.tag.split("}") - if len(splitted_tag) == 2: # Namespace - new_attr.tag = "}".join([splitted_tag[0], xml_name]) - else: - new_attr.tag = xml_name - serialized.append(new_attr) # type: ignore - else: # That's a basic type - # Integrate namespace if necessary - local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) - local_node.text = str(new_attr) - serialized.append(local_node) # type: ignore - else: # JSON - for k in reversed(keys): # type: ignore - new_attr = {k: new_attr} - - _new_attr = new_attr - _serialized = serialized - for k in keys: # type: ignore - if k not in _serialized: - _serialized.update(_new_attr) # type: ignore - _new_attr = _new_attr[k] # type: ignore - _serialized = _serialized[k] - except ValueError as err: - if isinstance(err, SerializationError): - raise - - except (AttributeError, KeyError, TypeError) as err: - msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) - raise SerializationError(msg) from err - return serialized - - def body(self, data, data_type, **kwargs): - """Serialize data intended for a request body. - - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: dict - :raises SerializationError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized request body - """ - - # Just in case this is a dict - internal_data_type_str = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type_str, None) - try: - is_xml_model_serialization = kwargs["is_xml"] - except KeyError: - if internal_data_type and issubclass(internal_data_type, Model): - is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) - else: - is_xml_model_serialization = False - if internal_data_type and not isinstance(internal_data_type, Enum): - try: - deserializer = Deserializer(self.dependencies) - # Since it's on serialization, it's almost sure that format is not JSON REST - # We're not able to deal with additional properties for now. - deserializer.additional_properties_detection = False - if is_xml_model_serialization: - deserializer.key_extractors = [ # type: ignore - attribute_key_case_insensitive_extractor, - ] - else: - deserializer.key_extractors = [ - rest_key_case_insensitive_extractor, - attribute_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor, - ] - data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access - except DeserializationError as err: - raise SerializationError("Unable to build a model: " + str(err)) from err - - return self._serialize(data, data_type, **kwargs) - - def url(self, name, data, data_type, **kwargs): - """Serialize data intended for a URL path. - - :param str name: The name of the URL path parameter. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str - :returns: The serialized URL path - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - """ - try: - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - - if kwargs.get("skip_quote") is True: - output = str(output) - output = output.replace("{", quote("{")).replace("}", quote("}")) - else: - output = quote(str(output), safe="") - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return output - - def query(self, name, data, data_type, **kwargs): - """Serialize data intended for a URL query. - - :param str name: The name of the query parameter. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str, list - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized query parameter - """ - try: - # Treat the list aside, since we don't want to encode the div separator - if data_type.startswith("["): - internal_data_type = data_type[1:-1] - do_quote = not kwargs.get("skip_quote", False) - return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) - - # Not a list, regular serialization - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - if kwargs.get("skip_quote") is True: - output = str(output) - else: - output = quote(str(output), safe="") - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return str(output) - - def header(self, name, data, data_type, **kwargs): - """Serialize data intended for a request header. - - :param str name: The name of the header. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized header - """ - try: - if data_type in ["[str]"]: - data = ["" if d is None else d for d in data] - - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return str(output) - - def serialize_data(self, data, data_type, **kwargs): - """Serialize generic data according to supplied data type. - - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :raises AttributeError: if required data is None. - :raises ValueError: if data is None - :raises SerializationError: if serialization fails. - :returns: The serialized data. - :rtype: str, int, float, bool, dict, list - """ - if data is None: - raise ValueError("No value for given attribute") - - try: - if data is CoreNull: - return None - if data_type in self.basic_types.values(): - return self.serialize_basic(data, data_type, **kwargs) - - if data_type in self.serialize_type: - return self.serialize_type[data_type](data, **kwargs) - - # If dependencies is empty, try with current data class - # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) - if issubclass(enum_type, Enum): - return Serializer.serialize_enum(data, enum_obj=enum_type) - - iter_type = data_type[0] + data_type[-1] - if iter_type in self.serialize_type: - return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) - - except (ValueError, TypeError) as err: - msg = "Unable to serialize value: {!r} as type: {!r}." - raise SerializationError(msg.format(data, data_type)) from err - return self._serialize(data, **kwargs) - - @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements - custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) - if custom_serializer: - return custom_serializer - if kwargs.get("is_xml", False): - return cls._xml_basic_types_serializers.get(data_type) - - @classmethod - def serialize_basic(cls, data, data_type, **kwargs): - """Serialize basic builting data type. - Serializes objects to str, int, float or bool. - - Possible kwargs: - - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - - is_xml bool : If set, use xml_basic_types_serializers - - :param obj data: Object to be serialized. - :param str data_type: Type of object in the iterable. - :rtype: str, int, float, bool - :return: serialized object - """ - custom_serializer = cls._get_custom_serializers(data_type, **kwargs) - if custom_serializer: - return custom_serializer(data) - if data_type == "str": - return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec # pylint: disable=eval-used - - @classmethod - def serialize_unicode(cls, data): - """Special handling for serializing unicode strings in Py2. - Encode to UTF-8 if unicode, otherwise handle as a str. - - :param str data: Object to be serialized. - :rtype: str - :return: serialized object - """ - try: # If I received an enum, return its value - return data.value - except AttributeError: - pass - - try: - if isinstance(data, unicode): # type: ignore - # Don't change it, JSON and XML ElementTree are totally able - # to serialize correctly u'' strings - return data - except NameError: - return str(data) - return str(data) - - def serialize_iter(self, data, iter_type, div=None, **kwargs): - """Serialize iterable. - - Supported kwargs: - - serialization_ctxt dict : The current entry of _attribute_map, or same format. - serialization_ctxt['type'] should be same as data_type. - - is_xml bool : If set, serialize as XML - - :param list data: Object to be serialized. - :param str iter_type: Type of object in the iterable. - :param str div: If set, this str will be used to combine the elements - in the iterable into a combined string. Default is 'None'. - Defaults to False. - :rtype: list, str - :return: serialized iterable - """ - if isinstance(data, str): - raise SerializationError("Refuse str type as a valid iter type.") - - serialization_ctxt = kwargs.get("serialization_ctxt", {}) - is_xml = kwargs.get("is_xml", False) - - serialized = [] - for d in data: - try: - serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError as err: - if isinstance(err, SerializationError): - raise - serialized.append(None) - - if kwargs.get("do_quote", False): - serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] - - if div: - serialized = ["" if s is None else str(s) for s in serialized] - serialized = div.join(serialized) - - if "xml" in serialization_ctxt or is_xml: - # XML serialization is more complicated - xml_desc = serialization_ctxt.get("xml", {}) - xml_name = xml_desc.get("name") - if not xml_name: - xml_name = serialization_ctxt["key"] - - # Create a wrap node if necessary (use the fact that Element and list have "append") - is_wrapped = xml_desc.get("wrapped", False) - node_name = xml_desc.get("itemsName", xml_name) - if is_wrapped: - final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - else: - final_result = [] - # All list elements to "local_node" - for el in serialized: - if isinstance(el, ET.Element): - el_node = el - else: - el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - if el is not None: # Otherwise it writes "None" :-p - el_node.text = str(el) - final_result.append(el_node) - return final_result - return serialized - - def serialize_dict(self, attr, dict_type, **kwargs): - """Serialize a dictionary of objects. - - :param dict attr: Object to be serialized. - :param str dict_type: Type of object in the dictionary. - :rtype: dict - :return: serialized dictionary - """ - serialization_ctxt = kwargs.get("serialization_ctxt", {}) - serialized = {} - for key, value in attr.items(): - try: - serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError as err: - if isinstance(err, SerializationError): - raise - serialized[self.serialize_unicode(key)] = None - - if "xml" in serialization_ctxt: - # XML serialization is more complicated - xml_desc = serialization_ctxt["xml"] - xml_name = xml_desc["name"] - - final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - for key, value in serialized.items(): - ET.SubElement(final_result, key).text = value - return final_result - - return serialized - - def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements - """Serialize a generic object. - This will be handled as a dictionary. If object passed in is not - a basic type (str, int, float, dict, list) it will simply be - cast to str. - - :param dict attr: Object to be serialized. - :rtype: dict or str - :return: serialized object - """ - if attr is None: - return None - if isinstance(attr, ET.Element): - return attr - obj_type = type(attr) - if obj_type in self.basic_types: - return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) - if obj_type is _long_type: - return self.serialize_long(attr) - if obj_type is str: - return self.serialize_unicode(attr) - if obj_type is datetime.datetime: - return self.serialize_iso(attr) - if obj_type is datetime.date: - return self.serialize_date(attr) - if obj_type is datetime.time: - return self.serialize_time(attr) - if obj_type is datetime.timedelta: - return self.serialize_duration(attr) - if obj_type is decimal.Decimal: - return self.serialize_decimal(attr) - - # If it's a model or I know this dependency, serialize as a Model - if obj_type in self.dependencies.values() or isinstance(attr, Model): - return self._serialize(attr) - - if obj_type == dict: - serialized = {} - for key, value in attr.items(): - try: - serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) - except ValueError: - serialized[self.serialize_unicode(key)] = None - return serialized - - if obj_type == list: - serialized = [] - for obj in attr: - try: - serialized.append(self.serialize_object(obj, **kwargs)) - except ValueError: - pass - return serialized - return str(attr) - - @staticmethod - def serialize_enum(attr, enum_obj=None): - try: - result = attr.value - except AttributeError: - result = attr - try: - enum_obj(result) # type: ignore - return result - except ValueError as exc: - for enum_value in enum_obj: # type: ignore - if enum_value.value.lower() == str(attr).lower(): - return enum_value.value - error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) from exc - - @staticmethod - def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument - """Serialize bytearray into base-64 string. - - :param str attr: Object to be serialized. - :rtype: str - :return: serialized base64 - """ - return b64encode(attr).decode() - - @staticmethod - def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument - """Serialize str into base-64 string. - - :param str attr: Object to be serialized. - :rtype: str - :return: serialized base64 - """ - encoded = b64encode(attr).decode("ascii") - return encoded.strip("=").replace("+", "-").replace("/", "_") - - @staticmethod - def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Decimal object to float. - - :param decimal attr: Object to be serialized. - :rtype: float - :return: serialized decimal - """ - return float(attr) - - @staticmethod - def serialize_long(attr, **kwargs): # pylint: disable=unused-argument - """Serialize long (Py2) or int (Py3). - - :param int attr: Object to be serialized. - :rtype: int/long - :return: serialized long - """ - return _long_type(attr) - - @staticmethod - def serialize_date(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Date object into ISO-8601 formatted string. - - :param Date attr: Object to be serialized. - :rtype: str - :return: serialized date - """ - if isinstance(attr, str): - attr = isodate.parse_date(attr) - t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) - return t - - @staticmethod - def serialize_time(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Time object into ISO-8601 formatted string. - - :param datetime.time attr: Object to be serialized. - :rtype: str - :return: serialized time - """ - if isinstance(attr, str): - attr = isodate.parse_time(attr) - t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) - if attr.microsecond: - t += ".{:02}".format(attr.microsecond) - return t - - @staticmethod - def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument - """Serialize TimeDelta object into ISO-8601 formatted string. - - :param TimeDelta attr: Object to be serialized. - :rtype: str - :return: serialized duration - """ - if isinstance(attr, str): - attr = isodate.parse_duration(attr) - return isodate.duration_isoformat(attr) - - @staticmethod - def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into RFC-1123 formatted string. - - :param Datetime attr: Object to be serialized. - :rtype: str - :raises TypeError: if format invalid. - :return: serialized rfc - """ - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - utc = attr.utctimetuple() - except AttributeError as exc: - raise TypeError("RFC1123 object must be valid Datetime object.") from exc - - return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( - Serializer.days[utc.tm_wday], - utc.tm_mday, - Serializer.months[utc.tm_mon], - utc.tm_year, - utc.tm_hour, - utc.tm_min, - utc.tm_sec, - ) - - @staticmethod - def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into ISO-8601 formatted string. - - :param Datetime attr: Object to be serialized. - :rtype: str - :raises SerializationError: if format invalid. - :return: serialized iso - """ - if isinstance(attr, str): - attr = isodate.parse_datetime(attr) - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - utc = attr.utctimetuple() - if utc.tm_year > 9999 or utc.tm_year < 1: - raise OverflowError("Hit max or min date") - - microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") - if microseconds: - microseconds = "." + microseconds - date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( - utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec - ) - return date + microseconds + "Z" - except (ValueError, OverflowError) as err: - msg = "Unable to serialize datetime object." - raise SerializationError(msg) from err - except AttributeError as err: - msg = "ISO-8601 object must be valid Datetime object." - raise TypeError(msg) from err - - @staticmethod - def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into IntTime format. - This is represented as seconds. - - :param Datetime attr: Object to be serialized. - :rtype: int - :raises SerializationError: if format invalid - :return: serialied unix - """ - if isinstance(attr, int): - return attr - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - return int(calendar.timegm(attr.utctimetuple())) - except AttributeError as exc: - raise TypeError("Unix time object must be valid Datetime object.") from exc - - -def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - key = attr_desc["key"] - working_data = data - - while "." in key: - # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) - if len(dict_keys) == 1: - key = _decode_attribute_map_key(dict_keys[0]) - break - working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = working_data.get(working_key, data) - if working_data is None: - # If at any point while following flatten JSON path see None, it means - # that all properties under are None as well - return None - key = ".".join(dict_keys[1:]) - - return working_data.get(key) - - -def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements - attr, attr_desc, data -): - key = attr_desc["key"] - working_data = data - - while "." in key: - dict_keys = _FLATTEN.split(key) - if len(dict_keys) == 1: - key = _decode_attribute_map_key(dict_keys[0]) - break - working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) - if working_data is None: - # If at any point while following flatten JSON path see None, it means - # that all properties under are None as well - return None - key = ".".join(dict_keys[1:]) - - if working_data: - return attribute_key_case_insensitive_extractor(key, None, working_data) - - -def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - """Extract the attribute in "data" based on the last part of the JSON path key. - - :param str attr: The attribute to extract - :param dict attr_desc: The attribute description - :param dict data: The data to extract from - :rtype: object - :returns: The extracted attribute - """ - key = attr_desc["key"] - dict_keys = _FLATTEN.split(key) - return attribute_key_extractor(dict_keys[-1], None, data) - - -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - """Extract the attribute in "data" based on the last part of the JSON path key. - - This is the case insensitive version of "last_rest_key_extractor" - :param str attr: The attribute to extract - :param dict attr_desc: The attribute description - :param dict data: The data to extract from - :rtype: object - :returns: The extracted attribute - """ - key = attr_desc["key"] - dict_keys = _FLATTEN.split(key) - return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) - - -def attribute_key_extractor(attr, _, data): - return data.get(attr) - - -def attribute_key_case_insensitive_extractor(attr, _, data): - found_key = None - lower_attr = attr.lower() - for key in data: - if lower_attr == key.lower(): - found_key = key - break - - return data.get(found_key) - - -def _extract_name_from_internal_type(internal_type): - """Given an internal type XML description, extract correct XML name with namespace. - - :param dict internal_type: An model type - :rtype: tuple - :returns: A tuple XML name + namespace dict - """ - internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - xml_name = internal_type_xml_map.get("name", internal_type.__name__) - xml_ns = internal_type_xml_map.get("ns", None) - if xml_ns: - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - return xml_name - - -def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements - if isinstance(data, dict): - return None - - # Test if this model is XML ready first - if not isinstance(data, ET.Element): - return None - - xml_desc = attr_desc.get("xml", {}) - xml_name = xml_desc.get("name", attr_desc["key"]) - - # Look for a children - is_iter_type = attr_desc["type"].startswith("[") - is_wrapped = xml_desc.get("wrapped", False) - internal_type = attr_desc.get("internalType", None) - internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - - # Integrate namespace if necessary - xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) - if xml_ns: - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - - # If it's an attribute, that's simple - if xml_desc.get("attr", False): - return data.get(xml_name) - - # If it's x-ms-text, that's simple too - if xml_desc.get("text", False): - return data.text - - # Scenario where I take the local name: - # - Wrapped node - # - Internal type is an enum (considered basic types) - # - Internal type has no XML/Name node - if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): - children = data.findall(xml_name) - # If internal type has a local name and it's not a list, I use that name - elif not is_iter_type and internal_type and "name" in internal_type_xml_map: - xml_name = _extract_name_from_internal_type(internal_type) - children = data.findall(xml_name) - # That's an array - else: - if internal_type: # Complex type, ignore itemsName and use the complex type name - items_name = _extract_name_from_internal_type(internal_type) - else: - items_name = xml_desc.get("itemsName", xml_name) - children = data.findall(items_name) - - if len(children) == 0: - if is_iter_type: - if is_wrapped: - return None # is_wrapped no node, we want None - return [] # not wrapped, assume empty list - return None # Assume it's not there, maybe an optional node. - - # If is_iter_type and not wrapped, return all found children - if is_iter_type: - if not is_wrapped: - return children - # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) - ) - return list(children[0]) # Might be empty list and that's ok. - - # Here it's not a itertype, we should have found one element only or empty - if len(children) > 1: - raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) - return children[0] - - -class Deserializer: - """Response object model deserializer. - - :param dict classes: Class type dictionary for deserializing complex types. - :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. - """ - - basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - - def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: - self.deserialize_type = { - "iso-8601": Deserializer.deserialize_iso, - "rfc-1123": Deserializer.deserialize_rfc, - "unix-time": Deserializer.deserialize_unix, - "duration": Deserializer.deserialize_duration, - "date": Deserializer.deserialize_date, - "time": Deserializer.deserialize_time, - "decimal": Deserializer.deserialize_decimal, - "long": Deserializer.deserialize_long, - "bytearray": Deserializer.deserialize_bytearray, - "base64": Deserializer.deserialize_base64, - "object": self.deserialize_object, - "[]": self.deserialize_iter, - "{}": self.deserialize_dict, - } - self.deserialize_expected_types = { - "duration": (isodate.Duration, datetime.timedelta), - "iso-8601": (datetime.datetime), - } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} - self.key_extractors = [rest_key_extractor, xml_key_extractor] - # Additional properties only works if the "rest_key_extractor" is used to - # extract the keys. Making it to work whatever the key extractor is too much - # complicated, with no real scenario for now. - # So adding a flag to disable additional properties detection. This flag should be - # used if your expect the deserialization to NOT come from a JSON REST syntax. - # Otherwise, result are unexpected - self.additional_properties_detection = True - - def __call__(self, target_obj, response_data, content_type=None): - """Call the deserializer to process a REST response. - - :param str target_obj: Target data type to deserialize to. - :param requests.Response response_data: REST response object. - :param str content_type: Swagger "produces" if available. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - data = self._unpack_content(response_data, content_type) - return self._deserialize(target_obj, data) - - def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements - """Call the deserializer on a model. - - Data needs to be already deserialized as JSON or XML ElementTree - - :param str target_obj: Target data type to deserialize to. - :param object data: Object to deserialize. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - # This is already a model, go recursive just in case - if hasattr(data, "_attribute_map"): - constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] - try: - for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access - if attr in constants: - continue - value = getattr(data, attr) - if value is None: - continue - local_type = mapconfig["type"] - internal_data_type = local_type.strip("[]{}") - if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): - continue - setattr(data, attr, self._deserialize(local_type, value)) - return data - except AttributeError: - return - - response, class_name = self._classify_target(target_obj, data) - - if isinstance(response, str): - return self.deserialize_data(data, response) - if isinstance(response, type) and issubclass(response, Enum): - return self.deserialize_enum(data, response) - - if data is None or data is CoreNull: - return data - try: - attributes = response._attribute_map # type: ignore # pylint: disable=protected-access - d_attrs = {} - for attr, attr_desc in attributes.items(): - # Check empty string. If it's not empty, someone has a real "additionalProperties"... - if attr == "additional_properties" and attr_desc["key"] == "": - continue - raw_value = None - # Enhance attr_desc with some dynamic data - attr_desc = attr_desc.copy() # Do a copy, do not change the real one - internal_data_type = attr_desc["type"].strip("[]{}") - if internal_data_type in self.dependencies: - attr_desc["internalType"] = self.dependencies[internal_data_type] - - for key_extractor in self.key_extractors: - found_value = key_extractor(attr, attr_desc, data) - if found_value is not None: - if raw_value is not None and raw_value != found_value: - msg = ( - "Ignoring extracted value '%s' from %s for key '%s'" - " (duplicate extraction, follow extractors order)" - ) - _LOGGER.warning(msg, found_value, key_extractor, attr) - continue - raw_value = found_value - - value = self.deserialize_data(raw_value, attr_desc["type"]) - d_attrs[attr] = value - except (AttributeError, TypeError, KeyError) as err: - msg = "Unable to deserialize to object: " + class_name # type: ignore - raise DeserializationError(msg) from err - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) - - def _build_additional_properties(self, attribute_map, data): - if not self.additional_properties_detection: - return None - if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": - # Check empty string. If it's not empty, someone has a real "additionalProperties" - return None - if isinstance(data, ET.Element): - data = {el.tag: el.text for el in data} - - known_keys = { - _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) - for desc in attribute_map.values() - if desc["key"] != "" - } - present_keys = set(data.keys()) - missing_keys = present_keys - known_keys - return {key: data[key] for key in missing_keys} - - def _classify_target(self, target, data): - """Check to see whether the deserialization target object can - be classified into a subclass. - Once classification has been determined, initialize object. - - :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deserialize. - :return: The classified target object and its class name. - :rtype: tuple - """ - if target is None: - return None, None - - if isinstance(target, str): - try: - target = self.dependencies[target] - except KeyError: - return target, target - - try: - target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access - except AttributeError: - pass # Target is not a Model, no classify - return target, target.__class__.__name__ # type: ignore - - def failsafe_deserialize(self, target_obj, data, content_type=None): - """Ignores any errors encountered in deserialization, - and falls back to not deserializing the object. Recommended - for use in error deserialization, as we want to return the - HttpResponseError to users, and not have them deal with - a deserialization error. - - :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deserialize. - :param str content_type: Swagger "produces" if available. - :return: Deserialized object. - :rtype: object - """ - try: - return self(target_obj, data, content_type=content_type) - except: # pylint: disable=bare-except - _LOGGER.debug( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - @staticmethod - def _unpack_content(raw_data, content_type=None): - """Extract the correct structure for deserialization. - - If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. - if we can't, raise. Your Pipeline should have a RawDeserializer. - - If not a pipeline response and raw_data is bytes or string, use content-type - to decode it. If no content-type, try JSON. - - If raw_data is something else, bypass all logic and return it directly. - - :param obj raw_data: Data to be processed. - :param str content_type: How to parse if raw_data is a string/bytes. - :raises JSONDecodeError: If JSON is requested and parsing is impossible. - :raises UnicodeDecodeError: If bytes is not UTF8 - :rtype: object - :return: Unpacked content. - """ - # Assume this is enough to detect a Pipeline Response without importing it - context = getattr(raw_data, "context", {}) - if context: - if RawDeserializer.CONTEXT_NAME in context: - return context[RawDeserializer.CONTEXT_NAME] - raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") - - # Assume this is enough to recognize universal_http.ClientResponse without importing it - if hasattr(raw_data, "body"): - return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) - - # Assume this enough to recognize requests.Response without importing it. - if hasattr(raw_data, "_content_consumed"): - return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) - - if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): - return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore - return raw_data - - def _instantiate_model(self, response, attrs, additional_properties=None): - """Instantiate a response model passing in deserialized args. - - :param Response response: The response model class. - :param dict attrs: The deserialized response attributes. - :param dict additional_properties: Additional properties to be set. - :rtype: Response - :return: The instantiated response model. - """ - if callable(response): - subtype = getattr(response, "_subtype_map", {}) - try: - readonly = [ - k - for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore - if v.get("readonly") - ] - const = [ - k - for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore - if v.get("constant") - ] - kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} - response_obj = response(**kwargs) - for attr in readonly: - setattr(response_obj, attr, attrs.get(attr)) - if additional_properties: - response_obj.additional_properties = additional_properties # type: ignore - return response_obj - except TypeError as err: - msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) from err - else: - try: - for attr, value in attrs.items(): - setattr(response, attr, value) - return response - except Exception as exp: - msg = "Unable to populate response model. " - msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) from exp - - def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements - """Process data for deserialization according to data type. - - :param str data: The response string to be deserialized. - :param str data_type: The type to deserialize to. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - if data is None: - return data - - try: - if not data_type: - return data - if data_type in self.basic_types.values(): - return self.deserialize_basic(data, data_type) - if data_type in self.deserialize_type: - if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): - return data - - is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment - "object", - "[]", - r"{}", - ] - if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: - return None - data_val = self.deserialize_type[data_type](data) - return data_val - - iter_type = data_type[0] + data_type[-1] - if iter_type in self.deserialize_type: - return self.deserialize_type[iter_type](data, data_type[1:-1]) - - obj_type = self.dependencies[data_type] - if issubclass(obj_type, Enum): - if isinstance(data, ET.Element): - data = data.text - return self.deserialize_enum(data, obj_type) - - except (ValueError, TypeError, AttributeError) as err: - msg = "Unable to deserialize response data." - msg += " Data: {}, {}".format(data, data_type) - raise DeserializationError(msg) from err - return self._deserialize(obj_type, data) - - def deserialize_iter(self, attr, iter_type): - """Deserialize an iterable. - - :param list attr: Iterable to be deserialized. - :param str iter_type: The type of object in the iterable. - :return: Deserialized iterable. - :rtype: list - """ - if attr is None: - return None - if isinstance(attr, ET.Element): # If I receive an element here, get the children - attr = list(attr) - if not isinstance(attr, (list, set)): - raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) - return [self.deserialize_data(a, iter_type) for a in attr] - - def deserialize_dict(self, attr, dict_type): - """Deserialize a dictionary. - - :param dict/list attr: Dictionary to be deserialized. Also accepts - a list of key, value pairs. - :param str dict_type: The object type of the items in the dictionary. - :return: Deserialized dictionary. - :rtype: dict - """ - if isinstance(attr, list): - return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} - - if isinstance(attr, ET.Element): - # Transform value into {"Key": "value"} - attr = {el.tag: el.text for el in attr} - return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - - def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements - """Deserialize a generic object. - This will be handled as a dictionary. - - :param dict attr: Dictionary to be deserialized. - :return: Deserialized object. - :rtype: dict - :raises TypeError: if non-builtin datatype encountered. - """ - if attr is None: - return None - if isinstance(attr, ET.Element): - # Do no recurse on XML, just return the tree as-is - return attr - if isinstance(attr, str): - return self.deserialize_basic(attr, "str") - obj_type = type(attr) - if obj_type in self.basic_types: - return self.deserialize_basic(attr, self.basic_types[obj_type]) - if obj_type is _long_type: - return self.deserialize_long(attr) - - if obj_type == dict: - deserialized = {} - for key, value in attr.items(): - try: - deserialized[key] = self.deserialize_object(value, **kwargs) - except ValueError: - deserialized[key] = None - return deserialized - - if obj_type == list: - deserialized = [] - for obj in attr: - try: - deserialized.append(self.deserialize_object(obj, **kwargs)) - except ValueError: - pass - return deserialized - - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) - - def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements - """Deserialize basic builtin data type from string. - Will attempt to convert to str, int, float and bool. - This function will also accept '1', '0', 'true' and 'false' as - valid bool values. - - :param str attr: response string to be deserialized. - :param str data_type: deserialization data type. - :return: Deserialized basic type. - :rtype: str, int, float or bool - :raises TypeError: if string format is not valid. - """ - # If we're here, data is supposed to be a basic type. - # If it's still an XML node, take the text - if isinstance(attr, ET.Element): - attr = attr.text - if not attr: - if data_type == "str": - # None or '', node is empty string. - return "" - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None - - if data_type == "bool": - if attr in [True, False, 1, 0]: - return bool(attr) - if isinstance(attr, str): - if attr.lower() in ["true", "1"]: - return True - if attr.lower() in ["false", "0"]: - return False - raise TypeError("Invalid boolean value: {}".format(attr)) - - if data_type == "str": - return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used - - @staticmethod - def deserialize_unicode(data): - """Preserve unicode objects in Python 2, otherwise return data - as a string. - - :param str data: response string to be deserialized. - :return: Deserialized string. - :rtype: str or unicode - """ - # We might be here because we have an enum modeled as string, - # and we try to deserialize a partial dict with enum inside - if isinstance(data, Enum): - return data - - # Consider this is real string - try: - if isinstance(data, unicode): # type: ignore - return data - except NameError: - return str(data) - return str(data) - - @staticmethod - def deserialize_enum(data, enum_obj): - """Deserialize string into enum object. - - If the string is not a valid enum value it will be returned as-is - and a warning will be logged. - - :param str data: Response string to be deserialized. If this value is - None or invalid it will be returned as-is. - :param Enum enum_obj: Enum object to deserialize to. - :return: Deserialized enum object. - :rtype: Enum - """ - if isinstance(data, enum_obj) or data is None: - return data - if isinstance(data, Enum): - data = data.value - if isinstance(data, int): - # Workaround. We might consider remove it in the future. - try: - return list(enum_obj.__members__.values())[data] - except IndexError as exc: - error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) from exc - try: - return enum_obj(str(data)) - except ValueError: - for enum_value in enum_obj: - if enum_value.value.lower() == str(data).lower(): - return enum_value - # We don't fail anymore for unknown value, we deserialize as a string - _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) - return Deserializer.deserialize_unicode(data) - - @staticmethod - def deserialize_bytearray(attr): - """Deserialize string into bytearray. - - :param str attr: response string to be deserialized. - :return: Deserialized bytearray - :rtype: bytearray - :raises TypeError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - return bytearray(b64decode(attr)) # type: ignore - - @staticmethod - def deserialize_base64(attr): - """Deserialize base64 encoded string into string. - - :param str attr: response string to be deserialized. - :return: Deserialized base64 string - :rtype: bytearray - :raises TypeError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore - attr = attr + padding # type: ignore - encoded = attr.replace("-", "+").replace("_", "/") - return b64decode(encoded) - - @staticmethod - def deserialize_decimal(attr): - """Deserialize string into Decimal object. - - :param str attr: response string to be deserialized. - :return: Deserialized decimal - :raises DeserializationError: if string format invalid. - :rtype: decimal - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - return decimal.Decimal(str(attr)) # type: ignore - except decimal.DecimalException as err: - msg = "Invalid decimal {}".format(attr) - raise DeserializationError(msg) from err - - @staticmethod - def deserialize_long(attr): - """Deserialize string into long (Py2) or int (Py3). - - :param str attr: response string to be deserialized. - :return: Deserialized int - :rtype: long or int - :raises ValueError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - return _long_type(attr) # type: ignore - - @staticmethod - def deserialize_duration(attr): - """Deserialize ISO-8601 formatted string into TimeDelta object. - - :param str attr: response string to be deserialized. - :return: Deserialized duration - :rtype: TimeDelta - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - duration = isodate.parse_duration(attr) - except (ValueError, OverflowError, AttributeError) as err: - msg = "Cannot deserialize duration object." - raise DeserializationError(msg) from err - return duration - - @staticmethod - def deserialize_date(attr): - """Deserialize ISO-8601 formatted string into Date object. - - :param str attr: response string to be deserialized. - :return: Deserialized date - :rtype: Date - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError("Date must have only digits and -. Received: %s" % attr) - # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - return isodate.parse_date(attr, defaultmonth=0, defaultday=0) - - @staticmethod - def deserialize_time(attr): - """Deserialize ISO-8601 formatted string into time object. - - :param str attr: response string to be deserialized. - :return: Deserialized time - :rtype: datetime.time - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError("Date must have only digits and -. Received: %s" % attr) - return isodate.parse_time(attr) - - @staticmethod - def deserialize_rfc(attr): - """Deserialize RFC-1123 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :return: Deserialized RFC datetime - :rtype: Datetime - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - parsed_date = email.utils.parsedate_tz(attr) # type: ignore - date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) - ) - if not date_obj.tzinfo: - date_obj = date_obj.astimezone(tz=TZ_UTC) - except ValueError as err: - msg = "Cannot deserialize to rfc datetime object." - raise DeserializationError(msg) from err - return date_obj - - @staticmethod - def deserialize_iso(attr): - """Deserialize ISO-8601 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :return: Deserialized ISO datetime - :rtype: Datetime - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - attr = attr.upper() # type: ignore - match = Deserializer.valid_date.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - check_decimal = attr.split(".") - if len(check_decimal) > 1: - decimal_str = "" - for digit in check_decimal[1]: - if digit.isdigit(): - decimal_str += digit - else: - break - if len(decimal_str) > 6: - attr = attr.replace(decimal_str, decimal_str[0:6]) - - date_obj = isodate.parse_datetime(attr) - test_utc = date_obj.utctimetuple() - if test_utc.tm_year > 9999 or test_utc.tm_year < 1: - raise OverflowError("Hit max or min date") - except (ValueError, OverflowError, AttributeError) as err: - msg = "Cannot deserialize datetime object." - raise DeserializationError(msg) from err - return date_obj - - @staticmethod - def deserialize_unix(attr): - """Serialize Datetime object into IntTime format. - This is represented as seconds. - - :param int attr: Object to be serialized. - :return: Deserialized datetime - :rtype: Datetime - :raises DeserializationError: if format invalid - """ - if isinstance(attr, ET.Element): - attr = int(attr.text) # type: ignore - try: - attr = int(attr) - date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) - except ValueError as err: - msg = "Cannot deserialize to unix datetime object." - raise DeserializationError(msg) from err - return date_obj diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/utils.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/utils.py deleted file mode 100644 index 35c9c836f85..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/utils.py +++ /dev/null @@ -1,25 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from abc import ABC -from typing import Generic, TYPE_CHECKING, TypeVar - -if TYPE_CHECKING: - from .serialization import Deserializer, Serializer - - -TClient = TypeVar("TClient") -TConfig = TypeVar("TConfig") - - -class ClientMixinABC(ABC, Generic[TClient, TConfig]): - """DO NOT use this class. It is for internal typing use only.""" - - _client: TClient - _config: TConfig - _serialize: "Serializer" - _deserialize: "Deserializer" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/__init__.py deleted file mode 100644 index d539abde419..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._client import ClientNamespaceSecondClient # type: ignore - -try: - from ._patch import __all__ as _patch_all - from ._patch import * -except ImportError: - _patch_all = [] -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "ClientNamespaceSecondClient", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore - -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py deleted file mode 100644 index f353356a14b..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Awaitable -from typing_extensions import Self - -from azure.core import AsyncPipelineClient -from azure.core.pipeline import policies -from azure.core.rest import AsyncHttpResponse, HttpRequest - -from ..._utils.serialization import Deserializer, Serializer -from ._configuration import ClientNamespaceSecondClientConfiguration -from ._operations._operations import _ClientNamespaceSecondClientOperationsMixin - - -class ClientNamespaceSecondClient( - _ClientNamespaceSecondClientOperationsMixin -): # pylint: disable=client-accepts-api-version-keyword - """ClientNamespaceSecondClient. - - :keyword endpoint: Service host. Default value is "http://localhost:3000". - :paramtype endpoint: str - """ - - def __init__( # pylint: disable=missing-client-constructor-parameter-credential - self, *, endpoint: str = "http://localhost:3000", **kwargs: Any - ) -> None: - _endpoint = "{endpoint}" - self._config = ClientNamespaceSecondClientConfiguration(endpoint=endpoint, **kwargs) - - _policies = kwargs.pop("policies", None) - if _policies is None: - _policies = [ - policies.RequestIdPolicy(**kwargs), - self._config.headers_policy, - self._config.user_agent_policy, - self._config.proxy_policy, - policies.ContentDecodePolicy(**kwargs), - self._config.redirect_policy, - self._config.retry_policy, - self._config.authentication_policy, - self._config.custom_hook_policy, - self._config.logging_policy, - policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, - self._config.http_logging_policy, - ] - self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) - - self._serialize = Serializer() - self._deserialize = Deserializer() - self._serialize.client_side_validation = False - - def send_request( - self, request: HttpRequest, *, stream: bool = False, **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse - """ - - request_copy = deepcopy(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> Self: - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details: Any) -> None: - await self._client.__aexit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_configuration.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_configuration.py deleted file mode 100644 index 32d10db815f..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_configuration.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.pipeline import policies - -from ..._version import VERSION - - -class ClientNamespaceSecondClientConfiguration: # pylint: disable=too-many-instance-attributes - """Configuration for ClientNamespaceSecondClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: Service host. Default value is "http://localhost:3000". - :type endpoint: str - """ - - def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: - - self.endpoint = endpoint - kwargs.setdefault("sdk_moniker", "client-clientnamespace/{}".format(VERSION)) - self.polling_interval = kwargs.get("polling_interval", 30) - self._configure(**kwargs) - - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py deleted file mode 100644 index 933fcd7d1b5..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py deleted file mode 100644 index 06548cdaf0b..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py +++ /dev/null @@ -1,95 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async - -from ... import models as _models2 -from ...._utils.model_base import _deserialize -from ...._utils.utils import ClientMixinABC -from ..._operations._operations import build_client_namespace_second_get_second_request -from .._configuration import ClientNamespaceSecondClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class _ClientNamespaceSecondClientOperationsMixin( - ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], ClientNamespaceSecondClientConfiguration] -): - - @distributed_trace_async - async def get_second(self, **kwargs: Any) -> _models2.SecondClientResult: - """get_second. - - :return: SecondClientResult. The SecondClientResult is compatible with MutableMapping - :rtype: ~client.clientnamespace.second.models.SecondClientResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models2.SecondClientResult] = kwargs.pop("cls", None) - - _request = build_client_namespace_second_get_second_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(_models2.SecondClientResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/__init__.py deleted file mode 100644 index ca608d6ae44..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._models import ( # type: ignore - SecondClientResult, -) -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "SecondClientResult", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py deleted file mode 100644 index 9e74a9906bc..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=useless-super-delegation - -from typing import Any, Mapping, TYPE_CHECKING, Union, overload - -from ..._utils.model_base import Model as _Model, rest_field - -if TYPE_CHECKING: - from ..sub import models as _sub_models2 - - -class SecondClientResult(_Model): - """SecondClientResult. - - :ivar type: Required. "second" - :vartype type: str or ~client.clientnamespace.second.sub.models.SecondClientEnumType - """ - - type: Union[str, "_sub_models2.SecondClientEnumType"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Required. \"second\"""" - - @overload - def __init__( - self, - *, - type: Union[str, "_sub_models2.SecondClientEnumType"], - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/__init__.py deleted file mode 100644 index d55ccad1f57..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/__init__.py deleted file mode 100644 index b5c580339ea..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._enums import ( # type: ignore - SecondClientEnumType, -) -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "SecondClientEnumType", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_enums.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_enums.py deleted file mode 100644 index c2a45b1ecb1..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_enums.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum -from azure.core import CaseInsensitiveEnumMeta - - -class SecondClientEnumType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of SecondClientEnumType.""" - - SECOND = "second" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/dev_requirements.txt b/packages/typespec-python/test/azure/generated/client-namespace/dev_requirements.txt deleted file mode 100644 index 10548647144..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/dev_requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ --e ../../../tools/azure-sdk-tools -../../core/azure-core -aiohttp \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/conftest.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/conftest.py deleted file mode 100644 index 6b58c0a8856..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/conftest.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import os -import pytest -from dotenv import load_dotenv -from devtools_testutils import ( - test_proxy, - add_general_regex_sanitizer, - add_body_key_sanitizer, - add_header_regex_sanitizer, -) - -load_dotenv() - - -# For security, please avoid record sensitive identity information in recordings -@pytest.fixture(scope="session", autouse=True) -def add_sanitizers(test_proxy): - namespacefirst_subscription_id = os.environ.get( - "NAMESPACEFIRST_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" - ) - namespacefirst_tenant_id = os.environ.get("NAMESPACEFIRST_TENANT_ID", "00000000-0000-0000-0000-000000000000") - namespacefirst_client_id = os.environ.get("NAMESPACEFIRST_CLIENT_ID", "00000000-0000-0000-0000-000000000000") - namespacefirst_client_secret = os.environ.get( - "NAMESPACEFIRST_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer(regex=namespacefirst_subscription_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=namespacefirst_tenant_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=namespacefirst_client_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=namespacefirst_client_secret, value="00000000-0000-0000-0000-000000000000") - - namespacesecond_subscription_id = os.environ.get( - "NAMESPACESECOND_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" - ) - namespacesecond_tenant_id = os.environ.get("NAMESPACESECOND_TENANT_ID", "00000000-0000-0000-0000-000000000000") - namespacesecond_client_id = os.environ.get("NAMESPACESECOND_CLIENT_ID", "00000000-0000-0000-0000-000000000000") - namespacesecond_client_secret = os.environ.get( - "NAMESPACESECOND_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" - ) - add_general_regex_sanitizer(regex=namespacesecond_subscription_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=namespacesecond_tenant_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=namespacesecond_client_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=namespacesecond_client_secret, value="00000000-0000-0000-0000-000000000000") - - add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") - add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first.py deleted file mode 100644 index aee7e809ce3..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import ClientNamespaceFirstClientTestBase, NamespaceFirstPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNamespaceFirst(ClientNamespaceFirstClientTestBase): - @NamespaceFirstPreparer() - @recorded_by_proxy - def test_get_first(self, namespacefirst_endpoint): - client = self.create_client(endpoint=namespacefirst_endpoint) - response = client.get_first() - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first_async.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first_async.py deleted file mode 100644 index 57f958a4a7f..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first_async.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import NamespaceFirstPreparer -from testpreparer_async import ClientNamespaceFirstClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNamespaceFirstAsync(ClientNamespaceFirstClientTestBaseAsync): - @NamespaceFirstPreparer() - @recorded_by_proxy_async - async def test_get_first(self, namespacefirst_endpoint): - client = self.create_async_client(endpoint=namespacefirst_endpoint) - response = await client.get_first() - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second.py deleted file mode 100644 index 5f06f4fdf07..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import ClientNamespaceSecondClientTestBase, NamespaceSecondPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNamespaceSecond(ClientNamespaceSecondClientTestBase): - @NamespaceSecondPreparer() - @recorded_by_proxy - def test_get_second(self, namespacesecond_endpoint): - client = self.create_client(endpoint=namespacesecond_endpoint) - response = client.get_second() - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second_async.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second_async.py deleted file mode 100644 index bd09e4206a3..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second_async.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import NamespaceSecondPreparer -from testpreparer_async import ClientNamespaceSecondClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestNamespaceSecondAsync(ClientNamespaceSecondClientTestBaseAsync): - @NamespaceSecondPreparer() - @recorded_by_proxy_async - async def test_get_second(self, namespacesecond_endpoint): - client = self.create_async_client(endpoint=namespacesecond_endpoint) - response = await client.get_second() - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer.py deleted file mode 100644 index e8a57ef35a2..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from client.clientnamespace import ClientNamespaceFirstClient -from client.clientnamespace.second import ClientNamespaceSecondClient -from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer -import functools - - -class ClientNamespaceFirstClientTestBase(AzureRecordedTestCase): - - def create_client(self, endpoint): - credential = self.get_credential(ClientNamespaceFirstClient) - return self.create_client_from_credential( - ClientNamespaceFirstClient, - credential=credential, - endpoint=endpoint, - ) - - -NamespaceFirstPreparer = functools.partial( - PowerShellPreparer, "namespacefirst", namespacefirst_endpoint="https://fake_namespacefirst_endpoint.com" -) - - -class ClientNamespaceSecondClientTestBase(AzureRecordedTestCase): - - def create_client(self, endpoint): - credential = self.get_credential(ClientNamespaceSecondClient) - return self.create_client_from_credential( - ClientNamespaceSecondClient, - credential=credential, - endpoint=endpoint, - ) - - -NamespaceSecondPreparer = functools.partial( - PowerShellPreparer, "namespacesecond", namespacesecond_endpoint="https://fake_namespacesecond_endpoint.com" -) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer_async.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer_async.py deleted file mode 100644 index e6496e014fc..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer_async.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from client.clientnamespace.aio import ClientNamespaceFirstClient -from client.clientnamespace.second.aio import ClientNamespaceSecondClient -from devtools_testutils import AzureRecordedTestCase - - -class ClientNamespaceFirstClientTestBaseAsync(AzureRecordedTestCase): - - def create_async_client(self, endpoint): - credential = self.get_credential(ClientNamespaceFirstClient, is_async=True) - return self.create_client_from_credential( - ClientNamespaceFirstClient, - credential=credential, - endpoint=endpoint, - ) - - -class ClientNamespaceSecondClientTestBaseAsync(AzureRecordedTestCase): - - def create_async_client(self, endpoint): - credential = self.get_credential(ClientNamespaceSecondClient, is_async=True) - return self.create_client_from_credential( - ClientNamespaceSecondClient, - credential=credential, - endpoint=endpoint, - ) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/setup.py b/packages/typespec-python/test/azure/generated/client-namespace/setup.py deleted file mode 100644 index 6aeb05249ae..00000000000 --- a/packages/typespec-python/test/azure/generated/client-namespace/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "client-clientnamespace" -PACKAGE_PPRINT_NAME = "Client Clientnamespace" -PACKAGE_NAMESPACE = "client.clientnamespace" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "client", - ] - ), - include_package_data=True, - package_data={ - "client.clientnamespace": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml new file mode 100644 index 00000000000..ee3321d7ed4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "encode-bytes" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Encode Bytes Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "encode.bytes._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/setup.py b/packages/typespec-python/test/azure/generated/encode-bytes/setup.py deleted file mode 100644 index 1237dec1191..00000000000 --- a/packages/typespec-python/test/azure/generated/encode-bytes/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "encode-bytes" -PACKAGE_PPRINT_NAME = "Encode Bytes" -PACKAGE_NAMESPACE = "encode.bytes" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "encode", - ] - ), - include_package_data=True, - package_data={ - "encode.bytes": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml new file mode 100644 index 00000000000..280b4572fa1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "encode-datetime" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Encode Datetime Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "encode.datetime._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/setup.py b/packages/typespec-python/test/azure/generated/encode-datetime/setup.py deleted file mode 100644 index 0da317dfe1f..00000000000 --- a/packages/typespec-python/test/azure/generated/encode-datetime/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "encode-datetime" -PACKAGE_PPRINT_NAME = "Encode Datetime" -PACKAGE_NAMESPACE = "encode.datetime" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "encode", - ] - ), - include_package_data=True, - package_data={ - "encode.datetime": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml new file mode 100644 index 00000000000..93d4b0ba275 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "encode-duration" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Encode Duration Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "encode.duration._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/encode-duration/setup.py b/packages/typespec-python/test/azure/generated/encode-duration/setup.py deleted file mode 100644 index 3c414bb82e4..00000000000 --- a/packages/typespec-python/test/azure/generated/encode-duration/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "encode-duration" -PACKAGE_PPRINT_NAME = "Encode Duration" -PACKAGE_NAMESPACE = "encode.duration" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "encode", - ] - ), - include_package_data=True, - package_data={ - "encode.duration": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml new file mode 100644 index 00000000000..ac4983ef282 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "encode-numeric" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Encode Numeric Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "encode.numeric._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/setup.py b/packages/typespec-python/test/azure/generated/encode-numeric/setup.py deleted file mode 100644 index 21922925f47..00000000000 --- a/packages/typespec-python/test/azure/generated/encode-numeric/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "encode-numeric" -PACKAGE_PPRINT_NAME = "Encode Numeric" -PACKAGE_NAMESPACE = "encode.numeric" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "encode", - ] - ), - include_package_data=True, - package_data={ - "encode.numeric": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml new file mode 100644 index 00000000000..99258986375 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-basic" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Parameters Basic Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "parameters.basic._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/setup.py b/packages/typespec-python/test/azure/generated/parameters-basic/setup.py deleted file mode 100644 index ad68ab6529d..00000000000 --- a/packages/typespec-python/test/azure/generated/parameters-basic/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-basic" -PACKAGE_PPRINT_NAME = "Parameters Basic" -PACKAGE_NAMESPACE = "parameters.basic" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.basic": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml new file mode 100644 index 00000000000..147680dd980 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-bodyoptionality" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Parameters Bodyoptionality Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "parameters.bodyoptionality._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/setup.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/setup.py deleted file mode 100644 index 194ade60f25..00000000000 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-bodyoptionality" -PACKAGE_PPRINT_NAME = "Parameters Bodyoptionality" -PACKAGE_NAMESPACE = "parameters.bodyoptionality" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.bodyoptionality": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml new file mode 100644 index 00000000000..1cf4d9dfa59 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-collectionformat" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Parameters Collectionformat Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "parameters.collectionformat._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/setup.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/setup.py deleted file mode 100644 index 1ad15329dd7..00000000000 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-collectionformat" -PACKAGE_PPRINT_NAME = "Parameters Collectionformat" -PACKAGE_NAMESPACE = "parameters.collectionformat" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.collectionformat": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml new file mode 100644 index 00000000000..59a823c68a6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-path" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Parameters Path Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "parameters.path._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/parameters-path/setup.py b/packages/typespec-python/test/azure/generated/parameters-path/setup.py deleted file mode 100644 index 5174cbd1b80..00000000000 --- a/packages/typespec-python/test/azure/generated/parameters-path/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-path" -PACKAGE_PPRINT_NAME = "Parameters Path" -PACKAGE_NAMESPACE = "parameters.path" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.path": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml new file mode 100644 index 00000000000..822e5483cad --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-spread" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Parameters Spread Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "parameters.spread._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/setup.py b/packages/typespec-python/test/azure/generated/parameters-spread/setup.py deleted file mode 100644 index 22e8453e322..00000000000 --- a/packages/typespec-python/test/azure/generated/parameters-spread/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-spread" -PACKAGE_PPRINT_NAME = "Parameters Spread" -PACKAGE_NAMESPACE = "parameters.spread" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.spread": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml new file mode 100644 index 00000000000..8d7b9dfe4bb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-contentnegotiation" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Payload Contentnegotiation Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "payload.contentnegotiation._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/setup.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/setup.py deleted file mode 100644 index 048ce8c85a7..00000000000 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-contentnegotiation" -PACKAGE_PPRINT_NAME = "Payload Contentnegotiation" -PACKAGE_NAMESPACE = "payload.contentnegotiation" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.contentnegotiation": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml new file mode 100644 index 00000000000..6cb328e2532 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-jsonmergepatch" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Payload Jsonmergepatch Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "payload.jsonmergepatch._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/setup.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/setup.py deleted file mode 100644 index d98df6211b0..00000000000 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-jsonmergepatch" -PACKAGE_PPRINT_NAME = "Payload Jsonmergepatch" -PACKAGE_NAMESPACE = "payload.jsonmergepatch" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.jsonmergepatch": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml new file mode 100644 index 00000000000..fde796d48f1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-mediatype" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Payload Mediatype Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "payload.mediatype._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/setup.py b/packages/typespec-python/test/azure/generated/payload-media-type/setup.py deleted file mode 100644 index 09bf7e72de5..00000000000 --- a/packages/typespec-python/test/azure/generated/payload-media-type/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-mediatype" -PACKAGE_PPRINT_NAME = "Payload Mediatype" -PACKAGE_NAMESPACE = "payload.mediatype" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.mediatype": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml new file mode 100644 index 00000000000..4fc0267e1e3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-multipart" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Payload Multipart Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "payload.multipart._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/setup.py b/packages/typespec-python/test/azure/generated/payload-multipart/setup.py deleted file mode 100644 index c98b5d7b9ca..00000000000 --- a/packages/typespec-python/test/azure/generated/payload-multipart/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-multipart" -PACKAGE_PPRINT_NAME = "Payload Multipart" -PACKAGE_NAMESPACE = "payload.multipart" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.multipart": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml new file mode 100644 index 00000000000..454b7bcc963 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-pageable" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Payload Pageable Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "payload.pageable._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/setup.py b/packages/typespec-python/test/azure/generated/payload-pageable/setup.py deleted file mode 100644 index 3df329c49a2..00000000000 --- a/packages/typespec-python/test/azure/generated/payload-pageable/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-pageable" -PACKAGE_PPRINT_NAME = "Payload Pageable" -PACKAGE_NAMESPACE = "payload.pageable" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.pageable": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml new file mode 100644 index 00000000000..5aaed93000f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-xml" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Payload Xml Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "payload.xml._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/payload-xml/setup.py b/packages/typespec-python/test/azure/generated/payload-xml/setup.py deleted file mode 100644 index 14f59a83e7a..00000000000 --- a/packages/typespec-python/test/azure/generated/payload-xml/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-xml" -PACKAGE_PPRINT_NAME = "Payload Xml" -PACKAGE_NAMESPACE = "payload.xml" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.xml": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml b/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml new file mode 100644 index 00000000000..c1cab66a0f9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "response-statuscoderange" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Response Statuscoderange Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "response.statuscoderange._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "response", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/setup.py b/packages/typespec-python/test/azure/generated/response-status-code-range/setup.py deleted file mode 100644 index 4320d7ee087..00000000000 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "response-statuscoderange" -PACKAGE_PPRINT_NAME = "Response Statuscoderange" -PACKAGE_NAMESPACE = "response.statuscoderange" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "response", - ] - ), - include_package_data=True, - package_data={ - "response.statuscoderange": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/routes/pyproject.toml b/packages/typespec-python/test/azure/generated/routes/pyproject.toml new file mode 100644 index 00000000000..96dca506f3c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/routes/pyproject.toml @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "routes" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Routes Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "routes._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/routes/setup.py b/packages/typespec-python/test/azure/generated/routes/setup.py deleted file mode 100644 index 26ccdf41f8a..00000000000 --- a/packages/typespec-python/test/azure/generated/routes/setup.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "routes" -PACKAGE_PPRINT_NAME = "Routes" -PACKAGE_NAMESPACE = "routes" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "routes": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/special-words/pyproject.toml b/packages/typespec-python/test/azure/generated/special-words/pyproject.toml new file mode 100644 index 00000000000..7fb250709a4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/pyproject.toml @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specialwords" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specialwords Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specialwords._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/special-words/setup.py b/packages/typespec-python/test/azure/generated/special-words/setup.py deleted file mode 100644 index de3b8a00c2d..00000000000 --- a/packages/typespec-python/test/azure/generated/special-words/setup.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specialwords" -PACKAGE_PPRINT_NAME = "Specialwords" -PACKAGE_NAMESPACE = "specialwords" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "specialwords": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml b/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml new file mode 100644 index 00000000000..0735d72b5f9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "streaming-jsonl" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Streaming Jsonl Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "streaming.jsonl._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "streaming", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/setup.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/setup.py deleted file mode 100644 index 7891d0f2601..00000000000 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "streaming-jsonl" -PACKAGE_PPRINT_NAME = "Streaming Jsonl" -PACKAGE_NAMESPACE = "streaming.jsonl" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "streaming", - ] - ), - include_package_data=True, - package_data={ - "streaming.jsonl": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml new file mode 100644 index 00000000000..223a1165291 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-array" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Array Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.array._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-array/setup.py b/packages/typespec-python/test/azure/generated/typetest-array/setup.py deleted file mode 100644 index 428a77680fd..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-array/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-array" -PACKAGE_PPRINT_NAME = "Typetest Array" -PACKAGE_NAMESPACE = "typetest.array" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - ] - ), - include_package_data=True, - package_data={ - "typetest.array": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/CHANGELOG.md b/packages/typespec-python/test/azure/generated/typetest-dictionary/CHANGELOG.md deleted file mode 100644 index 628743d283a..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Release History - -## 1.0.0b1 (1970-01-01) - -- Initial version diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/LICENSE b/packages/typespec-python/test/azure/generated/typetest-dictionary/LICENSE deleted file mode 100644 index 63447fd8bbb..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) Microsoft Corporation. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/MANIFEST.in b/packages/typespec-python/test/azure/generated/typetest-dictionary/MANIFEST.in deleted file mode 100644 index 8d989eb529c..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include *.md -include LICENSE -include typetest/dictionary/py.typed -recursive-include tests *.py -recursive-include samples *.py *.md -include typetest/__init__.py diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/README.md b/packages/typespec-python/test/azure/generated/typetest-dictionary/README.md deleted file mode 100644 index 0c8d60043c0..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Typetest Dictionary client library for Python - - -## Getting started - -### Install the package - -```bash -python -m pip install typetest-dictionary -``` - -#### Prequisites - -- Python 3.9 or later is required to use this package. -- You need an [Azure subscription][azure_sub] to use this package. -- An existing Typetest Dictionary instance. - - -## Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit https://cla.microsoft.com. - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, -see the Code of Conduct FAQ or contact opencode@microsoft.com with any -additional questions or comments. - - -[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ -[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token -[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials -[azure_identity_pip]: https://pypi.org/project/azure-identity/ -[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential -[pip]: https://pypi.org/project/pip/ -[azure_sub]: https://azure.microsoft.com/free/ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json deleted file mode 100644 index 4ea465f4f09..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "CrossLanguagePackageId": "Type.Dictionary", - "CrossLanguageDefinitionId": { - "typetest.dictionary.models.InnerModel": "Type.Dictionary.InnerModel", - "typetest.dictionary.operations.Int32ValueOperations.get": "Type.Dictionary.Int32Value.get", - "typetest.dictionary.aio.operations.Int32ValueOperations.get": "Type.Dictionary.Int32Value.get", - "typetest.dictionary.operations.Int32ValueOperations.put": "Type.Dictionary.Int32Value.put", - "typetest.dictionary.aio.operations.Int32ValueOperations.put": "Type.Dictionary.Int32Value.put", - "typetest.dictionary.operations.Int64ValueOperations.get": "Type.Dictionary.Int64Value.get", - "typetest.dictionary.aio.operations.Int64ValueOperations.get": "Type.Dictionary.Int64Value.get", - "typetest.dictionary.operations.Int64ValueOperations.put": "Type.Dictionary.Int64Value.put", - "typetest.dictionary.aio.operations.Int64ValueOperations.put": "Type.Dictionary.Int64Value.put", - "typetest.dictionary.operations.BooleanValueOperations.get": "Type.Dictionary.BooleanValue.get", - "typetest.dictionary.aio.operations.BooleanValueOperations.get": "Type.Dictionary.BooleanValue.get", - "typetest.dictionary.operations.BooleanValueOperations.put": "Type.Dictionary.BooleanValue.put", - "typetest.dictionary.aio.operations.BooleanValueOperations.put": "Type.Dictionary.BooleanValue.put", - "typetest.dictionary.operations.StringValueOperations.get": "Type.Dictionary.StringValue.get", - "typetest.dictionary.aio.operations.StringValueOperations.get": "Type.Dictionary.StringValue.get", - "typetest.dictionary.operations.StringValueOperations.put": "Type.Dictionary.StringValue.put", - "typetest.dictionary.aio.operations.StringValueOperations.put": "Type.Dictionary.StringValue.put", - "typetest.dictionary.operations.Float32ValueOperations.get": "Type.Dictionary.Float32Value.get", - "typetest.dictionary.aio.operations.Float32ValueOperations.get": "Type.Dictionary.Float32Value.get", - "typetest.dictionary.operations.Float32ValueOperations.put": "Type.Dictionary.Float32Value.put", - "typetest.dictionary.aio.operations.Float32ValueOperations.put": "Type.Dictionary.Float32Value.put", - "typetest.dictionary.operations.DatetimeValueOperations.get": "Type.Dictionary.DatetimeValue.get", - "typetest.dictionary.aio.operations.DatetimeValueOperations.get": "Type.Dictionary.DatetimeValue.get", - "typetest.dictionary.operations.DatetimeValueOperations.put": "Type.Dictionary.DatetimeValue.put", - "typetest.dictionary.aio.operations.DatetimeValueOperations.put": "Type.Dictionary.DatetimeValue.put", - "typetest.dictionary.operations.DurationValueOperations.get": "Type.Dictionary.DurationValue.get", - "typetest.dictionary.aio.operations.DurationValueOperations.get": "Type.Dictionary.DurationValue.get", - "typetest.dictionary.operations.DurationValueOperations.put": "Type.Dictionary.DurationValue.put", - "typetest.dictionary.aio.operations.DurationValueOperations.put": "Type.Dictionary.DurationValue.put", - "typetest.dictionary.operations.UnknownValueOperations.get": "Type.Dictionary.UnknownValue.get", - "typetest.dictionary.aio.operations.UnknownValueOperations.get": "Type.Dictionary.UnknownValue.get", - "typetest.dictionary.operations.UnknownValueOperations.put": "Type.Dictionary.UnknownValue.put", - "typetest.dictionary.aio.operations.UnknownValueOperations.put": "Type.Dictionary.UnknownValue.put", - "typetest.dictionary.operations.ModelValueOperations.get": "Type.Dictionary.ModelValue.get", - "typetest.dictionary.aio.operations.ModelValueOperations.get": "Type.Dictionary.ModelValue.get", - "typetest.dictionary.operations.ModelValueOperations.put": "Type.Dictionary.ModelValue.put", - "typetest.dictionary.aio.operations.ModelValueOperations.put": "Type.Dictionary.ModelValue.put", - "typetest.dictionary.operations.RecursiveModelValueOperations.get": "Type.Dictionary.RecursiveModelValue.get", - "typetest.dictionary.aio.operations.RecursiveModelValueOperations.get": "Type.Dictionary.RecursiveModelValue.get", - "typetest.dictionary.operations.RecursiveModelValueOperations.put": "Type.Dictionary.RecursiveModelValue.put", - "typetest.dictionary.aio.operations.RecursiveModelValueOperations.put": "Type.Dictionary.RecursiveModelValue.put", - "typetest.dictionary.operations.NullableFloatValueOperations.get": "Type.Dictionary.NullableFloatValue.get", - "typetest.dictionary.aio.operations.NullableFloatValueOperations.get": "Type.Dictionary.NullableFloatValue.get", - "typetest.dictionary.operations.NullableFloatValueOperations.put": "Type.Dictionary.NullableFloatValue.put", - "typetest.dictionary.aio.operations.NullableFloatValueOperations.put": "Type.Dictionary.NullableFloatValue.put" - } -} \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/dev_requirements.txt b/packages/typespec-python/test/azure/generated/typetest-dictionary/dev_requirements.txt deleted file mode 100644 index 10548647144..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/dev_requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ --e ../../../tools/azure-sdk-tools -../../core/azure-core -aiohttp \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/conftest.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/conftest.py deleted file mode 100644 index 694a0f94554..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/conftest.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import os -import pytest -from dotenv import load_dotenv -from devtools_testutils import ( - test_proxy, - add_general_regex_sanitizer, - add_body_key_sanitizer, - add_header_regex_sanitizer, -) - -load_dotenv() - - -# For security, please avoid record sensitive identity information in recordings -@pytest.fixture(scope="session", autouse=True) -def add_sanitizers(test_proxy): - dictionary_subscription_id = os.environ.get("DICTIONARY_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") - dictionary_tenant_id = os.environ.get("DICTIONARY_TENANT_ID", "00000000-0000-0000-0000-000000000000") - dictionary_client_id = os.environ.get("DICTIONARY_CLIENT_ID", "00000000-0000-0000-0000-000000000000") - dictionary_client_secret = os.environ.get("DICTIONARY_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=dictionary_subscription_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=dictionary_tenant_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=dictionary_client_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=dictionary_client_secret, value="00000000-0000-0000-0000-000000000000") - - add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") - add_header_regex_sanitizer(key="Cookie", value="cookie;") - add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations.py deleted file mode 100644 index 066f228c89a..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryBooleanValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_boolean_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.boolean_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_boolean_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.boolean_value.put( - body={"str": bool}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations_async.py deleted file mode 100644 index ea0403b733d..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryBooleanValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_boolean_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.boolean_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_boolean_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.boolean_value.put( - body={"str": bool}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations.py deleted file mode 100644 index 30fb62304ce..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryDatetimeValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_datetime_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.datetime_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_datetime_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.datetime_value.put( - body={"str": "2020-02-20 00:00:00"}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations_async.py deleted file mode 100644 index 3e83eefc827..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryDatetimeValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_datetime_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.datetime_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_datetime_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.datetime_value.put( - body={"str": "2020-02-20 00:00:00"}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations.py deleted file mode 100644 index b0b3e702188..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryDurationValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_duration_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.duration_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_duration_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.duration_value.put( - body={"str": "1 day, 0:00:00"}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations_async.py deleted file mode 100644 index 0d5394008dd..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryDurationValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_duration_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.duration_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_duration_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.duration_value.put( - body={"str": "1 day, 0:00:00"}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations.py deleted file mode 100644 index 859239e7348..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryFloat32ValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_float32_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.float32_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_float32_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.float32_value.put( - body={"str": 0.0}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations_async.py deleted file mode 100644 index a52a03e857f..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryFloat32ValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_float32_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.float32_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_float32_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.float32_value.put( - body={"str": 0.0}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations.py deleted file mode 100644 index a2199a45778..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryInt32ValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_int32_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.int32_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_int32_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.int32_value.put( - body={"str": 0}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations_async.py deleted file mode 100644 index 77d4bb4577d..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryInt32ValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_int32_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.int32_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_int32_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.int32_value.put( - body={"str": 0}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations.py deleted file mode 100644 index 6f7322982d7..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryInt64ValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_int64_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.int64_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_int64_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.int64_value.put( - body={"str": 0}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations_async.py deleted file mode 100644 index 12b6e15ef77..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryInt64ValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_int64_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.int64_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_int64_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.int64_value.put( - body={"str": 0}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations.py deleted file mode 100644 index 040afe8e20b..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryModelValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_model_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.model_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_model_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.model_value.put( - body={"str": {"property": "str", "children": {"str": ...}}}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations_async.py deleted file mode 100644 index 54fbc74db5b..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryModelValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_model_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.model_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_model_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.model_value.put( - body={"str": {"property": "str", "children": {"str": ...}}}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations.py deleted file mode 100644 index 3f17f0f6982..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryNullableFloatValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_nullable_float_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.nullable_float_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_nullable_float_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.nullable_float_value.put( - body={"str": 0.0}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations_async.py deleted file mode 100644 index 1e8f5f07b35..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryNullableFloatValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_nullable_float_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.nullable_float_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_nullable_float_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.nullable_float_value.put( - body={"str": 0.0}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations.py deleted file mode 100644 index fe00987385c..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryRecursiveModelValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_recursive_model_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.recursive_model_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_recursive_model_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.recursive_model_value.put( - body={"str": {"property": "str", "children": {"str": ...}}}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations_async.py deleted file mode 100644 index 63ed9c3ca9f..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryRecursiveModelValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_recursive_model_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.recursive_model_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_recursive_model_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.recursive_model_value.put( - body={"str": {"property": "str", "children": {"str": ...}}}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations.py deleted file mode 100644 index 6309558db05..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryStringValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_string_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.string_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_string_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.string_value.put( - body={"str": "str"}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations_async.py deleted file mode 100644 index 91fdb59db9f..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryStringValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_string_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.string_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_string_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.string_value.put( - body={"str": "str"}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations.py deleted file mode 100644 index e84f0564e91..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils import recorded_by_proxy -from testpreparer import DictionaryClientTestBase, DictionaryPreparer - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryUnknownValueOperations(DictionaryClientTestBase): - @DictionaryPreparer() - @recorded_by_proxy - def test_unknown_value_get(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.unknown_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy - def test_unknown_value_put(self, dictionary_endpoint): - client = self.create_client(endpoint=dictionary_endpoint) - response = client.unknown_value.put( - body={"str": {}}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations_async.py deleted file mode 100644 index 6bd7a2bf28a..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations_async.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from devtools_testutils.aio import recorded_by_proxy_async -from testpreparer import DictionaryPreparer -from testpreparer_async import DictionaryClientTestBaseAsync - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestDictionaryUnknownValueOperationsAsync(DictionaryClientTestBaseAsync): - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_unknown_value_get(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.unknown_value.get() - - # please add some check logic here by yourself - # ... - - @DictionaryPreparer() - @recorded_by_proxy_async - async def test_unknown_value_put(self, dictionary_endpoint): - client = self.create_async_client(endpoint=dictionary_endpoint) - response = await client.unknown_value.put( - body={"str": {}}, - ) - - # please add some check logic here by yourself - # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer.py deleted file mode 100644 index 8f9f9085cc3..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer -import functools -from typetest.dictionary import DictionaryClient - - -class DictionaryClientTestBase(AzureRecordedTestCase): - - def create_client(self, endpoint): - credential = self.get_credential(DictionaryClient) - return self.create_client_from_credential( - DictionaryClient, - credential=credential, - endpoint=endpoint, - ) - - -DictionaryPreparer = functools.partial( - PowerShellPreparer, "dictionary", dictionary_endpoint="https://fake_dictionary_endpoint.com" -) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer_async.py deleted file mode 100644 index d6149b7d469..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer_async.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from devtools_testutils import AzureRecordedTestCase -from typetest.dictionary.aio import DictionaryClient - - -class DictionaryClientTestBaseAsync(AzureRecordedTestCase): - - def create_async_client(self, endpoint): - credential = self.get_credential(DictionaryClient, is_async=True) - return self.create_client_from_credential( - DictionaryClient, - credential=credential, - endpoint=endpoint, - ) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/setup.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/setup.py deleted file mode 100644 index e2cc058460e..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-dictionary" -PACKAGE_PPRINT_NAME = "Typetest Dictionary" -PACKAGE_NAMESPACE = "typetest.dictionary" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - ] - ), - include_package_data=True, - package_data={ - "typetest.dictionary": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/__init__.py deleted file mode 100644 index d55ccad1f57..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/__init__.py deleted file mode 100644 index 635684f627e..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._client import DictionaryClient # type: ignore -from ._version import VERSION - -__version__ = VERSION - -try: - from ._patch import __all__ as _patch_all - from ._patch import * -except ImportError: - _patch_all = [] -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "DictionaryClient", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore - -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py deleted file mode 100644 index 393c329d4ba..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any -from typing_extensions import Self - -from azure.core import PipelineClient -from azure.core.pipeline import policies -from azure.core.rest import HttpRequest, HttpResponse - -from ._configuration import DictionaryClientConfiguration -from ._utils.serialization import Deserializer, Serializer -from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableFloatValueOperations, - RecursiveModelValueOperations, - StringValueOperations, - UnknownValueOperations, -) - - -class DictionaryClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes - """Illustrates various of dictionaries. - - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.dictionary.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.dictionary.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.dictionary.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.dictionary.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.dictionary.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.dictionary.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.dictionary.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.dictionary.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.dictionary.operations.ModelValueOperations - :ivar recursive_model_value: RecursiveModelValueOperations operations - :vartype recursive_model_value: typetest.dictionary.operations.RecursiveModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.dictionary.operations.NullableFloatValueOperations - :keyword endpoint: Service host. Default value is "http://localhost:3000". - :paramtype endpoint: str - """ - - def __init__( # pylint: disable=missing-client-constructor-parameter-credential - self, *, endpoint: str = "http://localhost:3000", **kwargs: Any - ) -> None: - _endpoint = "{endpoint}" - self._config = DictionaryClientConfiguration(endpoint=endpoint, **kwargs) - - _policies = kwargs.pop("policies", None) - if _policies is None: - _policies = [ - policies.RequestIdPolicy(**kwargs), - self._config.headers_policy, - self._config.user_agent_policy, - self._config.proxy_policy, - policies.ContentDecodePolicy(**kwargs), - self._config.redirect_policy, - self._config.retry_policy, - self._config.authentication_policy, - self._config.custom_hook_policy, - self._config.logging_policy, - policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, - self._config.http_logging_policy, - ] - self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) - - self._serialize = Serializer() - self._deserialize = Deserializer() - self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.recursive_model_value = RecursiveModelValueOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.nullable_float_value = NullableFloatValueOperations( - self._client, self._config, self._serialize, self._deserialize - ) - - def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse - """ - - request_copy = deepcopy(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore - - def close(self) -> None: - self._client.close() - - def __enter__(self) -> Self: - self._client.__enter__() - return self - - def __exit__(self, *exc_details: Any) -> None: - self._client.__exit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py deleted file mode 100644 index 4b1915c8ab7..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.pipeline import policies - -from ._version import VERSION - - -class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes - """Configuration for DictionaryClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: Service host. Default value is "http://localhost:3000". - :type endpoint: str - """ - - def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: - - self.endpoint = endpoint - kwargs.setdefault("sdk_moniker", "typetest-dictionary/{}".format(VERSION)) - self.polling_interval = kwargs.get("polling_interval", 30) - self._configure(**kwargs) - - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/__init__.py deleted file mode 100644 index 8026245c2ab..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/model_base.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/model_base.py deleted file mode 100644 index 49d5c725938..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/model_base.py +++ /dev/null @@ -1,1232 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=protected-access, broad-except - -import copy -import calendar -import decimal -import functools -import sys -import logging -import base64 -import re -import typing -import enum -import email.utils -from datetime import datetime, date, time, timedelta, timezone -from json import JSONEncoder -import xml.etree.ElementTree as ET -from collections.abc import MutableMapping -from typing_extensions import Self -import isodate -from azure.core.exceptions import DeserializationError -from azure.core import CaseInsensitiveEnumMeta -from azure.core.pipeline import PipelineResponse -from azure.core.serialization import _Null - -_LOGGER = logging.getLogger(__name__) - -__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] - -TZ_UTC = timezone.utc -_T = typing.TypeVar("_T") - - -def _timedelta_as_isostr(td: timedelta) -> str: - """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' - - Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython - - :param timedelta td: The timedelta to convert - :rtype: str - :return: ISO8601 version of this timedelta - """ - - # Split seconds to larger units - seconds = td.total_seconds() - minutes, seconds = divmod(seconds, 60) - hours, minutes = divmod(minutes, 60) - days, hours = divmod(hours, 24) - - days, hours, minutes = list(map(int, (days, hours, minutes))) - seconds = round(seconds, 6) - - # Build date - date_str = "" - if days: - date_str = "%sD" % days - - if hours or minutes or seconds: - # Build time - time_str = "T" - - # Hours - bigger_exists = date_str or hours - if bigger_exists: - time_str += "{:02}H".format(hours) - - # Minutes - bigger_exists = bigger_exists or minutes - if bigger_exists: - time_str += "{:02}M".format(minutes) - - # Seconds - try: - if seconds.is_integer(): - seconds_string = "{:02}".format(int(seconds)) - else: - # 9 chars long w/ leading 0, 6 digits after decimal - seconds_string = "%09.6f" % seconds - # Remove trailing zeros - seconds_string = seconds_string.rstrip("0") - except AttributeError: # int.is_integer() raises - seconds_string = "{:02}".format(seconds) - - time_str += "{}S".format(seconds_string) - else: - time_str = "" - - return "P" + date_str + time_str - - -def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: - encoded = base64.b64encode(o).decode() - if format == "base64url": - return encoded.strip("=").replace("+", "-").replace("/", "_") - return encoded - - -def _serialize_datetime(o, format: typing.Optional[str] = None): - if hasattr(o, "year") and hasattr(o, "hour"): - if format == "rfc7231": - return email.utils.format_datetime(o, usegmt=True) - if format == "unix-timestamp": - return int(calendar.timegm(o.utctimetuple())) - - # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) - if not o.tzinfo: - iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() - else: - iso_formatted = o.astimezone(TZ_UTC).isoformat() - # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) - return iso_formatted.replace("+00:00", "Z") - # Next try datetime.date or datetime.time - return o.isoformat() - - -def _is_readonly(p): - try: - return p._visibility == ["read"] - except AttributeError: - return False - - -class SdkJSONEncoder(JSONEncoder): - """A JSON encoder that's capable of serializing datetime objects and bytes.""" - - def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): - super().__init__(*args, **kwargs) - self.exclude_readonly = exclude_readonly - self.format = format - - def default(self, o): # pylint: disable=too-many-return-statements - if _is_model(o): - if self.exclude_readonly: - readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] - return {k: v for k, v in o.items() if k not in readonly_props} - return dict(o.items()) - try: - return super(SdkJSONEncoder, self).default(o) - except TypeError: - if isinstance(o, _Null): - return None - if isinstance(o, decimal.Decimal): - return float(o) - if isinstance(o, (bytes, bytearray)): - return _serialize_bytes(o, self.format) - try: - # First try datetime.datetime - return _serialize_datetime(o, self.format) - except AttributeError: - pass - # Last, try datetime.timedelta - try: - return _timedelta_as_isostr(o) - except AttributeError: - # This will be raised when it hits value.total_seconds in the method above - pass - return super(SdkJSONEncoder, self).default(o) - - -_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") -_VALID_RFC7231 = re.compile( - r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" - r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" -) - - -def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: - """Deserialize ISO-8601 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - attr = attr.upper() - match = _VALID_DATE.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - check_decimal = attr.split(".") - if len(check_decimal) > 1: - decimal_str = "" - for digit in check_decimal[1]: - if digit.isdigit(): - decimal_str += digit - else: - break - if len(decimal_str) > 6: - attr = attr.replace(decimal_str, decimal_str[0:6]) - - date_obj = isodate.parse_datetime(attr) - test_utc = date_obj.utctimetuple() - if test_utc.tm_year > 9999 or test_utc.tm_year < 1: - raise OverflowError("Hit max or min date") - return date_obj - - -def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: - """Deserialize RFC7231 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - match = _VALID_RFC7231.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - return email.utils.parsedate_to_datetime(attr) - - -def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: - """Deserialize unix timestamp into Datetime object. - - :param str attr: response string to be deserialized. - :rtype: ~datetime.datetime - :returns: The datetime object from that input - """ - if isinstance(attr, datetime): - # i'm already deserialized - return attr - return datetime.fromtimestamp(attr, TZ_UTC) - - -def _deserialize_date(attr: typing.Union[str, date]) -> date: - """Deserialize ISO-8601 formatted string into Date object. - :param str attr: response string to be deserialized. - :rtype: date - :returns: The date object from that input - """ - # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - if isinstance(attr, date): - return attr - return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore - - -def _deserialize_time(attr: typing.Union[str, time]) -> time: - """Deserialize ISO-8601 formatted string into time object. - - :param str attr: response string to be deserialized. - :rtype: datetime.time - :returns: The time object from that input - """ - if isinstance(attr, time): - return attr - return isodate.parse_time(attr) - - -def _deserialize_bytes(attr): - if isinstance(attr, (bytes, bytearray)): - return attr - return bytes(base64.b64decode(attr)) - - -def _deserialize_bytes_base64(attr): - if isinstance(attr, (bytes, bytearray)): - return attr - padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore - attr = attr + padding # type: ignore - encoded = attr.replace("-", "+").replace("_", "/") - return bytes(base64.b64decode(encoded)) - - -def _deserialize_duration(attr): - if isinstance(attr, timedelta): - return attr - return isodate.parse_duration(attr) - - -def _deserialize_decimal(attr): - if isinstance(attr, decimal.Decimal): - return attr - return decimal.Decimal(str(attr)) - - -def _deserialize_int_as_str(attr): - if isinstance(attr, int): - return attr - return int(attr) - - -_DESERIALIZE_MAPPING = { - datetime: _deserialize_datetime, - date: _deserialize_date, - time: _deserialize_time, - bytes: _deserialize_bytes, - bytearray: _deserialize_bytes, - timedelta: _deserialize_duration, - typing.Any: lambda x: x, - decimal.Decimal: _deserialize_decimal, -} - -_DESERIALIZE_MAPPING_WITHFORMAT = { - "rfc3339": _deserialize_datetime, - "rfc7231": _deserialize_datetime_rfc7231, - "unix-timestamp": _deserialize_datetime_unix_timestamp, - "base64": _deserialize_bytes, - "base64url": _deserialize_bytes_base64, -} - - -def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): - if annotation is int and rf and rf._format == "str": - return _deserialize_int_as_str - if rf and rf._format: - return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) - return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore - - -def _get_type_alias_type(module_name: str, alias_name: str): - types = { - k: v - for k, v in sys.modules[module_name].__dict__.items() - if isinstance(v, typing._GenericAlias) # type: ignore - } - if alias_name not in types: - return alias_name - return types[alias_name] - - -def _get_model(module_name: str, model_name: str): - models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} - module_end = module_name.rsplit(".", 1)[0] - models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) - if isinstance(model_name, str): - model_name = model_name.split(".")[-1] - if model_name not in models: - return model_name - return models[model_name] - - -_UNSET = object() - - -class _MyMutableMapping(MutableMapping[str, typing.Any]): - def __init__(self, data: typing.Dict[str, typing.Any]) -> None: - self._data = data - - def __contains__(self, key: typing.Any) -> bool: - return key in self._data - - def __getitem__(self, key: str) -> typing.Any: - return self._data.__getitem__(key) - - def __setitem__(self, key: str, value: typing.Any) -> None: - self._data.__setitem__(key, value) - - def __delitem__(self, key: str) -> None: - self._data.__delitem__(key) - - def __iter__(self) -> typing.Iterator[typing.Any]: - return self._data.__iter__() - - def __len__(self) -> int: - return self._data.__len__() - - def __ne__(self, other: typing.Any) -> bool: - return not self.__eq__(other) - - def keys(self) -> typing.KeysView[str]: - """ - :returns: a set-like object providing a view on D's keys - :rtype: ~typing.KeysView - """ - return self._data.keys() - - def values(self) -> typing.ValuesView[typing.Any]: - """ - :returns: an object providing a view on D's values - :rtype: ~typing.ValuesView - """ - return self._data.values() - - def items(self) -> typing.ItemsView[str, typing.Any]: - """ - :returns: set-like object providing a view on D's items - :rtype: ~typing.ItemsView - """ - return self._data.items() - - def get(self, key: str, default: typing.Any = None) -> typing.Any: - """ - Get the value for key if key is in the dictionary, else default. - :param str key: The key to look up. - :param any default: The value to return if key is not in the dictionary. Defaults to None - :returns: D[k] if k in D, else d. - :rtype: any - """ - try: - return self[key] - except KeyError: - return default - - @typing.overload - def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ - - @typing.overload - def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs - - @typing.overload - def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs - - def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: - """ - Removes specified key and return the corresponding value. - :param str key: The key to pop. - :param any default: The value to return if key is not in the dictionary - :returns: The value corresponding to the key. - :rtype: any - :raises KeyError: If key is not found and default is not given. - """ - if default is _UNSET: - return self._data.pop(key) - return self._data.pop(key, default) - - def popitem(self) -> typing.Tuple[str, typing.Any]: - """ - Removes and returns some (key, value) pair - :returns: The (key, value) pair. - :rtype: tuple - :raises KeyError: if D is empty. - """ - return self._data.popitem() - - def clear(self) -> None: - """ - Remove all items from D. - """ - self._data.clear() - - def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ - """ - Updates D from mapping/iterable E and F. - :param any args: Either a mapping object or an iterable of key-value pairs. - """ - self._data.update(*args, **kwargs) - - @typing.overload - def setdefault(self, key: str, default: None = None) -> None: ... - - @typing.overload - def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs - - def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: - """ - Same as calling D.get(k, d), and setting D[k]=d if k not found - :param str key: The key to look up. - :param any default: The value to set if key is not in the dictionary - :returns: D[k] if k in D, else d. - :rtype: any - """ - if default is _UNSET: - return self._data.setdefault(key) - return self._data.setdefault(key, default) - - def __eq__(self, other: typing.Any) -> bool: - try: - other_model = self.__class__(other) - except Exception: - return False - return self._data == other_model._data - - def __repr__(self) -> str: - return str(self._data) - - -def _is_model(obj: typing.Any) -> bool: - return getattr(obj, "_is_model", False) - - -def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements - if isinstance(o, list): - return [_serialize(x, format) for x in o] - if isinstance(o, dict): - return {k: _serialize(v, format) for k, v in o.items()} - if isinstance(o, set): - return {_serialize(x, format) for x in o} - if isinstance(o, tuple): - return tuple(_serialize(x, format) for x in o) - if isinstance(o, (bytes, bytearray)): - return _serialize_bytes(o, format) - if isinstance(o, decimal.Decimal): - return float(o) - if isinstance(o, enum.Enum): - return o.value - if isinstance(o, int): - if format == "str": - return str(o) - return o - try: - # First try datetime.datetime - return _serialize_datetime(o, format) - except AttributeError: - pass - # Last, try datetime.timedelta - try: - return _timedelta_as_isostr(o) - except AttributeError: - # This will be raised when it hits value.total_seconds in the method above - pass - return o - - -def _get_rest_field( - attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str -) -> typing.Optional["_RestField"]: - try: - return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) - except StopIteration: - return None - - -def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: - if not rf: - return _serialize(value, None) - if rf._is_multipart_file_input: - return value - if rf._is_model: - return _deserialize(rf._type, value) - if isinstance(value, ET.Element): - value = _deserialize(rf._type, value) - return _serialize(value, rf._format) - - -class Model(_MyMutableMapping): - _is_model = True - # label whether current class's _attr_to_rest_field has been calculated - # could not see _attr_to_rest_field directly because subclass inherits it from parent class - _calculated: typing.Set[str] = set() - - def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: - class_name = self.__class__.__name__ - if len(args) > 1: - raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") - dict_to_pass = { - rest_field._rest_name: rest_field._default - for rest_field in self._attr_to_rest_field.values() - if rest_field._default is not _UNSET - } - if args: # pylint: disable=too-many-nested-blocks - if isinstance(args[0], ET.Element): - existed_attr_keys = [] - model_meta = getattr(self, "_xml", {}) - - for rf in self._attr_to_rest_field.values(): - prop_meta = getattr(rf, "_xml", {}) - xml_name = prop_meta.get("name", rf._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - # attribute - if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) - continue - - # unwrapped element is array - if prop_meta.get("unwrapped", False): - # unwrapped array could either use prop items meta/prop meta - if prop_meta.get("itemsName"): - xml_name = prop_meta.get("itemsName") - xml_ns = prop_meta.get("itemNs") - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - items = args[0].findall(xml_name) # pyright: ignore - if len(items) > 0: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) - continue - - # text element is primitive type - if prop_meta.get("text", False): - if args[0].text is not None: - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) - continue - - # wrapped element could be normal property or array, it should only have one element - item = args[0].find(xml_name) - if item is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) - - # rest thing is additional properties - for e in args[0]: - if e.tag not in existed_attr_keys: - dict_to_pass[e.tag] = _convert_element(e) - else: - dict_to_pass.update( - {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} - ) - else: - non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] - if non_attr_kwargs: - # actual type errors only throw the first wrong keyword arg they see, so following that. - raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") - dict_to_pass.update( - { - self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) - for k, v in kwargs.items() - if v is not None - } - ) - super().__init__(dict_to_pass) - - def copy(self) -> "Model": - return Model(self.__dict__) - - def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: - if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: - # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', - # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' - mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order - attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property - k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") - } - annotations = { - k: v - for mro_class in mros - if hasattr(mro_class, "__annotations__") - for k, v in mro_class.__annotations__.items() - } - for attr, rf in attr_to_rest_field.items(): - rf._module = cls.__module__ - if not rf._type: - rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) - if not rf._rest_name_input: - rf._rest_name_input = attr - cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) - cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") - - return super().__new__(cls) - - def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: - for base in cls.__bases__: - if hasattr(base, "__mapping__"): - base.__mapping__[discriminator or cls.__name__] = cls # type: ignore - - @classmethod - def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: - for v in cls.__dict__.values(): - if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: - return v - return None - - @classmethod - def _deserialize(cls, data, exist_discriminators): - if not hasattr(cls, "__mapping__"): - return cls(data) - discriminator = cls._get_discriminator(exist_discriminators) - if discriminator is None: - return cls(data) - exist_discriminators.append(discriminator._rest_name) - if isinstance(data, ET.Element): - model_meta = getattr(cls, "_xml", {}) - prop_meta = getattr(discriminator, "_xml", {}) - xml_name = prop_meta.get("name", discriminator._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - if data.get(xml_name) is not None: - discriminator_value = data.get(xml_name) - else: - discriminator_value = data.find(xml_name).text # pyright: ignore - else: - discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member - return mapped_cls._deserialize(data, exist_discriminators) - - def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be turned into json using json.dump. - - :keyword bool exclude_readonly: Whether to remove the readonly properties. - :returns: A dict JSON compatible object - :rtype: dict - """ - - result = {} - readonly_props = [] - if exclude_readonly: - readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] - for k, v in self.items(): - if exclude_readonly and k in readonly_props: # pyright: ignore - continue - is_multipart_file_input = False - try: - is_multipart_file_input = next( - rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k - )._is_multipart_file_input - except StopIteration: - pass - result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) - return result - - @staticmethod - def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: - if v is None or isinstance(v, _Null): - return None - if isinstance(v, (list, tuple, set)): - return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) - if isinstance(v, dict): - return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} - return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v - - -def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): - if _is_model(obj): - return obj - return _deserialize(model_deserializer, obj) - - -def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): - if obj is None: - return obj - return _deserialize_with_callable(if_obj_deserializer, obj) - - -def _deserialize_with_union(deserializers, obj): - for deserializer in deserializers: - try: - return _deserialize(deserializer, obj) - except DeserializationError: - pass - raise DeserializationError() - - -def _deserialize_dict( - value_deserializer: typing.Optional[typing.Callable], - module: typing.Optional[str], - obj: typing.Dict[typing.Any, typing.Any], -): - if obj is None: - return obj - if isinstance(obj, ET.Element): - obj = {child.tag: child for child in obj} - return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} - - -def _deserialize_multiple_sequence( - entry_deserializers: typing.List[typing.Optional[typing.Callable]], - module: typing.Optional[str], - obj, -): - if obj is None: - return obj - return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) - - -def _deserialize_sequence( - deserializer: typing.Optional[typing.Callable], - module: typing.Optional[str], - obj, -): - if obj is None: - return obj - if isinstance(obj, ET.Element): - obj = list(obj) - return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) - - -def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: - return sorted( - types, - key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), - ) - - -def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches - annotation: typing.Any, - module: typing.Optional[str], - rf: typing.Optional["_RestField"] = None, -) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: - if not annotation: - return None - - # is it a type alias? - if isinstance(annotation, str): - if module is not None: - annotation = _get_type_alias_type(module, annotation) - - # is it a forward ref / in quotes? - if isinstance(annotation, (str, typing.ForwardRef)): - try: - model_name = annotation.__forward_arg__ # type: ignore - except AttributeError: - model_name = annotation - if module is not None: - annotation = _get_model(module, model_name) # type: ignore - - try: - if module and _is_model(annotation): - if rf: - rf._is_model = True - - return functools.partial(_deserialize_model, annotation) # pyright: ignore - except Exception: - pass - - # is it a literal? - try: - if annotation.__origin__ is typing.Literal: # pyright: ignore - return None - except AttributeError: - pass - - # is it optional? - try: - if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore - if len(annotation.__args__) <= 2: # pyright: ignore - if_obj_deserializer = _get_deserialize_callable_from_annotation( - next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore - ) - - return functools.partial(_deserialize_with_optional, if_obj_deserializer) - # the type is Optional[Union[...]], we need to remove the None type from the Union - annotation_copy = copy.copy(annotation) - annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore - return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) - except AttributeError: - pass - - # is it union? - if getattr(annotation, "__origin__", None) is typing.Union: - # initial ordering is we make `string` the last deserialization option, because it is often them most generic - deserializers = [ - _get_deserialize_callable_from_annotation(arg, module, rf) - for arg in _sorted_annotations(annotation.__args__) # pyright: ignore - ] - - return functools.partial(_deserialize_with_union, deserializers) - - try: - if annotation._name == "Dict": # pyright: ignore - value_deserializer = _get_deserialize_callable_from_annotation( - annotation.__args__[1], module, rf # pyright: ignore - ) - - return functools.partial( - _deserialize_dict, - value_deserializer, - module, - ) - except (AttributeError, IndexError): - pass - try: - if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore - if len(annotation.__args__) > 1: # pyright: ignore - entry_deserializers = [ - _get_deserialize_callable_from_annotation(dt, module, rf) - for dt in annotation.__args__ # pyright: ignore - ] - return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) - deserializer = _get_deserialize_callable_from_annotation( - annotation.__args__[0], module, rf # pyright: ignore - ) - - return functools.partial(_deserialize_sequence, deserializer, module) - except (TypeError, IndexError, AttributeError, SyntaxError): - pass - - def _deserialize_default( - deserializer, - obj, - ): - if obj is None: - return obj - try: - return _deserialize_with_callable(deserializer, obj) - except Exception: - pass - return obj - - if get_deserializer(annotation, rf): - return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) - - return functools.partial(_deserialize_default, annotation) - - -def _deserialize_with_callable( - deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], - value: typing.Any, -): # pylint: disable=too-many-return-statements - try: - if value is None or isinstance(value, _Null): - return None - if isinstance(value, ET.Element): - if deserializer is str: - return value.text or "" - if deserializer is int: - return int(value.text) if value.text else None - if deserializer is float: - return float(value.text) if value.text else None - if deserializer is bool: - return value.text == "true" if value.text else None - if deserializer is None: - return value - if deserializer in [int, float, bool]: - return deserializer(value) - if isinstance(deserializer, CaseInsensitiveEnumMeta): - try: - return deserializer(value) - except ValueError: - # for unknown value, return raw value - return value - if isinstance(deserializer, type) and issubclass(deserializer, Model): - return deserializer._deserialize(value, []) - return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) - except Exception as e: - raise DeserializationError() from e - - -def _deserialize( - deserializer: typing.Any, - value: typing.Any, - module: typing.Optional[str] = None, - rf: typing.Optional["_RestField"] = None, - format: typing.Optional[str] = None, -) -> typing.Any: - if isinstance(value, PipelineResponse): - value = value.http_response.json() - if rf is None and format: - rf = _RestField(format=format) - if not isinstance(deserializer, functools.partial): - deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) - return _deserialize_with_callable(deserializer, value) - - -def _failsafe_deserialize( - deserializer: typing.Any, - value: typing.Any, - module: typing.Optional[str] = None, - rf: typing.Optional["_RestField"] = None, - format: typing.Optional[str] = None, -) -> typing.Any: - try: - return _deserialize(deserializer, value, module, rf, format) - except DeserializationError: - _LOGGER.warning( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - -def _failsafe_deserialize_xml( - deserializer: typing.Any, - value: typing.Any, -) -> typing.Any: - try: - return _deserialize_xml(deserializer, value) - except DeserializationError: - _LOGGER.warning( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - -class _RestField: - def __init__( - self, - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - is_discriminator: bool = False, - visibility: typing.Optional[typing.List[str]] = None, - default: typing.Any = _UNSET, - format: typing.Optional[str] = None, - is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, - ): - self._type = type - self._rest_name_input = name - self._module: typing.Optional[str] = None - self._is_discriminator = is_discriminator - self._visibility = visibility - self._is_model = False - self._default = default - self._format = format - self._is_multipart_file_input = is_multipart_file_input - self._xml = xml if xml is not None else {} - - @property - def _class_type(self) -> typing.Any: - return getattr(self._type, "args", [None])[0] - - @property - def _rest_name(self) -> str: - if self._rest_name_input is None: - raise ValueError("Rest name was never set") - return self._rest_name_input - - def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin - # by this point, type and rest_name will have a value bc we default - # them in __new__ of the Model class - item = obj.get(self._rest_name) - if item is None: - return item - if self._is_model: - return item - return _deserialize(self._type, _serialize(item, self._format), rf=self) - - def __set__(self, obj: Model, value) -> None: - if value is None: - # we want to wipe out entries if users set attr to None - try: - obj.__delitem__(self._rest_name) - except KeyError: - pass - return - if self._is_model: - if not _is_model(value): - value = _deserialize(self._type, value) - obj.__setitem__(self._rest_name, value) - return - obj.__setitem__(self._rest_name, _serialize(value, self._format)) - - def _get_deserialize_callable_from_annotation( - self, annotation: typing.Any - ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: - return _get_deserialize_callable_from_annotation(annotation, self._module, self) - - -def rest_field( - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, - default: typing.Any = _UNSET, - format: typing.Optional[str] = None, - is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, -) -> typing.Any: - return _RestField( - name=name, - type=type, - visibility=visibility, - default=default, - format=format, - is_multipart_file_input=is_multipart_file_input, - xml=xml, - ) - - -def rest_discriminator( - *, - name: typing.Optional[str] = None, - type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, -) -> typing.Any: - return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) - - -def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: - """Serialize a model to XML. - - :param Model model: The model to serialize. - :param bool exclude_readonly: Whether to exclude readonly properties. - :returns: The XML representation of the model. - :rtype: str - """ - return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore - - -def _get_element( - o: typing.Any, - exclude_readonly: bool = False, - parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, - wrapped_element: typing.Optional[ET.Element] = None, -) -> typing.Union[ET.Element, typing.List[ET.Element]]: - if _is_model(o): - model_meta = getattr(o, "_xml", {}) - - # if prop is a model, then use the prop element directly, else generate a wrapper of model - if wrapped_element is None: - wrapped_element = _create_xml_element( - model_meta.get("name", o.__class__.__name__), - model_meta.get("prefix"), - model_meta.get("ns"), - ) - - readonly_props = [] - if exclude_readonly: - readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] - - for k, v in o.items(): - # do not serialize readonly properties - if exclude_readonly and k in readonly_props: - continue - - prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) - if prop_rest_field: - prop_meta = getattr(prop_rest_field, "_xml").copy() - # use the wire name as xml name if no specific name is set - if prop_meta.get("name") is None: - prop_meta["name"] = k - else: - # additional properties will not have rest field, use the wire name as xml name - prop_meta = {"name": k} - - # if no ns for prop, use model's - if prop_meta.get("ns") is None and model_meta.get("ns"): - prop_meta["ns"] = model_meta.get("ns") - prop_meta["prefix"] = model_meta.get("prefix") - - if prop_meta.get("unwrapped", False): - # unwrapped could only set on array - wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) - elif prop_meta.get("text", False): - # text could only set on primitive type - wrapped_element.text = _get_primitive_type_value(v) - elif prop_meta.get("attribute", False): - xml_name = prop_meta.get("name", k) - if prop_meta.get("ns"): - ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore - xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore - # attribute should be primitive type - wrapped_element.set(xml_name, _get_primitive_type_value(v)) - else: - # other wrapped prop element - wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) - return wrapped_element - if isinstance(o, list): - return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore - if isinstance(o, dict): - result = [] - for k, v in o.items(): - result.append( - _get_wrapped_element( - v, - exclude_readonly, - { - "name": k, - "ns": parent_meta.get("ns") if parent_meta else None, - "prefix": parent_meta.get("prefix") if parent_meta else None, - }, - ) - ) - return result - - # primitive case need to create element based on parent_meta - if parent_meta: - return _get_wrapped_element( - o, - exclude_readonly, - { - "name": parent_meta.get("itemsName", parent_meta.get("name")), - "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), - "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), - }, - ) - - raise ValueError("Could not serialize value into xml: " + o) - - -def _get_wrapped_element( - v: typing.Any, - exclude_readonly: bool, - meta: typing.Optional[typing.Dict[str, typing.Any]], -) -> ET.Element: - wrapped_element = _create_xml_element( - meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None - ) - if isinstance(v, (dict, list)): - wrapped_element.extend(_get_element(v, exclude_readonly, meta)) - elif _is_model(v): - _get_element(v, exclude_readonly, meta, wrapped_element) - else: - wrapped_element.text = _get_primitive_type_value(v) - return wrapped_element - - -def _get_primitive_type_value(v) -> str: - if v is True: - return "true" - if v is False: - return "false" - if isinstance(v, _Null): - return "" - return str(v) - - -def _create_xml_element(tag, prefix=None, ns=None): - if prefix and ns: - ET.register_namespace(prefix, ns) - if ns: - return ET.Element("{" + ns + "}" + tag) - return ET.Element(tag) - - -def _deserialize_xml( - deserializer: typing.Any, - value: str, -) -> typing.Any: - element = ET.fromstring(value) # nosec - return _deserialize(deserializer, element) - - -def _convert_element(e: ET.Element): - # dict case - if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: - dict_result: typing.Dict[str, typing.Any] = {} - for child in e: - if dict_result.get(child.tag) is not None: - if isinstance(dict_result[child.tag], list): - dict_result[child.tag].append(_convert_element(child)) - else: - dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] - else: - dict_result[child.tag] = _convert_element(child) - dict_result.update(e.attrib) - return dict_result - # array case - if len(e) > 0: - array_result: typing.List[typing.Any] = [] - for child in e: - array_result.append(_convert_element(child)) - return array_result - # primitive case - return e.text diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/serialization.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/serialization.py deleted file mode 100644 index eb86ea23c96..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/serialization.py +++ /dev/null @@ -1,2032 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -# pyright: reportUnnecessaryTypeIgnoreComment=false - -from base64 import b64decode, b64encode -import calendar -import datetime -import decimal -import email -from enum import Enum -import json -import logging -import re -import sys -import codecs -from typing import ( - Dict, - Any, - cast, - Optional, - Union, - AnyStr, - IO, - Mapping, - Callable, - MutableMapping, - List, -) - -try: - from urllib import quote # type: ignore -except ImportError: - from urllib.parse import quote -import xml.etree.ElementTree as ET - -import isodate # type: ignore -from typing_extensions import Self - -from azure.core.exceptions import DeserializationError, SerializationError -from azure.core.serialization import NULL as CoreNull - -_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") - -JSON = MutableMapping[str, Any] - - -class RawDeserializer: - - # Accept "text" because we're open minded people... - JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") - - # Name used in context - CONTEXT_NAME = "deserialized_data" - - @classmethod - def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: - """Decode data according to content-type. - - Accept a stream of data as well, but will be load at once in memory for now. - - If no content-type, will return the string version (not bytes, not stream) - - :param data: Input, could be bytes or stream (will be decoded with UTF8) or text - :type data: str or bytes or IO - :param str content_type: The content type. - :return: The deserialized data. - :rtype: object - """ - if hasattr(data, "read"): - # Assume a stream - data = cast(IO, data).read() - - if isinstance(data, bytes): - data_as_str = data.decode(encoding="utf-8-sig") - else: - # Explain to mypy the correct type. - data_as_str = cast(str, data) - - # Remove Byte Order Mark if present in string - data_as_str = data_as_str.lstrip(_BOM) - - if content_type is None: - return data - - if cls.JSON_REGEXP.match(content_type): - try: - return json.loads(data_as_str) - except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) from err - elif "xml" in (content_type or []): - try: - - try: - if isinstance(data, unicode): # type: ignore - # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string - data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore - except NameError: - pass - - return ET.fromstring(data_as_str) # nosec - except ET.ParseError as err: - # It might be because the server has an issue, and returned JSON with - # content-type XML.... - # So let's try a JSON load, and if it's still broken - # let's flow the initial exception - def _json_attemp(data): - try: - return True, json.loads(data) - except ValueError: - return False, None # Don't care about this one - - success, json_result = _json_attemp(data) - if success: - return json_result - # If i'm here, it's not JSON, it's not XML, let's scream - # and raise the last context in this block (the XML exception) - # The function hack is because Py2.7 messes up with exception - # context otherwise. - _LOGGER.critical("Wasn't XML not JSON, failing") - raise DeserializationError("XML is invalid") from err - elif content_type.startswith("text/"): - return data_as_str - raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) - - @classmethod - def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: - """Deserialize from HTTP response. - - Use bytes and headers to NOT use any requests/aiohttp or whatever - specific implementation. - Headers will tested for "content-type" - - :param bytes body_bytes: The body of the response. - :param dict headers: The headers of the response. - :returns: The deserialized data. - :rtype: object - """ - # Try to use content-type from headers if available - content_type = None - if "content-type" in headers: - content_type = headers["content-type"].split(";")[0].strip().lower() - # Ouch, this server did not declare what it sent... - # Let's guess it's JSON... - # Also, since Autorest was considering that an empty body was a valid JSON, - # need that test as well.... - else: - content_type = "application/json" - - if body_bytes: - return cls.deserialize_from_text(body_bytes, content_type) - return None - - -_LOGGER = logging.getLogger(__name__) - -try: - _long_type = long # type: ignore -except NameError: - _long_type = int - -TZ_UTC = datetime.timezone.utc - -_FLATTEN = re.compile(r"(? None: - self.additional_properties: Optional[Dict[str, Any]] = {} - for k in kwargs: # pylint: disable=consider-using-dict-items - if k not in self._attribute_map: - _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) - elif k in self._validation and self._validation[k].get("readonly", False): - _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) - else: - setattr(self, k, kwargs[k]) - - def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes. - - :param object other: The object to compare - :returns: True if objects are equal - :rtype: bool - """ - if isinstance(other, self.__class__): - return self.__dict__ == other.__dict__ - return False - - def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes. - - :param object other: The object to compare - :returns: True if objects are not equal - :rtype: bool - """ - return not self.__eq__(other) - - def __str__(self) -> str: - return str(self.__dict__) - - @classmethod - def enable_additional_properties_sending(cls) -> None: - cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} - - @classmethod - def is_xml_model(cls) -> bool: - try: - cls._xml_map # type: ignore - except AttributeError: - return False - return True - - @classmethod - def _create_xml_node(cls): - """Create XML node. - - :returns: The XML node - :rtype: xml.etree.ElementTree.Element - """ - try: - xml_map = cls._xml_map # type: ignore - except AttributeError: - xml_map = {} - - return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - - def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: - """Return the JSON that would be sent to server from this model. - - This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. - - If you want XML serialization, you can pass the kwargs is_xml=True. - - :param bool keep_readonly: If you want to serialize the readonly attributes - :returns: A dict JSON compatible object - :rtype: dict - """ - serializer = Serializer(self._infer_class_models()) - return serializer._serialize( # type: ignore # pylint: disable=protected-access - self, keep_readonly=keep_readonly, **kwargs - ) - - def as_dict( - self, - keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, - **kwargs: Any - ) -> JSON: - """Return a dict that can be serialized using json.dump. - - Advanced usage might optionally use a callback as parameter: - - .. code::python - - def my_key_transformer(key, attr_desc, value): - return key - - Key is the attribute name used in Python. Attr_desc - is a dict of metadata. Currently contains 'type' with the - msrest type and 'key' with the RestAPI encoded key. - Value is the current value in this object. - - The string returned will be used to serialize the key. - If the return type is a list, this is considered hierarchical - result dict. - - See the three examples in this file: - - - attribute_transformer - - full_restapi_key_transformer - - last_restapi_key_transformer - - If you want XML serialization, you can pass the kwargs is_xml=True. - - :param bool keep_readonly: If you want to serialize the readonly attributes - :param function key_transformer: A key transformer function. - :returns: A dict JSON compatible object - :rtype: dict - """ - serializer = Serializer(self._infer_class_models()) - return serializer._serialize( # type: ignore # pylint: disable=protected-access - self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs - ) - - @classmethod - def _infer_class_models(cls): - try: - str_models = cls.__module__.rsplit(".", 1)[0] - models = sys.modules[str_models] - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - if cls.__name__ not in client_models: - raise ValueError("Not Autorest generated code") - except Exception: # pylint: disable=broad-exception-caught - # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. - client_models = {cls.__name__: cls} - return client_models - - @classmethod - def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: - """Parse a str using the RestAPI syntax and return a model. - - :param str data: A str using RestAPI structure. JSON by default. - :param str content_type: JSON by default, set application/xml if XML. - :returns: An instance of this model - :raises DeserializationError: if something went wrong - :rtype: Self - """ - deserializer = Deserializer(cls._infer_class_models()) - return deserializer(cls.__name__, data, content_type=content_type) # type: ignore - - @classmethod - def from_dict( - cls, - data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, - content_type: Optional[str] = None, - ) -> Self: - """Parse a dict using given key extractor return a model. - - By default consider key - extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor - and last_rest_key_case_insensitive_extractor) - - :param dict data: A dict using RestAPI structure - :param function key_extractors: A key extractor function. - :param str content_type: JSON by default, set application/xml if XML. - :returns: An instance of this model - :raises DeserializationError: if something went wrong - :rtype: Self - """ - deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( # type: ignore - [ # type: ignore - attribute_key_case_insensitive_extractor, - rest_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor, - ] - if key_extractors is None - else key_extractors - ) - return deserializer(cls.__name__, data, content_type=content_type) # type: ignore - - @classmethod - def _flatten_subtype(cls, key, objects): - if "_subtype_map" not in cls.__dict__: - return {} - result = dict(cls._subtype_map[key]) - for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access - return result - - @classmethod - def _classify(cls, response, objects): - """Check the class _subtype_map for any child classes. - We want to ignore any inherited _subtype_maps. - - :param dict response: The initial data - :param dict objects: The class objects - :returns: The class to be used - :rtype: class - """ - for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): - subtype_value = None - - if not isinstance(response, ET.Element): - rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) - else: - subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) - if subtype_value: - # Try to match base class. Can be class name only - # (bug to fix in Autorest to support x-ms-discriminator-name) - if cls.__name__ == subtype_value: - return cls - flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) - try: - return objects[flatten_mapping_type[subtype_value]] # type: ignore - except KeyError: - _LOGGER.warning( - "Subtype value %s has no mapping, use base class %s.", - subtype_value, - cls.__name__, - ) - break - else: - _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) - break - return cls - - @classmethod - def _get_rest_key_parts(cls, attr_key): - """Get the RestAPI key of this attr, split it and decode part - :param str attr_key: Attribute key must be in attribute_map. - :returns: A list of RestAPI part - :rtype: list - """ - rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) - return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] - - -def _decode_attribute_map_key(key): - """This decode a key in an _attribute_map to the actual key we want to look at - inside the received data. - - :param str key: A key string from the generated code - :returns: The decoded key - :rtype: str - """ - return key.replace("\\.", ".") - - -class Serializer: # pylint: disable=too-many-public-methods - """Request object model serializer.""" - - basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - - _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} - days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} - months = { - 1: "Jan", - 2: "Feb", - 3: "Mar", - 4: "Apr", - 5: "May", - 6: "Jun", - 7: "Jul", - 8: "Aug", - 9: "Sep", - 10: "Oct", - 11: "Nov", - 12: "Dec", - } - validation = { - "min_length": lambda x, y: len(x) < y, - "max_length": lambda x, y: len(x) > y, - "minimum": lambda x, y: x < y, - "maximum": lambda x, y: x > y, - "minimum_ex": lambda x, y: x <= y, - "maximum_ex": lambda x, y: x >= y, - "min_items": lambda x, y: len(x) < y, - "max_items": lambda x, y: len(x) > y, - "pattern": lambda x, y: not re.match(y, x, re.UNICODE), - "unique": lambda x, y: len(x) != len(set(x)), - "multiple": lambda x, y: x % y != 0, - } - - def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: - self.serialize_type = { - "iso-8601": Serializer.serialize_iso, - "rfc-1123": Serializer.serialize_rfc, - "unix-time": Serializer.serialize_unix, - "duration": Serializer.serialize_duration, - "date": Serializer.serialize_date, - "time": Serializer.serialize_time, - "decimal": Serializer.serialize_decimal, - "long": Serializer.serialize_long, - "bytearray": Serializer.serialize_bytearray, - "base64": Serializer.serialize_base64, - "object": self.serialize_object, - "[]": self.serialize_iter, - "{}": self.serialize_dict, - } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} - self.key_transformer = full_restapi_key_transformer - self.client_side_validation = True - - def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals - self, target_obj, data_type=None, **kwargs - ): - """Serialize data into a string according to type. - - :param object target_obj: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str, dict - :raises SerializationError: if serialization fails. - :returns: The serialized data. - """ - key_transformer = kwargs.get("key_transformer", self.key_transformer) - keep_readonly = kwargs.get("keep_readonly", False) - if target_obj is None: - return None - - attr_name = None - class_name = target_obj.__class__.__name__ - - if data_type: - return self.serialize_data(target_obj, data_type, **kwargs) - - if not hasattr(target_obj, "_attribute_map"): - data_type = type(target_obj).__name__ - if data_type in self.basic_types.values(): - return self.serialize_data(target_obj, data_type, **kwargs) - - # Force "is_xml" kwargs if we detect a XML model - try: - is_xml_model_serialization = kwargs["is_xml"] - except KeyError: - is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) - - serialized = {} - if is_xml_model_serialization: - serialized = target_obj._create_xml_node() # pylint: disable=protected-access - try: - attributes = target_obj._attribute_map # pylint: disable=protected-access - for attr, attr_desc in attributes.items(): - attr_name = attr - if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access - attr_name, {} - ).get("readonly", False): - continue - - if attr_name == "additional_properties" and attr_desc["key"] == "": - if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) - continue - try: - - orig_attr = getattr(target_obj, attr) - if is_xml_model_serialization: - pass # Don't provide "transformer" for XML for now. Keep "orig_attr" - else: # JSON - keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) - keys = keys if isinstance(keys, list) else [keys] - - kwargs["serialization_ctxt"] = attr_desc - new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) - - if is_xml_model_serialization: - xml_desc = attr_desc.get("xml", {}) - xml_name = xml_desc.get("name", attr_desc["key"]) - xml_prefix = xml_desc.get("prefix", None) - xml_ns = xml_desc.get("ns", None) - if xml_desc.get("attr", False): - if xml_ns: - ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - serialized.set(xml_name, new_attr) # type: ignore - continue - if xml_desc.get("text", False): - serialized.text = new_attr # type: ignore - continue - if isinstance(new_attr, list): - serialized.extend(new_attr) # type: ignore - elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, - # we MUST replace the tag with the local tag. But keeping the namespaces. - if "name" not in getattr(orig_attr, "_xml_map", {}): - splitted_tag = new_attr.tag.split("}") - if len(splitted_tag) == 2: # Namespace - new_attr.tag = "}".join([splitted_tag[0], xml_name]) - else: - new_attr.tag = xml_name - serialized.append(new_attr) # type: ignore - else: # That's a basic type - # Integrate namespace if necessary - local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) - local_node.text = str(new_attr) - serialized.append(local_node) # type: ignore - else: # JSON - for k in reversed(keys): # type: ignore - new_attr = {k: new_attr} - - _new_attr = new_attr - _serialized = serialized - for k in keys: # type: ignore - if k not in _serialized: - _serialized.update(_new_attr) # type: ignore - _new_attr = _new_attr[k] # type: ignore - _serialized = _serialized[k] - except ValueError as err: - if isinstance(err, SerializationError): - raise - - except (AttributeError, KeyError, TypeError) as err: - msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) - raise SerializationError(msg) from err - return serialized - - def body(self, data, data_type, **kwargs): - """Serialize data intended for a request body. - - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: dict - :raises SerializationError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized request body - """ - - # Just in case this is a dict - internal_data_type_str = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type_str, None) - try: - is_xml_model_serialization = kwargs["is_xml"] - except KeyError: - if internal_data_type and issubclass(internal_data_type, Model): - is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) - else: - is_xml_model_serialization = False - if internal_data_type and not isinstance(internal_data_type, Enum): - try: - deserializer = Deserializer(self.dependencies) - # Since it's on serialization, it's almost sure that format is not JSON REST - # We're not able to deal with additional properties for now. - deserializer.additional_properties_detection = False - if is_xml_model_serialization: - deserializer.key_extractors = [ # type: ignore - attribute_key_case_insensitive_extractor, - ] - else: - deserializer.key_extractors = [ - rest_key_case_insensitive_extractor, - attribute_key_case_insensitive_extractor, - last_rest_key_case_insensitive_extractor, - ] - data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access - except DeserializationError as err: - raise SerializationError("Unable to build a model: " + str(err)) from err - - return self._serialize(data, data_type, **kwargs) - - def url(self, name, data, data_type, **kwargs): - """Serialize data intended for a URL path. - - :param str name: The name of the URL path parameter. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str - :returns: The serialized URL path - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - """ - try: - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - - if kwargs.get("skip_quote") is True: - output = str(output) - output = output.replace("{", quote("{")).replace("}", quote("}")) - else: - output = quote(str(output), safe="") - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return output - - def query(self, name, data, data_type, **kwargs): - """Serialize data intended for a URL query. - - :param str name: The name of the query parameter. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str, list - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized query parameter - """ - try: - # Treat the list aside, since we don't want to encode the div separator - if data_type.startswith("["): - internal_data_type = data_type[1:-1] - do_quote = not kwargs.get("skip_quote", False) - return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) - - # Not a list, regular serialization - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - if kwargs.get("skip_quote") is True: - output = str(output) - else: - output = quote(str(output), safe="") - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return str(output) - - def header(self, name, data, data_type, **kwargs): - """Serialize data intended for a request header. - - :param str name: The name of the header. - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :rtype: str - :raises TypeError: if serialization fails. - :raises ValueError: if data is None - :returns: The serialized header - """ - try: - if data_type in ["[str]"]: - data = ["" if d is None else d for d in data] - - output = self.serialize_data(data, data_type, **kwargs) - if data_type == "bool": - output = json.dumps(output) - except SerializationError as exc: - raise TypeError("{} must be type {}.".format(name, data_type)) from exc - return str(output) - - def serialize_data(self, data, data_type, **kwargs): - """Serialize generic data according to supplied data type. - - :param object data: The data to be serialized. - :param str data_type: The type to be serialized from. - :raises AttributeError: if required data is None. - :raises ValueError: if data is None - :raises SerializationError: if serialization fails. - :returns: The serialized data. - :rtype: str, int, float, bool, dict, list - """ - if data is None: - raise ValueError("No value for given attribute") - - try: - if data is CoreNull: - return None - if data_type in self.basic_types.values(): - return self.serialize_basic(data, data_type, **kwargs) - - if data_type in self.serialize_type: - return self.serialize_type[data_type](data, **kwargs) - - # If dependencies is empty, try with current data class - # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) - if issubclass(enum_type, Enum): - return Serializer.serialize_enum(data, enum_obj=enum_type) - - iter_type = data_type[0] + data_type[-1] - if iter_type in self.serialize_type: - return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) - - except (ValueError, TypeError) as err: - msg = "Unable to serialize value: {!r} as type: {!r}." - raise SerializationError(msg.format(data, data_type)) from err - return self._serialize(data, **kwargs) - - @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements - custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) - if custom_serializer: - return custom_serializer - if kwargs.get("is_xml", False): - return cls._xml_basic_types_serializers.get(data_type) - - @classmethod - def serialize_basic(cls, data, data_type, **kwargs): - """Serialize basic builting data type. - Serializes objects to str, int, float or bool. - - Possible kwargs: - - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - - is_xml bool : If set, use xml_basic_types_serializers - - :param obj data: Object to be serialized. - :param str data_type: Type of object in the iterable. - :rtype: str, int, float, bool - :return: serialized object - """ - custom_serializer = cls._get_custom_serializers(data_type, **kwargs) - if custom_serializer: - return custom_serializer(data) - if data_type == "str": - return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec # pylint: disable=eval-used - - @classmethod - def serialize_unicode(cls, data): - """Special handling for serializing unicode strings in Py2. - Encode to UTF-8 if unicode, otherwise handle as a str. - - :param str data: Object to be serialized. - :rtype: str - :return: serialized object - """ - try: # If I received an enum, return its value - return data.value - except AttributeError: - pass - - try: - if isinstance(data, unicode): # type: ignore - # Don't change it, JSON and XML ElementTree are totally able - # to serialize correctly u'' strings - return data - except NameError: - return str(data) - return str(data) - - def serialize_iter(self, data, iter_type, div=None, **kwargs): - """Serialize iterable. - - Supported kwargs: - - serialization_ctxt dict : The current entry of _attribute_map, or same format. - serialization_ctxt['type'] should be same as data_type. - - is_xml bool : If set, serialize as XML - - :param list data: Object to be serialized. - :param str iter_type: Type of object in the iterable. - :param str div: If set, this str will be used to combine the elements - in the iterable into a combined string. Default is 'None'. - Defaults to False. - :rtype: list, str - :return: serialized iterable - """ - if isinstance(data, str): - raise SerializationError("Refuse str type as a valid iter type.") - - serialization_ctxt = kwargs.get("serialization_ctxt", {}) - is_xml = kwargs.get("is_xml", False) - - serialized = [] - for d in data: - try: - serialized.append(self.serialize_data(d, iter_type, **kwargs)) - except ValueError as err: - if isinstance(err, SerializationError): - raise - serialized.append(None) - - if kwargs.get("do_quote", False): - serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] - - if div: - serialized = ["" if s is None else str(s) for s in serialized] - serialized = div.join(serialized) - - if "xml" in serialization_ctxt or is_xml: - # XML serialization is more complicated - xml_desc = serialization_ctxt.get("xml", {}) - xml_name = xml_desc.get("name") - if not xml_name: - xml_name = serialization_ctxt["key"] - - # Create a wrap node if necessary (use the fact that Element and list have "append") - is_wrapped = xml_desc.get("wrapped", False) - node_name = xml_desc.get("itemsName", xml_name) - if is_wrapped: - final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - else: - final_result = [] - # All list elements to "local_node" - for el in serialized: - if isinstance(el, ET.Element): - el_node = el - else: - el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - if el is not None: # Otherwise it writes "None" :-p - el_node.text = str(el) - final_result.append(el_node) - return final_result - return serialized - - def serialize_dict(self, attr, dict_type, **kwargs): - """Serialize a dictionary of objects. - - :param dict attr: Object to be serialized. - :param str dict_type: Type of object in the dictionary. - :rtype: dict - :return: serialized dictionary - """ - serialization_ctxt = kwargs.get("serialization_ctxt", {}) - serialized = {} - for key, value in attr.items(): - try: - serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) - except ValueError as err: - if isinstance(err, SerializationError): - raise - serialized[self.serialize_unicode(key)] = None - - if "xml" in serialization_ctxt: - # XML serialization is more complicated - xml_desc = serialization_ctxt["xml"] - xml_name = xml_desc["name"] - - final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) - for key, value in serialized.items(): - ET.SubElement(final_result, key).text = value - return final_result - - return serialized - - def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements - """Serialize a generic object. - This will be handled as a dictionary. If object passed in is not - a basic type (str, int, float, dict, list) it will simply be - cast to str. - - :param dict attr: Object to be serialized. - :rtype: dict or str - :return: serialized object - """ - if attr is None: - return None - if isinstance(attr, ET.Element): - return attr - obj_type = type(attr) - if obj_type in self.basic_types: - return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) - if obj_type is _long_type: - return self.serialize_long(attr) - if obj_type is str: - return self.serialize_unicode(attr) - if obj_type is datetime.datetime: - return self.serialize_iso(attr) - if obj_type is datetime.date: - return self.serialize_date(attr) - if obj_type is datetime.time: - return self.serialize_time(attr) - if obj_type is datetime.timedelta: - return self.serialize_duration(attr) - if obj_type is decimal.Decimal: - return self.serialize_decimal(attr) - - # If it's a model or I know this dependency, serialize as a Model - if obj_type in self.dependencies.values() or isinstance(attr, Model): - return self._serialize(attr) - - if obj_type == dict: - serialized = {} - for key, value in attr.items(): - try: - serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) - except ValueError: - serialized[self.serialize_unicode(key)] = None - return serialized - - if obj_type == list: - serialized = [] - for obj in attr: - try: - serialized.append(self.serialize_object(obj, **kwargs)) - except ValueError: - pass - return serialized - return str(attr) - - @staticmethod - def serialize_enum(attr, enum_obj=None): - try: - result = attr.value - except AttributeError: - result = attr - try: - enum_obj(result) # type: ignore - return result - except ValueError as exc: - for enum_value in enum_obj: # type: ignore - if enum_value.value.lower() == str(attr).lower(): - return enum_value.value - error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) from exc - - @staticmethod - def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument - """Serialize bytearray into base-64 string. - - :param str attr: Object to be serialized. - :rtype: str - :return: serialized base64 - """ - return b64encode(attr).decode() - - @staticmethod - def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument - """Serialize str into base-64 string. - - :param str attr: Object to be serialized. - :rtype: str - :return: serialized base64 - """ - encoded = b64encode(attr).decode("ascii") - return encoded.strip("=").replace("+", "-").replace("/", "_") - - @staticmethod - def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Decimal object to float. - - :param decimal attr: Object to be serialized. - :rtype: float - :return: serialized decimal - """ - return float(attr) - - @staticmethod - def serialize_long(attr, **kwargs): # pylint: disable=unused-argument - """Serialize long (Py2) or int (Py3). - - :param int attr: Object to be serialized. - :rtype: int/long - :return: serialized long - """ - return _long_type(attr) - - @staticmethod - def serialize_date(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Date object into ISO-8601 formatted string. - - :param Date attr: Object to be serialized. - :rtype: str - :return: serialized date - """ - if isinstance(attr, str): - attr = isodate.parse_date(attr) - t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) - return t - - @staticmethod - def serialize_time(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Time object into ISO-8601 formatted string. - - :param datetime.time attr: Object to be serialized. - :rtype: str - :return: serialized time - """ - if isinstance(attr, str): - attr = isodate.parse_time(attr) - t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) - if attr.microsecond: - t += ".{:02}".format(attr.microsecond) - return t - - @staticmethod - def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument - """Serialize TimeDelta object into ISO-8601 formatted string. - - :param TimeDelta attr: Object to be serialized. - :rtype: str - :return: serialized duration - """ - if isinstance(attr, str): - attr = isodate.parse_duration(attr) - return isodate.duration_isoformat(attr) - - @staticmethod - def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into RFC-1123 formatted string. - - :param Datetime attr: Object to be serialized. - :rtype: str - :raises TypeError: if format invalid. - :return: serialized rfc - """ - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - utc = attr.utctimetuple() - except AttributeError as exc: - raise TypeError("RFC1123 object must be valid Datetime object.") from exc - - return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( - Serializer.days[utc.tm_wday], - utc.tm_mday, - Serializer.months[utc.tm_mon], - utc.tm_year, - utc.tm_hour, - utc.tm_min, - utc.tm_sec, - ) - - @staticmethod - def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into ISO-8601 formatted string. - - :param Datetime attr: Object to be serialized. - :rtype: str - :raises SerializationError: if format invalid. - :return: serialized iso - """ - if isinstance(attr, str): - attr = isodate.parse_datetime(attr) - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - utc = attr.utctimetuple() - if utc.tm_year > 9999 or utc.tm_year < 1: - raise OverflowError("Hit max or min date") - - microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") - if microseconds: - microseconds = "." + microseconds - date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( - utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec - ) - return date + microseconds + "Z" - except (ValueError, OverflowError) as err: - msg = "Unable to serialize datetime object." - raise SerializationError(msg) from err - except AttributeError as err: - msg = "ISO-8601 object must be valid Datetime object." - raise TypeError(msg) from err - - @staticmethod - def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument - """Serialize Datetime object into IntTime format. - This is represented as seconds. - - :param Datetime attr: Object to be serialized. - :rtype: int - :raises SerializationError: if format invalid - :return: serialied unix - """ - if isinstance(attr, int): - return attr - try: - if not attr.tzinfo: - _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") - return int(calendar.timegm(attr.utctimetuple())) - except AttributeError as exc: - raise TypeError("Unix time object must be valid Datetime object.") from exc - - -def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - key = attr_desc["key"] - working_data = data - - while "." in key: - # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) - if len(dict_keys) == 1: - key = _decode_attribute_map_key(dict_keys[0]) - break - working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = working_data.get(working_key, data) - if working_data is None: - # If at any point while following flatten JSON path see None, it means - # that all properties under are None as well - return None - key = ".".join(dict_keys[1:]) - - return working_data.get(key) - - -def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements - attr, attr_desc, data -): - key = attr_desc["key"] - working_data = data - - while "." in key: - dict_keys = _FLATTEN.split(key) - if len(dict_keys) == 1: - key = _decode_attribute_map_key(dict_keys[0]) - break - working_key = _decode_attribute_map_key(dict_keys[0]) - working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) - if working_data is None: - # If at any point while following flatten JSON path see None, it means - # that all properties under are None as well - return None - key = ".".join(dict_keys[1:]) - - if working_data: - return attribute_key_case_insensitive_extractor(key, None, working_data) - - -def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - """Extract the attribute in "data" based on the last part of the JSON path key. - - :param str attr: The attribute to extract - :param dict attr_desc: The attribute description - :param dict data: The data to extract from - :rtype: object - :returns: The extracted attribute - """ - key = attr_desc["key"] - dict_keys = _FLATTEN.split(key) - return attribute_key_extractor(dict_keys[-1], None, data) - - -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument - """Extract the attribute in "data" based on the last part of the JSON path key. - - This is the case insensitive version of "last_rest_key_extractor" - :param str attr: The attribute to extract - :param dict attr_desc: The attribute description - :param dict data: The data to extract from - :rtype: object - :returns: The extracted attribute - """ - key = attr_desc["key"] - dict_keys = _FLATTEN.split(key) - return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) - - -def attribute_key_extractor(attr, _, data): - return data.get(attr) - - -def attribute_key_case_insensitive_extractor(attr, _, data): - found_key = None - lower_attr = attr.lower() - for key in data: - if lower_attr == key.lower(): - found_key = key - break - - return data.get(found_key) - - -def _extract_name_from_internal_type(internal_type): - """Given an internal type XML description, extract correct XML name with namespace. - - :param dict internal_type: An model type - :rtype: tuple - :returns: A tuple XML name + namespace dict - """ - internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - xml_name = internal_type_xml_map.get("name", internal_type.__name__) - xml_ns = internal_type_xml_map.get("ns", None) - if xml_ns: - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - return xml_name - - -def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements - if isinstance(data, dict): - return None - - # Test if this model is XML ready first - if not isinstance(data, ET.Element): - return None - - xml_desc = attr_desc.get("xml", {}) - xml_name = xml_desc.get("name", attr_desc["key"]) - - # Look for a children - is_iter_type = attr_desc["type"].startswith("[") - is_wrapped = xml_desc.get("wrapped", False) - internal_type = attr_desc.get("internalType", None) - internal_type_xml_map = getattr(internal_type, "_xml_map", {}) - - # Integrate namespace if necessary - xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) - if xml_ns: - xml_name = "{{{}}}{}".format(xml_ns, xml_name) - - # If it's an attribute, that's simple - if xml_desc.get("attr", False): - return data.get(xml_name) - - # If it's x-ms-text, that's simple too - if xml_desc.get("text", False): - return data.text - - # Scenario where I take the local name: - # - Wrapped node - # - Internal type is an enum (considered basic types) - # - Internal type has no XML/Name node - if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): - children = data.findall(xml_name) - # If internal type has a local name and it's not a list, I use that name - elif not is_iter_type and internal_type and "name" in internal_type_xml_map: - xml_name = _extract_name_from_internal_type(internal_type) - children = data.findall(xml_name) - # That's an array - else: - if internal_type: # Complex type, ignore itemsName and use the complex type name - items_name = _extract_name_from_internal_type(internal_type) - else: - items_name = xml_desc.get("itemsName", xml_name) - children = data.findall(items_name) - - if len(children) == 0: - if is_iter_type: - if is_wrapped: - return None # is_wrapped no node, we want None - return [] # not wrapped, assume empty list - return None # Assume it's not there, maybe an optional node. - - # If is_iter_type and not wrapped, return all found children - if is_iter_type: - if not is_wrapped: - return children - # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) - ) - return list(children[0]) # Might be empty list and that's ok. - - # Here it's not a itertype, we should have found one element only or empty - if len(children) > 1: - raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) - return children[0] - - -class Deserializer: - """Response object model deserializer. - - :param dict classes: Class type dictionary for deserializing complex types. - :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. - """ - - basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - - def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: - self.deserialize_type = { - "iso-8601": Deserializer.deserialize_iso, - "rfc-1123": Deserializer.deserialize_rfc, - "unix-time": Deserializer.deserialize_unix, - "duration": Deserializer.deserialize_duration, - "date": Deserializer.deserialize_date, - "time": Deserializer.deserialize_time, - "decimal": Deserializer.deserialize_decimal, - "long": Deserializer.deserialize_long, - "bytearray": Deserializer.deserialize_bytearray, - "base64": Deserializer.deserialize_base64, - "object": self.deserialize_object, - "[]": self.deserialize_iter, - "{}": self.deserialize_dict, - } - self.deserialize_expected_types = { - "duration": (isodate.Duration, datetime.timedelta), - "iso-8601": (datetime.datetime), - } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} - self.key_extractors = [rest_key_extractor, xml_key_extractor] - # Additional properties only works if the "rest_key_extractor" is used to - # extract the keys. Making it to work whatever the key extractor is too much - # complicated, with no real scenario for now. - # So adding a flag to disable additional properties detection. This flag should be - # used if your expect the deserialization to NOT come from a JSON REST syntax. - # Otherwise, result are unexpected - self.additional_properties_detection = True - - def __call__(self, target_obj, response_data, content_type=None): - """Call the deserializer to process a REST response. - - :param str target_obj: Target data type to deserialize to. - :param requests.Response response_data: REST response object. - :param str content_type: Swagger "produces" if available. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - data = self._unpack_content(response_data, content_type) - return self._deserialize(target_obj, data) - - def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements - """Call the deserializer on a model. - - Data needs to be already deserialized as JSON or XML ElementTree - - :param str target_obj: Target data type to deserialize to. - :param object data: Object to deserialize. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - # This is already a model, go recursive just in case - if hasattr(data, "_attribute_map"): - constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] - try: - for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access - if attr in constants: - continue - value = getattr(data, attr) - if value is None: - continue - local_type = mapconfig["type"] - internal_data_type = local_type.strip("[]{}") - if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): - continue - setattr(data, attr, self._deserialize(local_type, value)) - return data - except AttributeError: - return - - response, class_name = self._classify_target(target_obj, data) - - if isinstance(response, str): - return self.deserialize_data(data, response) - if isinstance(response, type) and issubclass(response, Enum): - return self.deserialize_enum(data, response) - - if data is None or data is CoreNull: - return data - try: - attributes = response._attribute_map # type: ignore # pylint: disable=protected-access - d_attrs = {} - for attr, attr_desc in attributes.items(): - # Check empty string. If it's not empty, someone has a real "additionalProperties"... - if attr == "additional_properties" and attr_desc["key"] == "": - continue - raw_value = None - # Enhance attr_desc with some dynamic data - attr_desc = attr_desc.copy() # Do a copy, do not change the real one - internal_data_type = attr_desc["type"].strip("[]{}") - if internal_data_type in self.dependencies: - attr_desc["internalType"] = self.dependencies[internal_data_type] - - for key_extractor in self.key_extractors: - found_value = key_extractor(attr, attr_desc, data) - if found_value is not None: - if raw_value is not None and raw_value != found_value: - msg = ( - "Ignoring extracted value '%s' from %s for key '%s'" - " (duplicate extraction, follow extractors order)" - ) - _LOGGER.warning(msg, found_value, key_extractor, attr) - continue - raw_value = found_value - - value = self.deserialize_data(raw_value, attr_desc["type"]) - d_attrs[attr] = value - except (AttributeError, TypeError, KeyError) as err: - msg = "Unable to deserialize to object: " + class_name # type: ignore - raise DeserializationError(msg) from err - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) - - def _build_additional_properties(self, attribute_map, data): - if not self.additional_properties_detection: - return None - if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": - # Check empty string. If it's not empty, someone has a real "additionalProperties" - return None - if isinstance(data, ET.Element): - data = {el.tag: el.text for el in data} - - known_keys = { - _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) - for desc in attribute_map.values() - if desc["key"] != "" - } - present_keys = set(data.keys()) - missing_keys = present_keys - known_keys - return {key: data[key] for key in missing_keys} - - def _classify_target(self, target, data): - """Check to see whether the deserialization target object can - be classified into a subclass. - Once classification has been determined, initialize object. - - :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deserialize. - :return: The classified target object and its class name. - :rtype: tuple - """ - if target is None: - return None, None - - if isinstance(target, str): - try: - target = self.dependencies[target] - except KeyError: - return target, target - - try: - target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access - except AttributeError: - pass # Target is not a Model, no classify - return target, target.__class__.__name__ # type: ignore - - def failsafe_deserialize(self, target_obj, data, content_type=None): - """Ignores any errors encountered in deserialization, - and falls back to not deserializing the object. Recommended - for use in error deserialization, as we want to return the - HttpResponseError to users, and not have them deal with - a deserialization error. - - :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deserialize. - :param str content_type: Swagger "produces" if available. - :return: Deserialized object. - :rtype: object - """ - try: - return self(target_obj, data, content_type=content_type) - except: # pylint: disable=bare-except - _LOGGER.debug( - "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True - ) - return None - - @staticmethod - def _unpack_content(raw_data, content_type=None): - """Extract the correct structure for deserialization. - - If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. - if we can't, raise. Your Pipeline should have a RawDeserializer. - - If not a pipeline response and raw_data is bytes or string, use content-type - to decode it. If no content-type, try JSON. - - If raw_data is something else, bypass all logic and return it directly. - - :param obj raw_data: Data to be processed. - :param str content_type: How to parse if raw_data is a string/bytes. - :raises JSONDecodeError: If JSON is requested and parsing is impossible. - :raises UnicodeDecodeError: If bytes is not UTF8 - :rtype: object - :return: Unpacked content. - """ - # Assume this is enough to detect a Pipeline Response without importing it - context = getattr(raw_data, "context", {}) - if context: - if RawDeserializer.CONTEXT_NAME in context: - return context[RawDeserializer.CONTEXT_NAME] - raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") - - # Assume this is enough to recognize universal_http.ClientResponse without importing it - if hasattr(raw_data, "body"): - return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) - - # Assume this enough to recognize requests.Response without importing it. - if hasattr(raw_data, "_content_consumed"): - return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) - - if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): - return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore - return raw_data - - def _instantiate_model(self, response, attrs, additional_properties=None): - """Instantiate a response model passing in deserialized args. - - :param Response response: The response model class. - :param dict attrs: The deserialized response attributes. - :param dict additional_properties: Additional properties to be set. - :rtype: Response - :return: The instantiated response model. - """ - if callable(response): - subtype = getattr(response, "_subtype_map", {}) - try: - readonly = [ - k - for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore - if v.get("readonly") - ] - const = [ - k - for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore - if v.get("constant") - ] - kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} - response_obj = response(**kwargs) - for attr in readonly: - setattr(response_obj, attr, attrs.get(attr)) - if additional_properties: - response_obj.additional_properties = additional_properties # type: ignore - return response_obj - except TypeError as err: - msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) from err - else: - try: - for attr, value in attrs.items(): - setattr(response, attr, value) - return response - except Exception as exp: - msg = "Unable to populate response model. " - msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) from exp - - def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements - """Process data for deserialization according to data type. - - :param str data: The response string to be deserialized. - :param str data_type: The type to deserialize to. - :raises DeserializationError: if deserialization fails. - :return: Deserialized object. - :rtype: object - """ - if data is None: - return data - - try: - if not data_type: - return data - if data_type in self.basic_types.values(): - return self.deserialize_basic(data, data_type) - if data_type in self.deserialize_type: - if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): - return data - - is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment - "object", - "[]", - r"{}", - ] - if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: - return None - data_val = self.deserialize_type[data_type](data) - return data_val - - iter_type = data_type[0] + data_type[-1] - if iter_type in self.deserialize_type: - return self.deserialize_type[iter_type](data, data_type[1:-1]) - - obj_type = self.dependencies[data_type] - if issubclass(obj_type, Enum): - if isinstance(data, ET.Element): - data = data.text - return self.deserialize_enum(data, obj_type) - - except (ValueError, TypeError, AttributeError) as err: - msg = "Unable to deserialize response data." - msg += " Data: {}, {}".format(data, data_type) - raise DeserializationError(msg) from err - return self._deserialize(obj_type, data) - - def deserialize_iter(self, attr, iter_type): - """Deserialize an iterable. - - :param list attr: Iterable to be deserialized. - :param str iter_type: The type of object in the iterable. - :return: Deserialized iterable. - :rtype: list - """ - if attr is None: - return None - if isinstance(attr, ET.Element): # If I receive an element here, get the children - attr = list(attr) - if not isinstance(attr, (list, set)): - raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) - return [self.deserialize_data(a, iter_type) for a in attr] - - def deserialize_dict(self, attr, dict_type): - """Deserialize a dictionary. - - :param dict/list attr: Dictionary to be deserialized. Also accepts - a list of key, value pairs. - :param str dict_type: The object type of the items in the dictionary. - :return: Deserialized dictionary. - :rtype: dict - """ - if isinstance(attr, list): - return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} - - if isinstance(attr, ET.Element): - # Transform value into {"Key": "value"} - attr = {el.tag: el.text for el in attr} - return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - - def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements - """Deserialize a generic object. - This will be handled as a dictionary. - - :param dict attr: Dictionary to be deserialized. - :return: Deserialized object. - :rtype: dict - :raises TypeError: if non-builtin datatype encountered. - """ - if attr is None: - return None - if isinstance(attr, ET.Element): - # Do no recurse on XML, just return the tree as-is - return attr - if isinstance(attr, str): - return self.deserialize_basic(attr, "str") - obj_type = type(attr) - if obj_type in self.basic_types: - return self.deserialize_basic(attr, self.basic_types[obj_type]) - if obj_type is _long_type: - return self.deserialize_long(attr) - - if obj_type == dict: - deserialized = {} - for key, value in attr.items(): - try: - deserialized[key] = self.deserialize_object(value, **kwargs) - except ValueError: - deserialized[key] = None - return deserialized - - if obj_type == list: - deserialized = [] - for obj in attr: - try: - deserialized.append(self.deserialize_object(obj, **kwargs)) - except ValueError: - pass - return deserialized - - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) - - def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements - """Deserialize basic builtin data type from string. - Will attempt to convert to str, int, float and bool. - This function will also accept '1', '0', 'true' and 'false' as - valid bool values. - - :param str attr: response string to be deserialized. - :param str data_type: deserialization data type. - :return: Deserialized basic type. - :rtype: str, int, float or bool - :raises TypeError: if string format is not valid. - """ - # If we're here, data is supposed to be a basic type. - # If it's still an XML node, take the text - if isinstance(attr, ET.Element): - attr = attr.text - if not attr: - if data_type == "str": - # None or '', node is empty string. - return "" - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None - - if data_type == "bool": - if attr in [True, False, 1, 0]: - return bool(attr) - if isinstance(attr, str): - if attr.lower() in ["true", "1"]: - return True - if attr.lower() in ["false", "0"]: - return False - raise TypeError("Invalid boolean value: {}".format(attr)) - - if data_type == "str": - return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used - - @staticmethod - def deserialize_unicode(data): - """Preserve unicode objects in Python 2, otherwise return data - as a string. - - :param str data: response string to be deserialized. - :return: Deserialized string. - :rtype: str or unicode - """ - # We might be here because we have an enum modeled as string, - # and we try to deserialize a partial dict with enum inside - if isinstance(data, Enum): - return data - - # Consider this is real string - try: - if isinstance(data, unicode): # type: ignore - return data - except NameError: - return str(data) - return str(data) - - @staticmethod - def deserialize_enum(data, enum_obj): - """Deserialize string into enum object. - - If the string is not a valid enum value it will be returned as-is - and a warning will be logged. - - :param str data: Response string to be deserialized. If this value is - None or invalid it will be returned as-is. - :param Enum enum_obj: Enum object to deserialize to. - :return: Deserialized enum object. - :rtype: Enum - """ - if isinstance(data, enum_obj) or data is None: - return data - if isinstance(data, Enum): - data = data.value - if isinstance(data, int): - # Workaround. We might consider remove it in the future. - try: - return list(enum_obj.__members__.values())[data] - except IndexError as exc: - error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) from exc - try: - return enum_obj(str(data)) - except ValueError: - for enum_value in enum_obj: - if enum_value.value.lower() == str(data).lower(): - return enum_value - # We don't fail anymore for unknown value, we deserialize as a string - _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) - return Deserializer.deserialize_unicode(data) - - @staticmethod - def deserialize_bytearray(attr): - """Deserialize string into bytearray. - - :param str attr: response string to be deserialized. - :return: Deserialized bytearray - :rtype: bytearray - :raises TypeError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - return bytearray(b64decode(attr)) # type: ignore - - @staticmethod - def deserialize_base64(attr): - """Deserialize base64 encoded string into string. - - :param str attr: response string to be deserialized. - :return: Deserialized base64 string - :rtype: bytearray - :raises TypeError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore - attr = attr + padding # type: ignore - encoded = attr.replace("-", "+").replace("_", "/") - return b64decode(encoded) - - @staticmethod - def deserialize_decimal(attr): - """Deserialize string into Decimal object. - - :param str attr: response string to be deserialized. - :return: Deserialized decimal - :raises DeserializationError: if string format invalid. - :rtype: decimal - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - return decimal.Decimal(str(attr)) # type: ignore - except decimal.DecimalException as err: - msg = "Invalid decimal {}".format(attr) - raise DeserializationError(msg) from err - - @staticmethod - def deserialize_long(attr): - """Deserialize string into long (Py2) or int (Py3). - - :param str attr: response string to be deserialized. - :return: Deserialized int - :rtype: long or int - :raises ValueError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - return _long_type(attr) # type: ignore - - @staticmethod - def deserialize_duration(attr): - """Deserialize ISO-8601 formatted string into TimeDelta object. - - :param str attr: response string to be deserialized. - :return: Deserialized duration - :rtype: TimeDelta - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - duration = isodate.parse_duration(attr) - except (ValueError, OverflowError, AttributeError) as err: - msg = "Cannot deserialize duration object." - raise DeserializationError(msg) from err - return duration - - @staticmethod - def deserialize_date(attr): - """Deserialize ISO-8601 formatted string into Date object. - - :param str attr: response string to be deserialized. - :return: Deserialized date - :rtype: Date - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError("Date must have only digits and -. Received: %s" % attr) - # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. - return isodate.parse_date(attr, defaultmonth=0, defaultday=0) - - @staticmethod - def deserialize_time(attr): - """Deserialize ISO-8601 formatted string into time object. - - :param str attr: response string to be deserialized. - :return: Deserialized time - :rtype: datetime.time - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore - raise DeserializationError("Date must have only digits and -. Received: %s" % attr) - return isodate.parse_time(attr) - - @staticmethod - def deserialize_rfc(attr): - """Deserialize RFC-1123 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :return: Deserialized RFC datetime - :rtype: Datetime - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - parsed_date = email.utils.parsedate_tz(attr) # type: ignore - date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) - ) - if not date_obj.tzinfo: - date_obj = date_obj.astimezone(tz=TZ_UTC) - except ValueError as err: - msg = "Cannot deserialize to rfc datetime object." - raise DeserializationError(msg) from err - return date_obj - - @staticmethod - def deserialize_iso(attr): - """Deserialize ISO-8601 formatted string into Datetime object. - - :param str attr: response string to be deserialized. - :return: Deserialized ISO datetime - :rtype: Datetime - :raises DeserializationError: if string format invalid. - """ - if isinstance(attr, ET.Element): - attr = attr.text - try: - attr = attr.upper() # type: ignore - match = Deserializer.valid_date.match(attr) - if not match: - raise ValueError("Invalid datetime string: " + attr) - - check_decimal = attr.split(".") - if len(check_decimal) > 1: - decimal_str = "" - for digit in check_decimal[1]: - if digit.isdigit(): - decimal_str += digit - else: - break - if len(decimal_str) > 6: - attr = attr.replace(decimal_str, decimal_str[0:6]) - - date_obj = isodate.parse_datetime(attr) - test_utc = date_obj.utctimetuple() - if test_utc.tm_year > 9999 or test_utc.tm_year < 1: - raise OverflowError("Hit max or min date") - except (ValueError, OverflowError, AttributeError) as err: - msg = "Cannot deserialize datetime object." - raise DeserializationError(msg) from err - return date_obj - - @staticmethod - def deserialize_unix(attr): - """Serialize Datetime object into IntTime format. - This is represented as seconds. - - :param int attr: Object to be serialized. - :return: Deserialized datetime - :rtype: Datetime - :raises DeserializationError: if format invalid - """ - if isinstance(attr, ET.Element): - attr = int(attr.text) # type: ignore - try: - attr = int(attr) - date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) - except ValueError as err: - msg = "Cannot deserialize to unix datetime object." - raise DeserializationError(msg) from err - return date_obj diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_version.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_version.py deleted file mode 100644 index be71c81bd28..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "1.0.0b1" diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/__init__.py deleted file mode 100644 index dcbbc238342..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._client import DictionaryClient # type: ignore - -try: - from ._patch import __all__ as _patch_all - from ._patch import * -except ImportError: - _patch_all = [] -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "DictionaryClient", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore - -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py deleted file mode 100644 index f48f157063d..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Awaitable -from typing_extensions import Self - -from azure.core import AsyncPipelineClient -from azure.core.pipeline import policies -from azure.core.rest import AsyncHttpResponse, HttpRequest - -from .._utils.serialization import Deserializer, Serializer -from ._configuration import DictionaryClientConfiguration -from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableFloatValueOperations, - RecursiveModelValueOperations, - StringValueOperations, - UnknownValueOperations, -) - - -class DictionaryClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes - """Illustrates various of dictionaries. - - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.dictionary.aio.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.dictionary.aio.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.dictionary.aio.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.dictionary.aio.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.dictionary.aio.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.dictionary.aio.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.dictionary.aio.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.dictionary.aio.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.dictionary.aio.operations.ModelValueOperations - :ivar recursive_model_value: RecursiveModelValueOperations operations - :vartype recursive_model_value: - typetest.dictionary.aio.operations.RecursiveModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.dictionary.aio.operations.NullableFloatValueOperations - :keyword endpoint: Service host. Default value is "http://localhost:3000". - :paramtype endpoint: str - """ - - def __init__( # pylint: disable=missing-client-constructor-parameter-credential - self, *, endpoint: str = "http://localhost:3000", **kwargs: Any - ) -> None: - _endpoint = "{endpoint}" - self._config = DictionaryClientConfiguration(endpoint=endpoint, **kwargs) - - _policies = kwargs.pop("policies", None) - if _policies is None: - _policies = [ - policies.RequestIdPolicy(**kwargs), - self._config.headers_policy, - self._config.user_agent_policy, - self._config.proxy_policy, - policies.ContentDecodePolicy(**kwargs), - self._config.redirect_policy, - self._config.retry_policy, - self._config.authentication_policy, - self._config.custom_hook_policy, - self._config.logging_policy, - policies.DistributedTracingPolicy(**kwargs), - policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, - self._config.http_logging_policy, - ] - self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) - - self._serialize = Serializer() - self._deserialize = Deserializer() - self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.recursive_model_value = RecursiveModelValueOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.nullable_float_value = NullableFloatValueOperations( - self._client, self._config, self._serialize, self._deserialize - ) - - def send_request( - self, request: HttpRequest, *, stream: bool = False, **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse - """ - - request_copy = deepcopy(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> Self: - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details: Any) -> None: - await self._client.__aexit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py deleted file mode 100644 index 0ddc478803d..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.pipeline import policies - -from .._version import VERSION - - -class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes - """Configuration for DictionaryClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param endpoint: Service host. Default value is "http://localhost:3000". - :type endpoint: str - """ - - def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: - - self.endpoint = endpoint - kwargs.setdefault("sdk_moniker", "typetest-dictionary/{}".format(VERSION)) - self.polling_interval = kwargs.get("polling_interval", 30) - self._configure(**kwargs) - - def _configure(self, **kwargs: Any) -> None: - self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) - self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) - self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) - self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py deleted file mode 100644 index f56c4be2d9f..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import RecursiveModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore - -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "RecursiveModelValueOperations", - "NullableFloatValueOperations", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py deleted file mode 100644 index 1807c80aa64..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py +++ /dev/null @@ -1,1807 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -import datetime -from io import IOBase -import json -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload - -from azure.core import AsyncPipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict - -from ... import models as _models -from ..._utils.model_base import SdkJSONEncoder, _deserialize -from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import ( - build_boolean_value_get_request, - build_boolean_value_put_request, - build_datetime_value_get_request, - build_datetime_value_put_request, - build_duration_value_get_request, - build_duration_value_put_request, - build_float32_value_get_request, - build_float32_value_put_request, - build_int32_value_get_request, - build_int32_value_put_request, - build_int64_value_get_request, - build_int64_value_put_request, - build_model_value_get_request, - build_model_value_put_request, - build_nullable_float_value_get_request, - build_nullable_float_value_put_request, - build_recursive_model_value_get_request, - build_recursive_model_value_put_request, - build_string_value_get_request, - build_string_value_put_request, - build_unknown_value_get_request, - build_unknown_value_put_request, -) -from .._configuration import DictionaryClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class Int32ValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`int32_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, int]: - """get. - - :return: dict mapping str to int - :rtype: dict[str, int] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, int]] = kwargs.pop("cls", None) - - _request = build_int32_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, int], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, int] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: int} type or a IO[bytes] type. Required. - :type body: dict[str, int] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_int32_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class Int64ValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`int64_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, int]: - """get. - - :return: dict mapping str to int - :rtype: dict[str, int] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, int]] = kwargs.pop("cls", None) - - _request = build_int64_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, int], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, int] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: int} type or a IO[bytes] type. Required. - :type body: dict[str, int] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_int64_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class BooleanValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`boolean_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, bool]: - """get. - - :return: dict mapping str to bool - :rtype: dict[str, bool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, bool]] = kwargs.pop("cls", None) - - _request = build_boolean_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, bool], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put(self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, bool] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: bool} type or a IO[bytes] type. Required. - :type body: dict[str, bool] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_boolean_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class StringValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`string_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, str]: - """get. - - :return: dict mapping str to str - :rtype: dict[str, str] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, str]] = kwargs.pop("cls", None) - - _request = build_string_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, str], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put(self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, str] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, str], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: str} type or a IO[bytes] type. Required. - :type body: dict[str, str] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_string_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class Float32ValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`float32_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, float]: - """get. - - :return: dict mapping str to float - :rtype: dict[str, float] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, float]] = kwargs.pop("cls", None) - - _request = build_float32_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, float], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, float] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: float} type or a IO[bytes] type. Required. - :type body: dict[str, float] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_float32_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class DatetimeValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`datetime_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: - """get. - - :return: dict mapping str to datetime - :rtype: dict[str, ~datetime.datetime] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, datetime.datetime]] = kwargs.pop("cls", None) - - _request = build_datetime_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, datetime.datetime], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put( - self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any - ) -> None: - """put. - - :param body: Required. - :type body: dict[str, ~datetime.datetime] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: datetime.datetime} type or a IO[bytes] type. Required. - :type body: dict[str, ~datetime.datetime] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - - _request = build_datetime_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class DurationValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`duration_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: - """get. - - :return: dict mapping str to timedelta - :rtype: dict[str, ~datetime.timedelta] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, datetime.timedelta]] = kwargs.pop("cls", None) - - _request = build_duration_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, datetime.timedelta], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put( - self, body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any - ) -> None: - """put. - - :param body: Required. - :type body: dict[str, ~datetime.timedelta] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: datetime.timedelta} type or a IO[bytes] type. Required. - :type body: dict[str, ~datetime.timedelta] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_duration_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class UnknownValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`unknown_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, Any]: - """get. - - :return: dict mapping str to any - :rtype: dict[str, any] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None) - - _request = build_unknown_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, Any], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put(self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, any] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, Any], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: Any} type or a IO[bytes] type. Required. - :type body: dict[str, any] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_unknown_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class ModelValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`model_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: - """get. - - :return: dict mapping str to InnerModel - :rtype: dict[str, ~typetest.dictionary.models.InnerModel] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - - _request = build_model_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, _models.InnerModel], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put( - self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any - ) -> None: - """put. - - :param body: Required. - :type body: dict[str, ~typetest.dictionary.models.InnerModel] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. - :type body: dict[str, ~typetest.dictionary.models.InnerModel] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_model_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class RecursiveModelValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`recursive_model_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: - """get. - - :return: dict mapping str to InnerModel - :rtype: dict[str, ~typetest.dictionary.models.InnerModel] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - - _request = build_recursive_model_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, _models.InnerModel], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put( - self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any - ) -> None: - """put. - - :param body: Required. - :type body: dict[str, ~typetest.dictionary.models.InnerModel] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. - :type body: dict[str, ~typetest.dictionary.models.InnerModel] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_recursive_model_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class NullableFloatValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`nullable_float_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> Dict[str, float]: - """get. - - :return: dict mapping str to float - :rtype: dict[str, float] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, float]] = kwargs.pop("cls", None) - - _request = build_nullable_float_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, float], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, float] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def put(self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: - """put. - - :param body: Is either a {str: float} type or a IO[bytes] type. Required. - :type body: dict[str, float] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_nullable_float_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/__init__.py deleted file mode 100644 index e87b77e0b91..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - - -from ._models import ( # type: ignore - InnerModel, -) -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "InnerModel", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py deleted file mode 100644 index f6891908fff..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=useless-super-delegation - -from typing import Any, Dict, Mapping, Optional, TYPE_CHECKING, overload - -from .._utils.model_base import Model as _Model, rest_field - -if TYPE_CHECKING: - from .. import models as _models - - -class InnerModel(_Model): - """Dictionary inner model. - - :ivar property: Required string property. Required. - :vartype property: str - :ivar children: - :vartype children: dict[str, ~typetest.dictionary.models.InnerModel] - """ - - property: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Required string property. Required.""" - children: Optional[Dict[str, "_models.InnerModel"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - - @overload - def __init__( - self, - *, - property: str, # pylint: disable=redefined-builtin - children: Optional[Dict[str, "_models.InnerModel"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py deleted file mode 100644 index f56c4be2d9f..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -# pylint: disable=wrong-import-position - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from ._patch import * # pylint: disable=unused-wildcard-import - -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import RecursiveModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore - -from ._patch import __all__ as _patch_all -from ._patch import * -from ._patch import patch_sdk as _patch_sdk - -__all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "RecursiveModelValueOperations", - "NullableFloatValueOperations", -] -__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore -_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py deleted file mode 100644 index c7c01f0aad5..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py +++ /dev/null @@ -1,2114 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -import datetime -from io import IOBase -import json -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -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 DictionaryClientConfiguration -from .._utils.model_base import SdkJSONEncoder, _deserialize -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/int32" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/int32" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/int64" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/int64" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/boolean" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/boolean" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_string_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/string" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_string_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/string" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/float32" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/float32" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/datetime" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/datetime" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/duration" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/duration" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/unknown" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/unknown" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_model_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/model" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_model_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/model" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_recursive_model_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/model/recursive" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_recursive_model_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/model/recursive" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/type/dictionary/nullable-float" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - # Construct URL - _url = "/type/dictionary/nullable-float" - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -class Int32ValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`int32_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, int]: - """get. - - :return: dict mapping str to int - :rtype: dict[str, int] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, int]] = kwargs.pop("cls", None) - - _request = build_int32_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, int], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, int] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: int} type or a IO[bytes] type. Required. - :type body: dict[str, int] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_int32_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class Int64ValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`int64_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, int]: - """get. - - :return: dict mapping str to int - :rtype: dict[str, int] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, int]] = kwargs.pop("cls", None) - - _request = build_int64_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, int], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, int] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: int} type or a IO[bytes] type. Required. - :type body: dict[str, int] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_int64_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class BooleanValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`boolean_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, bool]: - """get. - - :return: dict mapping str to bool - :rtype: dict[str, bool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, bool]] = kwargs.pop("cls", None) - - _request = build_boolean_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, bool], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put(self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, bool] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: bool} type or a IO[bytes] type. Required. - :type body: dict[str, bool] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_boolean_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class StringValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`string_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, str]: - """get. - - :return: dict mapping str to str - :rtype: dict[str, str] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, str]] = kwargs.pop("cls", None) - - _request = build_string_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, str], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put(self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, str] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, str], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: str} type or a IO[bytes] type. Required. - :type body: dict[str, str] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_string_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class Float32ValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`float32_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, float]: - """get. - - :return: dict mapping str to float - :rtype: dict[str, float] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, float]] = kwargs.pop("cls", None) - - _request = build_float32_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, float], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, float] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: float} type or a IO[bytes] type. Required. - :type body: dict[str, float] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_float32_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class DatetimeValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`datetime_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: - """get. - - :return: dict mapping str to datetime - :rtype: dict[str, ~datetime.datetime] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, datetime.datetime]] = kwargs.pop("cls", None) - - _request = build_datetime_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, datetime.datetime], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put(self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, ~datetime.datetime] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: datetime.datetime} type or a IO[bytes] type. Required. - :type body: dict[str, ~datetime.datetime] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - - _request = build_datetime_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class DurationValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`duration_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: - """get. - - :return: dict mapping str to timedelta - :rtype: dict[str, ~datetime.timedelta] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, datetime.timedelta]] = kwargs.pop("cls", None) - - _request = build_duration_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, datetime.timedelta], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put( - self, body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any - ) -> None: - """put. - - :param body: Required. - :type body: dict[str, ~datetime.timedelta] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: datetime.timedelta} type or a IO[bytes] type. Required. - :type body: dict[str, ~datetime.timedelta] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_duration_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class UnknownValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`unknown_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, Any]: - """get. - - :return: dict mapping str to any - :rtype: dict[str, any] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None) - - _request = build_unknown_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, Any], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put(self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, any] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, Any], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: Any} type or a IO[bytes] type. Required. - :type body: dict[str, any] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_unknown_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class ModelValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`model_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: - """get. - - :return: dict mapping str to InnerModel - :rtype: dict[str, ~typetest.dictionary.models.InnerModel] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - - _request = build_model_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, _models.InnerModel], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put( - self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any - ) -> None: - """put. - - :param body: Required. - :type body: dict[str, ~typetest.dictionary.models.InnerModel] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. - :type body: dict[str, ~typetest.dictionary.models.InnerModel] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_model_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class RecursiveModelValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`recursive_model_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: - """get. - - :return: dict mapping str to InnerModel - :rtype: dict[str, ~typetest.dictionary.models.InnerModel] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - - _request = build_recursive_model_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, _models.InnerModel], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put( - self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any - ) -> None: - """put. - - :param body: Required. - :type body: dict[str, ~typetest.dictionary.models.InnerModel] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. - :type body: dict[str, ~typetest.dictionary.models.InnerModel] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_recursive_model_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class NullableFloatValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`nullable_float_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> Dict[str, float]: - """get. - - :return: dict mapping str to float - :rtype: dict[str, float] - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Dict[str, float]] = kwargs.pop("cls", None) - - _request = build_nullable_float_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize(Dict[str, float], response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: dict[str, float] - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: - """put. - - :param body: Required. - :type body: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any - ) -> None: - """put. - - :param body: Is either a {str: float} type or a IO[bytes] type. Required. - :type body: dict[str, float] or IO[bytes] - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(body, (IOBase, bytes)): - _content = body - else: - _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_nullable_float_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_patch.py deleted file mode 100644 index 8bcb627aa47..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_patch.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------- -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/py.typed b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml new file mode 100644 index 00000000000..65976cf960a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-added" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Versioning Added Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "versioning.added._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/versioning-added/setup.py b/packages/typespec-python/test/azure/generated/versioning-added/setup.py deleted file mode 100644 index 5ef0b76d762..00000000000 --- a/packages/typespec-python/test/azure/generated/versioning-added/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-added" -PACKAGE_PPRINT_NAME = "Versioning Added" -PACKAGE_NAMESPACE = "versioning.added" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.added": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml new file mode 100644 index 00000000000..00f969baf32 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-madeoptional" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Versioning Madeoptional Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "versioning.madeoptional._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/setup.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/setup.py deleted file mode 100644 index c6037f9511a..00000000000 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-madeoptional" -PACKAGE_PPRINT_NAME = "Versioning Madeoptional" -PACKAGE_NAMESPACE = "versioning.madeoptional" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.madeoptional": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml new file mode 100644 index 00000000000..13db2f43211 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-removed" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Versioning Removed Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "versioning.removed._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/setup.py b/packages/typespec-python/test/azure/generated/versioning-removed/setup.py deleted file mode 100644 index db09e5cbb59..00000000000 --- a/packages/typespec-python/test/azure/generated/versioning-removed/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-removed" -PACKAGE_PPRINT_NAME = "Versioning Removed" -PACKAGE_NAMESPACE = "versioning.removed" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.removed": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml new file mode 100644 index 00000000000..7f71391cf66 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-renamedfrom" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Versioning Renamedfrom Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "versioning.renamedfrom._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/setup.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/setup.py deleted file mode 100644 index 34838c9ae87..00000000000 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-renamedfrom" -PACKAGE_PPRINT_NAME = "Versioning Renamedfrom" -PACKAGE_NAMESPACE = "versioning.renamedfrom" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.renamedfrom": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml new file mode 100644 index 00000000000..463cdca6218 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-returntypechangedfrom" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Versioning Returntypechangedfrom Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "versioning.returntypechangedfrom._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/setup.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/setup.py deleted file mode 100644 index b4e3a39e617..00000000000 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-returntypechangedfrom" -PACKAGE_PPRINT_NAME = "Versioning Returntypechangedfrom" -PACKAGE_NAMESPACE = "versioning.returntypechangedfrom" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.returntypechangedfrom": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml new file mode 100644 index 00000000000..b082e86a506 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-typechangedfrom" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Versioning Typechangedfrom Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "versioning.typechangedfrom._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/setup.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/setup.py deleted file mode 100644 index 29ec74be4de..00000000000 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-typechangedfrom" -PACKAGE_PPRINT_NAME = "Versioning Typechangedfrom" -PACKAGE_NAMESPACE = "versioning.typechangedfrom" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.typechangedfrom": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) From 15fc42dbaa3ec68aaee6fb1efe8c32999e839d3a Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 21 Jul 2025 18:39:47 +0000 Subject: [PATCH 06/48] Update dependencies --- packages/autorest.python/package.json | 4 ++-- packages/typespec-python/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 6f2942f6aef..a38a8b65579 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" @@ -47,4 +47,4 @@ "requirements.txt", "generator/" ] -} +} \ No newline at end of file diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 123e4767ade..40dd9ac6080 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { @@ -103,4 +103,4 @@ "chalk": "5.3.0", "@types/fs-extra": "11.0.4" } -} +} \ No newline at end of file From 407d5cef81edebed820a41c0a1eade1d7cc212d4 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 21 Jul 2025 18:40:55 +0000 Subject: [PATCH 07/48] Update dependencies (2025-07-21 18:40:55) --- pnpm-lock.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d99c6e6b4f..5d1d0e92e02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1668,8 +1668,8 @@ packages: peerDependencies: '@typespec/compiler': ^1.2.1 - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz': - resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz} version: 0.14.0 engines: {node: '>=20.0.0'} peerDependencies: @@ -6422,7 +6422,7 @@ snapshots: dependencies: '@typespec/compiler': 1.2.1(@types/node@22.13.17) - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTEwNDE1Ni9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q)': dependencies: '@azure-tools/typespec-autorest': 0.58.0(vddu6w2yloigenmssnpyjivoim) '@azure-tools/typespec-azure-core': 0.58.0(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))(@typespec/rest@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))) From 295e53569918944b1a9f7a3ac05555a5ce2bd95d Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 21 Jul 2025 18:45:50 +0000 Subject: [PATCH 08/48] Regenerate for typespec-python (2025-07-21 18:45:50) --- .../authentication-http-custom/pyproject.toml | 57 + .../authentication-http-custom/setup.py | 71 - .../pyproject.toml | 59 + .../setup.py | 73 - .../pyproject.toml | 59 + .../setup.py | 73 - .../pyproject.toml | 59 + .../setup.py | 73 - .../pyproject.toml | 59 + .../setup.py | 73 - .../pyproject.toml | 59 + .../setup.py | 73 - .../pyproject.toml | 59 + .../setup.py | 73 - .../pyproject.toml | 59 + .../setup.py | 73 - .../generated/azure-core-basic/pyproject.toml | 58 + .../azure/generated/azure-core-basic/setup.py | 72 - .../azure-core-lro-standard/pyproject.toml | 59 + .../azure-core-lro-standard/setup.py | 73 - .../generated/azure-core-model/pyproject.toml | 58 + .../azure/generated/azure-core-model/setup.py | 72 - .../generated/azure-core-page/pyproject.toml | 58 + .../azure/generated/azure-core-page/setup.py | 72 - .../azure-core-scalar/pyproject.toml | 58 + .../generated/azure-core-scalar/setup.py | 72 - .../azure-core-traits/pyproject.toml | 58 + .../generated/azure-core-traits/setup.py | 72 - .../azure-encode-duration/pyproject.toml | 58 + .../generated/azure-encode-duration/setup.py | 72 - .../azure-example-basic/pyproject.toml | 58 + .../generated/azure-example-basic/setup.py | 72 - .../azure-payload-pageable/pyproject.toml | 58 + .../generated/azure-payload-pageable/setup.py | 72 - .../pyproject.toml | 57 + .../setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../pyproject.toml | 57 + .../azure-resource-manager-resources/setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../generated/client-namespace/CHANGELOG.md | 5 + .../azure/generated/client-namespace/LICENSE | 21 + .../generated/client-namespace/MANIFEST.in | 6 + .../generated/client-namespace/README.md | 43 + .../client-namespace/apiview-properties.json | 12 + .../client-namespace/client/__init__.py | 1 + .../client/clientnamespace/__init__.py | 32 + .../client/clientnamespace/_client.py | 94 + .../client/clientnamespace/_configuration.py | 42 + .../clientnamespace/_operations/__init__.py | 22 + .../_operations/_operations.py | 112 + .../clientnamespace/_operations/_patch.py | 21 + .../client/clientnamespace/_patch.py | 21 + .../client/clientnamespace/_utils/__init__.py | 6 + .../clientnamespace/_utils/model_base.py | 1232 ++++++++++ .../clientnamespace/_utils/serialization.py | 2032 ++++++++++++++++ .../client/clientnamespace/_utils/utils.py | 25 + .../client/clientnamespace/_version.py | 9 + .../client/clientnamespace/aio/__init__.py | 29 + .../client/clientnamespace/aio/_client.py | 96 + .../clientnamespace/aio/_configuration.py | 42 + .../aio/_operations/__init__.py | 22 + .../aio/_operations/_operations.py | 95 + .../clientnamespace/aio/_operations/_patch.py | 21 + .../client/clientnamespace/aio/_patch.py | 21 + .../client/clientnamespace/first/__init__.py | 1 + .../clientnamespace/first/models/__init__.py | 27 + .../clientnamespace/first/models/_models.py | 40 + .../clientnamespace/first/models/_patch.py | 21 + .../client/clientnamespace/py.typed | 1 + .../client/clientnamespace/second/__init__.py | 32 + .../client/clientnamespace/second/_client.py | 94 + .../clientnamespace/second/_configuration.py | 42 + .../second/_operations/__init__.py | 22 + .../second/_operations/_operations.py | 112 + .../second/_operations/_patch.py | 21 + .../client/clientnamespace/second/_patch.py | 21 + .../clientnamespace/second/_utils/__init__.py | 6 + .../second/_utils/model_base.py | 1232 ++++++++++ .../second/_utils/serialization.py | 2032 ++++++++++++++++ .../clientnamespace/second/_utils/utils.py | 25 + .../clientnamespace/second/aio/__init__.py | 29 + .../clientnamespace/second/aio/_client.py | 96 + .../second/aio/_configuration.py | 42 + .../second/aio/_operations/__init__.py | 22 + .../second/aio/_operations/_operations.py | 95 + .../second/aio/_operations/_patch.py | 21 + .../clientnamespace/second/aio/_patch.py | 21 + .../clientnamespace/second/models/__init__.py | 27 + .../clientnamespace/second/models/_models.py | 45 + .../clientnamespace/second/models/_patch.py | 21 + .../clientnamespace/second/sub/__init__.py | 1 + .../second/sub/models/__init__.py | 27 + .../second/sub/models/_enums.py | 16 + .../second/sub/models/_patch.py | 21 + .../client-namespace/dev_requirements.txt | 3 + .../generated_tests/conftest.py | 52 + .../generated_tests/test_namespace_first.py | 22 + .../test_namespace_first_async.py | 23 + .../generated_tests/test_namespace_second.py | 22 + .../test_namespace_second_async.py | 23 + .../generated_tests/testpreparer.py | 43 + .../generated_tests/testpreparer_async.py | 32 + .../generated/client-namespace/pyproject.toml | 56 + .../generated/client-naming/pyproject.toml | 56 + .../azure/generated/client-naming/setup.py | 70 - .../client-structure-default/pyproject.toml | 57 + .../client-structure-default/setup.py | 71 - .../pyproject.toml | 57 + .../client-structure-multiclient/setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../headasbooleanfalse/pyproject.toml | 55 + .../generated/headasbooleanfalse/setup.py | 68 - .../headasbooleantrue/pyproject.toml | 55 + .../generated/headasbooleantrue/setup.py | 68 - .../resiliency-srv-driven1/pyproject.toml | 57 + .../generated/resiliency-srv-driven1/setup.py | 71 - .../resiliency-srv-driven2/pyproject.toml | 57 + .../generated/resiliency-srv-driven2/setup.py | 71 - .../pyproject.toml | 57 + .../serialization-encoded-name-json/setup.py | 71 - .../pyproject.toml | 57 + .../server-endpoint-not-defined/setup.py | 71 - .../server-path-multiple/pyproject.toml | 57 + .../generated/server-path-multiple/setup.py | 71 - .../server-path-single/pyproject.toml | 57 + .../generated/server-path-single/setup.py | 71 - .../pyproject.toml | 57 + .../server-versions-not-versioned/setup.py | 71 - .../server-versions-versioned/pyproject.toml | 57 + .../server-versions-versioned/setup.py | 71 - .../pyproject.toml | 56 + .../setup.py | 70 - .../pyproject.toml | 56 + .../special-headers-repeatability/setup.py | 70 - .../typetest-dictionary/CHANGELOG.md | 5 + .../generated/typetest-dictionary/LICENSE | 21 + .../generated/typetest-dictionary/MANIFEST.in | 6 + .../generated/typetest-dictionary/README.md | 43 + .../apiview-properties.json | 50 + .../typetest-dictionary/dev_requirements.txt | 3 + .../generated_tests/conftest.py | 35 + ...est_dictionary_boolean_value_operations.py | 33 + ...ctionary_boolean_value_operations_async.py | 34 + ...st_dictionary_datetime_value_operations.py | 33 + ...tionary_datetime_value_operations_async.py | 34 + ...st_dictionary_duration_value_operations.py | 33 + ...tionary_duration_value_operations_async.py | 34 + ...est_dictionary_float32_value_operations.py | 33 + ...ctionary_float32_value_operations_async.py | 34 + .../test_dictionary_int32_value_operations.py | 33 + ...dictionary_int32_value_operations_async.py | 34 + .../test_dictionary_int64_value_operations.py | 33 + ...dictionary_int64_value_operations_async.py | 34 + .../test_dictionary_model_value_operations.py | 33 + ...dictionary_model_value_operations_async.py | 34 + ...tionary_nullable_float_value_operations.py | 33 + ...y_nullable_float_value_operations_async.py | 34 + ...ionary_recursive_model_value_operations.py | 33 + ..._recursive_model_value_operations_async.py | 34 + ...test_dictionary_string_value_operations.py | 33 + ...ictionary_string_value_operations_async.py | 34 + ...est_dictionary_unknown_value_operations.py | 33 + ...ctionary_unknown_value_operations_async.py | 34 + .../generated_tests/testpreparer.py | 26 + .../generated_tests/testpreparer_async.py | 20 + .../typetest-dictionary/pyproject.toml | 56 + .../typetest-dictionary/typetest/__init__.py | 1 + .../typetest/dictionary/__init__.py | 32 + .../typetest/dictionary/_client.py | 141 ++ .../typetest/dictionary/_configuration.py | 42 + .../typetest/dictionary/_patch.py | 21 + .../typetest/dictionary/_utils/__init__.py | 6 + .../typetest/dictionary/_utils/model_base.py | 1232 ++++++++++ .../dictionary/_utils/serialization.py | 2032 ++++++++++++++++ .../typetest/dictionary/_version.py | 9 + .../typetest/dictionary/aio/__init__.py | 29 + .../typetest/dictionary/aio/_client.py | 144 ++ .../typetest/dictionary/aio/_configuration.py | 42 + .../typetest/dictionary/aio/_patch.py | 21 + .../dictionary/aio/operations/__init__.py | 45 + .../dictionary/aio/operations/_operations.py | 1807 ++++++++++++++ .../dictionary/aio/operations/_patch.py | 21 + .../typetest/dictionary/models/__init__.py | 27 + .../typetest/dictionary/models/_models.py | 49 + .../typetest/dictionary/models/_patch.py | 21 + .../dictionary/operations/__init__.py | 45 + .../dictionary/operations/_operations.py | 2114 +++++++++++++++++ .../typetest/dictionary/operations/_patch.py | 21 + .../typetest/dictionary/py.typed | 1 + .../typetest-enum-extensible/pyproject.toml | 57 + .../typetest-enum-extensible/setup.py | 71 - .../typetest-enum-fixed/pyproject.toml | 57 + .../generated/typetest-enum-fixed/setup.py | 71 - .../typetest-model-empty/pyproject.toml | 57 + .../generated/typetest-model-empty/setup.py | 71 - .../pyproject.toml | 57 + .../typetest-model-enumdiscriminator/setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../pyproject.toml | 57 + .../typetest-model-notdiscriminated/setup.py | 71 - .../typetest-model-recursive/pyproject.toml | 57 + .../typetest-model-recursive/setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../typetest-model-usage/pyproject.toml | 57 + .../generated/typetest-model-usage/setup.py | 71 - .../typetest-model-visibility/pyproject.toml | 57 + .../typetest-model-visibility/setup.py | 71 - .../pyproject.toml | 57 + .../setup.py | 71 - .../typetest-property-nullable/pyproject.toml | 57 + .../typetest-property-nullable/setup.py | 71 - .../typetest-property-optional/pyproject.toml | 57 + .../typetest-property-optional/setup.py | 71 - .../pyproject.toml | 57 + .../typetest-property-valuetypes/setup.py | 71 - .../generated/typetest-scalar/pyproject.toml | 56 + .../azure/generated/typetest-scalar/setup.py | 70 - .../generated/typetest-union/pyproject.toml | 56 + .../azure/generated/typetest-union/setup.py | 70 - .../authentication-api-key/pyproject.toml | 46 + .../generated/authentication-api-key/setup.py | 61 - .../authentication-http-custom/pyproject.toml | 47 + .../authentication-http-custom/setup.py | 62 - .../authentication-oauth2/pyproject.toml | 46 + .../generated/authentication-oauth2/setup.py | 61 - .../authentication-union/pyproject.toml | 46 + .../generated/authentication-union/setup.py | 61 - .../generated/encode-bytes/pyproject.toml | 46 + .../unbranded/generated/encode-bytes/setup.py | 61 - .../generated/encode-datetime/pyproject.toml | 46 + .../generated/encode-datetime/setup.py | 61 - .../generated/encode-duration/pyproject.toml | 46 + .../generated/encode-duration/setup.py | 61 - .../generated/encode-numeric/pyproject.toml | 46 + .../generated/encode-numeric/setup.py | 61 - .../headasbooleanfalse/pyproject.toml | 45 + .../generated/headasbooleanfalse/setup.py | 59 - .../headasbooleantrue/pyproject.toml | 45 + .../generated/headasbooleantrue/setup.py | 59 - .../generated/parameters-basic/pyproject.toml | 46 + .../generated/parameters-basic/setup.py | 61 - .../pyproject.toml | 46 + .../parameters-body-optionality/setup.py | 61 - .../pyproject.toml | 46 + .../parameters-collection-format/setup.py | 61 - .../generated/parameters-path/pyproject.toml | 46 + .../generated/parameters-path/setup.py | 61 - .../parameters-spread/pyproject.toml | 46 + .../generated/parameters-spread/setup.py | 61 - .../pyproject.toml | 46 + .../payload-content-negotiation/setup.py | 61 - .../payload-json-merge-patch/pyproject.toml | 46 + .../payload-json-merge-patch/setup.py | 61 - .../payload-media-type/pyproject.toml | 46 + .../generated/payload-media-type/setup.py | 61 - .../payload-multipart/pyproject.toml | 46 + .../generated/payload-multipart/setup.py | 61 - .../generated/payload-pageable/pyproject.toml | 46 + .../generated/payload-pageable/setup.py | 61 - .../generated/payload-xml/pyproject.toml | 46 + .../unbranded/generated/payload-xml/setup.py | 61 - .../response-status-code-range/pyproject.toml | 46 + .../response-status-code-range/setup.py | 61 - .../unbranded/generated/routes/pyproject.toml | 45 + .../test/unbranded/generated/routes/setup.py | 59 - .../pyproject.toml | 47 + .../serialization-encoded-name-json/setup.py | 62 - .../pyproject.toml | 47 + .../server-endpoint-not-defined/setup.py | 62 - .../server-path-multiple/pyproject.toml | 47 + .../generated/server-path-multiple/setup.py | 62 - .../server-path-single/pyproject.toml | 47 + .../generated/server-path-single/setup.py | 62 - .../pyproject.toml | 47 + .../server-versions-not-versioned/setup.py | 62 - .../server-versions-versioned/pyproject.toml | 47 + .../server-versions-versioned/setup.py | 62 - .../pyproject.toml | 46 + .../setup.py | 61 - .../pyproject.toml | 46 + .../special-headers-repeatability/setup.py | 61 - .../generated/special-words/pyproject.toml | 45 + .../generated/special-words/setup.py | 59 - .../generated/streaming-jsonl/pyproject.toml | 46 + .../generated/streaming-jsonl/setup.py | 61 - .../generated/typetest-array/pyproject.toml | 46 + .../generated/typetest-array/setup.py | 61 - .../typetest-dictionary/pyproject.toml | 46 + .../generated/typetest-dictionary/setup.py | 61 - .../typetest-enum-extensible/pyproject.toml | 47 + .../typetest-enum-extensible/setup.py | 62 - .../typetest-enum-fixed/pyproject.toml | 47 + .../generated/typetest-enum-fixed/setup.py | 62 - .../typetest-model-empty/pyproject.toml | 47 + .../generated/typetest-model-empty/setup.py | 62 - .../pyproject.toml | 47 + .../typetest-model-enumdiscriminator/setup.py | 62 - .../pyproject.toml | 47 + .../setup.py | 62 - .../pyproject.toml | 47 + .../typetest-model-notdiscriminated/setup.py | 62 - .../typetest-model-recursive/pyproject.toml | 47 + .../typetest-model-recursive/setup.py | 62 - .../pyproject.toml | 47 + .../setup.py | 62 - .../typetest-model-usage/pyproject.toml | 47 + .../generated/typetest-model-usage/setup.py | 62 - .../typetest-model-visibility/pyproject.toml | 47 + .../typetest-model-visibility/setup.py | 62 - .../pyproject.toml | 47 + .../setup.py | 62 - .../typetest-property-nullable/pyproject.toml | 47 + .../typetest-property-nullable/setup.py | 62 - .../typetest-property-optional/pyproject.toml | 47 + .../typetest-property-optional/setup.py | 62 - .../pyproject.toml | 47 + .../typetest-property-valuetypes/setup.py | 62 - .../generated/typetest-scalar/pyproject.toml | 46 + .../generated/typetest-scalar/setup.py | 61 - .../generated/typetest-union/pyproject.toml | 46 + .../generated/typetest-union/setup.py | 61 - .../generated/versioning-added/pyproject.toml | 46 + .../generated/versioning-added/setup.py | 61 - .../versioning-madeoptional/pyproject.toml | 46 + .../versioning-madeoptional/setup.py | 61 - .../versioning-removed/pyproject.toml | 46 + .../generated/versioning-removed/setup.py | 61 - .../versioning-renamedfrom/pyproject.toml | 46 + .../generated/versioning-renamedfrom/setup.py | 61 - .../pyproject.toml | 46 + .../versioning-returntypechangedfrom/setup.py | 61 - .../versioning-typechangedfrom/pyproject.toml | 46 + .../versioning-typechangedfrom/setup.py | 61 - 345 files changed, 23302 insertions(+), 7479 deletions(-) create mode 100644 packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/authentication-http-custom/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-access/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-core-basic/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-core-lro-standard/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-core-model/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-core-page/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-core-scalar/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-core-traits/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-encode-duration/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-example-basic/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-payload-pageable/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/setup.py create mode 100644 packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/setup.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/CHANGELOG.md create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/LICENSE create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/MANIFEST.in create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/README.md create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/apiview-properties.json create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_configuration.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/model_base.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/serialization.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/utils.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_version.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_configuration.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_models.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/py.typed create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_configuration.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/model_base.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/serialization.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/utils.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_configuration.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_enums.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/dev_requirements.txt create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/conftest.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml create mode 100644 packages/typespec-python/test/azure/generated/client-naming/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/client-naming/setup.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/setup.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/client-structure-multiclient/setup.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/client-structure-renamedoperation/setup.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/setup.py create mode 100644 packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/headasbooleanfalse/setup.py create mode 100644 packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/headasbooleantrue/setup.py create mode 100644 packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/resiliency-srv-driven1/setup.py create mode 100644 packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/resiliency-srv-driven2/setup.py create mode 100644 packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/serialization-encoded-name-json/setup.py create mode 100644 packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/server-endpoint-not-defined/setup.py create mode 100644 packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/server-path-multiple/setup.py create mode 100644 packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/server-path-single/setup.py create mode 100644 packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/server-versions-not-versioned/setup.py create mode 100644 packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/server-versions-versioned/setup.py create mode 100644 packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/special-headers-conditional-request/setup.py create mode 100644 packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/special-headers-repeatability/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/CHANGELOG.md create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/LICENSE create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/MANIFEST.in create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/README.md create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/dev_requirements.txt create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/conftest.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/model_base.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/serialization.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_version.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/py.typed create mode 100644 packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-enum-extensible/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-enum-fixed/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-model-empty/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-model-recursive/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-model-usage/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-model-visibility/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/setup.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml delete mode 100644 packages/typespec-python/test/azure/generated/typetest-union/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/authentication-api-key/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/authentication-http-custom/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/authentication-oauth2/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/authentication-union/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/encode-bytes/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/encode-datetime/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/encode-duration/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/encode-numeric/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/headasbooleanfalse/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/headasbooleantrue/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/parameters-basic/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/parameters-body-optionality/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/parameters-collection-format/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/parameters-path/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/parameters-spread/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/payload-content-negotiation/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/payload-media-type/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/payload-multipart/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/payload-pageable/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/payload-xml/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/response-status-code-range/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/routes/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/routes/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/server-path-multiple/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/server-path-single/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/server-versions-versioned/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/special-headers-repeatability/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/special-words/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/streaming-jsonl/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-array/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-dictionary/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-empty/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-recursive/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-usage/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-model-visibility/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-property-nullable/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-property-optional/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-scalar/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/typetest-union/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/versioning-added/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/versioning-madeoptional/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/versioning-removed/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml delete mode 100644 packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/setup.py diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml new file mode 100644 index 00000000000..22e8dc0c854 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "authentication-http-custom" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Authentication Http Custom Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "authentication.http.custom._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "authentication", + "authentication.http", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/setup.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/setup.py deleted file mode 100644 index b639fd5d773..00000000000 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "authentication-http-custom" -PACKAGE_PPRINT_NAME = "Authentication Http Custom" -PACKAGE_NAMESPACE = "authentication.http.custom" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "authentication", - "authentication.http", - ] - ), - include_package_data=True, - package_data={ - "authentication.http.custom": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml new file mode 100644 index 00000000000..bad1453d104 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-clientgenerator-core-access" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Clientgenerator Core Access Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.clientgenerator.core.access._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.clientgenerator", + "specs.azure.clientgenerator.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/setup.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/setup.py deleted file mode 100644 index 103f9e3e98f..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-clientgenerator-core-access" -PACKAGE_PPRINT_NAME = "Specs Azure Clientgenerator Core Access" -PACKAGE_NAMESPACE = "specs.azure.clientgenerator.core.access" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.clientgenerator", - "specs.azure.clientgenerator.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.clientgenerator.core.access": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml new file mode 100644 index 00000000000..156e5b4709a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-clientgenerator-core-clientinitialization" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Clientgenerator Core Clientinitialization Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.clientgenerator.core.clientinitialization._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.clientgenerator", + "specs.azure.clientgenerator.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/setup.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/setup.py deleted file mode 100644 index ab8653f0873..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-clientgenerator-core-clientinitialization" -PACKAGE_PPRINT_NAME = "Specs Azure Clientgenerator Core Clientinitialization" -PACKAGE_NAMESPACE = "specs.azure.clientgenerator.core.clientinitialization" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.clientgenerator", - "specs.azure.clientgenerator.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.clientgenerator.core.clientinitialization": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml new file mode 100644 index 00000000000..a5d2f902ea6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-clientgenerator-core-clientlocation" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Clientgenerator Core Clientlocation Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.clientgenerator.core.clientlocation._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.clientgenerator", + "specs.azure.clientgenerator.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/setup.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/setup.py deleted file mode 100644 index 8bb5cf1fa1e..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-clientgenerator-core-clientlocation" -PACKAGE_PPRINT_NAME = "Specs Azure Clientgenerator Core Clientlocation" -PACKAGE_NAMESPACE = "specs.azure.clientgenerator.core.clientlocation" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.clientgenerator", - "specs.azure.clientgenerator.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.clientgenerator.core.clientlocation": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml new file mode 100644 index 00000000000..fcf4c97e53e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-clientgenerator-core-emptystring" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Clientgenerator Core Emptystring Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.clientgenerator.core.emptystring._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.clientgenerator", + "specs.azure.clientgenerator.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/setup.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/setup.py deleted file mode 100644 index c4ea7f9c43b..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-clientgenerator-core-emptystring" -PACKAGE_PPRINT_NAME = "Specs Azure Clientgenerator Core Emptystring" -PACKAGE_NAMESPACE = "specs.azure.clientgenerator.core.emptystring" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.clientgenerator", - "specs.azure.clientgenerator.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.clientgenerator.core.emptystring": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml new file mode 100644 index 00000000000..00ba20ca047 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-clientgenerator-core-flattenproperty" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Clientgenerator Core Flattenproperty Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.clientgenerator.core.flattenproperty._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.clientgenerator", + "specs.azure.clientgenerator.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/setup.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/setup.py deleted file mode 100644 index 4840c0195a3..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-clientgenerator-core-flattenproperty" -PACKAGE_PPRINT_NAME = "Specs Azure Clientgenerator Core Flattenproperty" -PACKAGE_NAMESPACE = "specs.azure.clientgenerator.core.flattenproperty" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.clientgenerator", - "specs.azure.clientgenerator.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.clientgenerator.core.flattenproperty": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml new file mode 100644 index 00000000000..249a1b65346 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-clientgenerator-core-override" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Clientgenerator Core Override Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.clientgenerator.core.override._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.clientgenerator", + "specs.azure.clientgenerator.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/setup.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/setup.py deleted file mode 100644 index 6f850dccb78..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-clientgenerator-core-override" -PACKAGE_PPRINT_NAME = "Specs Azure Clientgenerator Core Override" -PACKAGE_NAMESPACE = "specs.azure.clientgenerator.core.override" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.clientgenerator", - "specs.azure.clientgenerator.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.clientgenerator.core.override": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml new file mode 100644 index 00000000000..ebf11097974 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-clientgenerator-core-usage" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Clientgenerator Core Usage Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.clientgenerator.core.usage._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.clientgenerator", + "specs.azure.clientgenerator.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/setup.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/setup.py deleted file mode 100644 index 943f9eea151..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-clientgenerator-core-usage" -PACKAGE_PPRINT_NAME = "Specs Azure Clientgenerator Core Usage" -PACKAGE_NAMESPACE = "specs.azure.clientgenerator.core.usage" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.clientgenerator", - "specs.azure.clientgenerator.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.clientgenerator.core.usage": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml new file mode 100644 index 00000000000..e24a57ff7fd --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-core-basic" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Core Basic Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.core.basic._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/setup.py b/packages/typespec-python/test/azure/generated/azure-core-basic/setup.py deleted file mode 100644 index 2d899979fa1..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-core-basic" -PACKAGE_PPRINT_NAME = "Specs Azure Core Basic" -PACKAGE_NAMESPACE = "specs.azure.core.basic" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.core.basic": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml new file mode 100644 index 00000000000..e750a618724 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-core-lro-standard" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Core Lro Standard Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.core.lro.standard._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.core", + "specs.azure.core.lro", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/setup.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/setup.py deleted file mode 100644 index 800248559a4..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-core-lro-standard" -PACKAGE_PPRINT_NAME = "Specs Azure Core Lro Standard" -PACKAGE_NAMESPACE = "specs.azure.core.lro.standard" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.core", - "specs.azure.core.lro", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.core.lro.standard": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml new file mode 100644 index 00000000000..e142f60bdbe --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-core-model" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Core Model Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.core.model._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/setup.py b/packages/typespec-python/test/azure/generated/azure-core-model/setup.py deleted file mode 100644 index 02c8612f03e..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-core-model/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-core-model" -PACKAGE_PPRINT_NAME = "Specs Azure Core Model" -PACKAGE_NAMESPACE = "specs.azure.core.model" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.core.model": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml new file mode 100644 index 00000000000..312b23737b4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-core-page" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Core Page Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.core.page._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/setup.py b/packages/typespec-python/test/azure/generated/azure-core-page/setup.py deleted file mode 100644 index 978c13d348f..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-core-page/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-core-page" -PACKAGE_PPRINT_NAME = "Specs Azure Core Page" -PACKAGE_NAMESPACE = "specs.azure.core.page" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.core.page": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml new file mode 100644 index 00000000000..6b1d01b4a4f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-core-scalar" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Core Scalar Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.core.scalar._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/setup.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/setup.py deleted file mode 100644 index 87c932eb88f..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-core-scalar" -PACKAGE_PPRINT_NAME = "Specs Azure Core Scalar" -PACKAGE_NAMESPACE = "specs.azure.core.scalar" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.core.scalar": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml new file mode 100644 index 00000000000..fc10740f7dc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-core-traits" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Core Traits Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.core.traits._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.core", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/setup.py b/packages/typespec-python/test/azure/generated/azure-core-traits/setup.py deleted file mode 100644 index 8e7c078fb5b..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-core-traits" -PACKAGE_PPRINT_NAME = "Specs Azure Core Traits" -PACKAGE_NAMESPACE = "specs.azure.core.traits" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.core", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.core.traits": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml new file mode 100644 index 00000000000..66aa802de82 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-encode-duration" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Encode Duration Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.encode.duration._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-encode-duration/setup.py b/packages/typespec-python/test/azure/generated/azure-encode-duration/setup.py deleted file mode 100644 index af868450b11..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-encode-duration/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-encode-duration" -PACKAGE_PPRINT_NAME = "Specs Azure Encode Duration" -PACKAGE_NAMESPACE = "specs.azure.encode.duration" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.encode", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.encode.duration": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml new file mode 100644 index 00000000000..90e391adf00 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-example-basic" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Example Basic Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.example.basic._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.example", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/setup.py b/packages/typespec-python/test/azure/generated/azure-example-basic/setup.py deleted file mode 100644 index 5987a5c03ca..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-example-basic" -PACKAGE_PPRINT_NAME = "Specs Azure Example Basic" -PACKAGE_NAMESPACE = "specs.azure.example.basic" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.example", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.example.basic": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml new file mode 100644 index 00000000000..0596b284c0d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specs-azure-payload-pageable" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specs Azure Payload Pageable Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specs.azure.payload.pageable._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specs", + "specs.azure", + "specs.azure.payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-payload-pageable/setup.py b/packages/typespec-python/test/azure/generated/azure-payload-pageable/setup.py deleted file mode 100644 index 89b3fca745f..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-payload-pageable/setup.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specs-azure-payload-pageable" -PACKAGE_PPRINT_NAME = "Specs Azure Payload Pageable" -PACKAGE_NAMESPACE = "specs.azure.payload.pageable" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specs", - "specs.azure", - "specs.azure.payload", - ] - ), - include_package_data=True, - package_data={ - "specs.azure.payload.pageable": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml new file mode 100644 index 00000000000..f9b776f4cd4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-resourcemanager-commonproperties" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Resourcemanager Commonproperties Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.resourcemanager.commonproperties._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.resourcemanager", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/setup.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/setup.py deleted file mode 100644 index 5022c80f354..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-resourcemanager-commonproperties" -PACKAGE_PPRINT_NAME = "Azure Resourcemanager Commonproperties" -PACKAGE_NAMESPACE = "azure.resourcemanager.commonproperties" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.resourcemanager", - ] - ), - include_package_data=True, - package_data={ - "azure.resourcemanager.commonproperties": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml new file mode 100644 index 00000000000..c674764b954 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-resourcemanager-largeheader" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Resourcemanager Largeheader Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.resourcemanager.largeheader._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.resourcemanager", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/setup.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/setup.py deleted file mode 100644 index db0ac89b3c8..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-resourcemanager-largeheader" -PACKAGE_PPRINT_NAME = "Azure Resourcemanager Largeheader" -PACKAGE_NAMESPACE = "azure.resourcemanager.largeheader" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.resourcemanager", - ] - ), - include_package_data=True, - package_data={ - "azure.resourcemanager.largeheader": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml new file mode 100644 index 00000000000..4694deb4bea --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-resourcemanager-nonresource" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Resourcemanager Nonresource Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.resourcemanager.nonresource._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.resourcemanager", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/setup.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/setup.py deleted file mode 100644 index 4040e3ef82a..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-resourcemanager-nonresource" -PACKAGE_PPRINT_NAME = "Azure Resourcemanager Nonresource" -PACKAGE_NAMESPACE = "azure.resourcemanager.nonresource" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.resourcemanager", - ] - ), - include_package_data=True, - package_data={ - "azure.resourcemanager.nonresource": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml new file mode 100644 index 00000000000..9961b5a68ac --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-resourcemanager-operationtemplates" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Resourcemanager Operationtemplates Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.resourcemanager.operationtemplates._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.resourcemanager", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/setup.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/setup.py deleted file mode 100644 index 6ee38d1192a..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-resourcemanager-operationtemplates" -PACKAGE_PPRINT_NAME = "Azure Resourcemanager Operationtemplates" -PACKAGE_NAMESPACE = "azure.resourcemanager.operationtemplates" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.resourcemanager", - ] - ), - include_package_data=True, - package_data={ - "azure.resourcemanager.operationtemplates": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml new file mode 100644 index 00000000000..819cfe36d47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-resourcemanager-resources" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Resourcemanager Resources Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.resourcemanager.resources._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.resourcemanager", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/setup.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/setup.py deleted file mode 100644 index fb6f07be13a..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-resourcemanager-resources" -PACKAGE_PPRINT_NAME = "Azure Resourcemanager Resources" -PACKAGE_NAMESPACE = "azure.resourcemanager.resources" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.resourcemanager", - ] - ), - include_package_data=True, - package_data={ - "azure.resourcemanager.resources": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml new file mode 100644 index 00000000000..f1490d3fda5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "azure-specialheaders-xmsclientrequestid" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft CorporationAzure Specialheaders Xmsclientrequestid Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "azure.specialheaders.xmsclientrequestid._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "azure", + "azure.specialheaders", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/setup.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/setup.py deleted file mode 100644 index 7eed97ec9c1..00000000000 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-specialheaders-xmsclientrequestid" -PACKAGE_PPRINT_NAME = "Azure Specialheaders Xmsclientrequestid" -PACKAGE_NAMESPACE = "azure.specialheaders.xmsclientrequestid" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.specialheaders", - ] - ), - include_package_data=True, - package_data={ - "azure.specialheaders.xmsclientrequestid": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/CHANGELOG.md b/packages/typespec-python/test/azure/generated/client-namespace/CHANGELOG.md new file mode 100644 index 00000000000..628743d283a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version diff --git a/packages/typespec-python/test/azure/generated/client-namespace/LICENSE b/packages/typespec-python/test/azure/generated/client-namespace/LICENSE new file mode 100644 index 00000000000..63447fd8bbb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-namespace/MANIFEST.in b/packages/typespec-python/test/azure/generated/client-namespace/MANIFEST.in new file mode 100644 index 00000000000..381b472228a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/MANIFEST.in @@ -0,0 +1,6 @@ +include *.md +include LICENSE +include client/clientnamespace/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include client/__init__.py diff --git a/packages/typespec-python/test/azure/generated/client-namespace/README.md b/packages/typespec-python/test/azure/generated/client-namespace/README.md new file mode 100644 index 00000000000..a1d890f76fe --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/README.md @@ -0,0 +1,43 @@ +# Client Clientnamespace client library for Python + + +## Getting started + +### Install the package + +```bash +python -m pip install client-clientnamespace +``` + +#### Prequisites + +- Python 3.9 or later is required to use this package. +- You need an [Azure subscription][azure_sub] to use this package. +- An existing Client Clientnamespace instance. + + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials +[azure_identity_pip]: https://pypi.org/project/azure-identity/ +[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential +[pip]: https://pypi.org/project/pip/ +[azure_sub]: https://azure.microsoft.com/free/ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/apiview-properties.json b/packages/typespec-python/test/azure/generated/client-namespace/apiview-properties.json new file mode 100644 index 00000000000..8519c2a50ab --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/apiview-properties.json @@ -0,0 +1,12 @@ +{ + "CrossLanguagePackageId": "Client.ClientNamespace", + "CrossLanguageDefinitionId": { + "client.clientnamespace.first.models.FirstClientResult": "Client.ClientNamespace.FirstModel.FirstClientResult", + "client.clientnamespace.second.models.SecondClientResult": "Client.ClientNamespace.Second.Model.SecondClientResult", + "client.clientnamespace.models.SecondClientEnumType": "Client.ClientNamespace.Second.Model.SecondClientEnumType", + "client.clientnamespace.ClientNamespaceFirstClient.get_first": "ClientNameSpaceClient.ClientNamespaceFirstClient.getFirst", + "client.clientnamespace.aio.ClientNamespaceFirstClient.get_first": "ClientNameSpaceClient.ClientNamespaceFirstClient.getFirst", + "client.clientnamespace.ClientNamespaceSecondClient.get_second": "ClientNameSpaceClient.ClientNamespaceSecondClient.getSecond", + "client.clientnamespace.aio.ClientNamespaceSecondClient.get_second": "ClientNameSpaceClient.ClientNamespaceSecondClient.getSecond" + } +} \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/__init__.py new file mode 100644 index 00000000000..3f7d2e99360 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/__init__.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ClientNamespaceFirstClient # type: ignore +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClientNamespaceFirstClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py new file mode 100644 index 00000000000..bfb80c07d61 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any +from typing_extensions import Self + +from azure.core import PipelineClient +from azure.core.pipeline import policies +from azure.core.rest import HttpRequest, HttpResponse + +from ._configuration import ClientNamespaceFirstClientConfiguration +from ._operations._operations import _ClientNamespaceFirstClientOperationsMixin +from ._utils.serialization import Deserializer, Serializer + + +class ClientNamespaceFirstClient( + _ClientNamespaceFirstClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """ClientNamespaceFirstClient. + + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, *, endpoint: str = "http://localhost:3000", **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = ClientNamespaceFirstClientConfiguration(endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> Self: + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_configuration.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_configuration.py new file mode 100644 index 00000000000..89c01e16124 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_configuration.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.pipeline import policies + +from ._version import VERSION + + +class ClientNamespaceFirstClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for ClientNamespaceFirstClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: + + self.endpoint = endpoint + kwargs.setdefault("sdk_moniker", "client-clientnamespace/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py new file mode 100644 index 00000000000..933fcd7d1b5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py new file mode 100644 index 00000000000..0b6a5ce619c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +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 .._configuration import ClientNamespaceFirstClientConfiguration +from .._utils.model_base import _deserialize +from .._utils.serialization import Serializer +from .._utils.utils import ClientMixinABC +from ..first import models as _first_models2 + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_client_namespace_first_get_first_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/client/client-namespace/first" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +class _ClientNamespaceFirstClientOperationsMixin( + ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], ClientNamespaceFirstClientConfiguration] +): + + @distributed_trace + def get_first(self, **kwargs: Any) -> _first_models2.FirstClientResult: + """get_first. + + :return: FirstClientResult. The FirstClientResult is compatible with MutableMapping + :rtype: ~client.clientnamespace.first.models.FirstClientResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_first_models2.FirstClientResult] = kwargs.pop("cls", None) + + _request = build_client_namespace_first_get_first_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_first_models2.FirstClientResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/__init__.py new file mode 100644 index 00000000000..8026245c2ab --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/model_base.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/model_base.py new file mode 100644 index 00000000000..49d5c725938 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/model_base.py @@ -0,0 +1,1232 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +from typing_extensions import Self +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field( + attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str +) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: typing.Set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: # pylint: disable=too-many-nested-blocks + if isinstance(args[0], ET.Element): + existed_attr_keys = [] + model_meta = getattr(self, "_xml", {}) + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + if prop_meta.get("itemsName"): + xml_name = prop_meta.get("itemsName") + xml_ns = prop_meta.get("itemNs") + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = args[0].findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) + continue + + # text element is primitive type + if prop_meta.get("text", False): + if args[0].text is not None: + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = args[0].find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in args[0]: + if e.tag not in existed_attr_keys: + dict_to_pass[e.tag] = _convert_element(e) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: typing.Dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: typing.List[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + if annotation._name == "Dict": # pyright: ignore + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value) + except ValueError: + # for unknown value, return raw value + return value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, value, module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + + @property + def _class_type(self) -> typing.Any: + return getattr(self._type, "args", [None])[0] + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + item = obj.get(self._rest_name) + if item is None: + return item + if self._is_model: + return item + return _deserialize(self._type, _serialize(item, self._format), rf=self) + + def __set__(self, obj: Model, value) -> None: + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, typing.List[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + wrapped_element = _create_xml_element( + model_meta.get("name", o.__class__.__name__), + model_meta.get("prefix"), + model_meta.get("ns"), + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # if no ns for prop, use model's + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + xml_name = prop_meta.get("name", k) + if prop_meta.get("ns"): + ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore + xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore + # attribute should be primitive type + wrapped_element.set(xml_name, _get_primitive_type_value(v)) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": parent_meta.get("ns") if parent_meta else None, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[typing.Dict[str, typing.Any]], +) -> ET.Element: + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _create_xml_element(tag, prefix=None, ns=None): + if prefix and ns: + ET.register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: typing.Dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: typing.List[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/serialization.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/serialization.py new file mode 100644 index 00000000000..eb86ea23c96 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/serialization.py @@ -0,0 +1,2032 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + MutableMapping, + List, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore +from typing_extensions import Self + +from azure.core.exceptions import DeserializationError, SerializationError +from azure.core.serialization import NULL as CoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + :return: The deserialized data. + :rtype: object + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) from err + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError as err: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + +TZ_UTC = datetime.timezone.utc + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Optional[Dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to server from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: # pylint: disable=broad-exception-caught + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def from_dict( + cls, + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> Self: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str + """ + return key.replace("\\.", ".") + + +class Serializer: # pylint: disable=too-many-public-methods + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): + """Serialize data into a string according to type. + + :param object target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises SerializationError: if serialization fails. + :returns: The serialized data. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() # pylint: disable=protected-access + try: + attributes = target_obj._attribute_map # pylint: disable=protected-access + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError as err: + if isinstance(err, SerializationError): + raise + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise SerializationError(msg) from err + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access + except DeserializationError as err: + raise SerializationError("Unable to build a model: " + str(err)) from err + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param str name: The name of the query parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, list + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + do_quote = not kwargs.get("skip_quote", False) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param str name: The name of the header. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is CoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + if data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param obj data: Object to be serialized. + :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec # pylint: disable=eval-used + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param str data: Object to be serialized. + :rtype: str + :return: serialized object + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list data: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + Defaults to False. + :rtype: list, str + :return: serialized iterable + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized.append(None) + + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :rtype: dict + :return: serialized dictionary + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + :return: serialized object + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + if obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError as exc: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) from exc + + @staticmethod + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument + """Serialize bytearray into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument + """Serialize str into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Decimal object to float. + + :param decimal attr: Object to be serialized. + :rtype: float + :return: serialized decimal + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument + """Serialize long (Py2) or int (Py3). + + :param int attr: Object to be serialized. + :rtype: int/long + :return: serialized long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + :return: serialized date + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + :return: serialized time + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises TypeError: if format invalid. + :return: serialized rfc + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises SerializationError: if format invalid. + :return: serialized iso + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise SerializationError(msg) from err + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise TypeError(msg) from err + + @staticmethod + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises SerializationError: if format invalid + :return: serialied unix + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc + + +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer: + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, str): + return self.deserialize_data(data, response) + if isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None or data is CoreNull: + return data + try: + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise DeserializationError(msg) from err + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple + """ + if target is None: + return None, None + + if isinstance(target, str): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object + """ + try: + return self(target_obj, data, content_type=content_type) + except: # pylint: disable=bare-except + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties # type: ignore + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) from err + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) from exp + + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise DeserializationError(msg) from err + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. + :rtype: dict + :raises TypeError: if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, str): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :return: Deserialized basic type. + :rtype: str, int, float or bool + :raises TypeError: if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + if isinstance(attr, str): + if attr.lower() in ["true", "1"]: + return True + if attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec # pylint: disable=eval-used + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :return: Deserialized string. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + try: + return list(enum_obj.__members__.values())[data] + except IndexError as exc: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) from exc + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :return: Deserialized bytearray + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :return: Deserialized base64 string + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(str(attr)) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise DeserializationError(msg) from err + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :return: Deserialized int + :rtype: long or int + :raises ValueError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :return: Deserialized date + :rtype: Date + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=0, defaultday=0) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :return: Deserialized time + :rtype: datetime.time + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :return: Deserialized datetime + :rtype: Datetime + :raises DeserializationError: if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + attr = int(attr) + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise DeserializationError(msg) from err + return date_obj diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/utils.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/utils.py new file mode 100644 index 00000000000..35c9c836f85 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_utils/utils.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import Generic, TYPE_CHECKING, TypeVar + +if TYPE_CHECKING: + from .serialization import Deserializer, Serializer + + +TClient = TypeVar("TClient") +TConfig = TypeVar("TConfig") + + +class ClientMixinABC(ABC, Generic[TClient, TConfig]): + """DO NOT use this class. It is for internal typing use only.""" + + _client: TClient + _config: TConfig + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_version.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_version.py new file mode 100644 index 00000000000..be71c81bd28 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/__init__.py new file mode 100644 index 00000000000..3856e72bfda --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/__init__.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ClientNamespaceFirstClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClientNamespaceFirstClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py new file mode 100644 index 00000000000..46eb766121e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable +from typing_extensions import Self + +from azure.core import AsyncPipelineClient +from azure.core.pipeline import policies +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from .._utils.serialization import Deserializer, Serializer +from ._configuration import ClientNamespaceFirstClientConfiguration +from ._operations._operations import _ClientNamespaceFirstClientOperationsMixin + + +class ClientNamespaceFirstClient( + _ClientNamespaceFirstClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """ClientNamespaceFirstClient. + + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, *, endpoint: str = "http://localhost:3000", **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = ClientNamespaceFirstClientConfiguration(endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request( + self, request: HttpRequest, *, stream: bool = False, **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> Self: + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_configuration.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_configuration.py new file mode 100644 index 00000000000..2d59c0fc0de --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_configuration.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.pipeline import policies + +from .._version import VERSION + + +class ClientNamespaceFirstClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for ClientNamespaceFirstClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: + + self.endpoint = endpoint + kwargs.setdefault("sdk_moniker", "client-clientnamespace/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py new file mode 100644 index 00000000000..933fcd7d1b5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py new file mode 100644 index 00000000000..d8f8c6e474e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py @@ -0,0 +1,95 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core import AsyncPipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ..._operations._operations import build_client_namespace_first_get_first_request +from ..._utils.model_base import _deserialize +from ..._utils.utils import ClientMixinABC +from ...first import models as _first_models3 +from .._configuration import ClientNamespaceFirstClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class _ClientNamespaceFirstClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], ClientNamespaceFirstClientConfiguration] +): + + @distributed_trace_async + async def get_first(self, **kwargs: Any) -> _first_models3.FirstClientResult: + """get_first. + + :return: FirstClientResult. The FirstClientResult is compatible with MutableMapping + :rtype: ~client.clientnamespace.first.models.FirstClientResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_first_models3.FirstClientResult] = kwargs.pop("cls", None) + + _request = build_client_namespace_first_get_first_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_first_models3.FirstClientResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/__init__.py new file mode 100644 index 00000000000..d2634721e6c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/__init__.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + FirstClientResult, +) +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "FirstClientResult", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_models.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_models.py new file mode 100644 index 00000000000..d105c9fda60 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_models.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +from typing import Any, Mapping, overload + +from ..._utils.model_base import Model as _Model, rest_field + + +class FirstClientResult(_Model): + """FirstClientResult. + + :ivar name: Required. + :vartype name: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Required.""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/first/models/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/py.typed b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/__init__.py new file mode 100644 index 00000000000..0f7106f0faf --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/__init__.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ClientNamespaceSecondClient # type: ignore +from .._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClientNamespaceSecondClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py new file mode 100644 index 00000000000..66234c859e5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any +from typing_extensions import Self + +from azure.core import PipelineClient +from azure.core.pipeline import policies +from azure.core.rest import HttpRequest, HttpResponse + +from .._utils.serialization import Deserializer, Serializer +from ._configuration import ClientNamespaceSecondClientConfiguration +from ._operations._operations import _ClientNamespaceSecondClientOperationsMixin + + +class ClientNamespaceSecondClient( + _ClientNamespaceSecondClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """ClientNamespaceSecondClient. + + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, *, endpoint: str = "http://localhost:3000", **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = ClientNamespaceSecondClientConfiguration(endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> Self: + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_configuration.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_configuration.py new file mode 100644 index 00000000000..412ef516a62 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_configuration.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.pipeline import policies + +from .._version import VERSION + + +class ClientNamespaceSecondClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for ClientNamespaceSecondClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: + + self.endpoint = endpoint + kwargs.setdefault("sdk_moniker", "client-clientnamespace/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py new file mode 100644 index 00000000000..933fcd7d1b5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py new file mode 100644 index 00000000000..354b8d1b7a2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +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 _models1 +from ..._utils.model_base import _deserialize +from ..._utils.serialization import Serializer +from ..._utils.utils import ClientMixinABC +from .._configuration import ClientNamespaceSecondClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_client_namespace_second_get_second_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/client/client-namespace/second" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +class _ClientNamespaceSecondClientOperationsMixin( + ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], ClientNamespaceSecondClientConfiguration] +): + + @distributed_trace + def get_second(self, **kwargs: Any) -> _models1.SecondClientResult: + """get_second. + + :return: SecondClientResult. The SecondClientResult is compatible with MutableMapping + :rtype: ~client.clientnamespace.second.models.SecondClientResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models1.SecondClientResult] = kwargs.pop("cls", None) + + _request = build_client_namespace_second_get_second_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models1.SecondClientResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/__init__.py new file mode 100644 index 00000000000..8026245c2ab --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/model_base.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/model_base.py new file mode 100644 index 00000000000..49d5c725938 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/model_base.py @@ -0,0 +1,1232 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +from typing_extensions import Self +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field( + attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str +) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: typing.Set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: # pylint: disable=too-many-nested-blocks + if isinstance(args[0], ET.Element): + existed_attr_keys = [] + model_meta = getattr(self, "_xml", {}) + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + if prop_meta.get("itemsName"): + xml_name = prop_meta.get("itemsName") + xml_ns = prop_meta.get("itemNs") + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = args[0].findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) + continue + + # text element is primitive type + if prop_meta.get("text", False): + if args[0].text is not None: + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = args[0].find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in args[0]: + if e.tag not in existed_attr_keys: + dict_to_pass[e.tag] = _convert_element(e) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: typing.Dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: typing.List[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + if annotation._name == "Dict": # pyright: ignore + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value) + except ValueError: + # for unknown value, return raw value + return value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, value, module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + + @property + def _class_type(self) -> typing.Any: + return getattr(self._type, "args", [None])[0] + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + item = obj.get(self._rest_name) + if item is None: + return item + if self._is_model: + return item + return _deserialize(self._type, _serialize(item, self._format), rf=self) + + def __set__(self, obj: Model, value) -> None: + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, typing.List[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + wrapped_element = _create_xml_element( + model_meta.get("name", o.__class__.__name__), + model_meta.get("prefix"), + model_meta.get("ns"), + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # if no ns for prop, use model's + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + xml_name = prop_meta.get("name", k) + if prop_meta.get("ns"): + ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore + xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore + # attribute should be primitive type + wrapped_element.set(xml_name, _get_primitive_type_value(v)) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": parent_meta.get("ns") if parent_meta else None, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[typing.Dict[str, typing.Any]], +) -> ET.Element: + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _create_xml_element(tag, prefix=None, ns=None): + if prefix and ns: + ET.register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: typing.Dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: typing.List[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/serialization.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/serialization.py new file mode 100644 index 00000000000..eb86ea23c96 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/serialization.py @@ -0,0 +1,2032 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + MutableMapping, + List, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore +from typing_extensions import Self + +from azure.core.exceptions import DeserializationError, SerializationError +from azure.core.serialization import NULL as CoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + :return: The deserialized data. + :rtype: object + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) from err + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError as err: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + +TZ_UTC = datetime.timezone.utc + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Optional[Dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to server from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: # pylint: disable=broad-exception-caught + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def from_dict( + cls, + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> Self: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str + """ + return key.replace("\\.", ".") + + +class Serializer: # pylint: disable=too-many-public-methods + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): + """Serialize data into a string according to type. + + :param object target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises SerializationError: if serialization fails. + :returns: The serialized data. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() # pylint: disable=protected-access + try: + attributes = target_obj._attribute_map # pylint: disable=protected-access + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError as err: + if isinstance(err, SerializationError): + raise + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise SerializationError(msg) from err + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access + except DeserializationError as err: + raise SerializationError("Unable to build a model: " + str(err)) from err + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param str name: The name of the query parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, list + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + do_quote = not kwargs.get("skip_quote", False) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param str name: The name of the header. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is CoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + if data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param obj data: Object to be serialized. + :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec # pylint: disable=eval-used + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param str data: Object to be serialized. + :rtype: str + :return: serialized object + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list data: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + Defaults to False. + :rtype: list, str + :return: serialized iterable + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized.append(None) + + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :rtype: dict + :return: serialized dictionary + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + :return: serialized object + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + if obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError as exc: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) from exc + + @staticmethod + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument + """Serialize bytearray into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument + """Serialize str into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Decimal object to float. + + :param decimal attr: Object to be serialized. + :rtype: float + :return: serialized decimal + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument + """Serialize long (Py2) or int (Py3). + + :param int attr: Object to be serialized. + :rtype: int/long + :return: serialized long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + :return: serialized date + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + :return: serialized time + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises TypeError: if format invalid. + :return: serialized rfc + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises SerializationError: if format invalid. + :return: serialized iso + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise SerializationError(msg) from err + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise TypeError(msg) from err + + @staticmethod + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises SerializationError: if format invalid + :return: serialied unix + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc + + +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer: + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, str): + return self.deserialize_data(data, response) + if isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None or data is CoreNull: + return data + try: + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise DeserializationError(msg) from err + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple + """ + if target is None: + return None, None + + if isinstance(target, str): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object + """ + try: + return self(target_obj, data, content_type=content_type) + except: # pylint: disable=bare-except + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties # type: ignore + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) from err + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) from exp + + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise DeserializationError(msg) from err + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. + :rtype: dict + :raises TypeError: if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, str): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :return: Deserialized basic type. + :rtype: str, int, float or bool + :raises TypeError: if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + if isinstance(attr, str): + if attr.lower() in ["true", "1"]: + return True + if attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec # pylint: disable=eval-used + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :return: Deserialized string. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + try: + return list(enum_obj.__members__.values())[data] + except IndexError as exc: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) from exc + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :return: Deserialized bytearray + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :return: Deserialized base64 string + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(str(attr)) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise DeserializationError(msg) from err + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :return: Deserialized int + :rtype: long or int + :raises ValueError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :return: Deserialized date + :rtype: Date + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=0, defaultday=0) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :return: Deserialized time + :rtype: datetime.time + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :return: Deserialized datetime + :rtype: Datetime + :raises DeserializationError: if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + attr = int(attr) + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise DeserializationError(msg) from err + return date_obj diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/utils.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/utils.py new file mode 100644 index 00000000000..35c9c836f85 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_utils/utils.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import Generic, TYPE_CHECKING, TypeVar + +if TYPE_CHECKING: + from .serialization import Deserializer, Serializer + + +TClient = TypeVar("TClient") +TConfig = TypeVar("TConfig") + + +class ClientMixinABC(ABC, Generic[TClient, TConfig]): + """DO NOT use this class. It is for internal typing use only.""" + + _client: TClient + _config: TConfig + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/__init__.py new file mode 100644 index 00000000000..d539abde419 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/__init__.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ClientNamespaceSecondClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ClientNamespaceSecondClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py new file mode 100644 index 00000000000..f353356a14b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable +from typing_extensions import Self + +from azure.core import AsyncPipelineClient +from azure.core.pipeline import policies +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from ..._utils.serialization import Deserializer, Serializer +from ._configuration import ClientNamespaceSecondClientConfiguration +from ._operations._operations import _ClientNamespaceSecondClientOperationsMixin + + +class ClientNamespaceSecondClient( + _ClientNamespaceSecondClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """ClientNamespaceSecondClient. + + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, *, endpoint: str = "http://localhost:3000", **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = ClientNamespaceSecondClientConfiguration(endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request( + self, request: HttpRequest, *, stream: bool = False, **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> Self: + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_configuration.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_configuration.py new file mode 100644 index 00000000000..32d10db815f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_configuration.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.pipeline import policies + +from ..._version import VERSION + + +class ClientNamespaceSecondClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for ClientNamespaceSecondClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: + + self.endpoint = endpoint + kwargs.setdefault("sdk_moniker", "client-clientnamespace/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py new file mode 100644 index 00000000000..933fcd7d1b5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py new file mode 100644 index 00000000000..06548cdaf0b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py @@ -0,0 +1,95 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core import AsyncPipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ... import models as _models2 +from ...._utils.model_base import _deserialize +from ...._utils.utils import ClientMixinABC +from ..._operations._operations import build_client_namespace_second_get_second_request +from .._configuration import ClientNamespaceSecondClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class _ClientNamespaceSecondClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], ClientNamespaceSecondClientConfiguration] +): + + @distributed_trace_async + async def get_second(self, **kwargs: Any) -> _models2.SecondClientResult: + """get_second. + + :return: SecondClientResult. The SecondClientResult is compatible with MutableMapping + :rtype: ~client.clientnamespace.second.models.SecondClientResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models2.SecondClientResult] = kwargs.pop("cls", None) + + _request = build_client_namespace_second_get_second_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(_models2.SecondClientResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/__init__.py new file mode 100644 index 00000000000..ca608d6ae44 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/__init__.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + SecondClientResult, +) +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "SecondClientResult", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py new file mode 100644 index 00000000000..9e74a9906bc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +from typing import Any, Mapping, TYPE_CHECKING, Union, overload + +from ..._utils.model_base import Model as _Model, rest_field + +if TYPE_CHECKING: + from ..sub import models as _sub_models2 + + +class SecondClientResult(_Model): + """SecondClientResult. + + :ivar type: Required. "second" + :vartype type: str or ~client.clientnamespace.second.sub.models.SecondClientEnumType + """ + + type: Union[str, "_sub_models2.SecondClientEnumType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Required. \"second\"""" + + @overload + def __init__( + self, + *, + type: Union[str, "_sub_models2.SecondClientEnumType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/__init__.py new file mode 100644 index 00000000000..b5c580339ea --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/__init__.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._enums import ( # type: ignore + SecondClientEnumType, +) +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "SecondClientEnumType", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_enums.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_enums.py new file mode 100644 index 00000000000..c2a45b1ecb1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_enums.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class SecondClientEnumType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of SecondClientEnumType.""" + + SECOND = "second" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_patch.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/sub/models/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/client-namespace/dev_requirements.txt b/packages/typespec-python/test/azure/generated/client-namespace/dev_requirements.txt new file mode 100644 index 00000000000..10548647144 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/dev_requirements.txt @@ -0,0 +1,3 @@ +-e ../../../tools/azure-sdk-tools +../../core/azure-core +aiohttp \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/conftest.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/conftest.py new file mode 100644 index 00000000000..6b58c0a8856 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/conftest.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + namespacefirst_subscription_id = os.environ.get( + "NAMESPACEFIRST_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" + ) + namespacefirst_tenant_id = os.environ.get("NAMESPACEFIRST_TENANT_ID", "00000000-0000-0000-0000-000000000000") + namespacefirst_client_id = os.environ.get("NAMESPACEFIRST_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + namespacefirst_client_secret = os.environ.get( + "NAMESPACEFIRST_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" + ) + add_general_regex_sanitizer(regex=namespacefirst_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=namespacefirst_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=namespacefirst_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=namespacefirst_client_secret, value="00000000-0000-0000-0000-000000000000") + + namespacesecond_subscription_id = os.environ.get( + "NAMESPACESECOND_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000" + ) + namespacesecond_tenant_id = os.environ.get("NAMESPACESECOND_TENANT_ID", "00000000-0000-0000-0000-000000000000") + namespacesecond_client_id = os.environ.get("NAMESPACESECOND_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + namespacesecond_client_secret = os.environ.get( + "NAMESPACESECOND_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000" + ) + add_general_regex_sanitizer(regex=namespacesecond_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=namespacesecond_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=namespacesecond_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=namespacesecond_client_secret, value="00000000-0000-0000-0000-000000000000") + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first.py new file mode 100644 index 00000000000..aee7e809ce3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ClientNamespaceFirstClientTestBase, NamespaceFirstPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNamespaceFirst(ClientNamespaceFirstClientTestBase): + @NamespaceFirstPreparer() + @recorded_by_proxy + def test_get_first(self, namespacefirst_endpoint): + client = self.create_client(endpoint=namespacefirst_endpoint) + response = client.get_first() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first_async.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first_async.py new file mode 100644 index 00000000000..57f958a4a7f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_first_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NamespaceFirstPreparer +from testpreparer_async import ClientNamespaceFirstClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNamespaceFirstAsync(ClientNamespaceFirstClientTestBaseAsync): + @NamespaceFirstPreparer() + @recorded_by_proxy_async + async def test_get_first(self, namespacefirst_endpoint): + client = self.create_async_client(endpoint=namespacefirst_endpoint) + response = await client.get_first() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second.py new file mode 100644 index 00000000000..5f06f4fdf07 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ClientNamespaceSecondClientTestBase, NamespaceSecondPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNamespaceSecond(ClientNamespaceSecondClientTestBase): + @NamespaceSecondPreparer() + @recorded_by_proxy + def test_get_second(self, namespacesecond_endpoint): + client = self.create_client(endpoint=namespacesecond_endpoint) + response = client.get_second() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second_async.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second_async.py new file mode 100644 index 00000000000..bd09e4206a3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/test_namespace_second_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NamespaceSecondPreparer +from testpreparer_async import ClientNamespaceSecondClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNamespaceSecondAsync(ClientNamespaceSecondClientTestBaseAsync): + @NamespaceSecondPreparer() + @recorded_by_proxy_async + async def test_get_second(self, namespacesecond_endpoint): + client = self.create_async_client(endpoint=namespacesecond_endpoint) + response = await client.get_second() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer.py new file mode 100644 index 00000000000..e8a57ef35a2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from client.clientnamespace import ClientNamespaceFirstClient +from client.clientnamespace.second import ClientNamespaceSecondClient +from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer +import functools + + +class ClientNamespaceFirstClientTestBase(AzureRecordedTestCase): + + def create_client(self, endpoint): + credential = self.get_credential(ClientNamespaceFirstClient) + return self.create_client_from_credential( + ClientNamespaceFirstClient, + credential=credential, + endpoint=endpoint, + ) + + +NamespaceFirstPreparer = functools.partial( + PowerShellPreparer, "namespacefirst", namespacefirst_endpoint="https://fake_namespacefirst_endpoint.com" +) + + +class ClientNamespaceSecondClientTestBase(AzureRecordedTestCase): + + def create_client(self, endpoint): + credential = self.get_credential(ClientNamespaceSecondClient) + return self.create_client_from_credential( + ClientNamespaceSecondClient, + credential=credential, + endpoint=endpoint, + ) + + +NamespaceSecondPreparer = functools.partial( + PowerShellPreparer, "namespacesecond", namespacesecond_endpoint="https://fake_namespacesecond_endpoint.com" +) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer_async.py b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer_async.py new file mode 100644 index 00000000000..e6496e014fc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/generated_tests/testpreparer_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from client.clientnamespace.aio import ClientNamespaceFirstClient +from client.clientnamespace.second.aio import ClientNamespaceSecondClient +from devtools_testutils import AzureRecordedTestCase + + +class ClientNamespaceFirstClientTestBaseAsync(AzureRecordedTestCase): + + def create_async_client(self, endpoint): + credential = self.get_credential(ClientNamespaceFirstClient, is_async=True) + return self.create_client_from_credential( + ClientNamespaceFirstClient, + credential=credential, + endpoint=endpoint, + ) + + +class ClientNamespaceSecondClientTestBaseAsync(AzureRecordedTestCase): + + def create_async_client(self, endpoint): + credential = self.get_credential(ClientNamespaceSecondClient, is_async=True) + return self.create_client_from_credential( + ClientNamespaceSecondClient, + credential=credential, + endpoint=endpoint, + ) diff --git a/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml b/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml new file mode 100644 index 00000000000..fa67324d5a8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "client-clientnamespace" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Client Clientnamespace Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "client.clientnamespace._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "client", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml b/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml new file mode 100644 index 00000000000..9e5d6263d2e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "client-naming" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Client Naming Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "client.naming._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "client", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/client-naming/setup.py b/packages/typespec-python/test/azure/generated/client-naming/setup.py deleted file mode 100644 index 3eca1ae8d16..00000000000 --- a/packages/typespec-python/test/azure/generated/client-naming/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "client-naming" -PACKAGE_PPRINT_NAME = "Client Naming" -PACKAGE_NAMESPACE = "client.naming" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "client", - ] - ), - include_package_data=True, - package_data={ - "client.naming": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml new file mode 100644 index 00000000000..9a0f42dd3a7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "client-structure-service" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Client Structure Service Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "client.structure.service._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "client", + "client.structure", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/setup.py b/packages/typespec-python/test/azure/generated/client-structure-default/setup.py deleted file mode 100644 index 3dad1500767..00000000000 --- a/packages/typespec-python/test/azure/generated/client-structure-default/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "client-structure-service" -PACKAGE_PPRINT_NAME = "Client Structure Service" -PACKAGE_NAMESPACE = "client.structure.service" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "client", - "client.structure", - ] - ), - include_package_data=True, - package_data={ - "client.structure.service": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml new file mode 100644 index 00000000000..d3acf571b6c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "client-structure-multiclient" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Client Structure Multiclient Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "client.structure.multiclient._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "client", + "client.structure", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/setup.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/setup.py deleted file mode 100644 index c3048c657d2..00000000000 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "client-structure-multiclient" -PACKAGE_PPRINT_NAME = "Client Structure Multiclient" -PACKAGE_NAMESPACE = "client.structure.multiclient" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "client", - "client.structure", - ] - ), - include_package_data=True, - package_data={ - "client.structure.multiclient": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml new file mode 100644 index 00000000000..367b03e51b8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "client-structure-renamedoperation" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Client Structure Renamedoperation Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "client.structure.renamedoperation._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "client", + "client.structure", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/setup.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/setup.py deleted file mode 100644 index 376bee67b20..00000000000 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "client-structure-renamedoperation" -PACKAGE_PPRINT_NAME = "Client Structure Renamedoperation" -PACKAGE_NAMESPACE = "client.structure.renamedoperation" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "client", - "client.structure", - ] - ), - include_package_data=True, - package_data={ - "client.structure.renamedoperation": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml new file mode 100644 index 00000000000..b7d80b747f3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "client-structure-twooperationgroup" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Client Structure Twooperationgroup Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "client.structure.twooperationgroup._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "client", + "client.structure", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/setup.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/setup.py deleted file mode 100644 index 7de42845c28..00000000000 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "client-structure-twooperationgroup" -PACKAGE_PPRINT_NAME = "Client Structure Twooperationgroup" -PACKAGE_NAMESPACE = "client.structure.twooperationgroup" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "client", - "client.structure", - ] - ), - include_package_data=True, - package_data={ - "client.structure.twooperationgroup": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml b/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml new file mode 100644 index 00000000000..8ca79f383d8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "headasbooleanfalse" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Headasbooleanfalse Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "headasbooleanfalse._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/setup.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/setup.py deleted file mode 100644 index e6d0293967b..00000000000 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/setup.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "headasbooleanfalse" -PACKAGE_PPRINT_NAME = "Headasbooleanfalse" -PACKAGE_NAMESPACE = "headasbooleanfalse" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "headasbooleanfalse": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml b/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml new file mode 100644 index 00000000000..1ffe5caa73c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "headasbooleantrue" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Headasbooleantrue Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "headasbooleantrue._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/setup.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/setup.py deleted file mode 100644 index 350d582a531..00000000000 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/setup.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "headasbooleantrue" -PACKAGE_PPRINT_NAME = "Headasbooleantrue" -PACKAGE_NAMESPACE = "headasbooleantrue" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "headasbooleantrue": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml new file mode 100644 index 00000000000..00be2e7bb8a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "resiliency-srv-driven1" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure ResiliencySrvDriven1 Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "resiliency.srv.driven1._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "resiliency", + "resiliency.srv", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/setup.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/setup.py deleted file mode 100644 index 95f4863490f..00000000000 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "resiliency-srv-driven1" -PACKAGE_PPRINT_NAME = "ResiliencySrvDriven1" -PACKAGE_NAMESPACE = "resiliency.srv.driven1" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "resiliency", - "resiliency.srv", - ] - ), - include_package_data=True, - package_data={ - "resiliency.srv.driven1": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml new file mode 100644 index 00000000000..6bb00988d27 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "resiliency-srv-driven2" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure ResiliencySrvDriven2 Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "resiliency.srv.driven2._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "resiliency", + "resiliency.srv", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/setup.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/setup.py deleted file mode 100644 index 29f0405533f..00000000000 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "resiliency-srv-driven2" -PACKAGE_PPRINT_NAME = "ResiliencySrvDriven2" -PACKAGE_NAMESPACE = "resiliency.srv.driven2" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "resiliency", - "resiliency.srv", - ] - ), - include_package_data=True, - package_data={ - "resiliency.srv.driven2": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml new file mode 100644 index 00000000000..7ce853a6f03 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "serialization-encodedname-json" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Serialization Encodedname Json Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "serialization.encodedname.json._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "serialization", + "serialization.encodedname", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/setup.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/setup.py deleted file mode 100644 index b111ba237c0..00000000000 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "serialization-encodedname-json" -PACKAGE_PPRINT_NAME = "Serialization Encodedname Json" -PACKAGE_NAMESPACE = "serialization.encodedname.json" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "serialization", - "serialization.encodedname", - ] - ), - include_package_data=True, - package_data={ - "serialization.encodedname.json": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml new file mode 100644 index 00000000000..34a7a16f096 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-endpoint-notdefined" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Server Endpoint Notdefined Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "server.endpoint.notdefined._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.endpoint", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/setup.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/setup.py deleted file mode 100644 index 3edf4f92724..00000000000 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-endpoint-notdefined" -PACKAGE_PPRINT_NAME = "Server Endpoint Notdefined" -PACKAGE_NAMESPACE = "server.endpoint.notdefined" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.endpoint", - ] - ), - include_package_data=True, - package_data={ - "server.endpoint.notdefined": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml b/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml new file mode 100644 index 00000000000..c9020e993ba --- /dev/null +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-path-multiple" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Server Path Multiple Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "server.path.multiple._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.path", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/setup.py b/packages/typespec-python/test/azure/generated/server-path-multiple/setup.py deleted file mode 100644 index a58011eb80a..00000000000 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-path-multiple" -PACKAGE_PPRINT_NAME = "Server Path Multiple" -PACKAGE_NAMESPACE = "server.path.multiple" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.path", - ] - ), - include_package_data=True, - package_data={ - "server.path.multiple": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml b/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml new file mode 100644 index 00000000000..cd74e05878f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-path-single" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Server Path Single Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "server.path.single._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.path", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/server-path-single/setup.py b/packages/typespec-python/test/azure/generated/server-path-single/setup.py deleted file mode 100644 index e716718edbb..00000000000 --- a/packages/typespec-python/test/azure/generated/server-path-single/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-path-single" -PACKAGE_PPRINT_NAME = "Server Path Single" -PACKAGE_NAMESPACE = "server.path.single" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.path", - ] - ), - include_package_data=True, - package_data={ - "server.path.single": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml new file mode 100644 index 00000000000..0500fbf7f6f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-versions-notversioned" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Server Versions Notversioned Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "server.versions.notversioned._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.versions", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/setup.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/setup.py deleted file mode 100644 index ec2e198806d..00000000000 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-versions-notversioned" -PACKAGE_PPRINT_NAME = "Server Versions Notversioned" -PACKAGE_NAMESPACE = "server.versions.notversioned" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.versions", - ] - ), - include_package_data=True, - package_data={ - "server.versions.notversioned": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml b/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml new file mode 100644 index 00000000000..98d9a5386d6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-versions-versioned" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Server Versions Versioned Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "server.versions.versioned._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.versions", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/setup.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/setup.py deleted file mode 100644 index 57e47d66a64..00000000000 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-versions-versioned" -PACKAGE_PPRINT_NAME = "Server Versions Versioned" -PACKAGE_NAMESPACE = "server.versions.versioned" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.versions", - ] - ), - include_package_data=True, - package_data={ - "server.versions.versioned": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml new file mode 100644 index 00000000000..befaab7174f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specialheaders-conditionalrequest" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specialheaders Conditionalrequest Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specialheaders.conditionalrequest._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specialheaders", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/setup.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/setup.py deleted file mode 100644 index 349dda1bfe0..00000000000 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specialheaders-conditionalrequest" -PACKAGE_PPRINT_NAME = "Specialheaders Conditionalrequest" -PACKAGE_NAMESPACE = "specialheaders.conditionalrequest" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specialheaders", - ] - ), - include_package_data=True, - package_data={ - "specialheaders.conditionalrequest": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml b/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml new file mode 100644 index 00000000000..3f1ea6f5f1f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specialheaders-repeatability" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Specialheaders Repeatability Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "specialheaders.repeatability._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specialheaders", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/setup.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/setup.py deleted file mode 100644 index 2cb7cea0c6e..00000000000 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specialheaders-repeatability" -PACKAGE_PPRINT_NAME = "Specialheaders Repeatability" -PACKAGE_NAMESPACE = "specialheaders.repeatability" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specialheaders", - ] - ), - include_package_data=True, - package_data={ - "specialheaders.repeatability": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/CHANGELOG.md b/packages/typespec-python/test/azure/generated/typetest-dictionary/CHANGELOG.md new file mode 100644 index 00000000000..628743d283a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/LICENSE b/packages/typespec-python/test/azure/generated/typetest-dictionary/LICENSE new file mode 100644 index 00000000000..63447fd8bbb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/MANIFEST.in b/packages/typespec-python/test/azure/generated/typetest-dictionary/MANIFEST.in new file mode 100644 index 00000000000..8d989eb529c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/MANIFEST.in @@ -0,0 +1,6 @@ +include *.md +include LICENSE +include typetest/dictionary/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include typetest/__init__.py diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/README.md b/packages/typespec-python/test/azure/generated/typetest-dictionary/README.md new file mode 100644 index 00000000000..0c8d60043c0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/README.md @@ -0,0 +1,43 @@ +# Typetest Dictionary client library for Python + + +## Getting started + +### Install the package + +```bash +python -m pip install typetest-dictionary +``` + +#### Prequisites + +- Python 3.9 or later is required to use this package. +- You need an [Azure subscription][azure_sub] to use this package. +- An existing Typetest Dictionary instance. + + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials +[azure_identity_pip]: https://pypi.org/project/azure-identity/ +[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential +[pip]: https://pypi.org/project/pip/ +[azure_sub]: https://azure.microsoft.com/free/ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json new file mode 100644 index 00000000000..4ea465f4f09 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json @@ -0,0 +1,50 @@ +{ + "CrossLanguagePackageId": "Type.Dictionary", + "CrossLanguageDefinitionId": { + "typetest.dictionary.models.InnerModel": "Type.Dictionary.InnerModel", + "typetest.dictionary.operations.Int32ValueOperations.get": "Type.Dictionary.Int32Value.get", + "typetest.dictionary.aio.operations.Int32ValueOperations.get": "Type.Dictionary.Int32Value.get", + "typetest.dictionary.operations.Int32ValueOperations.put": "Type.Dictionary.Int32Value.put", + "typetest.dictionary.aio.operations.Int32ValueOperations.put": "Type.Dictionary.Int32Value.put", + "typetest.dictionary.operations.Int64ValueOperations.get": "Type.Dictionary.Int64Value.get", + "typetest.dictionary.aio.operations.Int64ValueOperations.get": "Type.Dictionary.Int64Value.get", + "typetest.dictionary.operations.Int64ValueOperations.put": "Type.Dictionary.Int64Value.put", + "typetest.dictionary.aio.operations.Int64ValueOperations.put": "Type.Dictionary.Int64Value.put", + "typetest.dictionary.operations.BooleanValueOperations.get": "Type.Dictionary.BooleanValue.get", + "typetest.dictionary.aio.operations.BooleanValueOperations.get": "Type.Dictionary.BooleanValue.get", + "typetest.dictionary.operations.BooleanValueOperations.put": "Type.Dictionary.BooleanValue.put", + "typetest.dictionary.aio.operations.BooleanValueOperations.put": "Type.Dictionary.BooleanValue.put", + "typetest.dictionary.operations.StringValueOperations.get": "Type.Dictionary.StringValue.get", + "typetest.dictionary.aio.operations.StringValueOperations.get": "Type.Dictionary.StringValue.get", + "typetest.dictionary.operations.StringValueOperations.put": "Type.Dictionary.StringValue.put", + "typetest.dictionary.aio.operations.StringValueOperations.put": "Type.Dictionary.StringValue.put", + "typetest.dictionary.operations.Float32ValueOperations.get": "Type.Dictionary.Float32Value.get", + "typetest.dictionary.aio.operations.Float32ValueOperations.get": "Type.Dictionary.Float32Value.get", + "typetest.dictionary.operations.Float32ValueOperations.put": "Type.Dictionary.Float32Value.put", + "typetest.dictionary.aio.operations.Float32ValueOperations.put": "Type.Dictionary.Float32Value.put", + "typetest.dictionary.operations.DatetimeValueOperations.get": "Type.Dictionary.DatetimeValue.get", + "typetest.dictionary.aio.operations.DatetimeValueOperations.get": "Type.Dictionary.DatetimeValue.get", + "typetest.dictionary.operations.DatetimeValueOperations.put": "Type.Dictionary.DatetimeValue.put", + "typetest.dictionary.aio.operations.DatetimeValueOperations.put": "Type.Dictionary.DatetimeValue.put", + "typetest.dictionary.operations.DurationValueOperations.get": "Type.Dictionary.DurationValue.get", + "typetest.dictionary.aio.operations.DurationValueOperations.get": "Type.Dictionary.DurationValue.get", + "typetest.dictionary.operations.DurationValueOperations.put": "Type.Dictionary.DurationValue.put", + "typetest.dictionary.aio.operations.DurationValueOperations.put": "Type.Dictionary.DurationValue.put", + "typetest.dictionary.operations.UnknownValueOperations.get": "Type.Dictionary.UnknownValue.get", + "typetest.dictionary.aio.operations.UnknownValueOperations.get": "Type.Dictionary.UnknownValue.get", + "typetest.dictionary.operations.UnknownValueOperations.put": "Type.Dictionary.UnknownValue.put", + "typetest.dictionary.aio.operations.UnknownValueOperations.put": "Type.Dictionary.UnknownValue.put", + "typetest.dictionary.operations.ModelValueOperations.get": "Type.Dictionary.ModelValue.get", + "typetest.dictionary.aio.operations.ModelValueOperations.get": "Type.Dictionary.ModelValue.get", + "typetest.dictionary.operations.ModelValueOperations.put": "Type.Dictionary.ModelValue.put", + "typetest.dictionary.aio.operations.ModelValueOperations.put": "Type.Dictionary.ModelValue.put", + "typetest.dictionary.operations.RecursiveModelValueOperations.get": "Type.Dictionary.RecursiveModelValue.get", + "typetest.dictionary.aio.operations.RecursiveModelValueOperations.get": "Type.Dictionary.RecursiveModelValue.get", + "typetest.dictionary.operations.RecursiveModelValueOperations.put": "Type.Dictionary.RecursiveModelValue.put", + "typetest.dictionary.aio.operations.RecursiveModelValueOperations.put": "Type.Dictionary.RecursiveModelValue.put", + "typetest.dictionary.operations.NullableFloatValueOperations.get": "Type.Dictionary.NullableFloatValue.get", + "typetest.dictionary.aio.operations.NullableFloatValueOperations.get": "Type.Dictionary.NullableFloatValue.get", + "typetest.dictionary.operations.NullableFloatValueOperations.put": "Type.Dictionary.NullableFloatValue.put", + "typetest.dictionary.aio.operations.NullableFloatValueOperations.put": "Type.Dictionary.NullableFloatValue.put" + } +} \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/dev_requirements.txt b/packages/typespec-python/test/azure/generated/typetest-dictionary/dev_requirements.txt new file mode 100644 index 00000000000..10548647144 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/dev_requirements.txt @@ -0,0 +1,3 @@ +-e ../../../tools/azure-sdk-tools +../../core/azure-core +aiohttp \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/conftest.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/conftest.py new file mode 100644 index 00000000000..694a0f94554 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/conftest.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + dictionary_subscription_id = os.environ.get("DICTIONARY_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + dictionary_tenant_id = os.environ.get("DICTIONARY_TENANT_ID", "00000000-0000-0000-0000-000000000000") + dictionary_client_id = os.environ.get("DICTIONARY_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + dictionary_client_secret = os.environ.get("DICTIONARY_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=dictionary_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=dictionary_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=dictionary_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=dictionary_client_secret, value="00000000-0000-0000-0000-000000000000") + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations.py new file mode 100644 index 00000000000..066f228c89a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryBooleanValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_boolean_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.boolean_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_boolean_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.boolean_value.put( + body={"str": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations_async.py new file mode 100644 index 00000000000..ea0403b733d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_boolean_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryBooleanValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_boolean_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.boolean_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_boolean_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.boolean_value.put( + body={"str": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations.py new file mode 100644 index 00000000000..30fb62304ce --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDatetimeValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_datetime_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.datetime_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_datetime_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.datetime_value.put( + body={"str": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations_async.py new file mode 100644 index 00000000000..3e83eefc827 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_datetime_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDatetimeValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_datetime_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.datetime_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_datetime_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.datetime_value.put( + body={"str": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations.py new file mode 100644 index 00000000000..b0b3e702188 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDurationValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_duration_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.duration_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_duration_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.duration_value.put( + body={"str": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations_async.py new file mode 100644 index 00000000000..0d5394008dd --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_duration_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDurationValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_duration_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.duration_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_duration_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.duration_value.put( + body={"str": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations.py new file mode 100644 index 00000000000..859239e7348 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryFloat32ValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_float32_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.float32_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_float32_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.float32_value.put( + body={"str": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations_async.py new file mode 100644 index 00000000000..a52a03e857f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_float32_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryFloat32ValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_float32_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.float32_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_float32_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.float32_value.put( + body={"str": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations.py new file mode 100644 index 00000000000..a2199a45778 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryInt32ValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_int32_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.int32_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_int32_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.int32_value.put( + body={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations_async.py new file mode 100644 index 00000000000..77d4bb4577d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int32_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryInt32ValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_int32_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.int32_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_int32_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.int32_value.put( + body={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations.py new file mode 100644 index 00000000000..6f7322982d7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryInt64ValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_int64_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.int64_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_int64_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.int64_value.put( + body={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations_async.py new file mode 100644 index 00000000000..12b6e15ef77 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_int64_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryInt64ValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_int64_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.int64_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_int64_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.int64_value.put( + body={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations.py new file mode 100644 index 00000000000..040afe8e20b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryModelValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_model_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.model_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_model_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.model_value.put( + body={"str": {"property": "str", "children": {"str": ...}}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations_async.py new file mode 100644 index 00000000000..54fbc74db5b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_model_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryModelValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_model_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.model_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_model_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.model_value.put( + body={"str": {"property": "str", "children": {"str": ...}}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations.py new file mode 100644 index 00000000000..3f17f0f6982 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryNullableFloatValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_nullable_float_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.nullable_float_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_nullable_float_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.nullable_float_value.put( + body={"str": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations_async.py new file mode 100644 index 00000000000..1e8f5f07b35 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_nullable_float_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryNullableFloatValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_nullable_float_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.nullable_float_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_nullable_float_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.nullable_float_value.put( + body={"str": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations.py new file mode 100644 index 00000000000..fe00987385c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryRecursiveModelValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_recursive_model_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.recursive_model_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_recursive_model_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.recursive_model_value.put( + body={"str": {"property": "str", "children": {"str": ...}}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations_async.py new file mode 100644 index 00000000000..63ed9c3ca9f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_recursive_model_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryRecursiveModelValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_recursive_model_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.recursive_model_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_recursive_model_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.recursive_model_value.put( + body={"str": {"property": "str", "children": {"str": ...}}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations.py new file mode 100644 index 00000000000..6309558db05 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryStringValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_string_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.string_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_string_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.string_value.put( + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations_async.py new file mode 100644 index 00000000000..91fdb59db9f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_string_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryStringValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_string_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.string_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_string_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.string_value.put( + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations.py new file mode 100644 index 00000000000..e84f0564e91 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryUnknownValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_unknown_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.unknown_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_unknown_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.unknown_value.put( + body={"str": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations_async.py new file mode 100644 index 00000000000..6bd7a2bf28a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_unknown_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryUnknownValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_unknown_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.unknown_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_unknown_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.unknown_value.put( + body={"str": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer.py new file mode 100644 index 00000000000..8f9f9085cc3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer +import functools +from typetest.dictionary import DictionaryClient + + +class DictionaryClientTestBase(AzureRecordedTestCase): + + def create_client(self, endpoint): + credential = self.get_credential(DictionaryClient) + return self.create_client_from_credential( + DictionaryClient, + credential=credential, + endpoint=endpoint, + ) + + +DictionaryPreparer = functools.partial( + PowerShellPreparer, "dictionary", dictionary_endpoint="https://fake_dictionary_endpoint.com" +) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer_async.py new file mode 100644 index 00000000000..d6149b7d469 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/testpreparer_async.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from devtools_testutils import AzureRecordedTestCase +from typetest.dictionary.aio import DictionaryClient + + +class DictionaryClientTestBaseAsync(AzureRecordedTestCase): + + def create_async_client(self, endpoint): + credential = self.get_credential(DictionaryClient, is_async=True) + return self.create_client_from_credential( + DictionaryClient, + credential=credential, + endpoint=endpoint, + ) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml new file mode 100644 index 00000000000..7cb42409bf7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-dictionary" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Dictionary Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.dictionary._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/__init__.py new file mode 100644 index 00000000000..635684f627e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/__init__.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import DictionaryClient # type: ignore +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "DictionaryClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py new file mode 100644 index 00000000000..393c329d4ba --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py @@ -0,0 +1,141 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any +from typing_extensions import Self + +from azure.core import PipelineClient +from azure.core.pipeline import policies +from azure.core.rest import HttpRequest, HttpResponse + +from ._configuration import DictionaryClientConfiguration +from ._utils.serialization import Deserializer, Serializer +from .operations import ( + BooleanValueOperations, + DatetimeValueOperations, + DurationValueOperations, + Float32ValueOperations, + Int32ValueOperations, + Int64ValueOperations, + ModelValueOperations, + NullableFloatValueOperations, + RecursiveModelValueOperations, + StringValueOperations, + UnknownValueOperations, +) + + +class DictionaryClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes + """Illustrates various of dictionaries. + + :ivar int32_value: Int32ValueOperations operations + :vartype int32_value: typetest.dictionary.operations.Int32ValueOperations + :ivar int64_value: Int64ValueOperations operations + :vartype int64_value: typetest.dictionary.operations.Int64ValueOperations + :ivar boolean_value: BooleanValueOperations operations + :vartype boolean_value: typetest.dictionary.operations.BooleanValueOperations + :ivar string_value: StringValueOperations operations + :vartype string_value: typetest.dictionary.operations.StringValueOperations + :ivar float32_value: Float32ValueOperations operations + :vartype float32_value: typetest.dictionary.operations.Float32ValueOperations + :ivar datetime_value: DatetimeValueOperations operations + :vartype datetime_value: typetest.dictionary.operations.DatetimeValueOperations + :ivar duration_value: DurationValueOperations operations + :vartype duration_value: typetest.dictionary.operations.DurationValueOperations + :ivar unknown_value: UnknownValueOperations operations + :vartype unknown_value: typetest.dictionary.operations.UnknownValueOperations + :ivar model_value: ModelValueOperations operations + :vartype model_value: typetest.dictionary.operations.ModelValueOperations + :ivar recursive_model_value: RecursiveModelValueOperations operations + :vartype recursive_model_value: typetest.dictionary.operations.RecursiveModelValueOperations + :ivar nullable_float_value: NullableFloatValueOperations operations + :vartype nullable_float_value: typetest.dictionary.operations.NullableFloatValueOperations + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, *, endpoint: str = "http://localhost:3000", **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = DictionaryClientConfiguration(endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.recursive_model_value = RecursiveModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_float_value = NullableFloatValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> Self: + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py new file mode 100644 index 00000000000..4b1915c8ab7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_configuration.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.pipeline import policies + +from ._version import VERSION + + +class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for DictionaryClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: + + self.endpoint = endpoint + kwargs.setdefault("sdk_moniker", "typetest-dictionary/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/__init__.py new file mode 100644 index 00000000000..8026245c2ab --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/model_base.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/model_base.py new file mode 100644 index 00000000000..49d5c725938 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/model_base.py @@ -0,0 +1,1232 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +from typing_extensions import Self +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field( + attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str +) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: typing.Set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: # pylint: disable=too-many-nested-blocks + if isinstance(args[0], ET.Element): + existed_attr_keys = [] + model_meta = getattr(self, "_xml", {}) + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + if prop_meta.get("itemsName"): + xml_name = prop_meta.get("itemsName") + xml_ns = prop_meta.get("itemNs") + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = args[0].findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) + continue + + # text element is primitive type + if prop_meta.get("text", False): + if args[0].text is not None: + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = args[0].find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in args[0]: + if e.tag not in existed_attr_keys: + dict_to_pass[e.tag] = _convert_element(e) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: typing.Dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: typing.List[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + if annotation._name == "Dict": # pyright: ignore + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value) + except ValueError: + # for unknown value, return raw value + return value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, value, module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + + @property + def _class_type(self) -> typing.Any: + return getattr(self._type, "args", [None])[0] + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + item = obj.get(self._rest_name) + if item is None: + return item + if self._is_model: + return item + return _deserialize(self._type, _serialize(item, self._format), rf=self) + + def __set__(self, obj: Model, value) -> None: + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, typing.List[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + wrapped_element = _create_xml_element( + model_meta.get("name", o.__class__.__name__), + model_meta.get("prefix"), + model_meta.get("ns"), + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # if no ns for prop, use model's + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + xml_name = prop_meta.get("name", k) + if prop_meta.get("ns"): + ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore + xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore + # attribute should be primitive type + wrapped_element.set(xml_name, _get_primitive_type_value(v)) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": parent_meta.get("ns") if parent_meta else None, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[typing.Dict[str, typing.Any]], +) -> ET.Element: + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _create_xml_element(tag, prefix=None, ns=None): + if prefix and ns: + ET.register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: typing.Dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: typing.List[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/serialization.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/serialization.py new file mode 100644 index 00000000000..eb86ea23c96 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_utils/serialization.py @@ -0,0 +1,2032 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + MutableMapping, + List, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore +from typing_extensions import Self + +from azure.core.exceptions import DeserializationError, SerializationError +from azure.core.serialization import NULL as CoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + :return: The deserialized data. + :rtype: object + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) from err + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError as err: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + +TZ_UTC = datetime.timezone.utc + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Optional[Dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to server from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: # pylint: disable=broad-exception-caught + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def from_dict( + cls, + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> Self: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str + """ + return key.replace("\\.", ".") + + +class Serializer: # pylint: disable=too-many-public-methods + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): + """Serialize data into a string according to type. + + :param object target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises SerializationError: if serialization fails. + :returns: The serialized data. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() # pylint: disable=protected-access + try: + attributes = target_obj._attribute_map # pylint: disable=protected-access + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError as err: + if isinstance(err, SerializationError): + raise + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise SerializationError(msg) from err + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access + except DeserializationError as err: + raise SerializationError("Unable to build a model: " + str(err)) from err + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param str name: The name of the query parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, list + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + do_quote = not kwargs.get("skip_quote", False) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param str name: The name of the header. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is CoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + if data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param obj data: Object to be serialized. + :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec # pylint: disable=eval-used + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param str data: Object to be serialized. + :rtype: str + :return: serialized object + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list data: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + Defaults to False. + :rtype: list, str + :return: serialized iterable + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized.append(None) + + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :rtype: dict + :return: serialized dictionary + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + :return: serialized object + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + if obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError as exc: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) from exc + + @staticmethod + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument + """Serialize bytearray into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument + """Serialize str into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Decimal object to float. + + :param decimal attr: Object to be serialized. + :rtype: float + :return: serialized decimal + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument + """Serialize long (Py2) or int (Py3). + + :param int attr: Object to be serialized. + :rtype: int/long + :return: serialized long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + :return: serialized date + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + :return: serialized time + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises TypeError: if format invalid. + :return: serialized rfc + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises SerializationError: if format invalid. + :return: serialized iso + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise SerializationError(msg) from err + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise TypeError(msg) from err + + @staticmethod + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises SerializationError: if format invalid + :return: serialied unix + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc + + +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer: + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, str): + return self.deserialize_data(data, response) + if isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None or data is CoreNull: + return data + try: + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise DeserializationError(msg) from err + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple + """ + if target is None: + return None, None + + if isinstance(target, str): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object + """ + try: + return self(target_obj, data, content_type=content_type) + except: # pylint: disable=bare-except + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties # type: ignore + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) from err + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) from exp + + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise DeserializationError(msg) from err + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. + :rtype: dict + :raises TypeError: if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, str): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :return: Deserialized basic type. + :rtype: str, int, float or bool + :raises TypeError: if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + if isinstance(attr, str): + if attr.lower() in ["true", "1"]: + return True + if attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec # pylint: disable=eval-used + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :return: Deserialized string. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + try: + return list(enum_obj.__members__.values())[data] + except IndexError as exc: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) from exc + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :return: Deserialized bytearray + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :return: Deserialized base64 string + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(str(attr)) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise DeserializationError(msg) from err + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :return: Deserialized int + :rtype: long or int + :raises ValueError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :return: Deserialized date + :rtype: Date + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=0, defaultday=0) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :return: Deserialized time + :rtype: datetime.time + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :return: Deserialized datetime + :rtype: Datetime + :raises DeserializationError: if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + attr = int(attr) + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise DeserializationError(msg) from err + return date_obj diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_version.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_version.py new file mode 100644 index 00000000000..be71c81bd28 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/__init__.py new file mode 100644 index 00000000000..dcbbc238342 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/__init__.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import DictionaryClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "DictionaryClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py new file mode 100644 index 00000000000..f48f157063d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py @@ -0,0 +1,144 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable +from typing_extensions import Self + +from azure.core import AsyncPipelineClient +from azure.core.pipeline import policies +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from .._utils.serialization import Deserializer, Serializer +from ._configuration import DictionaryClientConfiguration +from .operations import ( + BooleanValueOperations, + DatetimeValueOperations, + DurationValueOperations, + Float32ValueOperations, + Int32ValueOperations, + Int64ValueOperations, + ModelValueOperations, + NullableFloatValueOperations, + RecursiveModelValueOperations, + StringValueOperations, + UnknownValueOperations, +) + + +class DictionaryClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes + """Illustrates various of dictionaries. + + :ivar int32_value: Int32ValueOperations operations + :vartype int32_value: typetest.dictionary.aio.operations.Int32ValueOperations + :ivar int64_value: Int64ValueOperations operations + :vartype int64_value: typetest.dictionary.aio.operations.Int64ValueOperations + :ivar boolean_value: BooleanValueOperations operations + :vartype boolean_value: typetest.dictionary.aio.operations.BooleanValueOperations + :ivar string_value: StringValueOperations operations + :vartype string_value: typetest.dictionary.aio.operations.StringValueOperations + :ivar float32_value: Float32ValueOperations operations + :vartype float32_value: typetest.dictionary.aio.operations.Float32ValueOperations + :ivar datetime_value: DatetimeValueOperations operations + :vartype datetime_value: typetest.dictionary.aio.operations.DatetimeValueOperations + :ivar duration_value: DurationValueOperations operations + :vartype duration_value: typetest.dictionary.aio.operations.DurationValueOperations + :ivar unknown_value: UnknownValueOperations operations + :vartype unknown_value: typetest.dictionary.aio.operations.UnknownValueOperations + :ivar model_value: ModelValueOperations operations + :vartype model_value: typetest.dictionary.aio.operations.ModelValueOperations + :ivar recursive_model_value: RecursiveModelValueOperations operations + :vartype recursive_model_value: + typetest.dictionary.aio.operations.RecursiveModelValueOperations + :ivar nullable_float_value: NullableFloatValueOperations operations + :vartype nullable_float_value: typetest.dictionary.aio.operations.NullableFloatValueOperations + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, *, endpoint: str = "http://localhost:3000", **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = DictionaryClientConfiguration(endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) + self.recursive_model_value = RecursiveModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_float_value = NullableFloatValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def send_request( + self, request: HttpRequest, *, stream: bool = False, **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> Self: + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py new file mode 100644 index 00000000000..0ddc478803d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_configuration.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.pipeline import policies + +from .._version import VERSION + + +class DictionaryClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for DictionaryClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__(self, endpoint: str = "http://localhost:3000", **kwargs: Any) -> None: + + self.endpoint = endpoint + kwargs.setdefault("sdk_moniker", "typetest-dictionary/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py new file mode 100644 index 00000000000..f56c4be2d9f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Int32ValueOperations # type: ignore +from ._operations import Int64ValueOperations # type: ignore +from ._operations import BooleanValueOperations # type: ignore +from ._operations import StringValueOperations # type: ignore +from ._operations import Float32ValueOperations # type: ignore +from ._operations import DatetimeValueOperations # type: ignore +from ._operations import DurationValueOperations # type: ignore +from ._operations import UnknownValueOperations # type: ignore +from ._operations import ModelValueOperations # type: ignore +from ._operations import RecursiveModelValueOperations # type: ignore +from ._operations import NullableFloatValueOperations # type: ignore + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Int32ValueOperations", + "Int64ValueOperations", + "BooleanValueOperations", + "StringValueOperations", + "Float32ValueOperations", + "DatetimeValueOperations", + "DurationValueOperations", + "UnknownValueOperations", + "ModelValueOperations", + "RecursiveModelValueOperations", + "NullableFloatValueOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py new file mode 100644 index 00000000000..1807c80aa64 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py @@ -0,0 +1,1807 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +import datetime +from io import IOBase +import json +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core import AsyncPipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict + +from ... import models as _models +from ..._utils.model_base import SdkJSONEncoder, _deserialize +from ..._utils.serialization import Deserializer, Serializer +from ...operations._operations import ( + build_boolean_value_get_request, + build_boolean_value_put_request, + build_datetime_value_get_request, + build_datetime_value_put_request, + build_duration_value_get_request, + build_duration_value_put_request, + build_float32_value_get_request, + build_float32_value_put_request, + build_int32_value_get_request, + build_int32_value_put_request, + build_int64_value_get_request, + build_int64_value_put_request, + build_model_value_get_request, + build_model_value_put_request, + build_nullable_float_value_get_request, + build_nullable_float_value_put_request, + build_recursive_model_value_get_request, + build_recursive_model_value_put_request, + build_string_value_get_request, + build_string_value_put_request, + build_unknown_value_get_request, + build_unknown_value_put_request, +) +from .._configuration import DictionaryClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class Int32ValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`int32_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, int]: + """get. + + :return: dict mapping str to int + :rtype: dict[str, int] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, int]] = kwargs.pop("cls", None) + + _request = build_int32_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, int], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, int] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: int} type or a IO[bytes] type. Required. + :type body: dict[str, int] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_int32_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class Int64ValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`int64_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, int]: + """get. + + :return: dict mapping str to int + :rtype: dict[str, int] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, int]] = kwargs.pop("cls", None) + + _request = build_int64_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, int], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, int] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: int} type or a IO[bytes] type. Required. + :type body: dict[str, int] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_int64_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class BooleanValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`boolean_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, bool]: + """get. + + :return: dict mapping str to bool + :rtype: dict[str, bool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, bool]] = kwargs.pop("cls", None) + + _request = build_boolean_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, bool], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put(self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, bool] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: bool} type or a IO[bytes] type. Required. + :type body: dict[str, bool] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_boolean_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class StringValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`string_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, str]: + """get. + + :return: dict mapping str to str + :rtype: dict[str, str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, str]] = kwargs.pop("cls", None) + + _request = build_string_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, str], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put(self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, str] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, str], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: str} type or a IO[bytes] type. Required. + :type body: dict[str, str] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_string_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class Float32ValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`float32_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, float]: + """get. + + :return: dict mapping str to float + :rtype: dict[str, float] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, float]] = kwargs.pop("cls", None) + + _request = build_float32_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, float], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, float] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: float} type or a IO[bytes] type. Required. + :type body: dict[str, float] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_float32_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class DatetimeValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`datetime_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: + """get. + + :return: dict mapping str to datetime + :rtype: dict[str, ~datetime.datetime] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, datetime.datetime]] = kwargs.pop("cls", None) + + _request = build_datetime_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, datetime.datetime], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put( + self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any + ) -> None: + """put. + + :param body: Required. + :type body: dict[str, ~datetime.datetime] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: datetime.datetime} type or a IO[bytes] type. Required. + :type body: dict[str, ~datetime.datetime] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore + + _request = build_datetime_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class DurationValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`duration_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: + """get. + + :return: dict mapping str to timedelta + :rtype: dict[str, ~datetime.timedelta] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, datetime.timedelta]] = kwargs.pop("cls", None) + + _request = build_duration_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, datetime.timedelta], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put( + self, body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any + ) -> None: + """put. + + :param body: Required. + :type body: dict[str, ~datetime.timedelta] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: datetime.timedelta} type or a IO[bytes] type. Required. + :type body: dict[str, ~datetime.timedelta] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_duration_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class UnknownValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`unknown_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, Any]: + """get. + + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None) + + _request = build_unknown_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, Any], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put(self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, any] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, Any], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: Any} type or a IO[bytes] type. Required. + :type body: dict[str, any] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_unknown_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ModelValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`model_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: + """get. + + :return: dict mapping str to InnerModel + :rtype: dict[str, ~typetest.dictionary.models.InnerModel] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, _models.InnerModel]] = kwargs.pop("cls", None) + + _request = build_model_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, _models.InnerModel], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put( + self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any + ) -> None: + """put. + + :param body: Required. + :type body: dict[str, ~typetest.dictionary.models.InnerModel] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. + :type body: dict[str, ~typetest.dictionary.models.InnerModel] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_model_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class RecursiveModelValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`recursive_model_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: + """get. + + :return: dict mapping str to InnerModel + :rtype: dict[str, ~typetest.dictionary.models.InnerModel] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, _models.InnerModel]] = kwargs.pop("cls", None) + + _request = build_recursive_model_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, _models.InnerModel], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put( + self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any + ) -> None: + """put. + + :param body: Required. + :type body: dict[str, ~typetest.dictionary.models.InnerModel] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. + :type body: dict[str, ~typetest.dictionary.models.InnerModel] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_recursive_model_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class NullableFloatValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.aio.DictionaryClient`'s + :attr:`nullable_float_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, **kwargs: Any) -> Dict[str, float]: + """get. + + :return: dict mapping str to float + :rtype: dict[str, float] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, float]] = kwargs.pop("cls", None) + + _request = build_nullable_float_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, float], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, float] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def put(self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any) -> None: + """put. + + :param body: Is either a {str: float} type or a IO[bytes] type. Required. + :type body: dict[str, float] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_nullable_float_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/__init__.py new file mode 100644 index 00000000000..e87b77e0b91 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/__init__.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + InnerModel, +) +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "InnerModel", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py new file mode 100644 index 00000000000..f6891908fff --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_models.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +from typing import Any, Dict, Mapping, Optional, TYPE_CHECKING, overload + +from .._utils.model_base import Model as _Model, rest_field + +if TYPE_CHECKING: + from .. import models as _models + + +class InnerModel(_Model): + """Dictionary inner model. + + :ivar property: Required string property. Required. + :vartype property: str + :ivar children: + :vartype children: dict[str, ~typetest.dictionary.models.InnerModel] + """ + + property: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Required string property. Required.""" + children: Optional[Dict[str, "_models.InnerModel"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + property: str, # pylint: disable=redefined-builtin + children: Optional[Dict[str, "_models.InnerModel"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/models/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py new file mode 100644 index 00000000000..f56c4be2d9f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Int32ValueOperations # type: ignore +from ._operations import Int64ValueOperations # type: ignore +from ._operations import BooleanValueOperations # type: ignore +from ._operations import StringValueOperations # type: ignore +from ._operations import Float32ValueOperations # type: ignore +from ._operations import DatetimeValueOperations # type: ignore +from ._operations import DurationValueOperations # type: ignore +from ._operations import UnknownValueOperations # type: ignore +from ._operations import ModelValueOperations # type: ignore +from ._operations import RecursiveModelValueOperations # type: ignore +from ._operations import NullableFloatValueOperations # type: ignore + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Int32ValueOperations", + "Int64ValueOperations", + "BooleanValueOperations", + "StringValueOperations", + "Float32ValueOperations", + "DatetimeValueOperations", + "DurationValueOperations", + "UnknownValueOperations", + "ModelValueOperations", + "RecursiveModelValueOperations", + "NullableFloatValueOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py new file mode 100644 index 00000000000..c7c01f0aad5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py @@ -0,0 +1,2114 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +import datetime +from io import IOBase +import json +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, + map_error, +) +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 DictionaryClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize +from .._utils.serialization import Deserializer, Serializer + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/int32" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/int32" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/int64" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/int64" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/boolean" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/boolean" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_string_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/string" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_string_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/string" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/float32" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/float32" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/datetime" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/datetime" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/duration" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/duration" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/unknown" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/unknown" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_model_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/model" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_model_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/model" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_recursive_model_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/model/recursive" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_recursive_model_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/model/recursive" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/type/dictionary/nullable-float" + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) + + +def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + # Construct URL + _url = "/type/dictionary/nullable-float" + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) + + +class Int32ValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`int32_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, int]: + """get. + + :return: dict mapping str to int + :rtype: dict[str, int] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, int]] = kwargs.pop("cls", None) + + _request = build_int32_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, int], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, int] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: int} type or a IO[bytes] type. Required. + :type body: dict[str, int] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_int32_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class Int64ValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`int64_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, int]: + """get. + + :return: dict mapping str to int + :rtype: dict[str, int] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, int]] = kwargs.pop("cls", None) + + _request = build_int64_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, int], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put(self, body: Dict[str, int], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, int] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, int], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: int} type or a IO[bytes] type. Required. + :type body: dict[str, int] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_int64_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class BooleanValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`boolean_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, bool]: + """get. + + :return: dict mapping str to bool + :rtype: dict[str, bool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, bool]] = kwargs.pop("cls", None) + + _request = build_boolean_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, bool], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put(self, body: Dict[str, bool], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, bool] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, bool], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: bool} type or a IO[bytes] type. Required. + :type body: dict[str, bool] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_boolean_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class StringValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`string_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, str]: + """get. + + :return: dict mapping str to str + :rtype: dict[str, str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, str]] = kwargs.pop("cls", None) + + _request = build_string_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, str], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put(self, body: Dict[str, str], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, str] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, str], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: str} type or a IO[bytes] type. Required. + :type body: dict[str, str] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_string_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class Float32ValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`float32_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, float]: + """get. + + :return: dict mapping str to float + :rtype: dict[str, float] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, float]] = kwargs.pop("cls", None) + + _request = build_float32_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, float], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, float] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: float} type or a IO[bytes] type. Required. + :type body: dict[str, float] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_float32_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class DatetimeValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`datetime_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, datetime.datetime]: + """get. + + :return: dict mapping str to datetime + :rtype: dict[str, ~datetime.datetime] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, datetime.datetime]] = kwargs.pop("cls", None) + + _request = build_datetime_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, datetime.datetime], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put(self, body: Dict[str, datetime.datetime], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, ~datetime.datetime] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, datetime.datetime], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: datetime.datetime} type or a IO[bytes] type. Required. + :type body: dict[str, ~datetime.datetime] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore + + _request = build_datetime_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class DurationValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`duration_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, datetime.timedelta]: + """get. + + :return: dict mapping str to timedelta + :rtype: dict[str, ~datetime.timedelta] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, datetime.timedelta]] = kwargs.pop("cls", None) + + _request = build_duration_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, datetime.timedelta], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put( + self, body: Dict[str, datetime.timedelta], *, content_type: str = "application/json", **kwargs: Any + ) -> None: + """put. + + :param body: Required. + :type body: dict[str, ~datetime.timedelta] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, datetime.timedelta], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: datetime.timedelta} type or a IO[bytes] type. Required. + :type body: dict[str, ~datetime.timedelta] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_duration_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class UnknownValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`unknown_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, Any]: + """get. + + :return: dict mapping str to any + :rtype: dict[str, any] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None) + + _request = build_unknown_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, Any], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put(self, body: Dict[str, Any], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, any] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, Any], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: Any} type or a IO[bytes] type. Required. + :type body: dict[str, any] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_unknown_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class ModelValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`model_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: + """get. + + :return: dict mapping str to InnerModel + :rtype: dict[str, ~typetest.dictionary.models.InnerModel] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, _models.InnerModel]] = kwargs.pop("cls", None) + + _request = build_model_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, _models.InnerModel], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put( + self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any + ) -> None: + """put. + + :param body: Required. + :type body: dict[str, ~typetest.dictionary.models.InnerModel] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. + :type body: dict[str, ~typetest.dictionary.models.InnerModel] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_model_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class RecursiveModelValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`recursive_model_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, _models.InnerModel]: + """get. + + :return: dict mapping str to InnerModel + :rtype: dict[str, ~typetest.dictionary.models.InnerModel] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, _models.InnerModel]] = kwargs.pop("cls", None) + + _request = build_recursive_model_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, _models.InnerModel], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put( + self, body: Dict[str, _models.InnerModel], *, content_type: str = "application/json", **kwargs: Any + ) -> None: + """put. + + :param body: Required. + :type body: dict[str, ~typetest.dictionary.models.InnerModel] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, _models.InnerModel], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: InnerModel} type or a IO[bytes] type. Required. + :type body: dict[str, ~typetest.dictionary.models.InnerModel] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_recursive_model_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class NullableFloatValueOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~typetest.dictionary.DictionaryClient`'s + :attr:`nullable_float_value` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: DictionaryClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, **kwargs: Any) -> Dict[str, float]: + """get. + + :return: dict mapping str to float + :rtype: dict[str, float] + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Dict[str, float]] = kwargs.pop("cls", None) + + _request = build_nullable_float_value_get_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if _stream: + deserialized = response.iter_bytes() + else: + deserialized = _deserialize(Dict[str, float], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def put(self, body: Dict[str, float], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: dict[str, float] + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def put(self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> None: + """put. + + :param body: Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def put( # pylint: disable=inconsistent-return-statements + self, body: Union[Dict[str, float], IO[bytes]], **kwargs: Any + ) -> None: + """put. + + :param body: Is either a {str: float} type or a IO[bytes] type. Required. + :type body: dict[str, float] or IO[bytes] + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_nullable_float_value_put_request( + content_type=content_type, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_patch.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/py.typed b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml new file mode 100644 index 00000000000..199a328ad9a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-enum-extensible" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Enum Extensible Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.enum.extensible._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.enum", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/setup.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/setup.py deleted file mode 100644 index 04a22735ee6..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-enum-extensible" -PACKAGE_PPRINT_NAME = "Typetest Enum Extensible" -PACKAGE_NAMESPACE = "typetest.enum.extensible" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.enum", - ] - ), - include_package_data=True, - package_data={ - "typetest.enum.extensible": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml new file mode 100644 index 00000000000..261253c4790 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-enum-fixed" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Enum Fixed Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.enum.fixed._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.enum", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/setup.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/setup.py deleted file mode 100644 index 05ebc926a4e..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-enum-fixed" -PACKAGE_PPRINT_NAME = "Typetest Enum Fixed" -PACKAGE_NAMESPACE = "typetest.enum.fixed" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.enum", - ] - ), - include_package_data=True, - package_data={ - "typetest.enum.fixed": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml new file mode 100644 index 00000000000..3e79b6e16b3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-empty" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Model Empty Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.empty._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/setup.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/setup.py deleted file mode 100644 index 49716b2e99a..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-empty" -PACKAGE_PPRINT_NAME = "Typetest Model Empty" -PACKAGE_NAMESPACE = "typetest.model.empty" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.empty": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml new file mode 100644 index 00000000000..b1024fcc6b7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-enumdiscriminator" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Model Enumdiscriminator Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.enumdiscriminator._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/setup.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/setup.py deleted file mode 100644 index ae7fb728d97..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-enumdiscriminator" -PACKAGE_PPRINT_NAME = "Typetest Model Enumdiscriminator" -PACKAGE_NAMESPACE = "typetest.model.enumdiscriminator" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.enumdiscriminator": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml new file mode 100644 index 00000000000..ef74ff9212c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-nesteddiscriminator" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Model Nesteddiscriminator Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.nesteddiscriminator._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/setup.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/setup.py deleted file mode 100644 index a2425f1c1ea..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-nesteddiscriminator" -PACKAGE_PPRINT_NAME = "Typetest Model Nesteddiscriminator" -PACKAGE_NAMESPACE = "typetest.model.nesteddiscriminator" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.nesteddiscriminator": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml new file mode 100644 index 00000000000..f349311d0de --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-notdiscriminated" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Model Notdiscriminated Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.notdiscriminated._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/setup.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/setup.py deleted file mode 100644 index 084596adb57..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-notdiscriminated" -PACKAGE_PPRINT_NAME = "Typetest Model Notdiscriminated" -PACKAGE_NAMESPACE = "typetest.model.notdiscriminated" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.notdiscriminated": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml new file mode 100644 index 00000000000..a67ea74778e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-recursive" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Model Recursive Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.recursive._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/setup.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/setup.py deleted file mode 100644 index a2b6957575d..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-recursive" -PACKAGE_PPRINT_NAME = "Typetest Model Recursive" -PACKAGE_NAMESPACE = "typetest.model.recursive" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.recursive": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml new file mode 100644 index 00000000000..b0daae89277 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-singlediscriminator" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Model Singlediscriminator Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.singlediscriminator._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/setup.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/setup.py deleted file mode 100644 index 474e1a6baa3..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-singlediscriminator" -PACKAGE_PPRINT_NAME = "Typetest Model Singlediscriminator" -PACKAGE_NAMESPACE = "typetest.model.singlediscriminator" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.singlediscriminator": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml new file mode 100644 index 00000000000..d7ec808f749 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-usage" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Model Usage Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.usage._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/setup.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/setup.py deleted file mode 100644 index eca94f07289..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-usage" -PACKAGE_PPRINT_NAME = "Typetest Model Usage" -PACKAGE_NAMESPACE = "typetest.model.usage" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.usage": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml new file mode 100644 index 00000000000..cbb741237f9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-visibility" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Model Visibility Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.visibility._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/setup.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/setup.py deleted file mode 100644 index 2e1aac4ae0f..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-visibility" -PACKAGE_PPRINT_NAME = "Typetest Model Visibility" -PACKAGE_NAMESPACE = "typetest.model.visibility" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.visibility": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml new file mode 100644 index 00000000000..5aa28bd8c0d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-property-additionalproperties" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Property Additionalproperties Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.property.additionalproperties._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.property", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/setup.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/setup.py deleted file mode 100644 index 7f3d1956c8f..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-property-additionalproperties" -PACKAGE_PPRINT_NAME = "Typetest Property Additionalproperties" -PACKAGE_NAMESPACE = "typetest.property.additionalproperties" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.property", - ] - ), - include_package_data=True, - package_data={ - "typetest.property.additionalproperties": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml new file mode 100644 index 00000000000..e61edcccfbc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-property-nullable" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Property Nullable Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.property.nullable._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.property", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/setup.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/setup.py deleted file mode 100644 index 26a82a272e5..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-property-nullable" -PACKAGE_PPRINT_NAME = "Typetest Property Nullable" -PACKAGE_NAMESPACE = "typetest.property.nullable" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.property", - ] - ), - include_package_data=True, - package_data={ - "typetest.property.nullable": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml new file mode 100644 index 00000000000..28a9b50c890 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-property-optional" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Property Optional Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.property.optional._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.property", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/setup.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/setup.py deleted file mode 100644 index e128775bb50..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-property-optional" -PACKAGE_PPRINT_NAME = "Typetest Property Optional" -PACKAGE_NAMESPACE = "typetest.property.optional" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.property", - ] - ), - include_package_data=True, - package_data={ - "typetest.property.optional": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml new file mode 100644 index 00000000000..294705b194e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-property-valuetypes" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Property Valuetypes Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.property.valuetypes._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.property", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/setup.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/setup.py deleted file mode 100644 index 549468d0656..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/setup.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-property-valuetypes" -PACKAGE_PPRINT_NAME = "Typetest Property Valuetypes" -PACKAGE_NAMESPACE = "typetest.property.valuetypes" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.property", - ] - ), - include_package_data=True, - package_data={ - "typetest.property.valuetypes": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml new file mode 100644 index 00000000000..2f10fcac8e3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-scalar" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Scalar Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.scalar._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/setup.py b/packages/typespec-python/test/azure/generated/typetest-scalar/setup.py deleted file mode 100644 index ceb3f2162e3..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-scalar" -PACKAGE_PPRINT_NAME = "Typetest Scalar" -PACKAGE_NAMESPACE = "typetest.scalar" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - ] - ), - include_package_data=True, - package_data={ - "typetest.scalar": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml new file mode 100644 index 00000000000..748e9e68e71 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-union" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Corporation Azure Typetest Union Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] + +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk" + +[tool.setuptools.dynamic] +version = {attr = "typetest.union._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/azure/generated/typetest-union/setup.py b/packages/typespec-python/test/azure/generated/typetest-union/setup.py deleted file mode 100644 index 269ccc430e7..00000000000 --- a/packages/typespec-python/test/azure/generated/typetest-union/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-union" -PACKAGE_PPRINT_NAME = "Typetest Union" -PACKAGE_NAMESPACE = "typetest.union" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - ] - ), - include_package_data=True, - package_data={ - "typetest.union": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml new file mode 100644 index 00000000000..e3d6ef01060 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "authentication-apikey" +authors = [ + { name = "" }, +] +description = "Authentication Apikey Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "authentication.apikey._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "authentication", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/setup.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/setup.py deleted file mode 100644 index 659e31d511b..00000000000 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "authentication-apikey" -PACKAGE_PPRINT_NAME = "Authentication Apikey" -PACKAGE_NAMESPACE = "authentication.apikey" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "authentication", - ] - ), - include_package_data=True, - package_data={ - "authentication.apikey": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml new file mode 100644 index 00000000000..81e6855c949 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "authentication-http-custom" +authors = [ + { name = "" }, +] +description = "Authentication Http Custom Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "authentication.http.custom._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "authentication", + "authentication.http", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/setup.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/setup.py deleted file mode 100644 index 037ead7277d..00000000000 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "authentication-http-custom" -PACKAGE_PPRINT_NAME = "Authentication Http Custom" -PACKAGE_NAMESPACE = "authentication.http.custom" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "authentication", - "authentication.http", - ] - ), - include_package_data=True, - package_data={ - "authentication.http.custom": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml new file mode 100644 index 00000000000..cf9d336db31 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "authentication-oauth2" +authors = [ + { name = "" }, +] +description = "Authentication Oauth2 Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "authentication.oauth2._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "authentication", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/setup.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/setup.py deleted file mode 100644 index f92f8f349f1..00000000000 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "authentication-oauth2" -PACKAGE_PPRINT_NAME = "Authentication Oauth2" -PACKAGE_NAMESPACE = "authentication.oauth2" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "authentication", - ] - ), - include_package_data=True, - package_data={ - "authentication.oauth2": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml new file mode 100644 index 00000000000..4e8a54c3ae0 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "authentication-union" +authors = [ + { name = "" }, +] +description = "Authentication Union Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "authentication.union._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "authentication", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/setup.py b/packages/typespec-python/test/unbranded/generated/authentication-union/setup.py deleted file mode 100644 index af391f65858..00000000000 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "authentication-union" -PACKAGE_PPRINT_NAME = "Authentication Union" -PACKAGE_NAMESPACE = "authentication.union" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "authentication", - ] - ), - include_package_data=True, - package_data={ - "authentication.union": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml new file mode 100644 index 00000000000..27f0e693d11 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "encode-bytes" +authors = [ + { name = "" }, +] +description = "Encode Bytes Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "encode.bytes._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/setup.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/setup.py deleted file mode 100644 index d9dbe1b277f..00000000000 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "encode-bytes" -PACKAGE_PPRINT_NAME = "Encode Bytes" -PACKAGE_NAMESPACE = "encode.bytes" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "encode", - ] - ), - include_package_data=True, - package_data={ - "encode.bytes": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml new file mode 100644 index 00000000000..ee9a0a6e091 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "encode-datetime" +authors = [ + { name = "" }, +] +description = "Encode Datetime Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "encode.datetime._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/setup.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/setup.py deleted file mode 100644 index 2955ba441e9..00000000000 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "encode-datetime" -PACKAGE_PPRINT_NAME = "Encode Datetime" -PACKAGE_NAMESPACE = "encode.datetime" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "encode", - ] - ), - include_package_data=True, - package_data={ - "encode.datetime": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml new file mode 100644 index 00000000000..411da0b3fd0 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "encode-duration" +authors = [ + { name = "" }, +] +description = "Encode Duration Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "encode.duration._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/setup.py b/packages/typespec-python/test/unbranded/generated/encode-duration/setup.py deleted file mode 100644 index 90123164126..00000000000 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "encode-duration" -PACKAGE_PPRINT_NAME = "Encode Duration" -PACKAGE_NAMESPACE = "encode.duration" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "encode", - ] - ), - include_package_data=True, - package_data={ - "encode.duration": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml new file mode 100644 index 00000000000..aea3b490bab --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "encode-numeric" +authors = [ + { name = "" }, +] +description = "Encode Numeric Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "encode.numeric._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "encode", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/setup.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/setup.py deleted file mode 100644 index 08ff5fedd28..00000000000 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "encode-numeric" -PACKAGE_PPRINT_NAME = "Encode Numeric" -PACKAGE_NAMESPACE = "encode.numeric" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "encode", - ] - ), - include_package_data=True, - package_data={ - "encode.numeric": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml new file mode 100644 index 00000000000..b05ca293cb1 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml @@ -0,0 +1,45 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "headasbooleanfalse" +authors = [ + { name = "" }, +] +description = "Headasbooleanfalse Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "headasbooleanfalse._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/setup.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/setup.py deleted file mode 100644 index 9b007937c9b..00000000000 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/setup.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "headasbooleanfalse" -PACKAGE_PPRINT_NAME = "Headasbooleanfalse" -PACKAGE_NAMESPACE = "headasbooleanfalse" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "headasbooleanfalse": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml new file mode 100644 index 00000000000..6f07b96d53e --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml @@ -0,0 +1,45 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "headasbooleantrue" +authors = [ + { name = "" }, +] +description = "Headasbooleantrue Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "headasbooleantrue._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/setup.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/setup.py deleted file mode 100644 index f49e8ad9474..00000000000 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/setup.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "headasbooleantrue" -PACKAGE_PPRINT_NAME = "Headasbooleantrue" -PACKAGE_NAMESPACE = "headasbooleantrue" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "headasbooleantrue": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml new file mode 100644 index 00000000000..78ae058960d --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-basic" +authors = [ + { name = "" }, +] +description = "Parameters Basic Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "parameters.basic._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/setup.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/setup.py deleted file mode 100644 index 13977e44489..00000000000 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-basic" -PACKAGE_PPRINT_NAME = "Parameters Basic" -PACKAGE_NAMESPACE = "parameters.basic" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.basic": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml new file mode 100644 index 00000000000..4d6a73c5c72 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-bodyoptionality" +authors = [ + { name = "" }, +] +description = "Parameters Bodyoptionality Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "parameters.bodyoptionality._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/setup.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/setup.py deleted file mode 100644 index 58234ead6e5..00000000000 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-bodyoptionality" -PACKAGE_PPRINT_NAME = "Parameters Bodyoptionality" -PACKAGE_NAMESPACE = "parameters.bodyoptionality" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.bodyoptionality": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml new file mode 100644 index 00000000000..dca8be28b81 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-collectionformat" +authors = [ + { name = "" }, +] +description = "Parameters Collectionformat Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "parameters.collectionformat._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/setup.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/setup.py deleted file mode 100644 index 52eec3d4ab2..00000000000 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-collectionformat" -PACKAGE_PPRINT_NAME = "Parameters Collectionformat" -PACKAGE_NAMESPACE = "parameters.collectionformat" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.collectionformat": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml new file mode 100644 index 00000000000..b60aee973c4 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-path" +authors = [ + { name = "" }, +] +description = "Parameters Path Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "parameters.path._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/setup.py b/packages/typespec-python/test/unbranded/generated/parameters-path/setup.py deleted file mode 100644 index 0de7829c2f3..00000000000 --- a/packages/typespec-python/test/unbranded/generated/parameters-path/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-path" -PACKAGE_PPRINT_NAME = "Parameters Path" -PACKAGE_NAMESPACE = "parameters.path" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.path": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml new file mode 100644 index 00000000000..6189129dfe9 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "parameters-spread" +authors = [ + { name = "" }, +] +description = "Parameters Spread Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "parameters.spread._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "parameters", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/setup.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/setup.py deleted file mode 100644 index 4ba6bdba876..00000000000 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "parameters-spread" -PACKAGE_PPRINT_NAME = "Parameters Spread" -PACKAGE_NAMESPACE = "parameters.spread" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "parameters", - ] - ), - include_package_data=True, - package_data={ - "parameters.spread": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml new file mode 100644 index 00000000000..47bff7f497b --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-contentnegotiation" +authors = [ + { name = "" }, +] +description = "Payload Contentnegotiation Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "payload.contentnegotiation._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/setup.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/setup.py deleted file mode 100644 index 473c275f275..00000000000 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-contentnegotiation" -PACKAGE_PPRINT_NAME = "Payload Contentnegotiation" -PACKAGE_NAMESPACE = "payload.contentnegotiation" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.contentnegotiation": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml new file mode 100644 index 00000000000..3801b657df5 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-jsonmergepatch" +authors = [ + { name = "" }, +] +description = "Payload Jsonmergepatch Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "payload.jsonmergepatch._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/setup.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/setup.py deleted file mode 100644 index bc432906bf2..00000000000 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-jsonmergepatch" -PACKAGE_PPRINT_NAME = "Payload Jsonmergepatch" -PACKAGE_NAMESPACE = "payload.jsonmergepatch" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.jsonmergepatch": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml new file mode 100644 index 00000000000..ee76f0640d6 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-mediatype" +authors = [ + { name = "" }, +] +description = "Payload Mediatype Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "payload.mediatype._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/setup.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/setup.py deleted file mode 100644 index 5f357abae01..00000000000 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-mediatype" -PACKAGE_PPRINT_NAME = "Payload Mediatype" -PACKAGE_NAMESPACE = "payload.mediatype" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.mediatype": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml new file mode 100644 index 00000000000..2dc43708196 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-multipart" +authors = [ + { name = "" }, +] +description = "Payload Multipart Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "payload.multipart._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/setup.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/setup.py deleted file mode 100644 index a814bbe5828..00000000000 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-multipart" -PACKAGE_PPRINT_NAME = "Payload Multipart" -PACKAGE_NAMESPACE = "payload.multipart" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.multipart": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml new file mode 100644 index 00000000000..5e9ce7cb31d --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-pageable" +authors = [ + { name = "" }, +] +description = "Payload Pageable Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "payload.pageable._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/setup.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/setup.py deleted file mode 100644 index b99c71a87ae..00000000000 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-pageable" -PACKAGE_PPRINT_NAME = "Payload Pageable" -PACKAGE_NAMESPACE = "payload.pageable" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.pageable": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml new file mode 100644 index 00000000000..67baba52810 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "payload-xml" +authors = [ + { name = "" }, +] +description = "Payload Xml Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "payload.xml._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "payload", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/setup.py b/packages/typespec-python/test/unbranded/generated/payload-xml/setup.py deleted file mode 100644 index 5cce3b9661e..00000000000 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "payload-xml" -PACKAGE_PPRINT_NAME = "Payload Xml" -PACKAGE_NAMESPACE = "payload.xml" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "payload", - ] - ), - include_package_data=True, - package_data={ - "payload.xml": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml b/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml new file mode 100644 index 00000000000..ead4614df55 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "response-statuscoderange" +authors = [ + { name = "" }, +] +description = "Response Statuscoderange Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "response.statuscoderange._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "response", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/setup.py b/packages/typespec-python/test/unbranded/generated/response-status-code-range/setup.py deleted file mode 100644 index 093f7048a7b..00000000000 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "response-statuscoderange" -PACKAGE_PPRINT_NAME = "Response Statuscoderange" -PACKAGE_NAMESPACE = "response.statuscoderange" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "response", - ] - ), - include_package_data=True, - package_data={ - "response.statuscoderange": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml new file mode 100644 index 00000000000..6478cf1d0e6 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml @@ -0,0 +1,45 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "routes" +authors = [ + { name = "" }, +] +description = "Routes Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "routes._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/routes/setup.py b/packages/typespec-python/test/unbranded/generated/routes/setup.py deleted file mode 100644 index 5684717baaf..00000000000 --- a/packages/typespec-python/test/unbranded/generated/routes/setup.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "routes" -PACKAGE_PPRINT_NAME = "Routes" -PACKAGE_NAMESPACE = "routes" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "routes": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml new file mode 100644 index 00000000000..c7406c82b89 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "serialization-encodedname-json" +authors = [ + { name = "" }, +] +description = "Serialization Encodedname Json Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "serialization.encodedname.json._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "serialization", + "serialization.encodedname", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/setup.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/setup.py deleted file mode 100644 index 0ff35032649..00000000000 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "serialization-encodedname-json" -PACKAGE_PPRINT_NAME = "Serialization Encodedname Json" -PACKAGE_NAMESPACE = "serialization.encodedname.json" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "serialization", - "serialization.encodedname", - ] - ), - include_package_data=True, - package_data={ - "serialization.encodedname.json": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml new file mode 100644 index 00000000000..9caf07c54ac --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-endpoint-notdefined" +authors = [ + { name = "" }, +] +description = "Server Endpoint Notdefined Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "server.endpoint.notdefined._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.endpoint", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/setup.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/setup.py deleted file mode 100644 index fde2b911ce3..00000000000 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-endpoint-notdefined" -PACKAGE_PPRINT_NAME = "Server Endpoint Notdefined" -PACKAGE_NAMESPACE = "server.endpoint.notdefined" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.endpoint", - ] - ), - include_package_data=True, - package_data={ - "server.endpoint.notdefined": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml new file mode 100644 index 00000000000..aa512e35747 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-path-multiple" +authors = [ + { name = "" }, +] +description = "Server Path Multiple Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "server.path.multiple._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.path", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/setup.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/setup.py deleted file mode 100644 index c3c6bac7a32..00000000000 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-path-multiple" -PACKAGE_PPRINT_NAME = "Server Path Multiple" -PACKAGE_NAMESPACE = "server.path.multiple" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.path", - ] - ), - include_package_data=True, - package_data={ - "server.path.multiple": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml new file mode 100644 index 00000000000..776dbc62e25 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-path-single" +authors = [ + { name = "" }, +] +description = "Server Path Single Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "server.path.single._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.path", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/setup.py b/packages/typespec-python/test/unbranded/generated/server-path-single/setup.py deleted file mode 100644 index 3a643f1a44c..00000000000 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-path-single" -PACKAGE_PPRINT_NAME = "Server Path Single" -PACKAGE_NAMESPACE = "server.path.single" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.path", - ] - ), - include_package_data=True, - package_data={ - "server.path.single": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml new file mode 100644 index 00000000000..4324d218b9b --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-versions-notversioned" +authors = [ + { name = "" }, +] +description = "Server Versions Notversioned Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "server.versions.notversioned._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.versions", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/setup.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/setup.py deleted file mode 100644 index 363d643298f..00000000000 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-versions-notversioned" -PACKAGE_PPRINT_NAME = "Server Versions Notversioned" -PACKAGE_NAMESPACE = "server.versions.notversioned" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.versions", - ] - ), - include_package_data=True, - package_data={ - "server.versions.notversioned": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml new file mode 100644 index 00000000000..53dc2ad650b --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "server-versions-versioned" +authors = [ + { name = "" }, +] +description = "Server Versions Versioned Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "server.versions.versioned._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "server", + "server.versions", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/setup.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/setup.py deleted file mode 100644 index c9f6136bf03..00000000000 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "server-versions-versioned" -PACKAGE_PPRINT_NAME = "Server Versions Versioned" -PACKAGE_NAMESPACE = "server.versions.versioned" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "server", - "server.versions", - ] - ), - include_package_data=True, - package_data={ - "server.versions.versioned": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml new file mode 100644 index 00000000000..fbbdf60ce28 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specialheaders-conditionalrequest" +authors = [ + { name = "" }, +] +description = "Specialheaders Conditionalrequest Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "specialheaders.conditionalrequest._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specialheaders", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/setup.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/setup.py deleted file mode 100644 index f5629a72fb5..00000000000 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specialheaders-conditionalrequest" -PACKAGE_PPRINT_NAME = "Specialheaders Conditionalrequest" -PACKAGE_NAMESPACE = "specialheaders.conditionalrequest" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specialheaders", - ] - ), - include_package_data=True, - package_data={ - "specialheaders.conditionalrequest": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml new file mode 100644 index 00000000000..b61ebbd8b7b --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specialheaders-repeatability" +authors = [ + { name = "" }, +] +description = "Specialheaders Repeatability Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "specialheaders.repeatability._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "specialheaders", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/setup.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/setup.py deleted file mode 100644 index c7cfe344a26..00000000000 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specialheaders-repeatability" -PACKAGE_PPRINT_NAME = "Specialheaders Repeatability" -PACKAGE_NAMESPACE = "specialheaders.repeatability" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "specialheaders", - ] - ), - include_package_data=True, - package_data={ - "specialheaders.repeatability": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml new file mode 100644 index 00000000000..10f51867ad5 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml @@ -0,0 +1,45 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "specialwords" +authors = [ + { name = "" }, +] +description = "Specialwords Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "specialwords._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/special-words/setup.py b/packages/typespec-python/test/unbranded/generated/special-words/setup.py deleted file mode 100644 index dab4101827a..00000000000 --- a/packages/typespec-python/test/unbranded/generated/special-words/setup.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "specialwords" -PACKAGE_PPRINT_NAME = "Specialwords" -PACKAGE_NAMESPACE = "specialwords" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - ] - ), - include_package_data=True, - package_data={ - "specialwords": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml new file mode 100644 index 00000000000..af3c5fae624 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "streaming-jsonl" +authors = [ + { name = "" }, +] +description = "Streaming Jsonl Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "streaming.jsonl._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "streaming", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/setup.py b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/setup.py deleted file mode 100644 index c33c5738977..00000000000 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "streaming-jsonl" -PACKAGE_PPRINT_NAME = "Streaming Jsonl" -PACKAGE_NAMESPACE = "streaming.jsonl" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "streaming", - ] - ), - include_package_data=True, - package_data={ - "streaming.jsonl": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml new file mode 100644 index 00000000000..2b25566168d --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-array" +authors = [ + { name = "" }, +] +description = "Typetest Array Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.array._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-array/setup.py deleted file mode 100644 index 73be1fe2f1c..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-array" -PACKAGE_PPRINT_NAME = "Typetest Array" -PACKAGE_NAMESPACE = "typetest.array" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - ] - ), - include_package_data=True, - package_data={ - "typetest.array": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml new file mode 100644 index 00000000000..d14351d63b9 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-dictionary" +authors = [ + { name = "" }, +] +description = "Typetest Dictionary Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.dictionary._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/setup.py deleted file mode 100644 index c643ab0c3f3..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-dictionary" -PACKAGE_PPRINT_NAME = "Typetest Dictionary" -PACKAGE_NAMESPACE = "typetest.dictionary" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - ] - ), - include_package_data=True, - package_data={ - "typetest.dictionary": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml new file mode 100644 index 00000000000..61eced04478 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-enum-extensible" +authors = [ + { name = "" }, +] +description = "Typetest Enum Extensible Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.enum.extensible._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.enum", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/setup.py deleted file mode 100644 index d064eddb431..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-enum-extensible" -PACKAGE_PPRINT_NAME = "Typetest Enum Extensible" -PACKAGE_NAMESPACE = "typetest.enum.extensible" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.enum", - ] - ), - include_package_data=True, - package_data={ - "typetest.enum.extensible": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml new file mode 100644 index 00000000000..4824d7a9328 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-enum-fixed" +authors = [ + { name = "" }, +] +description = "Typetest Enum Fixed Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.enum.fixed._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.enum", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/setup.py deleted file mode 100644 index bb215a64765..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-enum-fixed" -PACKAGE_PPRINT_NAME = "Typetest Enum Fixed" -PACKAGE_NAMESPACE = "typetest.enum.fixed" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.enum", - ] - ), - include_package_data=True, - package_data={ - "typetest.enum.fixed": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml new file mode 100644 index 00000000000..51afb91a2b6 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-empty" +authors = [ + { name = "" }, +] +description = "Typetest Model Empty Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.empty._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/setup.py deleted file mode 100644 index 010a3f2f922..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-empty" -PACKAGE_PPRINT_NAME = "Typetest Model Empty" -PACKAGE_NAMESPACE = "typetest.model.empty" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.empty": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml new file mode 100644 index 00000000000..cf1495c15eb --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-enumdiscriminator" +authors = [ + { name = "" }, +] +description = "Typetest Model Enumdiscriminator Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.enumdiscriminator._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/setup.py deleted file mode 100644 index 800a6b203df..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-enumdiscriminator" -PACKAGE_PPRINT_NAME = "Typetest Model Enumdiscriminator" -PACKAGE_NAMESPACE = "typetest.model.enumdiscriminator" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.enumdiscriminator": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml new file mode 100644 index 00000000000..84b257ef62f --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-nesteddiscriminator" +authors = [ + { name = "" }, +] +description = "Typetest Model Nesteddiscriminator Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.nesteddiscriminator._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/setup.py deleted file mode 100644 index 9c5f6bf1acf..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-nesteddiscriminator" -PACKAGE_PPRINT_NAME = "Typetest Model Nesteddiscriminator" -PACKAGE_NAMESPACE = "typetest.model.nesteddiscriminator" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.nesteddiscriminator": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml new file mode 100644 index 00000000000..041e712814d --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-notdiscriminated" +authors = [ + { name = "" }, +] +description = "Typetest Model Notdiscriminated Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.notdiscriminated._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/setup.py deleted file mode 100644 index 6134a292424..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-notdiscriminated" -PACKAGE_PPRINT_NAME = "Typetest Model Notdiscriminated" -PACKAGE_NAMESPACE = "typetest.model.notdiscriminated" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.notdiscriminated": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml new file mode 100644 index 00000000000..693be055949 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-recursive" +authors = [ + { name = "" }, +] +description = "Typetest Model Recursive Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.recursive._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/setup.py deleted file mode 100644 index 75c8f43e8b4..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-recursive" -PACKAGE_PPRINT_NAME = "Typetest Model Recursive" -PACKAGE_NAMESPACE = "typetest.model.recursive" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.recursive": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml new file mode 100644 index 00000000000..543541b5e69 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-singlediscriminator" +authors = [ + { name = "" }, +] +description = "Typetest Model Singlediscriminator Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.singlediscriminator._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/setup.py deleted file mode 100644 index fe0e3d64ba3..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-singlediscriminator" -PACKAGE_PPRINT_NAME = "Typetest Model Singlediscriminator" -PACKAGE_NAMESPACE = "typetest.model.singlediscriminator" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.singlediscriminator": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml new file mode 100644 index 00000000000..e967130e5be --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-usage" +authors = [ + { name = "" }, +] +description = "Typetest Model Usage Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.usage._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/setup.py deleted file mode 100644 index 8b9134430ec..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-usage" -PACKAGE_PPRINT_NAME = "Typetest Model Usage" -PACKAGE_NAMESPACE = "typetest.model.usage" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.usage": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml new file mode 100644 index 00000000000..9bca4e77228 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-model-visibility" +authors = [ + { name = "" }, +] +description = "Typetest Model Visibility Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.model.visibility._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.model", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/setup.py deleted file mode 100644 index 52024bd8123..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-model-visibility" -PACKAGE_PPRINT_NAME = "Typetest Model Visibility" -PACKAGE_NAMESPACE = "typetest.model.visibility" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.model", - ] - ), - include_package_data=True, - package_data={ - "typetest.model.visibility": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml new file mode 100644 index 00000000000..11e50ed3f2c --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-property-additionalproperties" +authors = [ + { name = "" }, +] +description = "Typetest Property Additionalproperties Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.property.additionalproperties._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.property", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/setup.py deleted file mode 100644 index 169242f3ca2..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-property-additionalproperties" -PACKAGE_PPRINT_NAME = "Typetest Property Additionalproperties" -PACKAGE_NAMESPACE = "typetest.property.additionalproperties" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.property", - ] - ), - include_package_data=True, - package_data={ - "typetest.property.additionalproperties": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml new file mode 100644 index 00000000000..f275ac0c58b --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-property-nullable" +authors = [ + { name = "" }, +] +description = "Typetest Property Nullable Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.property.nullable._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.property", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/setup.py deleted file mode 100644 index a9a981ad820..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-property-nullable" -PACKAGE_PPRINT_NAME = "Typetest Property Nullable" -PACKAGE_NAMESPACE = "typetest.property.nullable" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.property", - ] - ), - include_package_data=True, - package_data={ - "typetest.property.nullable": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml new file mode 100644 index 00000000000..6e3dcccf15c --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-property-optional" +authors = [ + { name = "" }, +] +description = "Typetest Property Optional Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.property.optional._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.property", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/setup.py deleted file mode 100644 index 1ad7e245c51..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-property-optional" -PACKAGE_PPRINT_NAME = "Typetest Property Optional" -PACKAGE_NAMESPACE = "typetest.property.optional" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.property", - ] - ), - include_package_data=True, - package_data={ - "typetest.property.optional": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml new file mode 100644 index 00000000000..c404504c437 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml @@ -0,0 +1,47 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-property-valuetypes" +authors = [ + { name = "" }, +] +description = "Typetest Property Valuetypes Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.property.valuetypes._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", + "typetest.property", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/setup.py deleted file mode 100644 index 092f6d0d294..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-property-valuetypes" -PACKAGE_PPRINT_NAME = "Typetest Property Valuetypes" -PACKAGE_NAMESPACE = "typetest.property.valuetypes" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - "typetest.property", - ] - ), - include_package_data=True, - package_data={ - "typetest.property.valuetypes": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml new file mode 100644 index 00000000000..eadee6ef826 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-scalar" +authors = [ + { name = "" }, +] +description = "Typetest Scalar Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.scalar._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/setup.py deleted file mode 100644 index acd6090ca81..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-scalar" -PACKAGE_PPRINT_NAME = "Typetest Scalar" -PACKAGE_NAMESPACE = "typetest.scalar" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - ] - ), - include_package_data=True, - package_data={ - "typetest.scalar": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml new file mode 100644 index 00000000000..6cd8046b56e --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "typetest-union" +authors = [ + { name = "" }, +] +description = "Typetest Union Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "typetest.union._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "typetest", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/setup.py b/packages/typespec-python/test/unbranded/generated/typetest-union/setup.py deleted file mode 100644 index 1ebfefaae4e..00000000000 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "typetest-union" -PACKAGE_PPRINT_NAME = "Typetest Union" -PACKAGE_NAMESPACE = "typetest.union" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "typetest", - ] - ), - include_package_data=True, - package_data={ - "typetest.union": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml new file mode 100644 index 00000000000..9858c47b7f4 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-added" +authors = [ + { name = "" }, +] +description = "Versioning Added Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "versioning.added._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/setup.py b/packages/typespec-python/test/unbranded/generated/versioning-added/setup.py deleted file mode 100644 index 060823852e6..00000000000 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-added" -PACKAGE_PPRINT_NAME = "Versioning Added" -PACKAGE_NAMESPACE = "versioning.added" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.added": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml new file mode 100644 index 00000000000..1dc7f270625 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-madeoptional" +authors = [ + { name = "" }, +] +description = "Versioning Madeoptional Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "versioning.madeoptional._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/setup.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/setup.py deleted file mode 100644 index 79205edbcf5..00000000000 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-madeoptional" -PACKAGE_PPRINT_NAME = "Versioning Madeoptional" -PACKAGE_NAMESPACE = "versioning.madeoptional" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.madeoptional": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml new file mode 100644 index 00000000000..e1e5dd04053 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-removed" +authors = [ + { name = "" }, +] +description = "Versioning Removed Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "versioning.removed._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/setup.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/setup.py deleted file mode 100644 index fb818823f2d..00000000000 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-removed" -PACKAGE_PPRINT_NAME = "Versioning Removed" -PACKAGE_NAMESPACE = "versioning.removed" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.removed": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml new file mode 100644 index 00000000000..7f3805b1e1e --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-renamedfrom" +authors = [ + { name = "" }, +] +description = "Versioning Renamedfrom Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "versioning.renamedfrom._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/setup.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/setup.py deleted file mode 100644 index 291f1aac401..00000000000 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-renamedfrom" -PACKAGE_PPRINT_NAME = "Versioning Renamedfrom" -PACKAGE_NAMESPACE = "versioning.renamedfrom" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.renamedfrom": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml new file mode 100644 index 00000000000..e6dd37c246f --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-returntypechangedfrom" +authors = [ + { name = "" }, +] +description = "Versioning Returntypechangedfrom Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "versioning.returntypechangedfrom._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/setup.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/setup.py deleted file mode 100644 index 45b0371b49d..00000000000 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-returntypechangedfrom" -PACKAGE_PPRINT_NAME = "Versioning Returntypechangedfrom" -PACKAGE_NAMESPACE = "versioning.returntypechangedfrom" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.returntypechangedfrom": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml new file mode 100644 index 00000000000..8f0ad95c674 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml @@ -0,0 +1,46 @@ + +[build-system] +requires = ["setuptools>=61.0.0", "wheel"] # Requires 61.0.0 for dynamic version +build-backend = "setuptools.build_meta" + +[project] +name = "versioning-typechangedfrom" +authors = [ + { name = "" }, +] +description = "Versioning Typechangedfrom Client Library for Python" +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", +] +requires-python = ">=3.9" + +dependencies = [ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[tool.setuptools.dynamic] +version = {attr = "versioning.typechangedfrom._version.VERSION"} +readme = {file = ["README.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "versioning", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/setup.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/setup.py deleted file mode 100644 index dc023fad954..00000000000 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "versioning-typechangedfrom" -PACKAGE_PPRINT_NAME = "Versioning Typechangedfrom" -PACKAGE_NAMESPACE = "versioning.typechangedfrom" - -# a.b.c => a/b/c -package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "versioning", - ] - ), - include_package_data=True, - package_data={ - "versioning.typechangedfrom": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "corehttp[requests]>=1.0.0b6", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) From dca4e1c4127dc8571eb91d6fd2344b248f4dad40 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 21 Jul 2025 19:02:10 +0000 Subject: [PATCH 09/48] Regenerate for autorest.python (2025-07-21 19:02:10) --- .../azure_key_credential/generated/setup.py | 33 ++++++++++++++++++ .../specification/basic/generated/setup.py | 33 ++++++++++++++++++ .../directives/generated/setup.py | 33 ++++++++++++++++++ .../management/generated/setup.py | 33 ++++++++++++++++++ .../AzureBodyDuration/setup.py | 33 ++++++++++++++++++ .../AzureParameterGrouping/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/AzureReport/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/AzureSpecials/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/CustomBaseUri/setup.py | 33 ++++++++++++++++++ .../CustomPollerPager/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/CustomUrlPaging/setup.py | 33 ++++++++++++++++++ .../Expected/AcceptanceTests/Head/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/HeadExceptions/setup.py | 33 ++++++++++++++++++ .../HeadWithAzureKeyCredentialPolicy/setup.py | 33 ++++++++++++++++++ .../Expected/AcceptanceTests/Lro/setup.py | 33 ++++++++++++++++++ .../LroWithParameterizedEndpoints/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/MixedApiVersion/setup.py | 33 ++++++++++++++++++ .../Expected/AcceptanceTests/Paging/setup.py | 33 ++++++++++++++++++ .../SecurityAadSwagger/setup.py | 33 ++++++++++++++++++ .../SecurityKeySwagger/setup.py | 33 ++++++++++++++++++ .../StorageManagementClient/setup.py | 33 ++++++++++++++++++ .../SubscriptionIdApiVersion/setup.py | 33 ++++++++++++++++++ .../AzureBodyDurationVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../AzureReportVersionTolerant/setup.py | 33 ++++++++++++++++++ .../AzureSpecialsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../CustomBaseUriVersionTolerant/setup.py | 33 ++++++++++++++++++ .../CustomPollerPagerVersionTolerant/setup.py | 33 ++++++++++++++++++ .../CustomUrlPagingVersionTolerant/setup.py | 33 ++++++++++++++++++ .../HeadExceptionsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../HeadVersionTolerant/setup.py | 33 ++++++++++++++++++ .../LroPagingVersionTolerant/setup.py | 34 +++++++++++++++++++ .../LroVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../PagingVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../DPGTestModelsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../AdditionalProperties/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/Anything/setup.py | 34 +++++++++++++++++++ .../AcceptanceTests/BodyArray/setup.py | 33 ++++++++++++++++++ .../BodyArrayWithNamespaceFolders/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyBinary/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyBoolean/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyByte/setup.py | 33 ++++++++++++++++++ .../BodyByteWithPackageName/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyComplex/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyDate/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyDateTime/setup.py | 33 ++++++++++++++++++ .../BodyDateTimeRfc1123/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyDictionary/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyDuration/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyFile/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyFormData/setup.py | 33 ++++++++++++++++++ .../BodyFormUrlEncodedData/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyInteger/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyNumber/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyString/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/BodyTime/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/ClientEnum/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/Constants/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/CustomBaseUri/setup.py | 33 ++++++++++++++++++ .../CustomBaseUriMoreOptions/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/ErrorWithSecrets/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/ExtensibleEnums/setup.py | 33 ++++++++++++++++++ .../Expected/AcceptanceTests/Header/setup.py | 33 ++++++++++++++++++ .../Expected/AcceptanceTests/Http/setup.py | 33 ++++++++++++++++++ .../IncorrectErrorResponse/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/MediaTypes/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/MergePatchJson/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/ModelFlattening/setup.py | 33 ++++++++++++++++++ .../MultipleInheritance/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/NoOperations/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/NonStringEnums/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/ObjectType/setup.py | 33 ++++++++++++++++++ .../ParameterFlattening/setup.py | 33 ++++++++++++++++++ .../ParameterizedEndpoint/setup.py | 33 ++++++++++++++++++ .../Expected/AcceptanceTests/Report/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/RequiredOptional/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/ReservedWords/setup.py | 33 ++++++++++++++++++ .../SecurityAadSwagger/setup.py | 33 ++++++++++++++++++ .../SecurityAadSwaggerCredentialFlag/setup.py | 33 ++++++++++++++++++ .../SecurityKeySwagger/setup.py | 33 ++++++++++++++++++ .../SecurityKeySwaggerCredentialFlag/setup.py | 33 ++++++++++++++++++ .../Expected/AcceptanceTests/Url/setup.py | 33 ++++++++++++++++++ .../UrlMultiCollectionFormat/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/Validation/setup.py | 33 ++++++++++++++++++ .../Expected/AcceptanceTests/Xml/setup.py | 33 ++++++++++++++++++ .../AcceptanceTests/XmsErrorResponse/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../AnythingVersionTolerant/setup.py | 34 +++++++++++++++++++ .../BodyArrayVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyBinaryVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyBooleanVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyByteVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyComplexVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../BodyDateTimeVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyDateVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyDictionaryVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyDurationVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyFileVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyFormDataVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../BodyIntegerVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyNumberVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyStringVersionTolerant/setup.py | 33 ++++++++++++++++++ .../BodyTimeVersionTolerant/setup.py | 33 ++++++++++++++++++ .../ClientEnumVersionTolerant/setup.py | 33 ++++++++++++++++++ .../ConstantsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../CustomBaseUriVersionTolerant/setup.py | 33 ++++++++++++++++++ .../ErrorWithSecretsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../ExtensibleEnumsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../HeaderVersionTolerant/setup.py | 33 ++++++++++++++++++ .../HttpVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../MediaTypesVersionTolerant/setup.py | 33 ++++++++++++++++++ .../MergePatchJsonVersionTolerant/setup.py | 33 ++++++++++++++++++ .../ModelFlatteningVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../NoNamespaceFlagVersionTolerant/setup.py | 34 +++++++++++++++++++ .../NoOperationsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../NonStringEnumsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../ObjectTypeVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../ReportVersionTolerant/setup.py | 33 ++++++++++++++++++ .../RequiredOptionalVersionTolerant/setup.py | 33 ++++++++++++++++++ .../ReservedWordsVersionTolerant/setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../setup.py | 33 ++++++++++++++++++ .../UrlVersionTolerant/setup.py | 33 ++++++++++++++++++ .../ValidationVersionTolerant/setup.py | 33 ++++++++++++++++++ .../XmlVersionTolerant/setup.py | 33 ++++++++++++++++++ .../XmsErrorResponseVersionTolerant/setup.py | 33 ++++++++++++++++++ 141 files changed, 4657 insertions(+) create mode 100644 packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py create mode 100644 packages/autorest.python/samples/specification/basic/generated/setup.py create mode 100644 packages/autorest.python/samples/specification/directives/generated/setup.py create mode 100644 packages/autorest.python/samples/specification/management/generated/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py create mode 100644 packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py create mode 100644 packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py create mode 100644 packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py diff --git a/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py b/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py new file mode 100644 index 00000000000..79425cd2e78 --- /dev/null +++ b/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-key-credential-sample" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="azure-key-credential-sample", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/samples/specification/basic/generated/setup.py b/packages/autorest.python/samples/specification/basic/generated/setup.py new file mode 100644 index 00000000000..e9896b084f6 --- /dev/null +++ b/packages/autorest.python/samples/specification/basic/generated/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-basic-sample" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="azure-basic-sample", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/samples/specification/directives/generated/setup.py b/packages/autorest.python/samples/specification/directives/generated/setup.py new file mode 100644 index 00000000000..8e362ea59d6 --- /dev/null +++ b/packages/autorest.python/samples/specification/directives/generated/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-directives-sample" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="azure-directives-sample", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Show polling and paging generation. + """, +) diff --git a/packages/autorest.python/samples/specification/management/generated/setup.py b/packages/autorest.python/samples/specification/management/generated/setup.py new file mode 100644 index 00000000000..2086b103a4d --- /dev/null +++ b/packages/autorest.python/samples/specification/management/generated/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "azure-mgmt-sample" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="azure-mgmt-sample", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py new file mode 100644 index 00000000000..51d310be79c --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestDurationTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py new file mode 100644 index 00000000000..242933502fc --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparametergroupingtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterGroupingTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py new file mode 100644 index 00000000000..424415fb046 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestreportserviceforazure" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestReportServiceForAzure", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py new file mode 100644 index 00000000000..1828e65e8e4 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestazurespecialparameterstestclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestAzureSpecialParametersTestClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py new file mode 100644 index 00000000000..776c9edb733 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterizedHostTestClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py new file mode 100644 index 00000000000..cf0320bb5fa --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomPollerPager/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "custompollerpager" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="custompollerpager", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Long-running Operation for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py new file mode 100644 index 00000000000..57aa85cce20 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterizedhosttestpagingclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterizedHostTestPagingClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py new file mode 100644 index 00000000000..8460273b9a9 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Head/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestheadtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestHeadTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py new file mode 100644 index 00000000000..b781208d50b --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadExceptions/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestheadexceptiontestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestHeadExceptionTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py new file mode 100644 index 00000000000..8460273b9a9 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/HeadWithAzureKeyCredentialPolicy/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestheadtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestHeadTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py new file mode 100644 index 00000000000..b3ad7670f04 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Lro/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestlongrunningoperationtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestLongRunningOperationTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Long-running Operation for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py new file mode 100644 index 00000000000..c15e03fb538 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "lrowithparamaterizedendpoints" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="LROWithParamaterizedEndpoints", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py new file mode 100644 index 00000000000..c3845da1124 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "mixedapiversion" +version = "1.0.0b1" + + +setup( + name=PACKAGE_NAME, + version=version, + description="mixedapiversion", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py new file mode 100644 index 00000000000..751424a3b08 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestpagingtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestPagingTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Long-running Operation for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py new file mode 100644 index 00000000000..f5833b6e9d9 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestsecurityaad" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutorestSecurityAad", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Autorest Security Aad REST APIs. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py new file mode 100644 index 00000000000..911380f7b18 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestsecuritykey" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutorestSecurityKey", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Autorest Security Key REST APIs. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py new file mode 100644 index 00000000000..1c86fa28abe --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/StorageManagementClient/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "storagemanagementclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="StorageManagementClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + StorageManagementClient. + """, +) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py new file mode 100644 index 00000000000..771918e8e42 --- /dev/null +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "microsoftazuretesturl" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="MicrosoftAzureTestUrl", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Some cool documentation. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py new file mode 100644 index 00000000000..400b90dee36 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestDurationTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py new file mode 100644 index 00000000000..71c9ada660d --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparametergroupingtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterGroupingTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py new file mode 100644 index 00000000000..7c18c0ffbd0 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestreportserviceforazure" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestReportServiceForAzure", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py new file mode 100644 index 00000000000..4c99b5a59e5 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureSpecialsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestazurespecialparameterstestclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestAzureSpecialParametersTestClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py new file mode 100644 index 00000000000..fb2cea48e37 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterizedHostTestClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py new file mode 100644 index 00000000000..18925d862ff --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "custompollerpagerversiontolerant" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="custompollerpagerversiontolerant", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Long-running Operation for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py new file mode 100644 index 00000000000..ed5bc12c318 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterizedhosttestpagingclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterizedHostTestPagingClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py new file mode 100644 index 00000000000..a2114e63fe9 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestheadexceptiontestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestHeadExceptionTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py new file mode 100644 index 00000000000..2e702b5d420 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/HeadVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestheadtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestHeadTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py new file mode 100644 index 00000000000..b1a063b8890 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py @@ -0,0 +1,34 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "lropagingversiontolerant" +version = "1.0.0b1" + + +setup( + name=PACKAGE_NAME, + version=version, + description="lropagingversiontolerant", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py new file mode 100644 index 00000000000..1fa17b82ee2 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestlongrunningoperationtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestLongRunningOperationTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Long-running Operation for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py new file mode 100644 index 00000000000..1a280855d1c --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "lrowithparamaterizedendpoints" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="LROWithParamaterizedEndpoints", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py new file mode 100644 index 00000000000..3331e707db0 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestpagingtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestPagingTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Long-running Operation for AutoRest. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py new file mode 100644 index 00000000000..c0a39668cb1 --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/StorageManagementClientVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "storagemanagementclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="StorageManagementClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + StorageManagementClient. + """, +) diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py new file mode 100644 index 00000000000..f3c3ea18adb --- /dev/null +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/SubscriptionIdApiVersionVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "microsoftazuretesturl" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="MicrosoftAzureTestUrl", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Some cool documentation. + """, +) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py new file mode 100644 index 00000000000..c23af9f512c --- /dev/null +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "dpgcustomizationcustomized" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="dpgcustomizationcustomized", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + DPG Swagger that tests our ability to grow up. + """, +) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py new file mode 100644 index 00000000000..889fcb7e225 --- /dev/null +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "dpgcustomizationinitial" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="dpgcustomizationinitial", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + DPG Swagger that tests our ability to grow up. + """, +) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py new file mode 100644 index 00000000000..49b4eb793d9 --- /dev/null +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "dpgservicedriveninitial" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="dpgservicedriveninitial", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + DPG Swagger, this is the initial swagger a service could do. + """, +) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py new file mode 100644 index 00000000000..90ebdfbfd32 --- /dev/null +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "dpgservicedrivenupdateone" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="dpgservicedrivenupdateone", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + DPG Swagger, this is the initial swagger a service could do. + """, +) diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py new file mode 100644 index 00000000000..7b2a3db6c73 --- /dev/null +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "dpgtestmodels" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="dpgtestmodels", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + DPG Swagger that tests our ability to grow up. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py new file mode 100644 index 00000000000..4e5a9cb677f --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "additionalpropertiesclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AdditionalPropertiesClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py new file mode 100644 index 00000000000..f3f7fab84e4 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py @@ -0,0 +1,34 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "anythingclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AnythingClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py new file mode 100644 index 00000000000..3591d75b611 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatarrayservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATArrayService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py new file mode 100644 index 00000000000..3591d75b611 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatarrayservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATArrayService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py new file mode 100644 index 00000000000..d481e6765ea --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "binarywithcontenttypeapplicationjson" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="BinaryWithContentTypeApplicationJson", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Sample for file with json and binary content type. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py new file mode 100644 index 00000000000..688f20e6e69 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestbooltestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestBoolTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py new file mode 100644 index 00000000000..c19ff067a90 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatbyteservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATByteService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py new file mode 100644 index 00000000000..3adce84b2b0 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "packagename" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="packagename", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py new file mode 100644 index 00000000000..d5fd29c14c4 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestcomplextestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestComplexTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py new file mode 100644 index 00000000000..f350db858d9 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestdatetestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestDateTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py new file mode 100644 index 00000000000..a6d46ea08d1 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestdatetimetestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestDateTimeTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py new file mode 100644 index 00000000000..02600cb9476 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestrfc1123datetimetestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestRFC1123DateTimeTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py new file mode 100644 index 00000000000..57822ed5acb --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatdictionaryservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATDictionaryService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py new file mode 100644 index 00000000000..51d310be79c --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestDurationTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py new file mode 100644 index 00000000000..3e52ce075aa --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatfileservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATFileService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py new file mode 100644 index 00000000000..45ec7dbe609 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatformdataservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATFormDataService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py new file mode 100644 index 00000000000..ac42ab58b6c --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "bodyformsdataurlencoded" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="BodyFormsDataURLEncoded", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py new file mode 100644 index 00000000000..ffe4f7810d5 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestintegertestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestIntegerTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py new file mode 100644 index 00000000000..679b4661e47 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestnumbertestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestNumberTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py new file mode 100644 index 00000000000..c141bac7ab4 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py new file mode 100644 index 00000000000..f29b3ccad04 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autoresttimetestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestTimeTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py new file mode 100644 index 00000000000..59fc02c049d --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "clientwithenum" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ClientWithEnum", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test client with enum variable. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py new file mode 100644 index 00000000000..6e9e0380601 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerconstantservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerConstantService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger Constant. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py new file mode 100644 index 00000000000..776c9edb733 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterizedHostTestClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py new file mode 100644 index 00000000000..1aaaed971ff --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterizedcustomhosttestclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterizedCustomHostTestClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py new file mode 100644 index 00000000000..a4c461c083a --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "errorwithsecrets" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ErrorWithSecrets", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Tests whether loggers/tracers redact secrets and PII within error responses. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py new file mode 100644 index 00000000000..1c0323fca33 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "petstoreinc" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="PetStoreInc", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + PetStore. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py new file mode 100644 index 00000000000..97b5c3a5b5f --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatheaderservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATHeaderService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py new file mode 100644 index 00000000000..29a75656e2a --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autoresthttpinfrastructuretestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestHttpInfrastructureTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py new file mode 100644 index 00000000000..10eb713af21 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "incorrectreturnederrormodel" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="IncorrectReturnedErrorModel", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test to see when throwing an HttpResponseError whether we swallow error model deserialization errors. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py new file mode 100644 index 00000000000..63f39798790 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "mediatypesclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="MediaTypesClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Play with produces/consumes and media-types in general. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py new file mode 100644 index 00000000000..1cb779fd90d --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "mergepatchjsonclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="MergePatchJsonClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing merge patch json. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py new file mode 100644 index 00000000000..1098909a796 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestresourceflatteningtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestResourceFlatteningTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Resource Flattening for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py new file mode 100644 index 00000000000..24b447fd4e9 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multipleinheritanceserviceclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="MultipleInheritanceServiceClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiinheritance client testing. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py new file mode 100644 index 00000000000..bf08d4328ac --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "nooperationsserviceclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="NoOperationsServiceClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client with no operations. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py new file mode 100644 index 00000000000..99adff7d2c2 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "nonstringenumsclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="NonStringEnumsClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Testing non-string enums. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py new file mode 100644 index 00000000000..f81ec7c7005 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "objecttypeclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ObjectTypeClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing basic type: object swaggers. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py new file mode 100644 index 00000000000..558fbf1fc4e --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterflattening" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterFlattening", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Resource Flattening for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py new file mode 100644 index 00000000000..524ec102acd --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "parmaterizedendpointclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ParmaterizedEndpointClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing parameterized hosts with the name 'endpoint'. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py new file mode 100644 index 00000000000..f8a3dddcd1e --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestreportservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestReportService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py new file mode 100644 index 00000000000..f924e27dfe2 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestrequiredoptionaltestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestRequiredOptionalTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py new file mode 100644 index 00000000000..bc83d8d534d --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "reservedwordsclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ReservedWordsClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Swagger that has operation groups etc. with reserved words. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py new file mode 100644 index 00000000000..19948e1caa7 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestsecurityaad" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutorestSecurityAad", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Autorest Security Aad REST APIs. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py new file mode 100644 index 00000000000..1e4025c78fd --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "securityaadswaggercredentialflag" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="SecurityAadSwaggerCredentialFlag", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Autorest Security Aad REST APIs. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py new file mode 100644 index 00000000000..5a5f344d2ff --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestsecuritykey" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutorestSecurityKey", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Autorest Security Key REST APIs. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py new file mode 100644 index 00000000000..d88b08ed49f --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "securitykeyswaggercredentialflag" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="SecurityKeySwaggerCredentialFlag", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Autorest Security Key REST APIs. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py new file mode 100644 index 00000000000..9913cf9a106 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autoresturltestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestUrlTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py new file mode 100644 index 00000000000..0aa4e4b2fb5 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autoresturlmutlicollectionformattestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestUrlMutliCollectionFormatTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py new file mode 100644 index 00000000000..3dde62c4285 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestvalidationtest" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestValidationTest", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. No server backend exists for these tests. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py new file mode 100644 index 00000000000..c320e2f7335 --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatxmlservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATXMLService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py new file mode 100644 index 00000000000..63298db94cb --- /dev/null +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "xmserrorresponseextensions" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="XMSErrorResponseExtensions", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + XMS Error Response Extensions. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py new file mode 100644 index 00000000000..5a40fcb0ab8 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "additionalpropertiesclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AdditionalPropertiesClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py new file mode 100644 index 00000000000..30034d83c6d --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py @@ -0,0 +1,34 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "anythingclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AnythingClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py new file mode 100644 index 00000000000..3288447fb8a --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatarrayservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATArrayService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py new file mode 100644 index 00000000000..5f06103f0e9 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "binarywithcontenttypeapplicationjson" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="BinaryWithContentTypeApplicationJson", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Sample for file with json and binary content type. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py new file mode 100644 index 00000000000..242a9371671 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestbooltestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestBoolTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py new file mode 100644 index 00000000000..3d7baf22ccd --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatbyteservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATByteService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py new file mode 100644 index 00000000000..e1cc3889509 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestcomplextestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestComplexTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py new file mode 100644 index 00000000000..ea37e96529b --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestrfc1123datetimetestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestRFC1123DateTimeTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py new file mode 100644 index 00000000000..3772b30b471 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestdatetimetestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestDateTimeTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py new file mode 100644 index 00000000000..c487af06187 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestdatetestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestDateTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py new file mode 100644 index 00000000000..f6386b0f2e0 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatdictionaryservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATDictionaryService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py new file mode 100644 index 00000000000..400b90dee36 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestdurationtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestDurationTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py new file mode 100644 index 00000000000..29134ca1b10 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatfileservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATFileService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py new file mode 100644 index 00000000000..7f7d419fd79 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatformdataservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATFormDataService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py new file mode 100644 index 00000000000..daa487136fa --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "bodyformsdataurlencoded" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="BodyFormsDataURLEncoded", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py new file mode 100644 index 00000000000..293e7858e06 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestintegertestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestIntegerTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py new file mode 100644 index 00000000000..3c3b3e2d3b3 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestnumbertestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestNumberTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py new file mode 100644 index 00000000000..5443f89a881 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py new file mode 100644 index 00000000000..8197d64f66f --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autoresttimetestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestTimeTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py new file mode 100644 index 00000000000..8807d0de347 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "clientwithenum" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ClientWithEnum", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test client with enum variable. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py new file mode 100644 index 00000000000..43ab422bc31 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerconstantservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerConstantService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger Constant. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py new file mode 100644 index 00000000000..1dc42f910a7 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterizedcustomhosttestclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterizedCustomHostTestClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py new file mode 100644 index 00000000000..fb2cea48e37 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterizedhosttestclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterizedHostTestClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py new file mode 100644 index 00000000000..e3c2ed83aac --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "errorwithsecrets" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ErrorWithSecrets", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Tests whether loggers/tracers redact secrets and PII within error responses. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py new file mode 100644 index 00000000000..ce05cbf78c7 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "petstoreinc" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="PetStoreInc", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + PetStore. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py new file mode 100644 index 00000000000..a474e0ff66a --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatheaderservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATHeaderService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py new file mode 100644 index 00000000000..f87eb21c235 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autoresthttpinfrastructuretestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestHttpInfrastructureTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py new file mode 100644 index 00000000000..07a3372ab15 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "incorrectreturnederrormodel" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="IncorrectReturnedErrorModel", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test to see when throwing an HttpResponseError whether we swallow error model deserialization errors. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py new file mode 100644 index 00000000000..57fd24719cd --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "mediatypesclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="MediaTypesClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Play with produces/consumes and media-types in general. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py new file mode 100644 index 00000000000..9a3d60523aa --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "mergepatchjsonclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="MergePatchJsonClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing merge patch json. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py new file mode 100644 index 00000000000..468ba5f8987 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestresourceflatteningtestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestResourceFlatteningTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Resource Flattening for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py new file mode 100644 index 00000000000..ba3246fc65e --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multipleinheritanceserviceclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="MultipleInheritanceServiceClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiinheritance client testing. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py new file mode 100644 index 00000000000..f50b4996cda --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py @@ -0,0 +1,34 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "nonamespaceflag" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="nonamespaceflag", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing basic anything types. Those schemas without types can be anything: primitive, object, array. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py new file mode 100644 index 00000000000..6c90c5c86c5 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "nooperationsserviceclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="NoOperationsServiceClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client with no operations. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py new file mode 100644 index 00000000000..7676cfb4f96 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "nonstringenumsclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="NonStringEnumsClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Testing non-string enums. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py new file mode 100644 index 00000000000..10d2ca3d6be --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "objecttypeclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ObjectTypeClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing basic type: object swaggers. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py new file mode 100644 index 00000000000..b95414e70ea --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestparameterflattening" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestParameterFlattening", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Resource Flattening for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py new file mode 100644 index 00000000000..2ae7effd091 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "parmaterizedendpointclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ParmaterizedEndpointClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for testing parameterized hosts with the name 'endpoint'. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py new file mode 100644 index 00000000000..e844f289d7e --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestreportservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestReportService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py new file mode 100644 index 00000000000..5d78d91beec --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestrequiredoptionaltestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestRequiredOptionalTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py new file mode 100644 index 00000000000..1282c0d24d0 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "reservedwordsclient" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="ReservedWordsClient", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Swagger that has operation groups etc. with reserved words. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py new file mode 100644 index 00000000000..5b88f7f5b54 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestsecurityaad" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutorestSecurityAad", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Autorest Security Aad REST APIs. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py new file mode 100644 index 00000000000..83c81bb0cf6 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestsecuritykey" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutorestSecurityKey", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Autorest Security Key REST APIs. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py new file mode 100644 index 00000000000..7816f0697d0 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autoresturlmutlicollectionformattestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestUrlMutliCollectionFormatTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py new file mode 100644 index 00000000000..fdc3396da09 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autoresturltestservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestUrlTestService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py new file mode 100644 index 00000000000..9508ff2fc4e --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestvalidationtest" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestValidationTest", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest. No server backend exists for these tests. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py new file mode 100644 index 00000000000..24bc8897ffd --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "autorestswaggerbatxmlservice" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="AutoRestSwaggerBATXMLService", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Test Infrastructure for AutoRest Swagger BAT. + """, +) diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py new file mode 100644 index 00000000000..7dde5c58c42 --- /dev/null +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "xmserrorresponseextensions" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="XMSErrorResponseExtensions", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + XMS Error Response Extensions. + """, +) From 9db95bb09f537a0390f48b92af290ac134bfa1ce Mon Sep 17 00:00:00 2001 From: swathipil Date: Mon, 21 Jul 2025 12:45:12 -0700 Subject: [PATCH 10/48] bump apiview-stub-generator version --- packages/autorest.python/test/azure/legacy/tox.ini | 2 +- packages/autorest.python/test/azure/version-tolerant/tox.ini | 2 +- packages/autorest.python/test/dpg/version-tolerant/tox.ini | 2 +- packages/autorest.python/test/multiapi/tox.ini | 2 +- packages/autorest.python/test/vanilla/legacy/tox.ini | 2 +- packages/autorest.python/test/vanilla/version-tolerant/tox.ini | 2 +- packages/typespec-python/test/azure/tox.ini | 2 +- packages/typespec-python/test/unbranded/tox.ini | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/autorest.python/test/azure/legacy/tox.ini b/packages/autorest.python/test/azure/legacy/tox.ini index bb387be9998..9bdf0b6118a 100644 --- a/packages/autorest.python/test/azure/legacy/tox.ini +++ b/packages/autorest.python/test/azure/legacy/tox.ini @@ -16,5 +16,5 @@ commands = [testenv:apiview] commands = - pip install apiview-stub-generator==0.3.13 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" python ../../../../../eng/scripts/run_apiview.py -t azure -g legacy diff --git a/packages/autorest.python/test/azure/version-tolerant/tox.ini b/packages/autorest.python/test/azure/version-tolerant/tox.ini index 40cbebeac6c..beb7e352e60 100644 --- a/packages/autorest.python/test/azure/version-tolerant/tox.ini +++ b/packages/autorest.python/test/azure/version-tolerant/tox.ini @@ -32,5 +32,5 @@ commands = [testenv:apiview] commands = - pip install apiview-stub-generator==0.3.13 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" python ../../../../../eng/scripts/run_apiview.py -t azure -g version-tolerant {posargs} diff --git a/packages/autorest.python/test/dpg/version-tolerant/tox.ini b/packages/autorest.python/test/dpg/version-tolerant/tox.ini index 7b4268a5426..72323f74e73 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/tox.ini +++ b/packages/autorest.python/test/dpg/version-tolerant/tox.ini @@ -32,5 +32,5 @@ commands = [testenv:apiview] commands = - pip install apiview-stub-generator==0.3.13 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" python ../../../../../eng/scripts/run_apiview.py -t dpg -g version-tolerant diff --git a/packages/autorest.python/test/multiapi/tox.ini b/packages/autorest.python/test/multiapi/tox.ini index 8b188547ab8..aa618497fba 100644 --- a/packages/autorest.python/test/multiapi/tox.ini +++ b/packages/autorest.python/test/multiapi/tox.ini @@ -31,5 +31,5 @@ commands = [testenv:apiview] commands = - pip install apiview-stub-generator==0.3.13 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" python ../../../../eng/scripts/run_apiview.py -t multiapi diff --git a/packages/autorest.python/test/vanilla/legacy/tox.ini b/packages/autorest.python/test/vanilla/legacy/tox.ini index 42c52381b87..ff7cc5ced5c 100644 --- a/packages/autorest.python/test/vanilla/legacy/tox.ini +++ b/packages/autorest.python/test/vanilla/legacy/tox.ini @@ -16,7 +16,7 @@ commands = [testenv:apiview] commands = - pip install apiview-stub-generator==0.3.13 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" python ../../../../../eng/scripts/run_apiview.py -t vanilla -g legacy [testenv:sphinx] diff --git a/packages/autorest.python/test/vanilla/version-tolerant/tox.ini b/packages/autorest.python/test/vanilla/version-tolerant/tox.ini index 39601b040e9..b7434ea3a43 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/tox.ini +++ b/packages/autorest.python/test/vanilla/version-tolerant/tox.ini @@ -32,5 +32,5 @@ commands = [testenv:apiview] commands = - pip install apiview-stub-generator==0.3.13 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" python ../../../../../eng/scripts/run_apiview.py -t vanilla -g version-tolerant diff --git a/packages/typespec-python/test/azure/tox.ini b/packages/typespec-python/test/azure/tox.ini index 39fa29c1e38..b5066b80dfb 100644 --- a/packages/typespec-python/test/azure/tox.ini +++ b/packages/typespec-python/test/azure/tox.ini @@ -33,5 +33,5 @@ commands = [testenv:apiview] envlist=py311 commands = - pip install apiview-stub-generator==0.3.13 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" python ../../../../eng/scripts/run_apiview.py -p typespec-python -t azure -s "generated" {posargs} diff --git a/packages/typespec-python/test/unbranded/tox.ini b/packages/typespec-python/test/unbranded/tox.ini index 8d78747bfcf..2a57a126941 100644 --- a/packages/typespec-python/test/unbranded/tox.ini +++ b/packages/typespec-python/test/unbranded/tox.ini @@ -33,5 +33,5 @@ commands = [testenv:apiview] envlist=py311 commands = - pip install apiview-stub-generator==0.3.13 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" pip install ../../../../../azure-sdk-tools/packages/python-packages/apiview-stub-generator --extra-index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" From 7d8fd32eed9efb63b2d346337c9e97f512a8f795 Mon Sep 17 00:00:00 2001 From: swathipil Date: Mon, 21 Jul 2025 14:48:46 -0700 Subject: [PATCH 11/48] add basic-setup-py to all multiapi tests --- .../test/multiapi/specification/multiapi/README.md | 1 + .../specification/multiapicredentialdefaultpolicy/README.md | 1 + .../test/multiapi/specification/multiapicustombaseurl/README.md | 1 + .../test/multiapi/specification/multiapidataplane/README.md | 1 + .../test/multiapi/specification/multiapikeywordonly/README.md | 1 + .../test/multiapi/specification/multiapinoasync/README.md | 1 + .../test/multiapi/specification/multiapisecurity/README.md | 1 + .../test/multiapi/specification/multiapiwithsubmodule/README.md | 1 + 8 files changed, 8 insertions(+) diff --git a/packages/autorest.python/test/multiapi/specification/multiapi/README.md b/packages/autorest.python/test/multiapi/specification/multiapi/README.md index 09cdf99f68d..b2781270bc9 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapi/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapi/README.md @@ -37,6 +37,7 @@ azure-arm: true add-credentials: true python3-only: true version-tolerant: false +basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md b/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md index 1b5a28a07f2..4f0342bb7c5 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md @@ -32,6 +32,7 @@ add-credentials: true credential-default-policy-type: AzureKeyCredentialPolicy python3-only: true version-tolerant: false +basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md b/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md index 4c300b5c00e..5adeb7bf713 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md @@ -20,6 +20,7 @@ license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true python3-only: true version-tolerant: false +basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md b/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md index 158374dd780..dbedf229f43 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md @@ -30,6 +30,7 @@ license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true python3-only: true version-tolerant: false +basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md b/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md index 687683c8a75..a1034a140d3 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md @@ -27,6 +27,7 @@ add-credentials: true python3-only: true version-tolerant: false only-path-and-body-params-positional: true +basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md b/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md index 5546f909929..7e41fe4bb32 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md @@ -32,6 +32,7 @@ add-credentials: true no-async: true python3-only: true version-tolerant: false +basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md b/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md index 9caca9e8fef..f1336ed6528 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md @@ -24,6 +24,7 @@ license-header: MICROSOFT_MIT_NO_VERSION security: AADToken python3-only: true version-tolerant: false +basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md index c6b37deb834..c1420c3d6a1 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md @@ -30,6 +30,7 @@ add-credentials: true no-namespace-folders: true python3-only: true version-tolerant: false +basic-setup-py: true ``` ``` yaml $(multiapi) From 46f5e5f4d6a0e1fcec0f2b4d84bc041e7d969ab3 Mon Sep 17 00:00:00 2001 From: swathipil Date: Mon, 21 Jul 2025 15:37:11 -0700 Subject: [PATCH 12/48] chronus --- ...client-python-add-pyproject-toml-2025-6-21-14-58-56.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .chronus/changes/auto-swathipil-http-client-python-add-pyproject-toml-2025-6-21-14-58-56.md diff --git a/.chronus/changes/auto-swathipil-http-client-python-add-pyproject-toml-2025-6-21-14-58-56.md b/.chronus/changes/auto-swathipil-http-client-python-add-pyproject-toml-2025-6-21-14-58-56.md new file mode 100644 index 00000000000..0975d74ba7d --- /dev/null +++ b/.chronus/changes/auto-swathipil-http-client-python-add-pyproject-toml-2025-6-21-14-58-56.md @@ -0,0 +1,8 @@ +--- +changeKind: feature +packages: + - "@autorest/python" + - "@azure-tools/typespec-python" +--- + +Add pyproject.toml generation by default \ No newline at end of file From 0bcdc6573a71e09baa9dc01b4cb496de362a0429 Mon Sep 17 00:00:00 2001 From: swathipil Date: Mon, 21 Jul 2025 16:11:09 -0700 Subject: [PATCH 13/48] pass in package-version with basic-setup-py --- .../test/multiapi/specification/multiapi/README.md | 3 ++- .../specification/multiapicredentialdefaultpolicy/README.md | 3 ++- .../multiapi/specification/multiapicustombaseurl/README.md | 3 ++- .../test/multiapi/specification/multiapidataplane/README.md | 3 ++- .../test/multiapi/specification/multiapikeywordonly/README.md | 3 ++- .../test/multiapi/specification/multiapinoasync/README.md | 3 ++- .../test/multiapi/specification/multiapisecurity/README.md | 3 ++- .../multiapi/specification/multiapiwithsubmodule/README.md | 4 +++- 8 files changed, 17 insertions(+), 8 deletions(-) diff --git a/packages/autorest.python/test/multiapi/specification/multiapi/README.md b/packages/autorest.python/test/multiapi/specification/multiapi/README.md index b2781270bc9..b1cad435b2b 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapi/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapi/README.md @@ -31,13 +31,14 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/Multiapi/ ### Settings ``` yaml package-name: multiapi +package-version: 0.1.0 +basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true add-credentials: true python3-only: true version-tolerant: false -basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md b/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md index 4f0342bb7c5..c600a1e86e9 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md @@ -25,6 +25,8 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiC ### Settings ``` yaml package-name: multiapicredentialdefaultpolicy +package-version: 0.1.0 +basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true @@ -32,7 +34,6 @@ add-credentials: true credential-default-policy-type: AzureKeyCredentialPolicy python3-only: true version-tolerant: false -basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md b/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md index 5adeb7bf713..c7fa242a213 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md @@ -15,12 +15,13 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiC ### Settings ``` yaml package-name: multiapicustombaseurl +package-version: 0.1.0 +basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true python3-only: true version-tolerant: false -basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md b/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md index dbedf229f43..a843239de92 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md @@ -25,12 +25,13 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiD ### Settings ``` yaml package-name: multiapidataplane +package-version: 0.1.0 +basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true python3-only: true version-tolerant: false -basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md b/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md index a1034a140d3..1bceac23e76 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md @@ -21,13 +21,14 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiK ### Settings ``` yaml package-name: multiapikeywordonly +package-version: 0.1.0 +basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true python3-only: true version-tolerant: false only-path-and-body-params-positional: true -basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md b/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md index 7e41fe4bb32..775e4a2d22c 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md @@ -25,6 +25,8 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiN ### Settings ``` yaml package-name: multiapinoasync +package-version: 0.1.0 +basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true @@ -32,7 +34,6 @@ add-credentials: true no-async: true python3-only: true version-tolerant: false -basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md b/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md index f1336ed6528..25a0d65fe19 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md @@ -19,12 +19,13 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiS ### Settings ``` yaml package-name: multiapisecurity +package-version: 0.1.0 +basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION security: AADToken python3-only: true version-tolerant: false -basic-setup-py: true ``` ``` yaml $(multiapi) diff --git a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md index c1420c3d6a1..ba0d9c07c7c 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md @@ -24,13 +24,15 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiW ### Settings ``` yaml +package-name: multiapiwithsubmodule +package-version: 0.1.0 +basic-setup-py: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true add-credentials: true no-namespace-folders: true python3-only: true version-tolerant: false -basic-setup-py: true ``` ``` yaml $(multiapi) From 478bd4a273b3854d2aed0ad1ac2bb931b885145d Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Tue, 22 Jul 2025 00:33:17 +0000 Subject: [PATCH 14/48] Regenerate for autorest.python (2025-07-22 00:33:17) --- .../Multiapi/multiapi/v0/__init__.py | 3 ++ .../Multiapi/multiapi/v0/_configuration.py | 4 +-- .../Multiapi/multiapi/v0/_version.py | 9 +++++ .../multiapi/v0/aio/_configuration.py | 4 +-- .../Multiapi/multiapi/v1/__init__.py | 3 ++ .../Multiapi/multiapi/v1/_configuration.py | 4 +-- .../Multiapi/multiapi/v1/_version.py | 9 +++++ .../multiapi/v1/aio/_configuration.py | 4 +-- .../Multiapi/multiapi/v2/__init__.py | 3 ++ .../Multiapi/multiapi/v2/_configuration.py | 4 +-- .../Multiapi/multiapi/v2/_version.py | 9 +++++ .../multiapi/v2/aio/_configuration.py | 4 +-- .../Multiapi/multiapi/v3/__init__.py | 3 ++ .../Multiapi/multiapi/v3/_configuration.py | 4 +-- .../Multiapi/multiapi/v3/_version.py | 9 +++++ .../multiapi/v3/aio/_configuration.py | 4 +-- .../AcceptanceTests/Multiapi/setup.py | 33 +++++++++++++++++++ .../v1/__init__.py | 3 ++ .../v1/_configuration.py | 2 +- .../v1/_version.py | 9 +++++ .../v1/aio/_configuration.py | 2 +- .../v2/__init__.py | 3 ++ .../v2/_configuration.py | 2 +- .../v2/_version.py | 9 +++++ .../v2/aio/_configuration.py | 2 +- .../v3/__init__.py | 3 ++ .../v3/_configuration.py | 2 +- .../v3/_version.py | 9 +++++ .../v3/aio/_configuration.py | 2 +- .../MultiapiCredentialDefaultPolicy/setup.py | 33 +++++++++++++++++++ .../multiapicustombaseurl/v1/__init__.py | 3 ++ .../v1/_configuration.py | 4 +-- .../multiapicustombaseurl/v1/_version.py | 9 +++++ .../v1/aio/_configuration.py | 4 +-- .../multiapicustombaseurl/v2/__init__.py | 3 ++ .../v2/_configuration.py | 4 +-- .../multiapicustombaseurl/v2/_version.py | 9 +++++ .../v2/aio/_configuration.py | 4 +-- .../MultiapiCustomBaseUrl/setup.py | 33 +++++++++++++++++++ .../multiapidataplane/v1/__init__.py | 3 ++ .../multiapidataplane/v1/_configuration.py | 4 +-- .../multiapidataplane/v1/_version.py | 9 +++++ .../v1/aio/_configuration.py | 4 +-- .../multiapidataplane/v2/__init__.py | 3 ++ .../multiapidataplane/v2/_configuration.py | 4 +-- .../multiapidataplane/v2/_version.py | 9 +++++ .../v2/aio/_configuration.py | 4 +-- .../multiapidataplane/v3/__init__.py | 3 ++ .../multiapidataplane/v3/_configuration.py | 4 +-- .../multiapidataplane/v3/_version.py | 9 +++++ .../v3/aio/_configuration.py | 4 +-- .../MultiapiDataPlane/setup.py | 33 +++++++++++++++++++ .../multiapikeywordonly/v1/__init__.py | 3 ++ .../multiapikeywordonly/v1/_configuration.py | 4 +-- .../multiapikeywordonly/v1/_version.py | 9 +++++ .../v1/aio/_configuration.py | 4 +-- .../multiapikeywordonly/v2/__init__.py | 3 ++ .../multiapikeywordonly/v2/_configuration.py | 4 +-- .../multiapikeywordonly/v2/_version.py | 9 +++++ .../v2/aio/_configuration.py | 4 +-- .../multiapikeywordonly/v3/__init__.py | 3 ++ .../multiapikeywordonly/v3/_configuration.py | 4 +-- .../multiapikeywordonly/v3/_version.py | 9 +++++ .../v3/aio/_configuration.py | 4 +-- .../MultiapiKeywordOnly/setup.py | 33 +++++++++++++++++++ .../multiapinoasync/v1/__init__.py | 3 ++ .../multiapinoasync/v1/_configuration.py | 4 +-- .../multiapinoasync/v1/_version.py | 9 +++++ .../multiapinoasync/v2/__init__.py | 3 ++ .../multiapinoasync/v2/_configuration.py | 4 +-- .../multiapinoasync/v2/_version.py | 9 +++++ .../multiapinoasync/v3/__init__.py | 3 ++ .../multiapinoasync/v3/_configuration.py | 4 +-- .../multiapinoasync/v3/_version.py | 9 +++++ .../AcceptanceTests/MultiapiNoAsync/setup.py | 33 +++++++++++++++++++ .../multiapisecurity/v0/__init__.py | 3 ++ .../multiapisecurity/v0/_configuration.py | 4 +-- .../multiapisecurity/v0/_version.py | 9 +++++ .../multiapisecurity/v0/aio/_configuration.py | 4 +-- .../multiapisecurity/v1/__init__.py | 3 ++ .../multiapisecurity/v1/_configuration.py | 4 +-- .../multiapisecurity/v1/_version.py | 9 +++++ .../multiapisecurity/v1/aio/_configuration.py | 4 +-- .../AcceptanceTests/MultiapiSecurity/setup.py | 33 +++++++++++++++++++ .../submodule/v1/__init__.py | 3 ++ .../submodule/v1/_configuration.py | 4 +-- .../submodule/v1/_version.py | 9 +++++ .../submodule/v1/aio/_configuration.py | 4 +-- .../submodule/v2/__init__.py | 3 ++ .../submodule/v2/_configuration.py | 4 +-- .../submodule/v2/_version.py | 9 +++++ .../submodule/v2/aio/_configuration.py | 4 +-- .../submodule/v3/__init__.py | 3 ++ .../submodule/v3/_configuration.py | 4 +-- .../submodule/v3/_version.py | 9 +++++ .../submodule/v3/aio/_configuration.py | 4 +-- .../MultiapiWithSubmodule/setup.py | 33 +++++++++++++++++++ 97 files changed, 620 insertions(+), 80 deletions(-) create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_version.py create mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py index 5d72190ec6e..ecc80f7e9dc 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py index cc3420f9112..e6f2c2cd3b9 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py index 4d91e0a380e..8a60692e981 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py index 093bce4e8d9..de4929ac159 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py index 8a6a6365ac6..4317efc499d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py index 10f716d8dd6..f05db5a87eb 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py index 633f146ec60..4389e88fec4 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py index 7a4058edefe..2f2ef214142 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py new file mode 100644 index 00000000000..75b4710a660 --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multiapi" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="multiapi", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiapi client testing. + """, +) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py index a8be991d4c3..f2126018371 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -VERSION = "unknown" +from ._version import VERSION class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py index c0bfc9b848e..3c0830ad888 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -VERSION = "unknown" +from .._version import VERSION class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py index 0912525614d..9c3bd22c34c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -VERSION = "unknown" +from ._version import VERSION class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py index c6dedcb071d..dccea79e486 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -VERSION = "unknown" +from .._version import VERSION class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py index eca4a1b0a56..20985e2a570 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -VERSION = "unknown" +from ._version import VERSION class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py index 1f5ce3c0e76..8c2188639d4 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -VERSION = "unknown" +from .._version import VERSION class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py new file mode 100644 index 00000000000..6af00dbff11 --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multiapicredentialdefaultpolicy" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="multiapicredentialdefaultpolicy", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiapi client testing. + """, +) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/__init__.py index ccc133e71e1..57348374e03 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_custom_base_url_service_client import MultiapiCustomBaseUrlServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py index e88c1c6d7af..e74ffb25e51 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiCustomBaseUrlServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for MultiapiCustomBaseUrlServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py index 9915f2c2e2e..97746886abe 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiCustomBaseUrlServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for MultiapiCustomBaseUrlServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/__init__.py index ccc133e71e1..57348374e03 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_custom_base_url_service_client import MultiapiCustomBaseUrlServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py index 5f2904887f8..3801160ded3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiCustomBaseUrlServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for MultiapiCustomBaseUrlServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py index 0bdd1c9cfd0..a04a991dd74 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiCustomBaseUrlServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for MultiapiCustomBaseUrlServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py new file mode 100644 index 00000000000..c1763c41afb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multiapicustombaseurl" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="multiapicustombaseurl", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiapi custom base url testing. + """, +) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py index 09e03ece143..f83aebfe879 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py index 3d6432fa758..d06af26b62b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py index 5e60bea3540..70d30e58b22 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py index 8d71e3f2f72..cce1169d47e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py index 9826b12b94f..a591f06e464 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py index 0b30d2372cd..34548369fc3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py new file mode 100644 index 00000000000..bdaf37a9bbc --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multiapidataplane" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="multiapidataplane", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiapi client testing. + """, +) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py index 6810552fa19..7e497208c4f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py index e704da2b33e..8396d672d09 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py index 74eee4f7f7d..190801b148f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py index 2faf9fb852f..64be1d99aaf 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py index 525afec9c0b..a067ae6a497 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py index fa0ebc27201..e3814fcf91a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py new file mode 100644 index 00000000000..34eb726466d --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multiapikeywordonly" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="multiapikeywordonly", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiapi client testing. + """, +) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py index c4224d94b4c..e35a92c3c55 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py index 91e7712fba7..5b58adb7276 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py index 74845e1428b..01fbb65bf9b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py new file mode 100644 index 00000000000..da8f836f5d3 --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multiapinoasync" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="multiapinoasync", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiapi client testing. + """, +) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py index 9851b5dfa42..41c2a19e6a2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py index 74a93dfdd47..9c4caac31a9 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py index ab8adb477f6..fbae17e47da 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py index cc1b4d0032a..02d384eb6da 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py new file mode 100644 index 00000000000..269a7e66649 --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multiapisecurity" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="multiapisecurity", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-core>=1.30.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiapi client testing. + """, +) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py index 3dd2e667247..79cff01ce59 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py index d9524f4ef39..6eb12e25bf2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py index ccf9343999a..992f0cef797 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py index 3ef47ecd0f2..0be6a998a5b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/__init__.py index 30c0d2f93d3..c4dc4772677 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/__init__.py @@ -13,6 +13,9 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore +from ._version import VERSION + +__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py index f39362fec82..f98a73a1362 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: from azure.core.credentials import TokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_version.py new file mode 100644 index 00000000000..eae7c95b6fb --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py index 6da45f95f65..32968123405 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy +from .._version import VERSION + if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" - class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py new file mode 100644 index 00000000000..c5516505502 --- /dev/null +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from setuptools import setup, find_packages + + +PACKAGE_NAME = "multiapiwithsubmodule" +version = "0.1.0" + + +setup( + name=PACKAGE_NAME, + version=version, + description="multiapiwithsubmodule", + author_email="", + url="", + keywords="azure, azure sdk", + packages=find_packages(), + include_package_data=True, + install_requires=[ + "msrest>=0.7.1", + "azure-mgmt-core>=1.5.0", + "typing-extensions>=4.6.0", + ], + long_description="""\ + Service client for multiapi client testing. + """, +) From 41609e361c09684c35d41e603eb71e08f221d5ce Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 28 Jul 2025 20:49:50 +0000 Subject: [PATCH 15/48] Update dependencies --- packages/autorest.python/package.json | 2 +- packages/typespec-python/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index a38a8b65579..5365680f60d 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODExOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 40dd9ac6080..42a3e7b0438 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODExOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { From deee1d5371a55093032df721f81740a3640cebb4 Mon Sep 17 00:00:00 2001 From: swathipil Date: Mon, 28 Jul 2025 13:55:04 -0700 Subject: [PATCH 16/48] sync pnpm-lock to main --- pnpm-lock.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5d1d0e92e02..70753168fcc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: ~0.14.0 + version: 0.14.0(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: ~0.14.0 + version: 0.14.0(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1668,9 +1668,8 @@ packages: peerDependencies: '@typespec/compiler': ^1.2.1 - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz': - resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz} - version: 0.14.0 + '@typespec/http-client-python@0.14.0': + resolution: {integrity: sha512-JJ9dWy64bC7fQvYcxlBixJJ/raaPYWLbjqh5BZ725y/xRjHqHSwscAK2fXZIrNwrEdvF03y9XNlOnf3Zj0V4GA==} engines: {node: '>=20.0.0'} peerDependencies: '@azure-tools/typespec-autorest': '>=0.58.0 <1.0.0' @@ -6422,7 +6421,7 @@ snapshots: dependencies: '@typespec/compiler': 1.2.1(@types/node@22.13.17) - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTExNTQ0MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q)': + '@typespec/http-client-python@0.14.0(iurth4uuk4s6znzuuc7ncenk2q)': dependencies: '@azure-tools/typespec-autorest': 0.58.0(vddu6w2yloigenmssnpyjivoim) '@azure-tools/typespec-azure-core': 0.58.0(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))(@typespec/rest@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))) From d3a1ca829aaed658abb82412500c62bcba0efeef Mon Sep 17 00:00:00 2001 From: swathipil Date: Mon, 28 Jul 2025 15:06:16 -0700 Subject: [PATCH 17/48] revert multiapi so basic-setup-py isn't needed by default --- .../test/multiapi/specification/multiapi/README.md | 1 - .../specification/multiapicredentialdefaultpolicy/README.md | 1 - .../test/multiapi/specification/multiapicustombaseurl/README.md | 1 - .../test/multiapi/specification/multiapidataplane/README.md | 1 - .../test/multiapi/specification/multiapikeywordonly/README.md | 1 - .../test/multiapi/specification/multiapinoasync/README.md | 1 - .../test/multiapi/specification/multiapisecurity/README.md | 1 - .../test/multiapi/specification/multiapiwithsubmodule/README.md | 1 - 8 files changed, 8 deletions(-) diff --git a/packages/autorest.python/test/multiapi/specification/multiapi/README.md b/packages/autorest.python/test/multiapi/specification/multiapi/README.md index b1cad435b2b..467ae56eab0 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapi/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapi/README.md @@ -32,7 +32,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/Multiapi/ ``` yaml package-name: multiapi package-version: 0.1.0 -basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md b/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md index c600a1e86e9..ffb15764b40 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md @@ -26,7 +26,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiC ``` yaml package-name: multiapicredentialdefaultpolicy package-version: 0.1.0 -basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md b/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md index c7fa242a213..c04d7d7751e 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md @@ -16,7 +16,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiC ``` yaml package-name: multiapicustombaseurl package-version: 0.1.0 -basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md b/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md index a843239de92..02cd37a1bd7 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md @@ -26,7 +26,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiD ``` yaml package-name: multiapidataplane package-version: 0.1.0 -basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md b/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md index 1bceac23e76..56ff85a5751 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md @@ -22,7 +22,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiK ``` yaml package-name: multiapikeywordonly package-version: 0.1.0 -basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md b/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md index 775e4a2d22c..ed3bea0d91f 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md @@ -26,7 +26,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiN ``` yaml package-name: multiapinoasync package-version: 0.1.0 -basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md b/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md index 25a0d65fe19..8a16bd94502 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md @@ -20,7 +20,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiS ``` yaml package-name: multiapisecurity package-version: 0.1.0 -basic-setup-py: true no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION security: AADToken diff --git a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md index ba0d9c07c7c..d8572d5f6a4 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md @@ -26,7 +26,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiW ``` yaml package-name: multiapiwithsubmodule package-version: 0.1.0 -basic-setup-py: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true add-credentials: true From f014b71e08274370131ed301382f175b8554fbd4 Mon Sep 17 00:00:00 2001 From: swathipil Date: Mon, 28 Jul 2025 15:08:08 -0700 Subject: [PATCH 18/48] remove package-version too --- .../test/multiapi/specification/multiapi/README.md | 1 - .../specification/multiapicredentialdefaultpolicy/README.md | 1 - .../test/multiapi/specification/multiapicustombaseurl/README.md | 1 - .../test/multiapi/specification/multiapidataplane/README.md | 1 - .../test/multiapi/specification/multiapikeywordonly/README.md | 1 - .../test/multiapi/specification/multiapinoasync/README.md | 1 - .../test/multiapi/specification/multiapisecurity/README.md | 1 - .../test/multiapi/specification/multiapiwithsubmodule/README.md | 1 - 8 files changed, 8 deletions(-) diff --git a/packages/autorest.python/test/multiapi/specification/multiapi/README.md b/packages/autorest.python/test/multiapi/specification/multiapi/README.md index 467ae56eab0..09cdf99f68d 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapi/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapi/README.md @@ -31,7 +31,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/Multiapi/ ### Settings ``` yaml package-name: multiapi -package-version: 0.1.0 no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md b/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md index ffb15764b40..1b5a28a07f2 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapicredentialdefaultpolicy/README.md @@ -25,7 +25,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiC ### Settings ``` yaml package-name: multiapicredentialdefaultpolicy -package-version: 0.1.0 no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md b/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md index c04d7d7751e..4c300b5c00e 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapicustombaseurl/README.md @@ -15,7 +15,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiC ### Settings ``` yaml package-name: multiapicustombaseurl -package-version: 0.1.0 no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md b/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md index 02cd37a1bd7..158374dd780 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapidataplane/README.md @@ -25,7 +25,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiD ### Settings ``` yaml package-name: multiapidataplane -package-version: 0.1.0 no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md b/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md index 56ff85a5751..687683c8a75 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapikeywordonly/README.md @@ -21,7 +21,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiK ### Settings ``` yaml package-name: multiapikeywordonly -package-version: 0.1.0 no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION add-credentials: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md b/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md index ed3bea0d91f..5546f909929 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapinoasync/README.md @@ -25,7 +25,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiN ### Settings ``` yaml package-name: multiapinoasync -package-version: 0.1.0 no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true diff --git a/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md b/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md index 8a16bd94502..9caca9e8fef 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapisecurity/README.md @@ -19,7 +19,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiS ### Settings ``` yaml package-name: multiapisecurity -package-version: 0.1.0 no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION security: AADToken diff --git a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md index d8572d5f6a4..ca554456511 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md @@ -25,7 +25,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiW ### Settings ``` yaml package-name: multiapiwithsubmodule -package-version: 0.1.0 license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true add-credentials: true From 7422d082bfe2a0f19159484b47e5da7b8e0985bd Mon Sep 17 00:00:00 2001 From: swathipil Date: Mon, 28 Jul 2025 15:11:01 -0700 Subject: [PATCH 19/48] undo multiapisubmodule package-name --- .../test/multiapi/specification/multiapiwithsubmodule/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md index ca554456511..c6b37deb834 100644 --- a/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md +++ b/packages/autorest.python/test/multiapi/specification/multiapiwithsubmodule/README.md @@ -24,7 +24,6 @@ output-folder: $(python-sdks-folder)/multiapi/Expected/AcceptanceTests/MultiapiW ### Settings ``` yaml -package-name: multiapiwithsubmodule license-header: MICROSOFT_MIT_NO_VERSION azure-arm: true add-credentials: true From 916780e91d52baab44da661f96ad4ae5650fa8fc Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 28 Jul 2025 22:23:09 +0000 Subject: [PATCH 20/48] Update dependencies --- packages/autorest.python/package.json | 2 +- packages/typespec-python/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 5365680f60d..8805d34e8a4 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODExOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 42a3e7b0438..86ff6f691bd 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODExOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { From ac4dc518aab79645e5187e69e0d750f2fc062bc3 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 28 Jul 2025 22:24:08 +0000 Subject: [PATCH 21/48] Update dependencies (2025-07-28 22:24:08) --- pnpm-lock.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70753168fcc..d6f02f3712d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: ~0.14.0 - version: 0.14.0(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: ~0.14.0 - version: 0.14.0(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1668,8 +1668,9 @@ packages: peerDependencies: '@typespec/compiler': ^1.2.1 - '@typespec/http-client-python@0.14.0': - resolution: {integrity: sha512-JJ9dWy64bC7fQvYcxlBixJJ/raaPYWLbjqh5BZ725y/xRjHqHSwscAK2fXZIrNwrEdvF03y9XNlOnf3Zj0V4GA==} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz} + version: 0.14.0 engines: {node: '>=20.0.0'} peerDependencies: '@azure-tools/typespec-autorest': '>=0.58.0 <1.0.0' @@ -6421,7 +6422,7 @@ snapshots: dependencies: '@typespec/compiler': 1.2.1(@types/node@22.13.17) - '@typespec/http-client-python@0.14.0(iurth4uuk4s6znzuuc7ncenk2q)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q)': dependencies: '@azure-tools/typespec-autorest': 0.58.0(vddu6w2yloigenmssnpyjivoim) '@azure-tools/typespec-azure-core': 0.58.0(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))(@typespec/rest@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))) From 48dc1a2abf8c5aa20e0c6caa8aa0dda097f437f8 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 28 Jul 2025 22:29:07 +0000 Subject: [PATCH 22/48] Regenerate for typespec-python (2025-07-28 22:29:07) --- .../authentication-api-key/authentication/apikey/_client.py | 2 +- .../authentication/apikey/_operations/__init__.py | 1 + .../authentication/apikey/aio/_client.py | 2 +- .../authentication/apikey/aio/_operations/__init__.py | 1 + .../azure/generated/authentication-api-key/pyproject.toml | 3 ++- .../authentication/http/custom/_client.py | 2 +- .../authentication/http/custom/_operations/__init__.py | 1 + .../authentication/http/custom/aio/_client.py | 2 +- .../authentication/http/custom/aio/_operations/__init__.py | 1 + .../generated/authentication-http-custom/pyproject.toml | 3 ++- .../authentication-oauth2/authentication/oauth2/_client.py | 2 +- .../authentication/oauth2/_operations/__init__.py | 1 + .../authentication/oauth2/aio/_client.py | 2 +- .../authentication/oauth2/aio/_operations/__init__.py | 1 + .../azure/generated/authentication-oauth2/pyproject.toml | 3 ++- .../authentication-union/authentication/union/_client.py | 2 +- .../authentication/union/_operations/__init__.py | 1 + .../authentication-union/authentication/union/aio/_client.py | 2 +- .../authentication/union/aio/_operations/__init__.py | 1 + .../test/azure/generated/authentication-union/pyproject.toml | 3 ++- .../azure-client-generator-core-access/pyproject.toml | 3 ++- .../pyproject.toml | 3 ++- .../clientgenerator/core/clientinitialization/_client.py | 4 ++-- .../clientgenerator/core/clientinitialization/aio/_client.py | 4 ++-- .../core/clientinitialization/aio/operations/__init__.py | 5 +++++ .../core/clientinitialization/operations/__init__.py | 5 +++++ .../pyproject.toml | 3 ++- .../azure/clientgenerator/core/clientlocation/_client.py | 2 +- .../azure/clientgenerator/core/clientlocation/aio/_client.py | 2 +- .../core/clientlocation/aio/operations/__init__.py | 1 + .../core/clientlocation/operations/__init__.py | 1 + .../pyproject.toml | 3 ++- .../specs/azure/clientgenerator/core/emptystring/_client.py | 2 +- .../clientgenerator/core/emptystring/_operations/__init__.py | 2 ++ .../azure/clientgenerator/core/emptystring/aio/_client.py | 2 +- .../core/emptystring/aio/_operations/__init__.py | 2 ++ .../pyproject.toml | 3 ++- .../azure/clientgenerator/core/flattenproperty/_client.py | 2 +- .../core/flattenproperty/_operations/__init__.py | 1 + .../clientgenerator/core/flattenproperty/aio/_client.py | 2 +- .../core/flattenproperty/aio/_operations/__init__.py | 1 + .../azure-client-generator-core-override/pyproject.toml | 3 ++- .../azure-client-generator-core-usage/pyproject.toml | 3 ++- .../test/azure/generated/azure-core-basic/pyproject.toml | 3 ++- .../azure-core-basic/specs/azure/core/basic/_client.py | 2 +- .../specs/azure/core/basic/_operations/__init__.py | 1 + .../azure-core-basic/specs/azure/core/basic/aio/_client.py | 2 +- .../specs/azure/core/basic/aio/_operations/__init__.py | 1 + .../test/azure/generated/azure-core-lro-rpc/pyproject.toml | 3 ++- .../azure-core-lro-rpc/specs/azure/core/lro/rpc/_client.py | 2 +- .../specs/azure/core/lro/rpc/_operations/__init__.py | 1 + .../specs/azure/core/lro/rpc/aio/_client.py | 2 +- .../specs/azure/core/lro/rpc/aio/_operations/__init__.py | 1 + .../azure/generated/azure-core-lro-standard/pyproject.toml | 3 ++- .../specs/azure/core/lro/standard/_client.py | 2 +- .../specs/azure/core/lro/standard/_operations/__init__.py | 1 + .../specs/azure/core/lro/standard/aio/_client.py | 2 +- .../azure/core/lro/standard/aio/_operations/__init__.py | 1 + .../test/azure/generated/azure-core-model/pyproject.toml | 3 ++- .../test/azure/generated/azure-core-page/pyproject.toml | 3 ++- .../azure-core-page/specs/azure/core/page/_client.py | 3 +-- .../azure-core-page/specs/azure/core/page/aio/_client.py | 3 +-- .../specs/azure/core/page/aio/operations/__init__.py | 1 + .../specs/azure/core/page/operations/__init__.py | 1 + .../test/azure/generated/azure-core-scalar/pyproject.toml | 3 ++- .../test/azure/generated/azure-core-traits/pyproject.toml | 3 ++- .../azure-core-traits/specs/azure/core/traits/_client.py | 2 +- .../specs/azure/core/traits/_operations/__init__.py | 1 + .../azure-core-traits/specs/azure/core/traits/aio/_client.py | 2 +- .../specs/azure/core/traits/aio/_operations/__init__.py | 1 + .../azure/generated/azure-encode-duration/pyproject.toml | 3 ++- .../specs/azure/encode/duration/_client.py | 2 +- .../specs/azure/encode/duration/_operations/__init__.py | 1 + .../specs/azure/encode/duration/aio/_client.py | 2 +- .../specs/azure/encode/duration/aio/_operations/__init__.py | 1 + .../test/azure/generated/azure-example-basic/pyproject.toml | 3 ++- .../azure-example-basic/specs/azure/example/basic/_client.py | 2 +- .../specs/azure/example/basic/_operations/__init__.py | 1 + .../specs/azure/example/basic/aio/_client.py | 2 +- .../specs/azure/example/basic/aio/_operations/__init__.py | 1 + .../azure/generated/azure-payload-pageable/pyproject.toml | 3 ++- .../specs/azure/payload/pageable/_client.py | 2 +- .../specs/azure/payload/pageable/_operations/__init__.py | 1 + .../specs/azure/payload/pageable/aio/_client.py | 2 +- .../specs/azure/payload/pageable/aio/_operations/__init__.py | 1 + .../azure-resource-manager-common-properties/pyproject.toml | 3 ++- .../azure-resource-manager-large-header/pyproject.toml | 3 ++- .../azure-resource-manager-non-resource/pyproject.toml | 3 ++- .../pyproject.toml | 3 ++- .../azure-resource-manager-resources/pyproject.toml | 3 ++- .../azure/specialheaders/xmsclientrequestid/_client.py | 2 +- .../xmsclientrequestid/_operations/__init__.py | 1 + .../azure/specialheaders/xmsclientrequestid/aio/_client.py | 2 +- .../xmsclientrequestid/aio/_operations/__init__.py | 1 + .../azure-special-headers-client-request-id/pyproject.toml | 3 ++- .../client-namespace/client/clientnamespace/_client.py | 2 +- .../client/clientnamespace/_operations/__init__.py | 1 + .../client-namespace/client/clientnamespace/aio/_client.py | 2 +- .../client/clientnamespace/aio/_operations/__init__.py | 1 + .../client/clientnamespace/second/_client.py | 2 +- .../client/clientnamespace/second/_operations/__init__.py | 1 + .../client/clientnamespace/second/aio/_client.py | 2 +- .../clientnamespace/second/aio/_operations/__init__.py | 1 + .../test/azure/generated/client-namespace/pyproject.toml | 3 ++- .../azure/generated/client-naming/client/naming/_client.py | 3 +-- .../generated/client-naming/client/naming/aio/_client.py | 3 +-- .../client-naming/client/naming/aio/operations/__init__.py | 1 + .../client-naming/client/naming/operations/__init__.py | 1 + .../test/azure/generated/client-naming/pyproject.toml | 3 ++- .../client/structure/service/_client.py | 3 +-- .../client/structure/service/aio/_client.py | 3 +-- .../client/structure/service/aio/operations/__init__.py | 1 + .../client/structure/service/operations/__init__.py | 1 + .../azure/generated/client-structure-default/pyproject.toml | 3 ++- .../client/structure/multiclient/_client.py | 2 +- .../client/structure/multiclient/_operations/__init__.py | 2 ++ .../client/structure/multiclient/aio/_client.py | 2 +- .../client/structure/multiclient/aio/_operations/__init__.py | 2 ++ .../generated/client-structure-multiclient/pyproject.toml | 3 ++- .../client/structure/renamedoperation/_client.py | 3 +-- .../client/structure/renamedoperation/aio/_client.py | 3 +-- .../structure/renamedoperation/aio/operations/__init__.py | 1 + .../client/structure/renamedoperation/operations/__init__.py | 1 + .../client-structure-renamedoperation/pyproject.toml | 3 ++- .../client-structure-twooperationgroup/pyproject.toml | 3 ++- .../test/azure/generated/encode-bytes/pyproject.toml | 3 ++- .../test/azure/generated/encode-datetime/pyproject.toml | 3 ++- .../test/azure/generated/encode-duration/pyproject.toml | 3 ++- .../test/azure/generated/encode-numeric/pyproject.toml | 3 ++- .../headasbooleanfalse/headasbooleanfalse/_client.py | 2 +- .../headasbooleanfalse/_operations/__init__.py | 1 + .../headasbooleanfalse/headasbooleanfalse/aio/_client.py | 2 +- .../headasbooleanfalse/aio/_operations/__init__.py | 1 + .../test/azure/generated/headasbooleanfalse/pyproject.toml | 3 ++- .../generated/headasbooleantrue/headasbooleantrue/_client.py | 2 +- .../headasbooleantrue/_operations/__init__.py | 1 + .../headasbooleantrue/headasbooleantrue/aio/_client.py | 2 +- .../headasbooleantrue/aio/_operations/__init__.py | 1 + .../test/azure/generated/headasbooleantrue/pyproject.toml | 3 ++- .../test/azure/generated/parameters-basic/pyproject.toml | 3 ++- .../parameters/bodyoptionality/_client.py | 2 +- .../parameters/bodyoptionality/_operations/__init__.py | 1 + .../parameters/bodyoptionality/aio/_client.py | 2 +- .../parameters/bodyoptionality/aio/_operations/__init__.py | 1 + .../generated/parameters-body-optionality/pyproject.toml | 3 ++- .../generated/parameters-collection-format/pyproject.toml | 3 ++- .../generated/parameters-path/parameters/path/_client.py | 2 +- .../parameters-path/parameters/path/_operations/__init__.py | 1 + .../generated/parameters-path/parameters/path/aio/_client.py | 2 +- .../parameters/path/aio/_operations/__init__.py | 1 + .../test/azure/generated/parameters-path/pyproject.toml | 3 ++- .../test/azure/generated/parameters-spread/pyproject.toml | 3 ++- .../generated/payload-content-negotiation/pyproject.toml | 3 ++- .../payload/jsonmergepatch/_client.py | 2 +- .../payload/jsonmergepatch/_operations/__init__.py | 1 + .../payload/jsonmergepatch/aio/_client.py | 2 +- .../payload/jsonmergepatch/aio/_operations/__init__.py | 1 + .../azure/generated/payload-json-merge-patch/pyproject.toml | 3 ++- .../test/azure/generated/payload-media-type/pyproject.toml | 3 ++- .../test/azure/generated/payload-multipart/pyproject.toml | 3 ++- .../test/azure/generated/payload-pageable/pyproject.toml | 3 ++- .../test/azure/generated/payload-xml/pyproject.toml | 3 ++- .../azure/generated/resiliency-srv-driven1/pyproject.toml | 3 ++- .../resiliency-srv-driven1/resiliency/srv/driven1/_client.py | 2 +- .../resiliency/srv/driven1/_operations/__init__.py | 1 + .../resiliency/srv/driven1/aio/_client.py | 2 +- .../resiliency/srv/driven1/aio/_operations/__init__.py | 1 + .../azure/generated/resiliency-srv-driven2/pyproject.toml | 3 ++- .../resiliency-srv-driven2/resiliency/srv/driven2/_client.py | 2 +- .../resiliency/srv/driven2/_operations/__init__.py | 1 + .../resiliency/srv/driven2/aio/_client.py | 2 +- .../resiliency/srv/driven2/aio/_operations/__init__.py | 1 + .../generated/response-status-code-range/pyproject.toml | 3 ++- .../response/statuscoderange/_client.py | 2 +- .../response/statuscoderange/_operations/__init__.py | 1 + .../response/statuscoderange/aio/_client.py | 2 +- .../response/statuscoderange/aio/_operations/__init__.py | 1 + .../test/azure/generated/routes/pyproject.toml | 3 ++- .../test/azure/generated/routes/routes/_client.py | 3 +-- .../test/azure/generated/routes/routes/aio/_client.py | 3 +-- .../azure/generated/routes/routes/aio/operations/__init__.py | 1 + .../azure/generated/routes/routes/operations/__init__.py | 1 + .../generated/serialization-encoded-name-json/pyproject.toml | 3 ++- .../generated/server-endpoint-not-defined/pyproject.toml | 3 ++- .../server/endpoint/notdefined/_client.py | 2 +- .../server/endpoint/notdefined/_operations/__init__.py | 1 + .../server/endpoint/notdefined/aio/_client.py | 2 +- .../server/endpoint/notdefined/aio/_operations/__init__.py | 1 + .../test/azure/generated/server-path-multiple/pyproject.toml | 3 ++- .../server-path-multiple/server/path/multiple/_client.py | 2 +- .../server/path/multiple/_operations/__init__.py | 1 + .../server-path-multiple/server/path/multiple/aio/_client.py | 2 +- .../server/path/multiple/aio/_operations/__init__.py | 1 + .../test/azure/generated/server-path-single/pyproject.toml | 3 ++- .../server-path-single/server/path/single/_client.py | 2 +- .../server/path/single/_operations/__init__.py | 1 + .../server-path-single/server/path/single/aio/_client.py | 2 +- .../server/path/single/aio/_operations/__init__.py | 1 + .../generated/server-versions-not-versioned/pyproject.toml | 3 ++- .../server/versions/notversioned/_client.py | 2 +- .../server/versions/notversioned/_operations/__init__.py | 1 + .../server/versions/notversioned/aio/_client.py | 2 +- .../server/versions/notversioned/aio/_operations/__init__.py | 1 + .../azure/generated/server-versions-versioned/pyproject.toml | 3 ++- .../server/versions/versioned/_client.py | 2 +- .../server/versions/versioned/_operations/__init__.py | 1 + .../server/versions/versioned/aio/_client.py | 2 +- .../server/versions/versioned/aio/_operations/__init__.py | 1 + .../special-headers-conditional-request/pyproject.toml | 3 ++- .../specialheaders/conditionalrequest/_client.py | 2 +- .../conditionalrequest/_operations/__init__.py | 1 + .../specialheaders/conditionalrequest/aio/_client.py | 2 +- .../conditionalrequest/aio/_operations/__init__.py | 1 + .../generated/special-headers-repeatability/pyproject.toml | 3 ++- .../specialheaders/repeatability/_client.py | 2 +- .../specialheaders/repeatability/_operations/__init__.py | 1 + .../specialheaders/repeatability/aio/_client.py | 2 +- .../specialheaders/repeatability/aio/_operations/__init__.py | 1 + .../test/azure/generated/special-words/pyproject.toml | 3 ++- .../test/azure/generated/streaming-jsonl/pyproject.toml | 3 ++- .../test/azure/generated/typetest-array/pyproject.toml | 3 ++- .../test/azure/generated/typetest-dictionary/pyproject.toml | 3 ++- .../azure/generated/typetest-enum-extensible/pyproject.toml | 3 ++- .../test/azure/generated/typetest-enum-fixed/pyproject.toml | 3 ++- .../test/azure/generated/typetest-model-empty/pyproject.toml | 3 ++- .../typetest-model-empty/typetest/model/empty/_client.py | 2 +- .../typetest/model/empty/_operations/__init__.py | 1 + .../typetest-model-empty/typetest/model/empty/aio/_client.py | 2 +- .../typetest/model/empty/aio/_operations/__init__.py | 1 + .../typetest-model-enumdiscriminator/pyproject.toml | 3 ++- .../typetest/model/enumdiscriminator/_client.py | 2 +- .../typetest/model/enumdiscriminator/_operations/__init__.py | 1 + .../typetest/model/enumdiscriminator/aio/_client.py | 2 +- .../model/enumdiscriminator/aio/_operations/__init__.py | 1 + .../typetest-model-nesteddiscriminator/pyproject.toml | 3 ++- .../typetest/model/nesteddiscriminator/_client.py | 2 +- .../model/nesteddiscriminator/_operations/__init__.py | 1 + .../typetest/model/nesteddiscriminator/aio/_client.py | 2 +- .../model/nesteddiscriminator/aio/_operations/__init__.py | 1 + .../generated/typetest-model-notdiscriminated/pyproject.toml | 3 ++- .../typetest/model/notdiscriminated/_client.py | 2 +- .../typetest/model/notdiscriminated/_operations/__init__.py | 1 + .../typetest/model/notdiscriminated/aio/_client.py | 2 +- .../model/notdiscriminated/aio/_operations/__init__.py | 1 + .../azure/generated/typetest-model-recursive/pyproject.toml | 3 ++- .../typetest/model/recursive/_client.py | 2 +- .../typetest/model/recursive/_operations/__init__.py | 1 + .../typetest/model/recursive/aio/_client.py | 2 +- .../typetest/model/recursive/aio/_operations/__init__.py | 1 + .../typetest-model-singlediscriminator/pyproject.toml | 3 ++- .../typetest/model/singlediscriminator/_client.py | 2 +- .../model/singlediscriminator/_operations/__init__.py | 1 + .../typetest/model/singlediscriminator/aio/_client.py | 2 +- .../model/singlediscriminator/aio/_operations/__init__.py | 1 + .../test/azure/generated/typetest-model-usage/pyproject.toml | 3 ++- .../typetest-model-usage/typetest/model/usage/_client.py | 2 +- .../typetest/model/usage/_operations/__init__.py | 1 + .../typetest-model-usage/typetest/model/usage/aio/_client.py | 2 +- .../typetest/model/usage/aio/_operations/__init__.py | 1 + .../azure/generated/typetest-model-visibility/pyproject.toml | 3 ++- .../typetest/model/visibility/_client.py | 2 +- .../typetest/model/visibility/_operations/__init__.py | 1 + .../typetest/model/visibility/aio/_client.py | 2 +- .../typetest/model/visibility/aio/_operations/__init__.py | 1 + .../typetest-property-additionalproperties/pyproject.toml | 3 ++- .../generated/typetest-property-nullable/pyproject.toml | 3 ++- .../generated/typetest-property-optional/pyproject.toml | 3 ++- .../generated/typetest-property-valuetypes/pyproject.toml | 3 ++- .../test/azure/generated/typetest-scalar/pyproject.toml | 3 ++- .../test/azure/generated/typetest-union/pyproject.toml | 3 ++- .../test/azure/generated/versioning-added/pyproject.toml | 3 ++- .../generated/versioning-added/versioning/added/_client.py | 3 +-- .../versioning-added/versioning/added/aio/_client.py | 3 +-- .../versioning/added/aio/operations/__init__.py | 1 + .../versioning-added/versioning/added/operations/__init__.py | 1 + .../azure/generated/versioning-madeoptional/pyproject.toml | 3 ++- .../versioning/madeoptional/_client.py | 2 +- .../versioning/madeoptional/_operations/__init__.py | 1 + .../versioning/madeoptional/aio/_client.py | 2 +- .../versioning/madeoptional/aio/_operations/__init__.py | 1 + .../test/azure/generated/versioning-removed/pyproject.toml | 3 ++- .../versioning-removed/versioning/removed/_client.py | 2 +- .../versioning/removed/_operations/__init__.py | 1 + .../versioning-removed/versioning/removed/aio/_client.py | 2 +- .../versioning/removed/aio/_operations/__init__.py | 1 + .../azure/generated/versioning-renamedfrom/pyproject.toml | 3 ++- .../versioning-renamedfrom/versioning/renamedfrom/_client.py | 3 +-- .../versioning/renamedfrom/aio/_client.py | 3 +-- .../versioning/renamedfrom/aio/operations/__init__.py | 1 + .../versioning/renamedfrom/operations/__init__.py | 1 + .../versioning-returntypechangedfrom/pyproject.toml | 3 ++- .../versioning/returntypechangedfrom/_client.py | 2 +- .../versioning/returntypechangedfrom/_operations/__init__.py | 1 + .../versioning/returntypechangedfrom/aio/_client.py | 2 +- .../returntypechangedfrom/aio/_operations/__init__.py | 1 + .../generated/versioning-typechangedfrom/pyproject.toml | 3 ++- .../versioning/typechangedfrom/_client.py | 2 +- .../versioning/typechangedfrom/_operations/__init__.py | 1 + .../versioning/typechangedfrom/aio/_client.py | 2 +- .../versioning/typechangedfrom/aio/_operations/__init__.py | 1 + .../authentication-api-key/authentication/apikey/_client.py | 2 +- .../authentication/apikey/_operations/__init__.py | 1 + .../authentication/apikey/aio/_client.py | 2 +- .../authentication/apikey/aio/_operations/__init__.py | 1 + .../generated/authentication-api-key/pyproject.toml | 1 + .../authentication/http/custom/_client.py | 2 +- .../authentication/http/custom/_operations/__init__.py | 1 + .../authentication/http/custom/aio/_client.py | 2 +- .../authentication/http/custom/aio/_operations/__init__.py | 1 + .../generated/authentication-http-custom/pyproject.toml | 1 + .../authentication-oauth2/authentication/oauth2/_client.py | 2 +- .../authentication/oauth2/_operations/__init__.py | 1 + .../authentication/oauth2/aio/_client.py | 2 +- .../authentication/oauth2/aio/_operations/__init__.py | 1 + .../unbranded/generated/authentication-oauth2/pyproject.toml | 1 + .../authentication-union/authentication/union/_client.py | 2 +- .../authentication/union/_operations/__init__.py | 1 + .../authentication-union/authentication/union/aio/_client.py | 2 +- .../authentication/union/aio/_operations/__init__.py | 1 + .../unbranded/generated/authentication-union/pyproject.toml | 1 + .../test/unbranded/generated/encode-bytes/pyproject.toml | 1 + .../test/unbranded/generated/encode-datetime/pyproject.toml | 1 + .../test/unbranded/generated/encode-duration/pyproject.toml | 1 + .../test/unbranded/generated/encode-numeric/pyproject.toml | 1 + .../headasbooleanfalse/headasbooleanfalse/_client.py | 2 +- .../headasbooleanfalse/_operations/__init__.py | 1 + .../headasbooleanfalse/headasbooleanfalse/aio/_client.py | 2 +- .../headasbooleanfalse/aio/_operations/__init__.py | 1 + .../unbranded/generated/headasbooleanfalse/pyproject.toml | 1 + .../generated/headasbooleantrue/headasbooleantrue/_client.py | 2 +- .../headasbooleantrue/_operations/__init__.py | 1 + .../headasbooleantrue/headasbooleantrue/aio/_client.py | 2 +- .../headasbooleantrue/aio/_operations/__init__.py | 1 + .../unbranded/generated/headasbooleantrue/pyproject.toml | 1 + .../test/unbranded/generated/parameters-basic/pyproject.toml | 1 + .../parameters/bodyoptionality/_client.py | 2 +- .../parameters/bodyoptionality/_operations/__init__.py | 1 + .../parameters/bodyoptionality/aio/_client.py | 2 +- .../parameters/bodyoptionality/aio/_operations/__init__.py | 1 + .../generated/parameters-body-optionality/pyproject.toml | 1 + .../generated/parameters-collection-format/pyproject.toml | 1 + .../generated/parameters-path/parameters/path/_client.py | 2 +- .../parameters-path/parameters/path/_operations/__init__.py | 1 + .../generated/parameters-path/parameters/path/aio/_client.py | 2 +- .../parameters/path/aio/_operations/__init__.py | 1 + .../test/unbranded/generated/parameters-path/pyproject.toml | 1 + .../unbranded/generated/parameters-spread/pyproject.toml | 1 + .../generated/payload-content-negotiation/pyproject.toml | 1 + .../payload/jsonmergepatch/_client.py | 2 +- .../payload/jsonmergepatch/_operations/__init__.py | 1 + .../payload/jsonmergepatch/aio/_client.py | 2 +- .../payload/jsonmergepatch/aio/_operations/__init__.py | 1 + .../generated/payload-json-merge-patch/pyproject.toml | 1 + .../unbranded/generated/payload-media-type/pyproject.toml | 1 + .../unbranded/generated/payload-multipart/pyproject.toml | 1 + .../test/unbranded/generated/payload-pageable/pyproject.toml | 1 + .../test/unbranded/generated/payload-xml/pyproject.toml | 1 + .../generated/response-status-code-range/pyproject.toml | 1 + .../response/statuscoderange/_client.py | 2 +- .../response/statuscoderange/_operations/__init__.py | 1 + .../response/statuscoderange/aio/_client.py | 2 +- .../response/statuscoderange/aio/_operations/__init__.py | 1 + .../test/unbranded/generated/routes/pyproject.toml | 1 + .../test/unbranded/generated/routes/routes/_client.py | 3 +-- .../test/unbranded/generated/routes/routes/aio/_client.py | 3 +-- .../generated/routes/routes/aio/operations/__init__.py | 1 + .../unbranded/generated/routes/routes/operations/__init__.py | 1 + .../generated/serialization-encoded-name-json/pyproject.toml | 1 + .../generated/server-endpoint-not-defined/pyproject.toml | 1 + .../server/endpoint/notdefined/_client.py | 2 +- .../server/endpoint/notdefined/_operations/__init__.py | 1 + .../server/endpoint/notdefined/aio/_client.py | 2 +- .../server/endpoint/notdefined/aio/_operations/__init__.py | 1 + .../unbranded/generated/server-path-multiple/pyproject.toml | 1 + .../server-path-multiple/server/path/multiple/_client.py | 2 +- .../server/path/multiple/_operations/__init__.py | 1 + .../server-path-multiple/server/path/multiple/aio/_client.py | 2 +- .../server/path/multiple/aio/_operations/__init__.py | 1 + .../unbranded/generated/server-path-single/pyproject.toml | 1 + .../server-path-single/server/path/single/_client.py | 2 +- .../server/path/single/_operations/__init__.py | 1 + .../server-path-single/server/path/single/aio/_client.py | 2 +- .../server/path/single/aio/_operations/__init__.py | 1 + .../generated/server-versions-not-versioned/pyproject.toml | 1 + .../server/versions/notversioned/_client.py | 2 +- .../server/versions/notversioned/_operations/__init__.py | 1 + .../server/versions/notversioned/aio/_client.py | 2 +- .../server/versions/notversioned/aio/_operations/__init__.py | 1 + .../generated/server-versions-versioned/pyproject.toml | 1 + .../server/versions/versioned/_client.py | 2 +- .../server/versions/versioned/_operations/__init__.py | 1 + .../server/versions/versioned/aio/_client.py | 2 +- .../server/versions/versioned/aio/_operations/__init__.py | 1 + .../special-headers-conditional-request/pyproject.toml | 1 + .../specialheaders/conditionalrequest/_client.py | 2 +- .../conditionalrequest/_operations/__init__.py | 1 + .../specialheaders/conditionalrequest/aio/_client.py | 2 +- .../conditionalrequest/aio/_operations/__init__.py | 1 + .../generated/special-headers-repeatability/pyproject.toml | 1 + .../specialheaders/repeatability/_client.py | 2 +- .../specialheaders/repeatability/_operations/__init__.py | 1 + .../specialheaders/repeatability/aio/_client.py | 2 +- .../specialheaders/repeatability/aio/_operations/__init__.py | 1 + .../test/unbranded/generated/special-words/pyproject.toml | 1 + .../test/unbranded/generated/streaming-jsonl/pyproject.toml | 1 + .../test/unbranded/generated/typetest-array/pyproject.toml | 1 + .../unbranded/generated/typetest-dictionary/pyproject.toml | 1 + .../generated/typetest-enum-extensible/pyproject.toml | 1 + .../unbranded/generated/typetest-enum-fixed/pyproject.toml | 1 + .../unbranded/generated/typetest-model-empty/pyproject.toml | 1 + .../typetest-model-empty/typetest/model/empty/_client.py | 2 +- .../typetest/model/empty/_operations/__init__.py | 1 + .../typetest-model-empty/typetest/model/empty/aio/_client.py | 2 +- .../typetest/model/empty/aio/_operations/__init__.py | 1 + .../typetest-model-enumdiscriminator/pyproject.toml | 1 + .../typetest/model/enumdiscriminator/_client.py | 2 +- .../typetest/model/enumdiscriminator/_operations/__init__.py | 1 + .../typetest/model/enumdiscriminator/aio/_client.py | 2 +- .../model/enumdiscriminator/aio/_operations/__init__.py | 1 + .../typetest-model-nesteddiscriminator/pyproject.toml | 1 + .../typetest/model/nesteddiscriminator/_client.py | 2 +- .../model/nesteddiscriminator/_operations/__init__.py | 1 + .../typetest/model/nesteddiscriminator/aio/_client.py | 2 +- .../model/nesteddiscriminator/aio/_operations/__init__.py | 1 + .../generated/typetest-model-notdiscriminated/pyproject.toml | 1 + .../typetest/model/notdiscriminated/_client.py | 2 +- .../typetest/model/notdiscriminated/_operations/__init__.py | 1 + .../typetest/model/notdiscriminated/aio/_client.py | 2 +- .../model/notdiscriminated/aio/_operations/__init__.py | 1 + .../generated/typetest-model-recursive/pyproject.toml | 1 + .../typetest/model/recursive/_client.py | 2 +- .../typetest/model/recursive/_operations/__init__.py | 1 + .../typetest/model/recursive/aio/_client.py | 2 +- .../typetest/model/recursive/aio/_operations/__init__.py | 1 + .../typetest-model-singlediscriminator/pyproject.toml | 1 + .../typetest/model/singlediscriminator/_client.py | 2 +- .../model/singlediscriminator/_operations/__init__.py | 1 + .../typetest/model/singlediscriminator/aio/_client.py | 2 +- .../model/singlediscriminator/aio/_operations/__init__.py | 1 + .../unbranded/generated/typetest-model-usage/pyproject.toml | 1 + .../typetest-model-usage/typetest/model/usage/_client.py | 2 +- .../typetest/model/usage/_operations/__init__.py | 1 + .../typetest-model-usage/typetest/model/usage/aio/_client.py | 2 +- .../typetest/model/usage/aio/_operations/__init__.py | 1 + .../generated/typetest-model-visibility/pyproject.toml | 1 + .../typetest/model/visibility/_client.py | 2 +- .../typetest/model/visibility/_operations/__init__.py | 1 + .../typetest/model/visibility/aio/_client.py | 2 +- .../typetest/model/visibility/aio/_operations/__init__.py | 1 + .../typetest-property-additionalproperties/pyproject.toml | 1 + .../generated/typetest-property-nullable/pyproject.toml | 1 + .../generated/typetest-property-optional/pyproject.toml | 1 + .../generated/typetest-property-valuetypes/pyproject.toml | 1 + .../test/unbranded/generated/typetest-scalar/pyproject.toml | 1 + .../test/unbranded/generated/typetest-union/pyproject.toml | 1 + .../test/unbranded/generated/versioning-added/pyproject.toml | 1 + .../generated/versioning-added/versioning/added/_client.py | 3 +-- .../versioning-added/versioning/added/aio/_client.py | 3 +-- .../versioning/added/aio/operations/__init__.py | 1 + .../versioning-added/versioning/added/operations/__init__.py | 1 + .../generated/versioning-madeoptional/pyproject.toml | 1 + .../versioning/madeoptional/_client.py | 2 +- .../versioning/madeoptional/_operations/__init__.py | 1 + .../versioning/madeoptional/aio/_client.py | 2 +- .../versioning/madeoptional/aio/_operations/__init__.py | 1 + .../unbranded/generated/versioning-removed/pyproject.toml | 1 + .../versioning-removed/versioning/removed/_client.py | 2 +- .../versioning/removed/_operations/__init__.py | 1 + .../versioning-removed/versioning/removed/aio/_client.py | 2 +- .../versioning/removed/aio/_operations/__init__.py | 1 + .../generated/versioning-renamedfrom/pyproject.toml | 1 + .../versioning-renamedfrom/versioning/renamedfrom/_client.py | 3 +-- .../versioning/renamedfrom/aio/_client.py | 3 +-- .../versioning/renamedfrom/aio/operations/__init__.py | 1 + .../versioning/renamedfrom/operations/__init__.py | 1 + .../versioning-returntypechangedfrom/pyproject.toml | 1 + .../versioning/returntypechangedfrom/_client.py | 2 +- .../versioning/returntypechangedfrom/_operations/__init__.py | 1 + .../versioning/returntypechangedfrom/aio/_client.py | 2 +- .../returntypechangedfrom/aio/_operations/__init__.py | 1 + .../generated/versioning-typechangedfrom/pyproject.toml | 1 + .../versioning/typechangedfrom/_client.py | 2 +- .../versioning/typechangedfrom/_operations/__init__.py | 1 + .../versioning/typechangedfrom/aio/_client.py | 2 +- .../versioning/typechangedfrom/aio/_operations/__init__.py | 1 + 485 files changed, 587 insertions(+), 280 deletions(-) diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_client.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_client.py index 00fdad5a7e1..b41d3a47701 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_client.py @@ -16,7 +16,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ApiKeyClientConfiguration -from ._operations._operations import _ApiKeyClientOperationsMixin +from ._operations import _ApiKeyClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_operations/__init__.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_operations/__init__.py index 933fcd7d1b5..90f96a75199 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ApiKeyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_client.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_client.py index 606037dfe6b..496661c0e01 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_client.py @@ -17,7 +17,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ApiKeyClientConfiguration -from ._operations._operations import _ApiKeyClientOperationsMixin +from ._operations import _ApiKeyClientOperationsMixin class ApiKeyClient(_ApiKeyClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_operations/__init__.py index 933fcd7d1b5..90f96a75199 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/authentication/apikey/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ApiKeyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml index dfb199927a2..481a653aece 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "authentication", ] diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_client.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_client.py index 42b0ce348f0..0b94f5629dc 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_client.py @@ -16,7 +16,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import CustomClientConfiguration -from ._operations._operations import _CustomClientOperationsMixin +from ._operations import _CustomClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_operations/__init__.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_operations/__init__.py index 933fcd7d1b5..24228de4fbc 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _CustomClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_client.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_client.py index 1448731fe56..c845aab2e10 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_client.py @@ -17,7 +17,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import CustomClientConfiguration -from ._operations._operations import _CustomClientOperationsMixin +from ._operations import _CustomClientOperationsMixin class CustomClient(_CustomClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_operations/__init__.py index 933fcd7d1b5..24228de4fbc 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/authentication/http/custom/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _CustomClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml index 22e8dc0c854..a4e6dde9b62 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "authentication", "authentication.http", ] diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_client.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_client.py index 8a8d191b5fd..0942dadeb8f 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import OAuth2ClientConfiguration -from ._operations._operations import _OAuth2ClientOperationsMixin +from ._operations import _OAuth2ClientOperationsMixin from ._utils.serialization import Deserializer, Serializer if TYPE_CHECKING: diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_operations/__init__.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_operations/__init__.py index 933fcd7d1b5..fa38368f082 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _OAuth2ClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_client.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_client.py index 1b2344201e4..395cc216bc8 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import OAuth2ClientConfiguration -from ._operations._operations import _OAuth2ClientOperationsMixin +from ._operations import _OAuth2ClientOperationsMixin if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_operations/__init__.py index 933fcd7d1b5..fa38368f082 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/authentication/oauth2/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _OAuth2ClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml index 8029fed7914..c1e53d6c0a9 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "authentication", ] diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_client.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_client.py index 03fcc06960c..667dadb9ad9 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_client.py @@ -16,7 +16,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import UnionClientConfiguration -from ._operations._operations import _UnionClientOperationsMixin +from ._operations import _UnionClientOperationsMixin from ._utils.serialization import Deserializer, Serializer if TYPE_CHECKING: diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_operations/__init__.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_operations/__init__.py index 933fcd7d1b5..059fddc84ee 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _UnionClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_client.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_client.py index 70f823cccb0..7bcbfc2c01d 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_client.py @@ -17,7 +17,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import UnionClientConfiguration -from ._operations._operations import _UnionClientOperationsMixin +from ._operations import _UnionClientOperationsMixin if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_operations/__init__.py index 933fcd7d1b5..059fddc84ee 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/authentication-union/authentication/union/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _UnionClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml index bad9e26fdab..e38bed1db07 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "authentication", ] diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml index bad1453d104..f50221419d1 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.clientgenerator", diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml index 156e5b4709a..d23cfa192d3 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.clientgenerator", diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/_client.py index 7db84fecd85..eef476a3aba 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/_client.py @@ -23,8 +23,8 @@ PathParamClientConfiguration, ) from ._utils.serialization import Deserializer, Serializer -from .operations import ChildClientOperations -from .operations._operations import ( +from .operations import ( + ChildClientOperations, _HeaderParamClientOperationsMixin, _MixedParamsClientOperationsMixin, _MultipleParamsClientOperationsMixin, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/aio/_client.py index c1b2cd99867..d03776cf867 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/aio/_client.py @@ -23,8 +23,8 @@ ParentClientConfiguration, PathParamClientConfiguration, ) -from .operations import ChildClientOperations -from .operations._operations import ( +from .operations import ( + ChildClientOperations, _HeaderParamClientOperationsMixin, _MixedParamsClientOperationsMixin, _MultipleParamsClientOperationsMixin, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/aio/operations/__init__.py index 6000174f8be..55b4923903e 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/aio/operations/__init__.py @@ -12,6 +12,11 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _HeaderParamClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _MultipleParamsClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _MixedParamsClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _PathParamClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _ParamAliasClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._operations import ChildClientOperations # type: ignore from ._patch import __all__ as _patch_all diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/operations/__init__.py index 6000174f8be..55b4923903e 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/specs/azure/clientgenerator/core/clientinitialization/operations/__init__.py @@ -12,6 +12,11 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _HeaderParamClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _MultipleParamsClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _MixedParamsClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _PathParamClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _ParamAliasClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._operations import ChildClientOperations # type: ignore from ._patch import __all__ as _patch_all diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml index a5d2f902ea6..a2f55f0c4b3 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.clientgenerator", diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/_client.py index b224221c0fe..d9a8c523d69 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/_client.py @@ -21,8 +21,8 @@ MoveToExistingSubClientOperations, MoveToNewSubClientOperations, MoveToRootClientOperations, + _ClientLocationClientOperationsMixin, ) -from .operations._operations import _ClientLocationClientOperationsMixin class ClientLocationClient(_ClientLocationClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/aio/_client.py index 719b32b9569..3092c03033e 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/aio/_client.py @@ -21,8 +21,8 @@ MoveToExistingSubClientOperations, MoveToNewSubClientOperations, MoveToRootClientOperations, + _ClientLocationClientOperationsMixin, ) -from .operations._operations import _ClientLocationClientOperationsMixin class ClientLocationClient(_ClientLocationClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/aio/operations/__init__.py index 3f232bf3c71..c3825a062e6 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/aio/operations/__init__.py @@ -16,6 +16,7 @@ from ._operations import MoveToNewSubClientOperations # type: ignore from ._operations import MoveToRootClientOperations # type: ignore from ._operations import ArchiveOperationsOperations # type: ignore +from ._operations import _ClientLocationClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/operations/__init__.py index 3f232bf3c71..c3825a062e6 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/specs/azure/clientgenerator/core/clientlocation/operations/__init__.py @@ -16,6 +16,7 @@ from ._operations import MoveToNewSubClientOperations # type: ignore from ._operations import MoveToRootClientOperations # type: ignore from ._operations import ArchiveOperationsOperations # type: ignore +from ._operations import _ClientLocationClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml index fcf4c97e53e..97d82c87420 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.clientgenerator", diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/_client.py index 0441f034e87..d9f47211756 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import DeserializeEmptyStringAsNullClientConfiguration -from ._operations._operations import _DeserializeEmptyStringAsNullClientOperationsMixin +from ._operations import _DeserializeEmptyStringAsNullClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/_operations/__init__.py index 933fcd7d1b5..721bdfb5d10 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/_operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DeserializeEmptyStringAsNullClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/aio/_client.py index 13ee3e68f45..4666d7b8f66 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DeserializeEmptyStringAsNullClientConfiguration -from ._operations._operations import _DeserializeEmptyStringAsNullClientOperationsMixin +from ._operations import _DeserializeEmptyStringAsNullClientOperationsMixin class DeserializeEmptyStringAsNullClient( diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/aio/_operations/__init__.py index 933fcd7d1b5..721bdfb5d10 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/specs/azure/clientgenerator/core/emptystring/aio/_operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DeserializeEmptyStringAsNullClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml index 00ba20ca047..37ee3866e78 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.clientgenerator", diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_client.py index 56b7a3896b6..2867c8db44a 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import FlattenPropertyClientConfiguration -from ._operations._operations import _FlattenPropertyClientOperationsMixin +from ._operations import _FlattenPropertyClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/__init__.py index 933fcd7d1b5..c6272b974e1 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _FlattenPropertyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_client.py index 22a33ee931f..b079e852129 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import FlattenPropertyClientConfiguration -from ._operations._operations import _FlattenPropertyClientOperationsMixin +from ._operations import _FlattenPropertyClientOperationsMixin class FlattenPropertyClient( diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/__init__.py index 933fcd7d1b5..c6272b974e1 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/specs/azure/clientgenerator/core/flattenproperty/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _FlattenPropertyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml index 249a1b65346..dede476b4cc 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.clientgenerator", diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml index ebf11097974..72fb2af95d9 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.clientgenerator", diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml index e24a57ff7fd..d474d59fddc 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.core", diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_client.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_client.py index 531aba6ef7c..cd1b61d7597 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import BasicClientConfiguration -from ._operations._operations import _BasicClientOperationsMixin +from ._operations import _BasicClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_operations/__init__.py index 933fcd7d1b5..52d377ad009 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _BasicClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_client.py index 6d83e457508..308cb1b6945 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import BasicClientConfiguration -from ._operations._operations import _BasicClientOperationsMixin +from ._operations import _BasicClientOperationsMixin class BasicClient(_BasicClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_operations/__init__.py index 933fcd7d1b5..52d377ad009 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/specs/azure/core/basic/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _BasicClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml index 071d9ee7d5b..57427c4a461 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.core", diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/_client.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/_client.py index 14689e9937a..1241abcb6f9 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import RpcClientConfiguration -from ._operations._operations import _RpcClientOperationsMixin +from ._operations import _RpcClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/_operations/__init__.py index 933fcd7d1b5..c0bf4a4843e 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RpcClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/aio/_client.py index 7c8947df5a8..b900520c0b4 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RpcClientConfiguration -from ._operations._operations import _RpcClientOperationsMixin +from ._operations import _RpcClientOperationsMixin class RpcClient(_RpcClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/aio/_operations/__init__.py index 933fcd7d1b5..c0bf4a4843e 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/specs/azure/core/lro/rpc/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RpcClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml index e750a618724..c1bbb56809d 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.core", diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_client.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_client.py index 8d424d83975..26323f7000e 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import StandardClientConfiguration -from ._operations._operations import _StandardClientOperationsMixin +from ._operations import _StandardClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_operations/__init__.py index 933fcd7d1b5..777574b1f70 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _StandardClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_client.py index 624a4597952..4bb45d4a20e 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import StandardClientConfiguration -from ._operations._operations import _StandardClientOperationsMixin +from ._operations import _StandardClientOperationsMixin class StandardClient(_StandardClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_operations/__init__.py index 933fcd7d1b5..777574b1f70 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/specs/azure/core/lro/standard/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _StandardClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml index e142f60bdbe..e7590e1a1c8 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.core", diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml index 312b23737b4..f48693ab434 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.core", diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py index f9f2be7d8bc..6b5fdd6b7c4 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py @@ -16,8 +16,7 @@ from ._configuration import PageClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import TwoModelsAsPageItemOperations -from .operations._operations import _PageClientOperationsMixin +from .operations import TwoModelsAsPageItemOperations, _PageClientOperationsMixin class PageClient(_PageClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py index b83c77be8c6..38978a0e194 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py @@ -16,8 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import PageClientConfiguration -from .operations import TwoModelsAsPageItemOperations -from .operations._operations import _PageClientOperationsMixin +from .operations import TwoModelsAsPageItemOperations, _PageClientOperationsMixin class PageClient(_PageClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/__init__.py index dcf114b751f..775b850d5ec 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import TwoModelsAsPageItemOperations # type: ignore +from ._operations import _PageClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/__init__.py index dcf114b751f..775b850d5ec 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import TwoModelsAsPageItemOperations # type: ignore +from ._operations import _PageClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml index 6b1d01b4a4f..ac0dc7a3124 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.core", diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml index fc10740f7dc..3122eeab3a6 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.core", diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_client.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_client.py index 9b1c6179855..3609e2a38d1 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import TraitsClientConfiguration -from ._operations._operations import _TraitsClientOperationsMixin +from ._operations import _TraitsClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/__init__.py index 933fcd7d1b5..cebaff56d73 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _TraitsClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_client.py index 24a24740b13..2f7f301b77f 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import TraitsClientConfiguration -from ._operations._operations import _TraitsClientOperationsMixin +from ._operations import _TraitsClientOperationsMixin class TraitsClient(_TraitsClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/__init__.py index 933fcd7d1b5..cebaff56d73 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _TraitsClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml index 66aa802de82..1456181a384 100644 --- a/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.encode", diff --git a/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/_client.py b/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/_client.py index ece43a4d99d..ce4ff9e4bc9 100644 --- a/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import DurationClientConfiguration -from ._operations._operations import _DurationClientOperationsMixin +from ._operations import _DurationClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/_operations/__init__.py index 933fcd7d1b5..6fb76cb7314 100644 --- a/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DurationClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/aio/_client.py index 14133537a16..9c467dae996 100644 --- a/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DurationClientConfiguration -from ._operations._operations import _DurationClientOperationsMixin +from ._operations import _DurationClientOperationsMixin class DurationClient(_DurationClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/aio/_operations/__init__.py index 933fcd7d1b5..6fb76cb7314 100644 --- a/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-encode-duration/specs/azure/encode/duration/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DurationClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml index 90e391adf00..e64c3ea1b4d 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.example", diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_client.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_client.py index 2c556bbd9b2..65a4e28a0c6 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AzureExampleClientConfiguration -from ._operations._operations import _AzureExampleClientOperationsMixin +from ._operations import _AzureExampleClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_operations/__init__.py index 933fcd7d1b5..adf64df024a 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AzureExampleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_client.py index b8f522aca9e..34f29056482 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AzureExampleClientConfiguration -from ._operations._operations import _AzureExampleClientOperationsMixin +from ._operations import _AzureExampleClientOperationsMixin class AzureExampleClient(_AzureExampleClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_operations/__init__.py index 933fcd7d1b5..adf64df024a 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/specs/azure/example/basic/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AzureExampleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml index 0596b284c0d..72defd0031e 100644 --- a/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specs", "specs.azure", "specs.azure.payload", diff --git a/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/_client.py b/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/_client.py index 023d5b2ef30..865cb7678f3 100644 --- a/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import PageableClientConfiguration -from ._operations._operations import _PageableClientOperationsMixin +from ._operations import _PageableClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/_operations/__init__.py index 933fcd7d1b5..0c5748aa41b 100644 --- a/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _PageableClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/aio/_client.py index 6a54b32dd58..9f5a244bf94 100644 --- a/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import PageableClientConfiguration -from ._operations._operations import _PageableClientOperationsMixin +from ._operations import _PageableClientOperationsMixin class PageableClient(_PageableClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/aio/_operations/__init__.py index 933fcd7d1b5..0c5748aa41b 100644 --- a/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-payload-pageable/specs/azure/payload/pageable/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _PageableClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml index f9b776f4cd4..e2113d5d0bb 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.resourcemanager", ] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml index c674764b954..13f6d55676a 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.resourcemanager", ] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml index 4694deb4bea..e3527ed39c7 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.resourcemanager", ] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml index 9961b5a68ac..194b585ce47 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.resourcemanager", ] diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml index 819cfe36d47..e97986651a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.resourcemanager", ] diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_client.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_client.py index 4823e1d2525..d74870945e4 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import XmsClientRequestIdClientConfiguration -from ._operations._operations import _XmsClientRequestIdClientOperationsMixin +from ._operations import _XmsClientRequestIdClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_operations/__init__.py index 933fcd7d1b5..aefd8b76b85 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _XmsClientRequestIdClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_client.py index 6aa9286ce91..7cbb5686654 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import XmsClientRequestIdClientConfiguration -from ._operations._operations import _XmsClientRequestIdClientOperationsMixin +from ._operations import _XmsClientRequestIdClientOperationsMixin class XmsClientRequestIdClient( diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_operations/__init__.py index 933fcd7d1b5..aefd8b76b85 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/azure/specialheaders/xmsclientrequestid/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _XmsClientRequestIdClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml index f1490d3fda5..61b6d6e0724 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.specialheaders", ] diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py index bfb80c07d61..4c2a2d79ebd 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ClientNamespaceFirstClientConfiguration -from ._operations._operations import _ClientNamespaceFirstClientOperationsMixin +from ._operations import _ClientNamespaceFirstClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py index 933fcd7d1b5..ee82a8fd22a 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ClientNamespaceFirstClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py index 46eb766121e..150ce47a09c 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ClientNamespaceFirstClientConfiguration -from ._operations._operations import _ClientNamespaceFirstClientOperationsMixin +from ._operations import _ClientNamespaceFirstClientOperationsMixin class ClientNamespaceFirstClient( diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py index 933fcd7d1b5..ee82a8fd22a 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ClientNamespaceFirstClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py index 66234c859e5..521fd3c81f0 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ClientNamespaceSecondClientConfiguration -from ._operations._operations import _ClientNamespaceSecondClientOperationsMixin +from ._operations import _ClientNamespaceSecondClientOperationsMixin class ClientNamespaceSecondClient( diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py index 933fcd7d1b5..db676df2ff8 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ClientNamespaceSecondClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py index f353356a14b..da23574ad54 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_client.py @@ -16,7 +16,7 @@ from ..._utils.serialization import Deserializer, Serializer from ._configuration import ClientNamespaceSecondClientConfiguration -from ._operations._operations import _ClientNamespaceSecondClientOperationsMixin +from ._operations import _ClientNamespaceSecondClientOperationsMixin class ClientNamespaceSecondClient( diff --git a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py index 933fcd7d1b5..db676df2ff8 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ClientNamespaceSecondClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml b/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml index fa67324d5a8..8bb732c33b9 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "client", ] diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_client.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_client.py index 8c609dfb321..b7eef00bc32 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/_client.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/_client.py @@ -16,8 +16,7 @@ from ._configuration import NamingClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ClientModelOperations, UnionEnumOperations -from .operations._operations import _NamingClientOperationsMixin +from .operations import ClientModelOperations, UnionEnumOperations, _NamingClientOperationsMixin class NamingClient(_NamingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/_client.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/_client.py index 2ed1be4131f..84e825c8725 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/_client.py @@ -16,8 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NamingClientConfiguration -from .operations import ClientModelOperations, UnionEnumOperations -from .operations._operations import _NamingClientOperationsMixin +from .operations import ClientModelOperations, UnionEnumOperations, _NamingClientOperationsMixin class NamingClient(_NamingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/operations/__init__.py index 3fd9a130965..60dbba1776e 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/aio/operations/__init__.py @@ -14,6 +14,7 @@ from ._operations import ClientModelOperations # type: ignore from ._operations import UnionEnumOperations # type: ignore +from ._operations import _NamingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/operations/__init__.py index 3fd9a130965..60dbba1776e 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/operations/__init__.py @@ -14,6 +14,7 @@ from ._operations import ClientModelOperations # type: ignore from ._operations import UnionEnumOperations # type: ignore +from ._operations import _NamingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml b/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml index 9e5d6263d2e..530643422e4 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "client", ] diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_client.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_client.py index e2402769be1..a657b69cc82 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_client.py @@ -17,8 +17,7 @@ from . import models as _models from ._configuration import ServiceClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import BarOperations, BazOperations, FooOperations, QuxOperations -from .operations._operations import _ServiceClientOperationsMixin +from .operations import BarOperations, BazOperations, FooOperations, QuxOperations, _ServiceClientOperationsMixin class ServiceClient(_ServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_client.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_client.py index 2380d8df954..e2f0cca115f 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_client.py @@ -17,8 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ServiceClientConfiguration -from .operations import BarOperations, BazOperations, FooOperations, QuxOperations -from .operations._operations import _ServiceClientOperationsMixin +from .operations import BarOperations, BazOperations, FooOperations, QuxOperations, _ServiceClientOperationsMixin class ServiceClient(_ServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/__init__.py index 4ef3abc5ecd..855187853b2 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/__init__.py @@ -16,6 +16,7 @@ from ._operations import QuxOperations # type: ignore from ._operations import FooOperations # type: ignore from ._operations import BarOperations # type: ignore +from ._operations import _ServiceClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/__init__.py index 4ef3abc5ecd..855187853b2 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/__init__.py @@ -16,6 +16,7 @@ from ._operations import QuxOperations # type: ignore from ._operations import FooOperations # type: ignore from ._operations import BarOperations # type: ignore +from ._operations import _ServiceClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml index 9a0f42dd3a7..e8222cce0f6 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "client", "client.structure", ] diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_client.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_client.py index 05a96e65484..0754cd63c5b 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_client.py @@ -16,7 +16,7 @@ from . import models as _models from ._configuration import ClientAClientConfiguration, ClientBClientConfiguration -from ._operations._operations import _ClientAClientOperationsMixin, _ClientBClientOperationsMixin +from ._operations import _ClientAClientOperationsMixin, _ClientBClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_operations/__init__.py index 933fcd7d1b5..e890bc2aaa0 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/_operations/__init__.py @@ -12,6 +12,8 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ClientAClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _ClientBClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_client.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_client.py index 5e24a2ee928..c0caa421db7 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_client.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ClientAClientConfiguration, ClientBClientConfiguration -from ._operations._operations import _ClientAClientOperationsMixin, _ClientBClientOperationsMixin +from ._operations import _ClientAClientOperationsMixin, _ClientBClientOperationsMixin class ClientAClient(_ClientAClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/__init__.py index 933fcd7d1b5..e890bc2aaa0 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/client/structure/multiclient/aio/_operations/__init__.py @@ -12,6 +12,8 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ClientAClientOperationsMixin # type: ignore # pylint: disable=unused-import +from ._operations import _ClientBClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml index d3acf571b6c..caa264770e6 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "client", "client.structure", ] diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_client.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_client.py index c40cbb2c8c2..e82ad01b4eb 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_client.py @@ -17,8 +17,7 @@ from . import models as _models from ._configuration import RenamedOperationClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import GroupOperations -from .operations._operations import _RenamedOperationClientOperationsMixin +from .operations import GroupOperations, _RenamedOperationClientOperationsMixin class RenamedOperationClient( diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_client.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_client.py index 9862d35b25a..3b0a7f3ffae 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_client.py @@ -17,8 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import RenamedOperationClientConfiguration -from .operations import GroupOperations -from .operations._operations import _RenamedOperationClientOperationsMixin +from .operations import GroupOperations, _RenamedOperationClientOperationsMixin class RenamedOperationClient( diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/__init__.py index 7f8fe11f074..9453f942d50 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import GroupOperations # type: ignore +from ._operations import _RenamedOperationClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/__init__.py index 7f8fe11f074..9453f942d50 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import GroupOperations # type: ignore +from ._operations import _RenamedOperationClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml index 367b03e51b8..c271206ff33 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "client", "client.structure", ] diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml index b7d80b747f3..d46a45f78e7 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "client", "client.structure", ] diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml index ee3321d7ed4..b92cf83afe9 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "encode", ] diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml index 280b4572fa1..6588b09239d 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "encode", ] diff --git a/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml index 93d4b0ba275..3fb2c54085c 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "encode", ] diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml index ac4983ef282..7aeb9120ac6 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "encode", ] diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_client.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_client.py index 171a7bb1c47..183a28836d2 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_client.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_operations/__init__.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_operations/__init__.py index 933fcd7d1b5..fbb6833b7fe 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_client.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_client.py index 4b41e1a911e..2bd3027bb36 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin class VisibilityClient(_VisibilityClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/__init__.py index 933fcd7d1b5..fbb6833b7fe 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml b/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml index 8ca79f383d8..bbbdd9fbd35 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_client.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_client.py index 171a7bb1c47..183a28836d2 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_client.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_operations/__init__.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_operations/__init__.py index 933fcd7d1b5..fbb6833b7fe 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_client.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_client.py index 4b41e1a911e..2bd3027bb36 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin class VisibilityClient(_VisibilityClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_operations/__init__.py index 933fcd7d1b5..fbb6833b7fe 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml b/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml index 1ffe5caa73c..193f48b9c0b 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml index 99258986375..72188b0e549 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py index 57e2a76de2a..c7b1bb740ad 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import BodyOptionalityClientConfiguration -from ._operations._operations import _BodyOptionalityClientOperationsMixin +from ._operations import _BodyOptionalityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer from .optionalexplicit.operations import OptionalExplicitOperations diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_operations/__init__.py index 933fcd7d1b5..5e3e145b59a 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _BodyOptionalityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py index b1acc9d6a7c..58b2dac665e 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py @@ -17,7 +17,7 @@ from .._utils.serialization import Deserializer, Serializer from ..optionalexplicit.aio.operations import OptionalExplicitOperations from ._configuration import BodyOptionalityClientConfiguration -from ._operations._operations import _BodyOptionalityClientOperationsMixin +from ._operations import _BodyOptionalityClientOperationsMixin class BodyOptionalityClient( diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_operations/__init__.py index 933fcd7d1b5..5e3e145b59a 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _BodyOptionalityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml index 147680dd980..feac487d10b 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml index 1cf4d9dfa59..cb16c23e958 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/_client.py b/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/_client.py index d2006282cc4..701fad89813 100644 --- a/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import PathClientConfiguration -from ._operations._operations import _PathClientOperationsMixin +from ._operations import _PathClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/_operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/_operations/__init__.py index 933fcd7d1b5..51f6b088a8c 100644 --- a/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _PathClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/aio/_client.py b/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/aio/_client.py index 302fcfe917f..0a5b8febb16 100644 --- a/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import PathClientConfiguration -from ._operations._operations import _PathClientOperationsMixin +from ._operations import _PathClientOperationsMixin class PathClient(_PathClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/aio/_operations/__init__.py index 933fcd7d1b5..51f6b088a8c 100644 --- a/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-path/parameters/path/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _PathClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml index 59a823c68a6..fbfe9f2fed8 100644 --- a/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml index 822e5483cad..e9cf17414fc 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml index 8d7b9dfe4bb..e4f74a833f4 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_client.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_client.py index c01145f8682..e975940a8ba 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import JsonMergePatchClientConfiguration -from ._operations._operations import _JsonMergePatchClientOperationsMixin +from ._operations import _JsonMergePatchClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/__init__.py index 933fcd7d1b5..9e49de11d27 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _JsonMergePatchClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_client.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_client.py index 13d4a1b794b..97340c807f3 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import JsonMergePatchClientConfiguration -from ._operations._operations import _JsonMergePatchClientOperationsMixin +from ._operations import _JsonMergePatchClientOperationsMixin class JsonMergePatchClient(_JsonMergePatchClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/__init__.py index 933fcd7d1b5..9e49de11d27 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _JsonMergePatchClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml index 6cb328e2532..4d86e0a2532 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml index fde796d48f1..981dd5ec4a5 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml index 4fc0267e1e3..d970dd955bc 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml index 454b7bcc963..c8f762397a4 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml index 5aaed93000f..b4adcf8971c 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml index 00be2e7bb8a..2bd6e3dde6f 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "resiliency", "resiliency.srv", ] diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py index 57426740093..123882b134a 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ResiliencyServiceDrivenClientConfiguration -from ._operations._operations import _ResiliencyServiceDrivenClientOperationsMixin +from ._operations import _ResiliencyServiceDrivenClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/__init__.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/__init__.py index 933fcd7d1b5..2b1a79eb84e 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ResiliencyServiceDrivenClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py index 7edb8a98716..620cfc1d4a6 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ResiliencyServiceDrivenClientConfiguration -from ._operations._operations import _ResiliencyServiceDrivenClientOperationsMixin +from ._operations import _ResiliencyServiceDrivenClientOperationsMixin class ResiliencyServiceDrivenClient(_ResiliencyServiceDrivenClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/__init__.py index 933fcd7d1b5..2b1a79eb84e 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/resiliency/srv/driven1/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ResiliencyServiceDrivenClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml index 6bb00988d27..62503ae2e4e 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "resiliency", "resiliency.srv", ] diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py index 0a3c41084ad..e058a85291b 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ResiliencyServiceDrivenClientConfiguration -from ._operations._operations import _ResiliencyServiceDrivenClientOperationsMixin +from ._operations import _ResiliencyServiceDrivenClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/__init__.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/__init__.py index 933fcd7d1b5..2b1a79eb84e 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ResiliencyServiceDrivenClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py index d568b95edd4..bd7f0c14624 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ResiliencyServiceDrivenClientConfiguration -from ._operations._operations import _ResiliencyServiceDrivenClientOperationsMixin +from ._operations import _ResiliencyServiceDrivenClientOperationsMixin class ResiliencyServiceDrivenClient(_ResiliencyServiceDrivenClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/__init__.py index 933fcd7d1b5..2b1a79eb84e 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/resiliency/srv/driven2/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ResiliencyServiceDrivenClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml b/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml index c1cab66a0f9..f91fd7aa4ec 100644 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "response", ] diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_client.py b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_client.py index 9aace53ab1e..274f01d8659 100644 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_client.py +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import StatusCodeRangeClientConfiguration -from ._operations._operations import _StatusCodeRangeClientOperationsMixin +from ._operations import _StatusCodeRangeClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_operations/__init__.py b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_operations/__init__.py index 933fcd7d1b5..6043d26148a 100644 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _StatusCodeRangeClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_client.py b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_client.py index d91140cfdc9..471d0b3f3ac 100644 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import StatusCodeRangeClientConfiguration -from ._operations._operations import _StatusCodeRangeClientOperationsMixin +from ._operations import _StatusCodeRangeClientOperationsMixin class StatusCodeRangeClient( diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_operations/__init__.py index 933fcd7d1b5..6043d26148a 100644 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _StatusCodeRangeClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/routes/pyproject.toml b/packages/typespec-python/test/azure/generated/routes/pyproject.toml index 96dca506f3c..90374cfe53e 100644 --- a/packages/typespec-python/test/azure/generated/routes/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/routes/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/typespec-python/test/azure/generated/routes/routes/_client.py b/packages/typespec-python/test/azure/generated/routes/routes/_client.py index f1e1e1b4f69..ea84f981a17 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/_client.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/_client.py @@ -16,8 +16,7 @@ from ._configuration import RoutesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import InInterfaceOperations -from .operations._operations import _RoutesClientOperationsMixin +from .operations import InInterfaceOperations, _RoutesClientOperationsMixin from .pathparameters.operations import PathParametersOperations from .queryparameters.operations import QueryParametersOperations diff --git a/packages/typespec-python/test/azure/generated/routes/routes/aio/_client.py b/packages/typespec-python/test/azure/generated/routes/routes/aio/_client.py index 0ee2c449008..7ca64d8eb70 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/aio/_client.py @@ -18,8 +18,7 @@ from ..pathparameters.aio.operations import PathParametersOperations from ..queryparameters.aio.operations import QueryParametersOperations from ._configuration import RoutesClientConfiguration -from .operations import InInterfaceOperations -from .operations._operations import _RoutesClientOperationsMixin +from .operations import InInterfaceOperations, _RoutesClientOperationsMixin class RoutesClient(_RoutesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/__init__.py index c3492222fa2..84c8a2ceb21 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import InInterfaceOperations # type: ignore +from ._operations import _RoutesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/routes/routes/operations/__init__.py b/packages/typespec-python/test/azure/generated/routes/routes/operations/__init__.py index c3492222fa2..84c8a2ceb21 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import InInterfaceOperations # type: ignore +from ._operations import _RoutesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml index 7ce853a6f03..7c4297d4da3 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "serialization", "serialization.encodedname", ] diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml index 34a7a16f096..97235ea0c13 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.endpoint", ] diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_client.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_client.py index 55390b195d1..5c189762ff7 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_client.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import NotDefinedClientConfiguration -from ._operations._operations import _NotDefinedClientOperationsMixin +from ._operations import _NotDefinedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/__init__.py index 933fcd7d1b5..0b431b10281 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotDefinedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_client.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_client.py index f3cc026b393..a46421e934d 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NotDefinedClientConfiguration -from ._operations._operations import _NotDefinedClientOperationsMixin +from ._operations import _NotDefinedClientOperationsMixin class NotDefinedClient(_NotDefinedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/__init__.py index 933fcd7d1b5..0b431b10281 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotDefinedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml b/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml index c9020e993ba..7ed51328284 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.path", ] diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_client.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_client.py index f300f9ebb43..0b79bd36b2a 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_client.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import MultipleClientConfiguration -from ._operations._operations import _MultipleClientOperationsMixin +from ._operations import _MultipleClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_operations/__init__.py index 933fcd7d1b5..bf218c19f0b 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MultipleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_client.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_client.py index e6bf5fc98d0..a071906a13c 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MultipleClientConfiguration -from ._operations._operations import _MultipleClientOperationsMixin +from ._operations import _MultipleClientOperationsMixin class MultipleClient(_MultipleClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_operations/__init__.py index 933fcd7d1b5..bf218c19f0b 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/server/path/multiple/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MultipleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml b/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml index cd74e05878f..b62d04bbe1d 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.path", ] diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_client.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_client.py index 98b081b8333..c3d23264a3a 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_client.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import SingleClientConfiguration -from ._operations._operations import _SingleClientOperationsMixin +from ._operations import _SingleClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_operations/__init__.py index 933fcd7d1b5..e144d82d044 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _SingleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_client.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_client.py index 086be5ede86..a641b5c0562 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import SingleClientConfiguration -from ._operations._operations import _SingleClientOperationsMixin +from ._operations import _SingleClientOperationsMixin class SingleClient(_SingleClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_operations/__init__.py index 933fcd7d1b5..e144d82d044 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-path-single/server/path/single/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _SingleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml index 0500fbf7f6f..b5f889dfdd7 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.versions", ] diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_client.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_client.py index a9402cf507d..33023825a28 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_client.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import NotVersionedClientConfiguration -from ._operations._operations import _NotVersionedClientOperationsMixin +from ._operations import _NotVersionedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_operations/__init__.py index 933fcd7d1b5..b04756dec72 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotVersionedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_client.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_client.py index 521a59fffad..cb7d8cfb993 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NotVersionedClientConfiguration -from ._operations._operations import _NotVersionedClientOperationsMixin +from ._operations import _NotVersionedClientOperationsMixin class NotVersionedClient(_NotVersionedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/__init__.py index 933fcd7d1b5..b04756dec72 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotVersionedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml b/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml index 98d9a5386d6..2b6ad720d72 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.versions", ] diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_client.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_client.py index 45f1d929af3..67e096be672 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_client.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import VersionedClientConfiguration -from ._operations._operations import _VersionedClientOperationsMixin +from ._operations import _VersionedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_operations/__init__.py index 933fcd7d1b5..c25b641c2cd 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VersionedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_client.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_client.py index 5282469283b..a8cf8837c51 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import VersionedClientConfiguration -from ._operations._operations import _VersionedClientOperationsMixin +from ._operations import _VersionedClientOperationsMixin class VersionedClient(_VersionedClientOperationsMixin): diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_operations/__init__.py index 933fcd7d1b5..c25b641c2cd 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/server/versions/versioned/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VersionedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml index befaab7174f..b4430b9586f 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specialheaders", ] diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_client.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_client.py index b10e70d3c68..7d6c08d8b93 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_client.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ConditionalRequestClientConfiguration -from ._operations._operations import _ConditionalRequestClientOperationsMixin +from ._operations import _ConditionalRequestClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/__init__.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/__init__.py index 933fcd7d1b5..790be58bb13 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ConditionalRequestClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_client.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_client.py index 5cd483e874c..6ea0db7a323 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ConditionalRequestClientConfiguration -from ._operations._operations import _ConditionalRequestClientOperationsMixin +from ._operations import _ConditionalRequestClientOperationsMixin class ConditionalRequestClient( diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/__init__.py index 933fcd7d1b5..790be58bb13 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ConditionalRequestClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml b/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml index 3f1ea6f5f1f..475012889ad 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specialheaders", ] diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_client.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_client.py index 522d77d3205..18016f43758 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_client.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import RepeatabilityClientConfiguration -from ._operations._operations import _RepeatabilityClientOperationsMixin +from ._operations import _RepeatabilityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_operations/__init__.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_operations/__init__.py index 933fcd7d1b5..43595684f5a 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RepeatabilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_client.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_client.py index c31c6943534..45a02c2e577 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RepeatabilityClientConfiguration -from ._operations._operations import _RepeatabilityClientOperationsMixin +from ._operations import _RepeatabilityClientOperationsMixin class RepeatabilityClient(_RepeatabilityClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/__init__.py index 933fcd7d1b5..43595684f5a 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RepeatabilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/special-words/pyproject.toml b/packages/typespec-python/test/azure/generated/special-words/pyproject.toml index 7fb250709a4..2910e9f34fb 100644 --- a/packages/typespec-python/test/azure/generated/special-words/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/special-words/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml b/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml index 0735d72b5f9..9ef8c4633a0 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "streaming", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml index 223a1165291..fbf8e75d44d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml index 7cb42409bf7..a468a09080e 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml index 199a328ad9a..b86603fc8a6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.enum", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml index 261253c4790..cad824040aa 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.enum", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml index 3e79b6e16b3..bdeda4e3337 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_client.py index d2ab3dbefb1..039ed2e25a8 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import EmptyClientConfiguration -from ._operations._operations import _EmptyClientOperationsMixin +from ._operations import _EmptyClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_operations/__init__.py index 933fcd7d1b5..37037be2e13 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _EmptyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_client.py index 333c4629dfc..8c0444249d8 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import EmptyClientConfiguration -from ._operations._operations import _EmptyClientOperationsMixin +from ._operations import _EmptyClientOperationsMixin class EmptyClient(_EmptyClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_operations/__init__.py index 933fcd7d1b5..37037be2e13 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/typetest/model/empty/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _EmptyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml index b1024fcc6b7..388ab338b89 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_client.py index 2b4852f96d9..24bc34b4ba5 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import EnumDiscriminatorClientConfiguration -from ._operations._operations import _EnumDiscriminatorClientOperationsMixin +from ._operations import _EnumDiscriminatorClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/__init__.py index 933fcd7d1b5..94cb990f401 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _EnumDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_client.py index b0d3a666f3b..77f63be3854 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import EnumDiscriminatorClientConfiguration -from ._operations._operations import _EnumDiscriminatorClientOperationsMixin +from ._operations import _EnumDiscriminatorClientOperationsMixin class EnumDiscriminatorClient( diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/__init__.py index 933fcd7d1b5..94cb990f401 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _EnumDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml index ef74ff9212c..f8be724361e 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_client.py index 237a6ad9988..f4610340800 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import NestedDiscriminatorClientConfiguration -from ._operations._operations import _NestedDiscriminatorClientOperationsMixin +from ._operations import _NestedDiscriminatorClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/__init__.py index 933fcd7d1b5..4bce10ca8e2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NestedDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_client.py index a099ab07939..189454a56d7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NestedDiscriminatorClientConfiguration -from ._operations._operations import _NestedDiscriminatorClientOperationsMixin +from ._operations import _NestedDiscriminatorClientOperationsMixin class NestedDiscriminatorClient( diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/__init__.py index 933fcd7d1b5..4bce10ca8e2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NestedDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml index f349311d0de..7a00ddf371d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_client.py index de900478816..9dbee25b991 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import NotDiscriminatedClientConfiguration -from ._operations._operations import _NotDiscriminatedClientOperationsMixin +from ._operations import _NotDiscriminatedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/__init__.py index 933fcd7d1b5..55cfeb70932 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotDiscriminatedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_client.py index f2a6206e147..fdd16ab8c3d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NotDiscriminatedClientConfiguration -from ._operations._operations import _NotDiscriminatedClientOperationsMixin +from ._operations import _NotDiscriminatedClientOperationsMixin class NotDiscriminatedClient( diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/__init__.py index 933fcd7d1b5..55cfeb70932 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotDiscriminatedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml index a67ea74778e..25703d51c90 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_client.py index c4b69284f09..a22a131850b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import RecursiveClientConfiguration -from ._operations._operations import _RecursiveClientOperationsMixin +from ._operations import _RecursiveClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_operations/__init__.py index 933fcd7d1b5..317b1922bc1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RecursiveClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_client.py index 43a110aa05c..87d2e92a383 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RecursiveClientConfiguration -from ._operations._operations import _RecursiveClientOperationsMixin +from ._operations import _RecursiveClientOperationsMixin class RecursiveClient(_RecursiveClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/__init__.py index 933fcd7d1b5..317b1922bc1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RecursiveClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml index b0daae89277..5d1600f021d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_client.py index b7eac9bceaa..e3a002c68e6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import SingleDiscriminatorClientConfiguration -from ._operations._operations import _SingleDiscriminatorClientOperationsMixin +from ._operations import _SingleDiscriminatorClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/__init__.py index 933fcd7d1b5..0d3d6a1e224 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _SingleDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_client.py index 6cc53fb9ce1..cf1247fd5b9 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import SingleDiscriminatorClientConfiguration -from ._operations._operations import _SingleDiscriminatorClientOperationsMixin +from ._operations import _SingleDiscriminatorClientOperationsMixin class SingleDiscriminatorClient( diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/__init__.py index 933fcd7d1b5..0d3d6a1e224 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _SingleDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml index d7ec808f749..8cb506cd2f7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_client.py index 825f597893e..0d20263c03e 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import UsageClientConfiguration -from ._operations._operations import _UsageClientOperationsMixin +from ._operations import _UsageClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_operations/__init__.py index 933fcd7d1b5..7a7c3e9596c 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _UsageClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_client.py index b238c355076..581fb9ce431 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import UsageClientConfiguration -from ._operations._operations import _UsageClientOperationsMixin +from ._operations import _UsageClientOperationsMixin class UsageClient(_UsageClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_operations/__init__.py index 933fcd7d1b5..7a7c3e9596c 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/typetest/model/usage/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _UsageClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml index cbb741237f9..9d92833dd47 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_client.py index 171a7bb1c47..183a28836d2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_operations/__init__.py index 933fcd7d1b5..fbb6833b7fe 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_client.py index 4b41e1a911e..2bd3027bb36 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin class VisibilityClient(_VisibilityClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/__init__.py index 933fcd7d1b5..fbb6833b7fe 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml index 5aa28bd8c0d..7148bc113b0 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.property", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml index e61edcccfbc..ddeb59c7a15 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.property", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml index 28a9b50c890..a30022b7175 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.property", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml index 294705b194e..5333cea0bb9 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.property", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml index 2f10fcac8e3..29564257a88 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", ] diff --git a/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml index 748e9e68e71..83c52d7a045 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", ] diff --git a/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml index 65976cf960a..89a81c7a58e 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_client.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_client.py index cc46d54abd5..d362b8ec014 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_client.py @@ -16,8 +16,7 @@ from ._configuration import AddedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import InterfaceV2Operations -from .operations._operations import _AddedClientOperationsMixin +from .operations import InterfaceV2Operations, _AddedClientOperationsMixin class AddedClient(_AddedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_client.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_client.py index cfd2422333a..105561e199b 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_client.py @@ -16,8 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AddedClientConfiguration -from .operations import InterfaceV2Operations -from .operations._operations import _AddedClientOperationsMixin +from .operations import InterfaceV2Operations, _AddedClientOperationsMixin class AddedClient(_AddedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/__init__.py index f648f4ab914..01960cbd44c 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import InterfaceV2Operations # type: ignore +from ._operations import _AddedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/__init__.py index f648f4ab914..01960cbd44c 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import InterfaceV2Operations # type: ignore +from ._operations import _AddedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml index 00f969baf32..48fda2716ff 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_client.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_client.py index 6c9022f66ae..48248760f37 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import MadeOptionalClientConfiguration -from ._operations._operations import _MadeOptionalClientOperationsMixin +from ._operations import _MadeOptionalClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_operations/__init__.py index 933fcd7d1b5..8a2be1b16bf 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MadeOptionalClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_client.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_client.py index 086a9305a97..b4d1bd90719 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MadeOptionalClientConfiguration -from ._operations._operations import _MadeOptionalClientOperationsMixin +from ._operations import _MadeOptionalClientOperationsMixin class MadeOptionalClient(_MadeOptionalClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/__init__.py index 933fcd7d1b5..8a2be1b16bf 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MadeOptionalClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml index 13db2f43211..59762b8806c 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_client.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_client.py index 51d74fd6737..d3f951b5e3b 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import RemovedClientConfiguration -from ._operations._operations import _RemovedClientOperationsMixin +from ._operations import _RemovedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_operations/__init__.py index 933fcd7d1b5..3d6979cd9ab 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RemovedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_client.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_client.py index 237b35d5a34..1dc50003446 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RemovedClientConfiguration -from ._operations._operations import _RemovedClientOperationsMixin +from ._operations import _RemovedClientOperationsMixin class RemovedClient(_RemovedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_operations/__init__.py index 933fcd7d1b5..3d6979cd9ab 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-removed/versioning/removed/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RemovedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml index 7f71391cf66..57e532a342e 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py index 52ea6d4eb4a..8d9547b37c7 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py @@ -16,8 +16,7 @@ from ._configuration import RenamedFromClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import NewInterfaceOperations -from .operations._operations import _RenamedFromClientOperationsMixin +from .operations import NewInterfaceOperations, _RenamedFromClientOperationsMixin class RenamedFromClient(_RenamedFromClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py index c246e913cac..30d3e70e91f 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py @@ -16,8 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RenamedFromClientConfiguration -from .operations import NewInterfaceOperations -from .operations._operations import _RenamedFromClientOperationsMixin +from .operations import NewInterfaceOperations, _RenamedFromClientOperationsMixin class RenamedFromClient(_RenamedFromClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py index f536ce47500..f41021cd05f 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import NewInterfaceOperations # type: ignore +from ._operations import _RenamedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py index f536ce47500..f41021cd05f 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import NewInterfaceOperations # type: ignore +from ._operations import _RenamedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml index 463cdca6218..a9280f6baa5 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_client.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_client.py index 0ea20cd10ed..8292fc2b8c3 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ReturnTypeChangedFromClientConfiguration -from ._operations._operations import _ReturnTypeChangedFromClientOperationsMixin +from ._operations import _ReturnTypeChangedFromClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/__init__.py index 933fcd7d1b5..c84b089ca04 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ReturnTypeChangedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_client.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_client.py index 2721fff558a..03743135042 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ReturnTypeChangedFromClientConfiguration -from ._operations._operations import _ReturnTypeChangedFromClientOperationsMixin +from ._operations import _ReturnTypeChangedFromClientOperationsMixin class ReturnTypeChangedFromClient( diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/__init__.py index 933fcd7d1b5..c84b089ca04 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ReturnTypeChangedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml index b082e86a506..ef5fe1f880d 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_client.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_client.py index 9eeb958c60c..acf503ab324 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import TypeChangedFromClientConfiguration -from ._operations._operations import _TypeChangedFromClientOperationsMixin +from ._operations import _TypeChangedFromClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/__init__.py index 933fcd7d1b5..78bf3316b74 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _TypeChangedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_client.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_client.py index 4698afeba0d..67ba4f4d858 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import TypeChangedFromClientConfiguration -from ._operations._operations import _TypeChangedFromClientOperationsMixin +from ._operations import _TypeChangedFromClientOperationsMixin class TypeChangedFromClient( diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/__init__.py index 933fcd7d1b5..78bf3316b74 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _TypeChangedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_client.py index b809f321bd0..39c3789576b 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_client.py @@ -9,7 +9,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import ApiKeyClientConfiguration -from ._operations._operations import _ApiKeyClientOperationsMixin +from ._operations import _ApiKeyClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_operations/__init__.py index 0d033db47cd..ec7cfa89f78 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ApiKeyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_client.py index 028cb9f347e..77cc728a366 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_client.py @@ -10,7 +10,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ApiKeyClientConfiguration -from ._operations._operations import _ApiKeyClientOperationsMixin +from ._operations import _ApiKeyClientOperationsMixin class ApiKeyClient(_ApiKeyClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_operations/__init__.py index 0d033db47cd..ec7cfa89f78 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/authentication/apikey/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ApiKeyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml index e3d6ef01060..73ce718d269 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "authentication", ] diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_client.py index 3a8f909d83f..e783ba86411 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_client.py @@ -9,7 +9,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import CustomClientConfiguration -from ._operations._operations import _CustomClientOperationsMixin +from ._operations import _CustomClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_operations/__init__.py index 0d033db47cd..7804cea6875 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _CustomClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_client.py index 1a0c96328e8..f2c2c91339d 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_client.py @@ -10,7 +10,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import CustomClientConfiguration -from ._operations._operations import _CustomClientOperationsMixin +from ._operations import _CustomClientOperationsMixin class CustomClient(_CustomClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_operations/__init__.py index 0d033db47cd..7804cea6875 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/authentication/http/custom/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _CustomClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml index 81e6855c949..b270fb32de4 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "authentication", "authentication.http", ] diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_client.py index 94e94e7d726..b6c2f221e76 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import OAuth2ClientConfiguration -from ._operations._operations import _OAuth2ClientOperationsMixin +from ._operations import _OAuth2ClientOperationsMixin from ._utils.serialization import Deserializer, Serializer if TYPE_CHECKING: diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_operations/__init__.py index 0d033db47cd..cc156f8e85d 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _OAuth2ClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_client.py index e9cf2c2379d..378fb98eda1 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import OAuth2ClientConfiguration -from ._operations._operations import _OAuth2ClientOperationsMixin +from ._operations import _OAuth2ClientOperationsMixin if TYPE_CHECKING: from corehttp.credentials import AsyncTokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_operations/__init__.py index 0d033db47cd..cc156f8e85d 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/authentication/oauth2/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _OAuth2ClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml index cf9d336db31..b3f9188dfdf 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "authentication", ] diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_client.py index af45ed6b6d1..171a71a4f5f 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_client.py @@ -9,7 +9,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import UnionClientConfiguration -from ._operations._operations import _UnionClientOperationsMixin +from ._operations import _UnionClientOperationsMixin from ._utils.serialization import Deserializer, Serializer if TYPE_CHECKING: diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_operations/__init__.py index 0d033db47cd..d723b389815 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _UnionClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_client.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_client.py index ff8b1ecde10..0ee916f5411 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_client.py @@ -10,7 +10,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import UnionClientConfiguration -from ._operations._operations import _UnionClientOperationsMixin +from ._operations import _UnionClientOperationsMixin if TYPE_CHECKING: from corehttp.credentials import AsyncTokenCredential diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_operations/__init__.py index 0d033db47cd..d723b389815 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/authentication/union/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _UnionClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml index 4e8a54c3ae0..dd5d454ce7e 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "authentication", ] diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml index 27f0e693d11..d1cc9280a9e 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "encode", ] diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml index ee9a0a6e091..c11e7c8539f 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "encode", ] diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml index 411da0b3fd0..4f73640a9fb 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "encode", ] diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml index aea3b490bab..30830a5f05d 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "encode", ] diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_client.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_client.py index 200f704cdff..caef522b8f6 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_client.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_operations/__init__.py index 0d033db47cd..0cbf0161a17 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_client.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_client.py index 014f0fbce20..0e56f7b7be2 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin class VisibilityClient(_VisibilityClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/__init__.py index 0d033db47cd..0cbf0161a17 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/headasbooleanfalse/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml index b05ca293cb1..413f849d138 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_client.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_client.py index 200f704cdff..caef522b8f6 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_client.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_operations/__init__.py index 0d033db47cd..0cbf0161a17 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_client.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_client.py index 014f0fbce20..0e56f7b7be2 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin class VisibilityClient(_VisibilityClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_operations/__init__.py index 0d033db47cd..0cbf0161a17 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/headasbooleantrue/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml index 6f07b96d53e..4d75d5a83f7 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml index 78ae058960d..df6f4a5ee50 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py index c8fba7140b3..b9f179a0361 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import BodyOptionalityClientConfiguration -from ._operations._operations import _BodyOptionalityClientOperationsMixin +from ._operations import _BodyOptionalityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer from .optionalexplicit.operations import OptionalExplicitOperations diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_operations/__init__.py index 0d033db47cd..72bd956bdb4 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _BodyOptionalityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py index 231051e5303..053836c3ca9 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py @@ -10,7 +10,7 @@ from .._utils.serialization import Deserializer, Serializer from ..optionalexplicit.aio.operations import OptionalExplicitOperations from ._configuration import BodyOptionalityClientConfiguration -from ._operations._operations import _BodyOptionalityClientOperationsMixin +from ._operations import _BodyOptionalityClientOperationsMixin class BodyOptionalityClient( diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_operations/__init__.py index 0d033db47cd..72bd956bdb4 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _BodyOptionalityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml index 4d6a73c5c72..75240738fb4 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml index dca8be28b81..f17403ab3d6 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/_client.py index bf3445b15ea..6f1e48f1911 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import PathClientConfiguration -from ._operations._operations import _PathClientOperationsMixin +from ._operations import _PathClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/_operations/__init__.py index 0d033db47cd..0b1d42b5c8e 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _PathClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/aio/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/aio/_client.py index 21da5b38416..78bdc4af9cb 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import PathClientConfiguration -from ._operations._operations import _PathClientOperationsMixin +from ._operations import _PathClientOperationsMixin class PathClient(_PathClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/aio/_operations/__init__.py index 0d033db47cd..0b1d42b5c8e 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-path/parameters/path/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _PathClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml index b60aee973c4..9006d80d8a3 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml index 6189129dfe9..6e7a66c297f 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "parameters", ] diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml index 47bff7f497b..2baba256b91 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_client.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_client.py index e2afa8fed56..57e104964f2 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import JsonMergePatchClientConfiguration -from ._operations._operations import _JsonMergePatchClientOperationsMixin +from ._operations import _JsonMergePatchClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/__init__.py index 0d033db47cd..a69a1f57f0f 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _JsonMergePatchClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_client.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_client.py index 17e0b18dd5c..a0f2cf55a9c 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import JsonMergePatchClientConfiguration -from ._operations._operations import _JsonMergePatchClientOperationsMixin +from ._operations import _JsonMergePatchClientOperationsMixin class JsonMergePatchClient(_JsonMergePatchClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/__init__.py index 0d033db47cd..a69a1f57f0f 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/payload/jsonmergepatch/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _JsonMergePatchClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml index 3801b657df5..130fff2a0f7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml index ee76f0640d6..cd9f75d482a 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml index 2dc43708196..5aa89935d95 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml index 5e9ce7cb31d..a94b1fd6003 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml index 67baba52810..a78893f7ed7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "payload", ] diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml b/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml index ead4614df55..658e62e8e9e 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "response", ] diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_client.py b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_client.py index 19c9c9a5ed5..1c4006cb1d0 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_client.py +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import StatusCodeRangeClientConfiguration -from ._operations._operations import _StatusCodeRangeClientOperationsMixin +from ._operations import _StatusCodeRangeClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_operations/__init__.py index 0d033db47cd..990f2f10025 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _StatusCodeRangeClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_client.py b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_client.py index 23808c714a8..7025f6c0f8a 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import StatusCodeRangeClientConfiguration -from ._operations._operations import _StatusCodeRangeClientOperationsMixin +from ._operations import _StatusCodeRangeClientOperationsMixin class StatusCodeRangeClient( diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_operations/__init__.py index 0d033db47cd..990f2f10025 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _StatusCodeRangeClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml index 6478cf1d0e6..a550930cf3e 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/_client.py b/packages/typespec-python/test/unbranded/generated/routes/routes/_client.py index bcdee096ec7..5774cd376f3 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/_client.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/_client.py @@ -9,8 +9,7 @@ from ._configuration import RoutesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import InInterfaceOperations -from .operations._operations import _RoutesClientOperationsMixin +from .operations import InInterfaceOperations, _RoutesClientOperationsMixin from .pathparameters.operations import PathParametersOperations from .queryparameters.operations import QueryParametersOperations diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_client.py b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_client.py index 459094196c6..5c5ec1bf12c 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_client.py @@ -11,8 +11,7 @@ from ..pathparameters.aio.operations import PathParametersOperations from ..queryparameters.aio.operations import QueryParametersOperations from ._configuration import RoutesClientConfiguration -from .operations import InInterfaceOperations -from .operations._operations import _RoutesClientOperationsMixin +from .operations import InInterfaceOperations, _RoutesClientOperationsMixin class RoutesClient(_RoutesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/__init__.py index 426da78e8ab..0b84d5c359c 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/__init__.py @@ -7,6 +7,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import InInterfaceOperations # type: ignore +from ._operations import _RoutesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/routes/routes/operations/__init__.py index 426da78e8ab..0b84d5c359c 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/operations/__init__.py @@ -7,6 +7,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import InInterfaceOperations # type: ignore +from ._operations import _RoutesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml index c7406c82b89..f3a37c74a5d 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "serialization", "serialization.encodedname", ] diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml index 9caf07c54ac..c232273d079 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.endpoint", ] diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_client.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_client.py index 378bac69ee2..1548cdef036 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import NotDefinedClientConfiguration -from ._operations._operations import _NotDefinedClientOperationsMixin +from ._operations import _NotDefinedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/__init__.py index 0d033db47cd..23de99f13b6 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotDefinedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_client.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_client.py index 683d06d8a7d..199fa637850 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NotDefinedClientConfiguration -from ._operations._operations import _NotDefinedClientOperationsMixin +from ._operations import _NotDefinedClientOperationsMixin class NotDefinedClient(_NotDefinedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/__init__.py index 0d033db47cd..23de99f13b6 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/server/endpoint/notdefined/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotDefinedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml index aa512e35747..9fd95e94cfd 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.path", ] diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_client.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_client.py index 49e837d053e..5111188837b 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import MultipleClientConfiguration -from ._operations._operations import _MultipleClientOperationsMixin +from ._operations import _MultipleClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_operations/__init__.py index 0d033db47cd..ea7f56dbfdd 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MultipleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_client.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_client.py index 73330980a03..50458fa1d66 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MultipleClientConfiguration -from ._operations._operations import _MultipleClientOperationsMixin +from ._operations import _MultipleClientOperationsMixin class MultipleClient(_MultipleClientOperationsMixin): diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_operations/__init__.py index 0d033db47cd..ea7f56dbfdd 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/server/path/multiple/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MultipleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml index 776dbc62e25..7f505da44ac 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.path", ] diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_client.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_client.py index ddf9cc67157..cc9e78bcf68 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import SingleClientConfiguration -from ._operations._operations import _SingleClientOperationsMixin +from ._operations import _SingleClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_operations/__init__.py index 0d033db47cd..8b21420f157 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _SingleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_client.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_client.py index 08ad85ee685..ea72d5bb061 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import SingleClientConfiguration -from ._operations._operations import _SingleClientOperationsMixin +from ._operations import _SingleClientOperationsMixin class SingleClient(_SingleClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_operations/__init__.py index 0d033db47cd..8b21420f157 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/server/path/single/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _SingleClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml index 4324d218b9b..46c9f3a3a1c 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.versions", ] diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_client.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_client.py index 8e508101762..05919a4440c 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import NotVersionedClientConfiguration -from ._operations._operations import _NotVersionedClientOperationsMixin +from ._operations import _NotVersionedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_operations/__init__.py index 0d033db47cd..e402e2590a1 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotVersionedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_client.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_client.py index cdc08d19f9f..fd416b17d69 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NotVersionedClientConfiguration -from ._operations._operations import _NotVersionedClientOperationsMixin +from ._operations import _NotVersionedClientOperationsMixin class NotVersionedClient(_NotVersionedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/__init__.py index 0d033db47cd..e402e2590a1 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/server/versions/notversioned/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotVersionedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml index 53dc2ad650b..01cf2c34a78 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "server", "server.versions", ] diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_client.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_client.py index c006b578200..e6dc9492ccf 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import VersionedClientConfiguration -from ._operations._operations import _VersionedClientOperationsMixin +from ._operations import _VersionedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_operations/__init__.py index 0d033db47cd..f768e75afaa 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VersionedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_client.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_client.py index 20f6dd8f949..a073ae7bbaf 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import VersionedClientConfiguration -from ._operations._operations import _VersionedClientOperationsMixin +from ._operations import _VersionedClientOperationsMixin class VersionedClient(_VersionedClientOperationsMixin): diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_operations/__init__.py index 0d033db47cd..f768e75afaa 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/server/versions/versioned/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VersionedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml index fbbdf60ce28..1d32f1682d7 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specialheaders", ] diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_client.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_client.py index 6318546f8e9..79ac424bd60 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_client.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import ConditionalRequestClientConfiguration -from ._operations._operations import _ConditionalRequestClientOperationsMixin +from ._operations import _ConditionalRequestClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/__init__.py index 0d033db47cd..85d1b593101 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ConditionalRequestClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_client.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_client.py index 4d69d8c33f0..d5635744516 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ConditionalRequestClientConfiguration -from ._operations._operations import _ConditionalRequestClientOperationsMixin +from ._operations import _ConditionalRequestClientOperationsMixin class ConditionalRequestClient( diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/__init__.py index 0d033db47cd..85d1b593101 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/specialheaders/conditionalrequest/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ConditionalRequestClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml index b61ebbd8b7b..56da3dfe494 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "specialheaders", ] diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_client.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_client.py index ad791052c17..9acb382959a 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_client.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import RepeatabilityClientConfiguration -from ._operations._operations import _RepeatabilityClientOperationsMixin +from ._operations import _RepeatabilityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_operations/__init__.py index 0d033db47cd..84768968391 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RepeatabilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_client.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_client.py index 77fa5230034..ea79e646a91 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RepeatabilityClientConfiguration -from ._operations._operations import _RepeatabilityClientOperationsMixin +from ._operations import _RepeatabilityClientOperationsMixin class RepeatabilityClient(_RepeatabilityClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/__init__.py index 0d033db47cd..84768968391 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/specialheaders/repeatability/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RepeatabilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml index 10f51867ad5..143c2214db5 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml index af3c5fae624..9d4bfed95fa 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "streaming", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml index 2b25566168d..88d9d41c42f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml index d14351d63b9..bb6c188b87c 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml index 61eced04478..28e678366a6 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.enum", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml index 4824d7a9328..8ab97e99232 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.enum", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml index 51afb91a2b6..55be2c138f9 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_client.py index 6c984570314..73ecb421192 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import EmptyClientConfiguration -from ._operations._operations import _EmptyClientOperationsMixin +from ._operations import _EmptyClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_operations/__init__.py index 0d033db47cd..fff1e4be06b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _EmptyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_client.py index 6d5cba7b319..c9a467bf4d9 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import EmptyClientConfiguration -from ._operations._operations import _EmptyClientOperationsMixin +from ._operations import _EmptyClientOperationsMixin class EmptyClient(_EmptyClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_operations/__init__.py index 0d033db47cd..fff1e4be06b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/typetest/model/empty/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _EmptyClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml index cf1495c15eb..5244ec98e1c 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_client.py index b879dbf5ef0..f330becebc8 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import EnumDiscriminatorClientConfiguration -from ._operations._operations import _EnumDiscriminatorClientOperationsMixin +from ._operations import _EnumDiscriminatorClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/__init__.py index 0d033db47cd..adcf7fd3d7f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _EnumDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_client.py index 8c49a254330..317b3948624 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import EnumDiscriminatorClientConfiguration -from ._operations._operations import _EnumDiscriminatorClientOperationsMixin +from ._operations import _EnumDiscriminatorClientOperationsMixin class EnumDiscriminatorClient( diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/__init__.py index 0d033db47cd..adcf7fd3d7f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/typetest/model/enumdiscriminator/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _EnumDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml index 84b257ef62f..9b68c161ba1 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_client.py index c52af2f6540..ceb015ca6f5 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import NestedDiscriminatorClientConfiguration -from ._operations._operations import _NestedDiscriminatorClientOperationsMixin +from ._operations import _NestedDiscriminatorClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/__init__.py index 0d033db47cd..dc5d55bc34f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NestedDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_client.py index 246c63a8ae8..5ef38d01840 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NestedDiscriminatorClientConfiguration -from ._operations._operations import _NestedDiscriminatorClientOperationsMixin +from ._operations import _NestedDiscriminatorClientOperationsMixin class NestedDiscriminatorClient( diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/__init__.py index 0d033db47cd..dc5d55bc34f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/typetest/model/nesteddiscriminator/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NestedDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml index 041e712814d..c5eea408e9b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_client.py index 8a1ea37a048..8a1be48f025 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import NotDiscriminatedClientConfiguration -from ._operations._operations import _NotDiscriminatedClientOperationsMixin +from ._operations import _NotDiscriminatedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/__init__.py index 0d033db47cd..b6130d596f2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotDiscriminatedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_client.py index 4841a1d7463..5e79ac2220b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NotDiscriminatedClientConfiguration -from ._operations._operations import _NotDiscriminatedClientOperationsMixin +from ._operations import _NotDiscriminatedClientOperationsMixin class NotDiscriminatedClient( diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/__init__.py index 0d033db47cd..b6130d596f2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/typetest/model/notdiscriminated/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _NotDiscriminatedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml index 693be055949..0ba5e07e10e 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_client.py index 55e13d36508..d75669f2e33 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import RecursiveClientConfiguration -from ._operations._operations import _RecursiveClientOperationsMixin +from ._operations import _RecursiveClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_operations/__init__.py index 0d033db47cd..25f03f2c716 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RecursiveClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_client.py index 2b9554d2e4c..67a5ba7469c 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RecursiveClientConfiguration -from ._operations._operations import _RecursiveClientOperationsMixin +from ._operations import _RecursiveClientOperationsMixin class RecursiveClient(_RecursiveClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/__init__.py index 0d033db47cd..25f03f2c716 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/typetest/model/recursive/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RecursiveClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml index 543541b5e69..cd098fe3ccd 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_client.py index c72e2c6289a..eb5a824a771 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import SingleDiscriminatorClientConfiguration -from ._operations._operations import _SingleDiscriminatorClientOperationsMixin +from ._operations import _SingleDiscriminatorClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/__init__.py index 0d033db47cd..f39dfb6f44a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _SingleDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_client.py index c674728da12..91952d03f15 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import SingleDiscriminatorClientConfiguration -from ._operations._operations import _SingleDiscriminatorClientOperationsMixin +from ._operations import _SingleDiscriminatorClientOperationsMixin class SingleDiscriminatorClient( diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/__init__.py index 0d033db47cd..f39dfb6f44a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/typetest/model/singlediscriminator/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _SingleDiscriminatorClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml index e967130e5be..770668c10bf 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_client.py index c00b6edf7f5..fbf27f47c72 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import UsageClientConfiguration -from ._operations._operations import _UsageClientOperationsMixin +from ._operations import _UsageClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_operations/__init__.py index 0d033db47cd..1505a449ad4 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _UsageClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_client.py index 151c4781de7..3e83a457d90 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import UsageClientConfiguration -from ._operations._operations import _UsageClientOperationsMixin +from ._operations import _UsageClientOperationsMixin class UsageClient(_UsageClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_operations/__init__.py index 0d033db47cd..1505a449ad4 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/typetest/model/usage/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _UsageClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml index 9bca4e77228..1c4e2a630d5 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.model", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_client.py index 200f704cdff..caef522b8f6 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_operations/__init__.py index 0d033db47cd..0cbf0161a17 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_client.py index 014f0fbce20..0e56f7b7be2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import VisibilityClientConfiguration -from ._operations._operations import _VisibilityClientOperationsMixin +from ._operations import _VisibilityClientOperationsMixin class VisibilityClient(_VisibilityClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/__init__.py index 0d033db47cd..0cbf0161a17 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/typetest/model/visibility/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _VisibilityClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml index 11e50ed3f2c..c2530511429 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.property", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml index f275ac0c58b..88d71b90a20 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.property", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml index 6e3dcccf15c..a99b94c13d1 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.property", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml index c404504c437..f2d7b9aac40 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", "typetest.property", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml index eadee6ef826..ede232d7ba7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", ] diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml index 6cd8046b56e..f899deca2a2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "typetest", ] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml index 9858c47b7f4..d6c8e50e6e4 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_client.py index ffea8ac1c0b..2a7c93b6217 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_client.py @@ -9,8 +9,7 @@ from ._configuration import AddedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import InterfaceV2Operations -from .operations._operations import _AddedClientOperationsMixin +from .operations import InterfaceV2Operations, _AddedClientOperationsMixin class AddedClient(_AddedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_client.py index 8b94832430b..31c8303444a 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_client.py @@ -9,8 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AddedClientConfiguration -from .operations import InterfaceV2Operations -from .operations._operations import _AddedClientOperationsMixin +from .operations import InterfaceV2Operations, _AddedClientOperationsMixin class AddedClient(_AddedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/__init__.py index a799428817a..0aa7a037977 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/__init__.py @@ -7,6 +7,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import InterfaceV2Operations # type: ignore +from ._operations import _AddedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/__init__.py index a799428817a..0aa7a037977 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/__init__.py @@ -7,6 +7,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import InterfaceV2Operations # type: ignore +from ._operations import _AddedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml index 1dc7f270625..ad840f61e5e 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_client.py index b4c9e8d31b4..eef40c44902 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import MadeOptionalClientConfiguration -from ._operations._operations import _MadeOptionalClientOperationsMixin +from ._operations import _MadeOptionalClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_operations/__init__.py index 0d033db47cd..1c90caa7653 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MadeOptionalClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_client.py index 93c72ef8e6c..20cc04e43ed 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MadeOptionalClientConfiguration -from ._operations._operations import _MadeOptionalClientOperationsMixin +from ._operations import _MadeOptionalClientOperationsMixin class MadeOptionalClient(_MadeOptionalClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/__init__.py index 0d033db47cd..1c90caa7653 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/versioning/madeoptional/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MadeOptionalClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml index e1e5dd04053..a3d7fb43d53 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_client.py index a2fd0c4539e..4ef1ea61472 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import RemovedClientConfiguration -from ._operations._operations import _RemovedClientOperationsMixin +from ._operations import _RemovedClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_operations/__init__.py index 0d033db47cd..0870a64bb43 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RemovedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_client.py index be14de6aad7..3772345824a 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RemovedClientConfiguration -from ._operations._operations import _RemovedClientOperationsMixin +from ._operations import _RemovedClientOperationsMixin class RemovedClient(_RemovedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_operations/__init__.py index 0d033db47cd..0870a64bb43 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/versioning/removed/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _RemovedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml index 7f3805b1e1e..0fa3c89f5dc 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py index 887fec01bcd..46c49883524 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py @@ -9,8 +9,7 @@ from ._configuration import RenamedFromClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import NewInterfaceOperations -from .operations._operations import _RenamedFromClientOperationsMixin +from .operations import NewInterfaceOperations, _RenamedFromClientOperationsMixin class RenamedFromClient(_RenamedFromClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py index d8029648d5e..e85150ae870 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py @@ -9,8 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RenamedFromClientConfiguration -from .operations import NewInterfaceOperations -from .operations._operations import _RenamedFromClientOperationsMixin +from .operations import NewInterfaceOperations, _RenamedFromClientOperationsMixin class RenamedFromClient(_RenamedFromClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py index 27e2a48d78a..f442abbdd7d 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py @@ -7,6 +7,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import NewInterfaceOperations # type: ignore +from ._operations import _RenamedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py index 27e2a48d78a..f442abbdd7d 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py @@ -7,6 +7,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import NewInterfaceOperations # type: ignore +from ._operations import _RenamedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml index e6dd37c246f..ddbd0963621 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_client.py index c91775c4be1..b76af6d8748 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import ReturnTypeChangedFromClientConfiguration -from ._operations._operations import _ReturnTypeChangedFromClientOperationsMixin +from ._operations import _ReturnTypeChangedFromClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/__init__.py index 0d033db47cd..7649f764920 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ReturnTypeChangedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_client.py index 088549b160b..33e432377de 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ReturnTypeChangedFromClientConfiguration -from ._operations._operations import _ReturnTypeChangedFromClientOperationsMixin +from ._operations import _ReturnTypeChangedFromClientOperationsMixin class ReturnTypeChangedFromClient( diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/__init__.py index 0d033db47cd..7649f764920 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/versioning/returntypechangedfrom/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ReturnTypeChangedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml index 8f0ad95c674..4e33c27c542 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml @@ -39,6 +39,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "versioning", ] diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_client.py index 554b0541167..dd0fbbbc455 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import PipelineClient, policies from ._configuration import TypeChangedFromClientConfiguration -from ._operations._operations import _TypeChangedFromClientOperationsMixin +from ._operations import _TypeChangedFromClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/__init__.py index 0d033db47cd..7c0587daab0 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _TypeChangedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_client.py index 10f8a70fb18..2a79688607d 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_client.py @@ -9,7 +9,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import TypeChangedFromClientConfiguration -from ._operations._operations import _TypeChangedFromClientOperationsMixin +from ._operations import _TypeChangedFromClientOperationsMixin class TypeChangedFromClient( diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/__init__.py index 0d033db47cd..7c0587daab0 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/versioning/typechangedfrom/aio/_operations/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _TypeChangedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * From c1d050c0c3eb4c41dc16783f05ab452605b5397b Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Mon, 28 Jul 2025 22:45:35 +0000 Subject: [PATCH 23/48] Regenerate for autorest.python (2025-07-28 22:45:35) --- .../azure_key_credential/generated/setup.py | 2 +- .../samples/specification/basic/generated/setup.py | 2 +- .../generated/azure/directives/sample/_client.py | 2 +- .../azure/directives/sample/_operations/__init__.py | 1 + .../generated/azure/directives/sample/aio/_client.py | 2 +- .../azure/directives/sample/aio/_operations/__init__.py | 1 + .../samples/specification/directives/generated/setup.py | 2 +- .../Expected/AcceptanceTests/AzureBodyDuration/setup.py | 2 +- .../AcceptanceTests/AzureParameterGrouping/setup.py | 2 +- .../azurereport/_auto_rest_report_service_for_azure.py | 2 +- .../aio/_auto_rest_report_service_for_azure.py | 2 +- .../AzureReport/azurereport/aio/operations/__init__.py | 2 ++ .../AzureReport/azurereport/operations/__init__.py | 2 ++ .../legacy/Expected/AcceptanceTests/AzureReport/setup.py | 2 +- .../Expected/AcceptanceTests/CustomBaseUri/setup.py | 2 +- .../Expected/AcceptanceTests/CustomUrlPaging/setup.py | 2 +- .../_lro_with_paramaterized_endpoints.py | 2 +- .../aio/_lro_with_paramaterized_endpoints.py | 2 +- .../aio/operations/__init__.py | 2 ++ .../lrowithparameterizedendpoints/operations/__init__.py | 2 ++ .../LroWithParameterizedEndpoints/setup.py | 2 +- .../Expected/AcceptanceTests/MixedApiVersion/setup.py | 2 +- .../AcceptanceTests/PackageModeBatch/pyproject.toml | 3 ++- .../AcceptanceTests/PackageModeDataPlane/pyproject.toml | 3 ++- .../AcceptanceTests/PackageModeMgmtPlane/pyproject.toml | 3 ++- .../legacy/Expected/AcceptanceTests/Paging/setup.py | 2 +- .../securityaadswagger/_autorest_security_aad.py | 2 +- .../securityaadswagger/aio/_autorest_security_aad.py | 2 +- .../securityaadswagger/aio/operations/__init__.py | 2 ++ .../securityaadswagger/operations/__init__.py | 2 ++ .../securitykeyswagger/_autorest_security_key.py | 2 +- .../securitykeyswagger/aio/_autorest_security_key.py | 2 +- .../securitykeyswagger/aio/operations/__init__.py | 2 ++ .../securitykeyswagger/operations/__init__.py | 2 ++ .../AzureBodyDurationVersionTolerant/setup.py | 2 +- .../AzureParameterGroupingVersionTolerant/setup.py | 2 +- .../azurereportversiontolerant/_client.py | 2 +- .../azurereportversiontolerant/_operations/__init__.py | 1 + .../azurereportversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../AcceptanceTests/AzureReportVersionTolerant/setup.py | 2 +- .../CustomBaseUriVersionTolerant/setup.py | 2 +- .../CustomUrlPagingVersionTolerant/setup.py | 2 +- .../AcceptanceTests/LroPagingVersionTolerant/setup.py | 2 +- .../_client.py | 2 +- .../_operations/__init__.py | 1 + .../aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../setup.py | 2 +- .../AcceptanceTests/PagingVersionTolerant/setup.py | 2 +- .../dpgcustomizationcustomizedversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 1 + .../aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../DPGCustomizationCustomizedVersionTolerant/setup.py | 2 +- .../dpgcustomizationinitialversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 1 + .../aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../DPGCustomizationInitialVersionTolerant/setup.py | 2 +- .../DPGServiceDrivenInitialVersionTolerant/setup.py | 2 +- .../DPGServiceDrivenUpdateOneVersionTolerant/setup.py | 2 +- .../dpgtestmodelsversiontolerant/_client.py | 2 +- .../dpgtestmodelsversiontolerant/_operations/__init__.py | 1 + .../dpgtestmodelsversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../DPGTestModelsVersionTolerant/setup.py | 2 +- .../AcceptanceTests/Multiapi/multiapi/v0/__init__.py | 3 --- .../Multiapi/multiapi/v0/_configuration.py | 4 ++-- .../AcceptanceTests/Multiapi/multiapi/v0/_version.py | 9 --------- .../Multiapi/multiapi/v0/aio/_configuration.py | 4 ++-- .../AcceptanceTests/Multiapi/multiapi/v1/__init__.py | 3 --- .../Multiapi/multiapi/v1/_configuration.py | 4 ++-- .../AcceptanceTests/Multiapi/multiapi/v1/_version.py | 9 --------- .../Multiapi/multiapi/v1/aio/_configuration.py | 4 ++-- .../AcceptanceTests/Multiapi/multiapi/v2/__init__.py | 3 --- .../Multiapi/multiapi/v2/_configuration.py | 4 ++-- .../AcceptanceTests/Multiapi/multiapi/v2/_version.py | 9 --------- .../Multiapi/multiapi/v2/aio/_configuration.py | 4 ++-- .../AcceptanceTests/Multiapi/multiapi/v3/__init__.py | 3 --- .../Multiapi/multiapi/v3/_configuration.py | 4 ++-- .../AcceptanceTests/Multiapi/multiapi/v3/_version.py | 9 --------- .../Multiapi/multiapi/v3/aio/_configuration.py | 4 ++-- .../multiapicredentialdefaultpolicy/v1/__init__.py | 3 --- .../multiapicredentialdefaultpolicy/v1/_configuration.py | 2 +- .../multiapicredentialdefaultpolicy/v1/_version.py | 9 --------- .../v1/aio/_configuration.py | 2 +- .../multiapicredentialdefaultpolicy/v2/__init__.py | 3 --- .../multiapicredentialdefaultpolicy/v2/_configuration.py | 2 +- .../multiapicredentialdefaultpolicy/v2/_version.py | 9 --------- .../v2/aio/_configuration.py | 2 +- .../multiapicredentialdefaultpolicy/v3/__init__.py | 3 --- .../multiapicredentialdefaultpolicy/v3/_configuration.py | 2 +- .../multiapicredentialdefaultpolicy/v3/_version.py | 9 --------- .../v3/aio/_configuration.py | 2 +- .../multiapicustombaseurl/v1/__init__.py | 3 --- .../multiapicustombaseurl/v1/_configuration.py | 4 ++-- .../multiapicustombaseurl/v1/_version.py | 9 --------- .../multiapicustombaseurl/v1/aio/_configuration.py | 4 ++-- .../multiapicustombaseurl/v2/__init__.py | 3 --- .../multiapicustombaseurl/v2/_configuration.py | 4 ++-- .../multiapicustombaseurl/v2/_version.py | 9 --------- .../multiapicustombaseurl/v2/aio/_configuration.py | 4 ++-- .../MultiapiDataPlane/multiapidataplane/v1/__init__.py | 3 --- .../multiapidataplane/v1/_configuration.py | 4 ++-- .../MultiapiDataPlane/multiapidataplane/v1/_version.py | 9 --------- .../multiapidataplane/v1/aio/_configuration.py | 4 ++-- .../MultiapiDataPlane/multiapidataplane/v2/__init__.py | 3 --- .../multiapidataplane/v2/_configuration.py | 4 ++-- .../MultiapiDataPlane/multiapidataplane/v2/_version.py | 9 --------- .../multiapidataplane/v2/aio/_configuration.py | 4 ++-- .../MultiapiDataPlane/multiapidataplane/v3/__init__.py | 3 --- .../multiapidataplane/v3/_configuration.py | 4 ++-- .../MultiapiDataPlane/multiapidataplane/v3/_version.py | 9 --------- .../multiapidataplane/v3/aio/_configuration.py | 4 ++-- .../multiapikeywordonly/v1/__init__.py | 3 --- .../multiapikeywordonly/v1/_configuration.py | 4 ++-- .../multiapikeywordonly/v1/_version.py | 9 --------- .../multiapikeywordonly/v1/aio/_configuration.py | 4 ++-- .../multiapikeywordonly/v2/__init__.py | 3 --- .../multiapikeywordonly/v2/_configuration.py | 4 ++-- .../multiapikeywordonly/v2/_version.py | 9 --------- .../multiapikeywordonly/v2/aio/_configuration.py | 4 ++-- .../multiapikeywordonly/v3/__init__.py | 3 --- .../multiapikeywordonly/v3/_configuration.py | 4 ++-- .../multiapikeywordonly/v3/_version.py | 9 --------- .../multiapikeywordonly/v3/aio/_configuration.py | 4 ++-- .../MultiapiNoAsync/multiapinoasync/v1/__init__.py | 3 --- .../MultiapiNoAsync/multiapinoasync/v1/_configuration.py | 4 ++-- .../MultiapiNoAsync/multiapinoasync/v1/_version.py | 9 --------- .../MultiapiNoAsync/multiapinoasync/v2/__init__.py | 3 --- .../MultiapiNoAsync/multiapinoasync/v2/_configuration.py | 4 ++-- .../MultiapiNoAsync/multiapinoasync/v2/_version.py | 9 --------- .../MultiapiNoAsync/multiapinoasync/v3/__init__.py | 3 --- .../MultiapiNoAsync/multiapinoasync/v3/_configuration.py | 4 ++-- .../MultiapiNoAsync/multiapinoasync/v3/_version.py | 9 --------- .../MultiapiSecurity/multiapisecurity/v0/__init__.py | 3 --- .../multiapisecurity/v0/_configuration.py | 4 ++-- .../MultiapiSecurity/multiapisecurity/v0/_version.py | 9 --------- .../multiapisecurity/v0/aio/_configuration.py | 4 ++-- .../MultiapiSecurity/multiapisecurity/v1/__init__.py | 3 --- .../multiapisecurity/v1/_configuration.py | 4 ++-- .../MultiapiSecurity/multiapisecurity/v1/_version.py | 9 --------- .../multiapisecurity/v1/aio/_configuration.py | 4 ++-- .../multiapiwithsubmodule/submodule/v1/__init__.py | 3 --- .../multiapiwithsubmodule/submodule/v1/_configuration.py | 4 ++-- .../multiapiwithsubmodule/submodule/v1/_version.py | 9 --------- .../submodule/v1/aio/_configuration.py | 4 ++-- .../multiapiwithsubmodule/submodule/v2/__init__.py | 3 --- .../multiapiwithsubmodule/submodule/v2/_configuration.py | 4 ++-- .../multiapiwithsubmodule/submodule/v2/_version.py | 9 --------- .../submodule/v2/aio/_configuration.py | 4 ++-- .../multiapiwithsubmodule/submodule/v3/__init__.py | 3 --- .../multiapiwithsubmodule/submodule/v3/_configuration.py | 4 ++-- .../multiapiwithsubmodule/submodule/v3/_version.py | 9 --------- .../submodule/v3/aio/_configuration.py | 4 ++-- .../AcceptanceTests/AdditionalProperties/setup.py | 2 +- .../Anything/anything/_anything_client.py | 2 +- .../Anything/anything/aio/_anything_client.py | 2 +- .../Anything/anything/aio/operations/__init__.py | 1 + .../Anything/anything/operations/__init__.py | 1 + .../legacy/Expected/AcceptanceTests/Anything/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyArray/setup.py | 2 +- .../BodyArrayWithNamespaceFolders/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyBinary/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyBoolean/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyByte/setup.py | 2 +- .../AcceptanceTests/BodyByteWithPackageName/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyComplex/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyDate/setup.py | 2 +- .../Expected/AcceptanceTests/BodyDateTime/setup.py | 2 +- .../AcceptanceTests/BodyDateTimeRfc1123/setup.py | 2 +- .../Expected/AcceptanceTests/BodyDictionary/setup.py | 2 +- .../Expected/AcceptanceTests/BodyDuration/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyFile/setup.py | 2 +- .../Expected/AcceptanceTests/BodyFormData/setup.py | 2 +- .../AcceptanceTests/BodyFormUrlEncodedData/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyInteger/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyNumber/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyString/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/BodyTime/setup.py | 2 +- .../ClientEnum/clientenum/_client_with_enum.py | 2 +- .../ClientEnum/clientenum/aio/_client_with_enum.py | 2 +- .../ClientEnum/clientenum/aio/operations/__init__.py | 1 + .../ClientEnum/clientenum/operations/__init__.py | 1 + .../legacy/Expected/AcceptanceTests/ClientEnum/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/Constants/setup.py | 2 +- .../Expected/AcceptanceTests/CustomBaseUri/setup.py | 2 +- .../AcceptanceTests/CustomBaseUriMoreOptions/setup.py | 2 +- .../errorwithsecrets/_error_with_secrets.py | 2 +- .../errorwithsecrets/aio/_error_with_secrets.py | 2 +- .../errorwithsecrets/aio/operations/__init__.py | 2 ++ .../errorwithsecrets/operations/__init__.py | 2 ++ .../Expected/AcceptanceTests/ErrorWithSecrets/setup.py | 2 +- .../Expected/AcceptanceTests/ExtensibleEnums/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/Header/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/Http/setup.py | 2 +- .../_incorrect_returned_error_model.py | 2 +- .../aio/_incorrect_returned_error_model.py | 2 +- .../incorrecterrorresponse/aio/operations/__init__.py | 2 ++ .../incorrecterrorresponse/operations/__init__.py | 2 ++ .../AcceptanceTests/IncorrectErrorResponse/setup.py | 2 +- .../internaloperation/_media_types_client.py | 2 +- .../internaloperation/aio/_media_types_client.py | 2 +- .../internaloperation/aio/operations/__init__.py | 2 ++ .../internaloperation/operations/__init__.py | 2 ++ .../AcceptanceTests/InternalOperation/pyproject.toml | 3 ++- .../MediaTypes/mediatypes/_media_types_client.py | 2 +- .../MediaTypes/mediatypes/aio/_media_types_client.py | 2 +- .../MediaTypes/mediatypes/aio/operations/__init__.py | 2 ++ .../MediaTypes/mediatypes/operations/__init__.py | 2 ++ .../legacy/Expected/AcceptanceTests/MediaTypes/setup.py | 2 +- .../mergepatchjson/_merge_patch_json_client.py | 2 +- .../mergepatchjson/aio/_merge_patch_json_client.py | 2 +- .../mergepatchjson/aio/operations/__init__.py | 2 ++ .../MergePatchJson/mergepatchjson/operations/__init__.py | 2 ++ .../Expected/AcceptanceTests/MergePatchJson/setup.py | 2 +- .../_auto_rest_resource_flattening_test_service.py | 4 +--- .../aio/_auto_rest_resource_flattening_test_service.py | 4 +--- .../modelflattening/aio/operations/__init__.py | 2 ++ .../modelflattening/operations/__init__.py | 2 ++ .../Expected/AcceptanceTests/ModelFlattening/setup.py | 2 +- .../_multiple_inheritance_service_client.py | 2 +- .../aio/_multiple_inheritance_service_client.py | 2 +- .../multipleinheritance/aio/operations/__init__.py | 2 ++ .../multipleinheritance/operations/__init__.py | 2 ++ .../AcceptanceTests/MultipleInheritance/setup.py | 2 +- .../Expected/AcceptanceTests/NoOperations/setup.py | 2 +- .../Expected/AcceptanceTests/NonStringEnums/setup.py | 2 +- .../ObjectType/objecttype/_object_type_client.py | 2 +- .../ObjectType/objecttype/aio/_object_type_client.py | 2 +- .../ObjectType/objecttype/aio/operations/__init__.py | 2 ++ .../ObjectType/objecttype/operations/__init__.py | 2 ++ .../legacy/Expected/AcceptanceTests/ObjectType/setup.py | 2 +- .../PackageModeDataPlane/packagemode/_anything_client.py | 2 +- .../packagemode/aio/_anything_client.py | 2 +- .../packagemode/aio/operations/__init__.py | 1 + .../packagemode/operations/__init__.py | 1 + .../AcceptanceTests/PackageModeDataPlane/pyproject.toml | 3 ++- .../AcceptanceTests/ParameterFlattening/setup.py | 2 +- .../_parmaterized_endpoint_client.py | 2 +- .../aio/_parmaterized_endpoint_client.py | 2 +- .../parameterizedendpoint/aio/operations/__init__.py | 2 ++ .../parameterizedendpoint/operations/__init__.py | 2 ++ .../AcceptanceTests/ParameterizedEndpoint/setup.py | 2 +- .../Report/report/_auto_rest_report_service.py | 2 +- .../Report/report/aio/_auto_rest_report_service.py | 2 +- .../Report/report/aio/operations/__init__.py | 2 ++ .../AcceptanceTests/Report/report/operations/__init__.py | 2 ++ .../legacy/Expected/AcceptanceTests/Report/setup.py | 2 +- .../Expected/AcceptanceTests/RequiredOptional/setup.py | 2 +- .../reservedwords/_reserved_words_client.py | 3 +-- .../reservedwords/aio/_reserved_words_client.py | 3 +-- .../reservedwords/aio/operations/__init__.py | 2 ++ .../ReservedWords/reservedwords/operations/__init__.py | 2 ++ .../Expected/AcceptanceTests/ReservedWords/setup.py | 2 +- .../securityaadswagger/_autorest_security_aad.py | 2 +- .../securityaadswagger/aio/_autorest_security_aad.py | 2 +- .../securityaadswagger/aio/operations/__init__.py | 2 ++ .../securityaadswagger/operations/__init__.py | 2 ++ .../Expected/AcceptanceTests/SecurityAadSwagger/setup.py | 2 +- .../_security_aad_swagger_credential_flag.py | 4 +--- .../aio/_security_aad_swagger_credential_flag.py | 4 +--- .../aio/operations/__init__.py | 2 ++ .../operations/__init__.py | 2 ++ .../SecurityAadSwaggerCredentialFlag/setup.py | 2 +- .../securitykeyswagger/_autorest_security_key.py | 2 +- .../securitykeyswagger/aio/_autorest_security_key.py | 2 +- .../securitykeyswagger/aio/operations/__init__.py | 2 ++ .../securitykeyswagger/operations/__init__.py | 2 ++ .../Expected/AcceptanceTests/SecurityKeySwagger/setup.py | 2 +- .../_security_key_swagger_credential_flag.py | 4 +--- .../aio/_security_key_swagger_credential_flag.py | 4 +--- .../aio/operations/__init__.py | 2 ++ .../operations/__init__.py | 2 ++ .../SecurityKeySwaggerCredentialFlag/setup.py | 2 +- .../vanilla/legacy/Expected/AcceptanceTests/Url/setup.py | 2 +- .../AcceptanceTests/UrlMultiCollectionFormat/setup.py | 2 +- .../legacy/Expected/AcceptanceTests/Validation/setup.py | 2 +- .../Validation/validation/_auto_rest_validation_test.py | 2 +- .../validation/aio/_auto_rest_validation_test.py | 2 +- .../Validation/validation/aio/operations/__init__.py | 2 ++ .../Validation/validation/operations/__init__.py | 2 ++ .../vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py | 2 +- .../Expected/AcceptanceTests/XmsErrorResponse/setup.py | 2 +- .../AdditionalPropertiesVersionTolerant/setup.py | 2 +- .../anythingversiontolerant/_client.py | 2 +- .../anythingversiontolerant/_operations/__init__.py | 1 + .../anythingversiontolerant/aio/_client.py | 2 +- .../anythingversiontolerant/aio/_operations/__init__.py | 1 + .../AcceptanceTests/AnythingVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyArrayVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyBinaryVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyBooleanVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyByteVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyComplexVersionTolerant/setup.py | 2 +- .../BodyDateTimeRfc1123VersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyDateTimeVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyDateVersionTolerant/setup.py | 2 +- .../BodyDictionaryVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyDurationVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyFileVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyFormDataVersionTolerant/setup.py | 2 +- .../BodyFormUrlEncodedDataVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyIntegerVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyNumberVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyStringVersionTolerant/setup.py | 2 +- .../AcceptanceTests/BodyTimeVersionTolerant/setup.py | 2 +- .../clientenumversiontolerant/_client.py | 2 +- .../clientenumversiontolerant/_operations/__init__.py | 1 + .../clientenumversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../AcceptanceTests/ClientEnumVersionTolerant/setup.py | 2 +- .../AcceptanceTests/ConstantsVersionTolerant/setup.py | 2 +- .../CustomBaseUriMoreOptionsVersionTolerant/setup.py | 2 +- .../CustomBaseUriVersionTolerant/setup.py | 2 +- .../errorwithsecretsversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 1 + .../errorwithsecretsversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../ErrorWithSecretsVersionTolerant/setup.py | 2 +- .../ExtensibleEnumsVersionTolerant/setup.py | 2 +- .../AcceptanceTests/HeaderVersionTolerant/setup.py | 2 +- .../AcceptanceTests/HttpVersionTolerant/setup.py | 2 +- .../incorrecterrorresponseversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 1 + .../incorrecterrorresponseversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../IncorrectErrorResponseVersionTolerant/setup.py | 2 +- .../mediatypesversiontolerant/_client.py | 2 +- .../mediatypesversiontolerant/_operations/__init__.py | 1 + .../mediatypesversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../AcceptanceTests/MediaTypesVersionTolerant/setup.py | 2 +- .../mergepatchjsonversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 1 + .../mergepatchjsonversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../MergePatchJsonVersionTolerant/setup.py | 2 +- .../modelflatteningversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 2 ++ .../modelflatteningversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 2 ++ .../ModelFlatteningVersionTolerant/setup.py | 2 +- .../multipleinheritanceversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 2 ++ .../multipleinheritanceversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 2 ++ .../MultipleInheritanceVersionTolerant/setup.py | 2 +- .../anything_client/_client.py | 2 +- .../anything_client/_operations/__init__.py | 1 + .../anything_client/aio/_client.py | 2 +- .../anything_client/aio/_operations/__init__.py | 1 + .../NoNamespaceFlagVersionTolerant/setup.py | 2 +- .../AcceptanceTests/NoOperationsVersionTolerant/setup.py | 2 +- .../NonStringEnumsVersionTolerant/setup.py | 2 +- .../objecttypeversiontolerant/_client.py | 2 +- .../objecttypeversiontolerant/_operations/__init__.py | 1 + .../objecttypeversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../AcceptanceTests/ObjectTypeVersionTolerant/setup.py | 2 +- .../ParameterFlatteningVersionTolerant/setup.py | 2 +- .../parameterizedendpointversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 1 + .../parameterizedendpointversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../ParameterizedEndpointVersionTolerant/setup.py | 2 +- .../reportversiontolerant/_client.py | 2 +- .../reportversiontolerant/_operations/__init__.py | 1 + .../reportversiontolerant/aio/_client.py | 2 +- .../reportversiontolerant/aio/_operations/__init__.py | 1 + .../AcceptanceTests/ReportVersionTolerant/setup.py | 2 +- .../RequiredOptionalVersionTolerant/setup.py | 2 +- .../reservedwordsversiontolerant/_client.py | 3 +-- .../reservedwordsversiontolerant/aio/_client.py | 3 +-- .../aio/operations/__init__.py | 1 + .../reservedwordsversiontolerant/operations/__init__.py | 1 + .../ReservedWordsVersionTolerant/setup.py | 2 +- .../securityaadswaggerversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 1 + .../securityaadswaggerversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../SecurityAadSwaggerVersionTolerant/setup.py | 2 +- .../securitykeyswaggerversiontolerant/_client.py | 2 +- .../_operations/__init__.py | 1 + .../securitykeyswaggerversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../SecurityKeySwaggerVersionTolerant/setup.py | 2 +- .../UrlMultiCollectionFormatVersionTolerant/setup.py | 2 +- .../Expected/AcceptanceTests/UrlVersionTolerant/setup.py | 2 +- .../AcceptanceTests/ValidationVersionTolerant/setup.py | 2 +- .../validationversiontolerant/_client.py | 2 +- .../validationversiontolerant/_operations/__init__.py | 1 + .../validationversiontolerant/aio/_client.py | 2 +- .../aio/_operations/__init__.py | 1 + .../Expected/AcceptanceTests/XmlVersionTolerant/setup.py | 2 +- .../XmsErrorResponseVersionTolerant/setup.py | 2 +- 397 files changed, 437 insertions(+), 590 deletions(-) delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_version.py delete mode 100644 packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_version.py diff --git a/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py b/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py index 79425cd2e78..428c81b1cfa 100644 --- a/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py +++ b/packages/autorest.python/samples/specification/azure_key_credential/generated/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/samples/specification/basic/generated/setup.py b/packages/autorest.python/samples/specification/basic/generated/setup.py index e9896b084f6..0f5b8375e0d 100644 --- a/packages/autorest.python/samples/specification/basic/generated/setup.py +++ b/packages/autorest.python/samples/specification/basic/generated/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/_client.py b/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/_client.py index 8188976d794..2419c98e18e 100644 --- a/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/_client.py +++ b/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import PollingPagingExampleConfiguration -from ._operations._operations import _PollingPagingExampleOperationsMixin +from ._operations import _PollingPagingExampleOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/_operations/__init__.py b/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/_operations/__init__.py index 780c0001fb4..410a1858101 100644 --- a/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/_operations/__init__.py +++ b/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _PollingPagingExampleOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/aio/_client.py b/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/aio/_client.py index f223df4a2b5..3a08c9ade76 100644 --- a/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/aio/_client.py +++ b/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import PollingPagingExampleConfiguration -from ._operations._operations import _PollingPagingExampleOperationsMixin +from ._operations import _PollingPagingExampleOperationsMixin class PollingPagingExample(_PollingPagingExampleOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/aio/_operations/__init__.py b/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/aio/_operations/__init__.py index 780c0001fb4..410a1858101 100644 --- a/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/aio/_operations/__init__.py +++ b/packages/autorest.python/samples/specification/directives/generated/azure/directives/sample/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _PollingPagingExampleOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/samples/specification/directives/generated/setup.py b/packages/autorest.python/samples/specification/directives/generated/setup.py index 8e362ea59d6..ea7e01374b6 100644 --- a/packages/autorest.python/samples/specification/directives/generated/setup.py +++ b/packages/autorest.python/samples/specification/directives/generated/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py index 51d310be79c..15756cd4b21 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py index 242933502fc..491a6524e3c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_auto_rest_report_service_for_azure.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_auto_rest_report_service_for_azure.py index 84c80108ded..5dff1d95aeb 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_auto_rest_report_service_for_azure.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/_auto_rest_report_service_for_azure.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import AutoRestReportServiceForAzureConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._auto_rest_report_service_for_azure_operations import _AutoRestReportServiceForAzureOperationsMixin +from .operations import _AutoRestReportServiceForAzureOperationsMixin class AutoRestReportServiceForAzure( diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/_auto_rest_report_service_for_azure.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/_auto_rest_report_service_for_azure.py index cfa94d65634..e6d325b711e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/_auto_rest_report_service_for_azure.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/_auto_rest_report_service_for_azure.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import AutoRestReportServiceForAzureConfiguration -from .operations._auto_rest_report_service_for_azure_operations import _AutoRestReportServiceForAzureOperationsMixin +from .operations import _AutoRestReportServiceForAzureOperationsMixin class AutoRestReportServiceForAzure( diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/__init__.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/__init__.py index 780c0001fb4..8e565555f11 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/__init__.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._auto_rest_report_service_for_azure_operations import _AutoRestReportServiceForAzureOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/__init__.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/__init__.py index 780c0001fb4..8e565555f11 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/__init__.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._auto_rest_report_service_for_azure_operations import _AutoRestReportServiceForAzureOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py index 424415fb046..55eda15673f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py index 776c9edb733..4d7a0828971 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py index 57aa85cce20..0c1b38c2349 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomUrlPaging/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_lro_with_paramaterized_endpoints.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_lro_with_paramaterized_endpoints.py index 6511910a6d9..f45d0e2a9ed 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_lro_with_paramaterized_endpoints.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/_lro_with_paramaterized_endpoints.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import LROWithParamaterizedEndpointsConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._lro_with_paramaterized_endpoints_operations import _LROWithParamaterizedEndpointsOperationsMixin +from .operations import _LROWithParamaterizedEndpointsOperationsMixin class LROWithParamaterizedEndpoints( diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/_lro_with_paramaterized_endpoints.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/_lro_with_paramaterized_endpoints.py index 0f250d42467..1b0af4cb569 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/_lro_with_paramaterized_endpoints.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/_lro_with_paramaterized_endpoints.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import LROWithParamaterizedEndpointsConfiguration -from .operations._lro_with_paramaterized_endpoints_operations import _LROWithParamaterizedEndpointsOperationsMixin +from .operations import _LROWithParamaterizedEndpointsOperationsMixin class LROWithParamaterizedEndpoints( diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/__init__.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/__init__.py index 780c0001fb4..50fcf9df034 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/__init__.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._lro_with_paramaterized_endpoints_operations import _LROWithParamaterizedEndpointsOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/__init__.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/__init__.py index 780c0001fb4..50fcf9df034 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/__init__.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._lro_with_paramaterized_endpoints_operations import _LROWithParamaterizedEndpointsOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py index c15e03fb538..1ee77ddd8ef 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py index c3845da1124..c2394cd9ff8 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml index 884339c4ffa..13a67155465 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.packagemode", ] diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml index 3a258f545a3..6051bac5f82 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.packagemode", ] diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml index 31584fc7312..049eb8b6399 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", "azure", "azure.package", ] diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py index 751424a3b08..eb94bdf1180 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/Paging/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py index f32364af31e..ec1c05d7b75 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py @@ -19,7 +19,7 @@ from ._configuration import AutorestSecurityAadConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._autorest_security_aad_operations import _AutorestSecurityAadOperationsMixin +from .operations import _AutorestSecurityAadOperationsMixin if TYPE_CHECKING: from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py index ebd8cbeb707..15105073115 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py @@ -19,7 +19,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutorestSecurityAadConfiguration -from .operations._autorest_security_aad_operations import _AutorestSecurityAadOperationsMixin +from .operations import _AutorestSecurityAadOperationsMixin if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/__init__.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/__init__.py index 780c0001fb4..dcfe59638f7 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/__init__.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._autorest_security_aad_operations import _AutorestSecurityAadOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/__init__.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/__init__.py index 780c0001fb4..dcfe59638f7 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/__init__.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._autorest_security_aad_operations import _AutorestSecurityAadOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py index 94e78488258..4288845f81f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py @@ -19,7 +19,7 @@ from ._configuration import AutorestSecurityKeyConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._autorest_security_key_operations import _AutorestSecurityKeyOperationsMixin +from .operations import _AutorestSecurityKeyOperationsMixin if TYPE_CHECKING: from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py index 12c53dea6a7..f013e7d0d2e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py @@ -19,7 +19,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutorestSecurityKeyConfiguration -from .operations._autorest_security_key_operations import _AutorestSecurityKeyOperationsMixin +from .operations import _AutorestSecurityKeyOperationsMixin if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/__init__.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/__init__.py index 780c0001fb4..f872338eff8 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/__init__.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._autorest_security_key_operations import _AutorestSecurityKeyOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/__init__.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/__init__.py index 780c0001fb4..f872338eff8 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/__init__.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._autorest_security_key_operations import _AutorestSecurityKeyOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py index 400b90dee36..d0c3ed5a74e 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureBodyDurationVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py index 71c9ada660d..51a6a8a3d4b 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureParameterGroupingVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_client.py index 96968ba3dd3..2e8f65f63cd 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AutoRestReportServiceForAzureConfiguration -from ._operations._operations import _AutoRestReportServiceForAzureOperationsMixin +from ._operations import _AutoRestReportServiceForAzureOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_operations/__init__.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_operations/__init__.py index 780c0001fb4..9224a4f540a 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutoRestReportServiceForAzureOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_client.py index 0600d5dd227..cd710344964 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutoRestReportServiceForAzureConfiguration -from ._operations._operations import _AutoRestReportServiceForAzureOperationsMixin +from ._operations import _AutoRestReportServiceForAzureOperationsMixin class AutoRestReportServiceForAzure( diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_operations/__init__.py index 780c0001fb4..9224a4f540a 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/azurereportversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutoRestReportServiceForAzureOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py index 7c18c0ffbd0..bbf2cb95ee9 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/AzureReportVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py index fb2cea48e37..338604a6c10 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py index ed5bc12c318..579eb7fbaa3 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/CustomUrlPagingVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py index b1a063b8890..713fc93a383 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroPagingVersionTolerant/setup.py @@ -25,7 +25,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_client.py index 5fba4956e9e..5b4f9f4dc39 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import LROWithParamaterizedEndpointsConfiguration -from ._operations._operations import _LROWithParamaterizedEndpointsOperationsMixin +from ._operations import _LROWithParamaterizedEndpointsOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_operations/__init__.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_operations/__init__.py index 780c0001fb4..1df202c162f 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _LROWithParamaterizedEndpointsOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_client.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_client.py index 0ab2f7d4103..6c69e5007f8 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import LROWithParamaterizedEndpointsConfiguration -from ._operations._operations import _LROWithParamaterizedEndpointsOperationsMixin +from ._operations import _LROWithParamaterizedEndpointsOperationsMixin class LROWithParamaterizedEndpoints( diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_operations/__init__.py index 780c0001fb4..1df202c162f 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/lrowithparameterizedendpointsversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _LROWithParamaterizedEndpointsOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py index 1a280855d1c..47d899efd1d 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/LroWithParameterizedEndpointsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py index 3331e707db0..a52e9cd12dd 100644 --- a/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py +++ b/packages/autorest.python/test/azure/version-tolerant/Expected/AcceptanceTests/PagingVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_client.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_client.py index 541e1823bc7..ede9a3fefa4 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_client.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import DPGClientConfiguration -from ._operations._operations import _DPGClientOperationsMixin +from ._operations import _DPGClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/__init__.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/__init__.py index 780c0001fb4..e3f1774ddf9 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DPGClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_client.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_client.py index 0060b04940e..048e29a8ab3 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DPGClientConfiguration -from ._operations._operations import _DPGClientOperationsMixin +from ._operations import _DPGClientOperationsMixin class DPGClient(_DPGClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_operations/__init__.py index 780c0001fb4..e3f1774ddf9 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DPGClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py index c23af9f512c..ce118ea3afe 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_client.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_client.py index 541e1823bc7..ede9a3fefa4 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_client.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import DPGClientConfiguration -from ._operations._operations import _DPGClientOperationsMixin +from ._operations import _DPGClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_operations/__init__.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_operations/__init__.py index 780c0001fb4..e3f1774ddf9 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DPGClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_client.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_client.py index 0060b04940e..048e29a8ab3 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DPGClientConfiguration -from ._operations._operations import _DPGClientOperationsMixin +from ._operations import _DPGClientOperationsMixin class DPGClient(_DPGClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_operations/__init__.py index 780c0001fb4..e3f1774ddf9 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/dpgcustomizationinitialversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DPGClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py index 889fcb7e225..ad6d7ffd1aa 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationInitialVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py index 49b4eb793d9..5f2a4244880 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py index 90ebdfbfd32..bb7ccaf45eb 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_client.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_client.py index b738389dbc7..95522248fcf 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_client.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_client.py @@ -16,7 +16,7 @@ from . import models as _models from ._configuration import DPGClientConfiguration -from ._operations._operations import _DPGClientOperationsMixin +from ._operations import _DPGClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_operations/__init__.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_operations/__init__.py index 780c0001fb4..e3f1774ddf9 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DPGClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_client.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_client.py index 0e229b84c01..bf4e449218e 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_client.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import DPGClientConfiguration -from ._operations._operations import _DPGClientOperationsMixin +from ._operations import _DPGClientOperationsMixin class DPGClient(_DPGClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_operations/__init__.py index 780c0001fb4..e3f1774ddf9 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/dpgtestmodelsversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _DPGClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py index 7b2a3db6c73..ed44d9ac989 100644 --- a/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py +++ b/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGTestModelsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py index ecc80f7e9dc..5d72190ec6e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py index e6f2c2cd3b9..cc3420f9112 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v0/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py index 8a60692e981..4d91e0a380e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py index de4929ac159..093bce4e8d9 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v1/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py index 4317efc499d..8a6a6365ac6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py index f05db5a87eb..10f716d8dd6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py index 4389e88fec4..633f146ec60 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py index 2f2ef214142..7a4058edefe 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v3/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py index f2126018371..a8be991d4c3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION +VERSION = "unknown" class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py index 3c0830ad888..c0bfc9b848e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v1/aio/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION +VERSION = "unknown" class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py index 9c3bd22c34c..0912525614d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION +VERSION = "unknown" class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py index dccea79e486..c6dedcb071d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v2/aio/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION +VERSION = "unknown" class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py index 20985e2a570..eca4a1b0a56 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION +VERSION = "unknown" class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py index 8c2188639d4..1f5ce3c0e76 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/aio/_configuration.py @@ -12,7 +12,7 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION +VERSION = "unknown" class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/__init__.py index 57348374e03..ccc133e71e1 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_custom_base_url_service_client import MultiapiCustomBaseUrlServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py index e74ffb25e51..e88c1c6d7af 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiCustomBaseUrlServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for MultiapiCustomBaseUrlServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py index 97746886abe..9915f2c2e2e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v1/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiCustomBaseUrlServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for MultiapiCustomBaseUrlServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/__init__.py index 57348374e03..ccc133e71e1 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_custom_base_url_service_client import MultiapiCustomBaseUrlServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py index 3801160ded3..5f2904887f8 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiCustomBaseUrlServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for MultiapiCustomBaseUrlServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py index a04a991dd74..0bdd1c9cfd0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiCustomBaseUrlServiceClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long """Configuration for MultiapiCustomBaseUrlServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py index f83aebfe879..09e03ece143 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py index d06af26b62b..3d6432fa758 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v1/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py index 70d30e58b22..5e60bea3540 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py index cce1169d47e..8d71e3f2f72 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v2/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py index a591f06e464..9826b12b94f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py index 34548369fc3..0b30d2372cd 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/multiapidataplane/v3/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py index 7e497208c4f..6810552fa19 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py index 8396d672d09..e704da2b33e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v1/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py index 190801b148f..74eee4f7f7d 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py index 64be1d99aaf..2faf9fb852f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v2/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py index a067ae6a497..525afec9c0b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py index e3814fcf91a..fa0ebc27201 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/multiapikeywordonly/v3/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py index e35a92c3c55..c4224d94b4c 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v1/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py index 5b58adb7276..91e7712fba7 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v2/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py index 01fbb65bf9b..74845e1428b 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/multiapinoasync/v3/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py index 41c2a19e6a2..9851b5dfa42 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py index 9c4caac31a9..74a93dfdd47 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v0/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py index fbae17e47da..ab8adb477f6 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py index 02d384eb6da..cc1b4d0032a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/multiapisecurity/v1/aio/_configuration.py @@ -10,11 +10,11 @@ from azure.core.pipeline import policies -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py index 79cff01ce59..3dd2e667247 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py index 6eb12e25bf2..d9524f4ef39 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v1/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py index 992f0cef797..ccf9343999a 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py index 0be6a998a5b..3ef47ecd0f2 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/__init__.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/__init__.py index c4dc4772677..30c0d2f93d3 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/__init__.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/__init__.py @@ -13,9 +13,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._multiapi_service_client import MultiapiServiceClient # type: ignore -from ._version import VERSION - -__version__ = VERSION try: from ._patch import __all__ as _patch_all diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py index f98a73a1362..f39362fec82 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -from ._version import VERSION - if TYPE_CHECKING: from azure.core.credentials import TokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_version.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_version.py deleted file mode 100644 index eae7c95b6fb..00000000000 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py index 32968123405..6da45f95f65 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v3/aio/_configuration.py @@ -11,11 +11,11 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -from .._version import VERSION - if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" + class MultiapiServiceClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for MultiapiServiceClient. diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py index 4e5a9cb677f..47cf0266aa5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_anything_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_anything_client.py index 006f2c9358f..c438a07d97a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_anything_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/_anything_client.py @@ -16,7 +16,7 @@ from ._configuration import AnythingClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._anything_client_operations import _AnythingClientOperationsMixin +from .operations import _AnythingClientOperationsMixin class AnythingClient(_AnythingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/_anything_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/_anything_client.py index 743b0ee9ff0..d5809c12117 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/_anything_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/_anything_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AnythingClientConfiguration -from .operations._anything_client_operations import _AnythingClientOperationsMixin +from .operations import _AnythingClientOperationsMixin class AnythingClient(_AnythingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/operations/__init__.py index 780c0001fb4..c48e66e46a5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/aio/operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._anything_client_operations import _AnythingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/operations/__init__.py index 780c0001fb4..c48e66e46a5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/anything/operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._anything_client_operations import _AnythingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py index f3f7fab84e4..bb6eb10ffb1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Anything/setup.py @@ -25,7 +25,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py index 3591d75b611..0b372010ed9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py index 3591d75b611..0b372010ed9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py index d481e6765ea..f6ea0ef3db3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py index 688f20e6e69..710fb25a269 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py index c19ff067a90..db2835edba5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py index 3adce84b2b0..57a29825cd8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py index d5fd29c14c4..4721cec833d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py index f350db858d9..6ddd0ab927d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py index a6d46ea08d1..8518627467e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py index 02600cb9476..1071478c957 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py index 57822ed5acb..6055836736b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py index 51d310be79c..15756cd4b21 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py index 3e52ce075aa..9c585bda92b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py index 45ec7dbe609..56327710926 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py index ac42ab58b6c..1f2ea30cf7e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormUrlEncodedData/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py index ffe4f7810d5..8634505177a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py index 679b4661e47..52547781c21 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py index c141bac7ab4..717b1db82e0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py index f29b3ccad04..a5aef3c794a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_client_with_enum.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_client_with_enum.py index a8f0fddc53b..8fb167cd5cc 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_client_with_enum.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/_client_with_enum.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import ClientWithEnumConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._client_with_enum_operations import _ClientWithEnumOperationsMixin +from .operations import _ClientWithEnumOperationsMixin class ClientWithEnum(_ClientWithEnumOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/_client_with_enum.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/_client_with_enum.py index 01c9daf522a..0c0898bc18d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/_client_with_enum.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/_client_with_enum.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ClientWithEnumConfiguration -from .operations._client_with_enum_operations import _ClientWithEnumOperationsMixin +from .operations import _ClientWithEnumOperationsMixin class ClientWithEnum(_ClientWithEnumOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/operations/__init__.py index 780c0001fb4..ea2450eb966 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/aio/operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._client_with_enum_operations import _ClientWithEnumOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/operations/__init__.py index 780c0001fb4..ea2450eb966 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/clientenum/operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._client_with_enum_operations import _ClientWithEnumOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py index 59fc02c049d..385a95258a2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ClientEnum/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py index 6e9e0380601..44b28ead147 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Constants/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py index 776c9edb733..4d7a0828971 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py index 1aaaed971ff..4d9f9d850fa 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_error_with_secrets.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_error_with_secrets.py index 81335e3b6cb..4c5b531c3b9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_error_with_secrets.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/_error_with_secrets.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import ErrorWithSecretsConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._error_with_secrets_operations import _ErrorWithSecretsOperationsMixin +from .operations import _ErrorWithSecretsOperationsMixin class ErrorWithSecrets(_ErrorWithSecretsOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_error_with_secrets.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_error_with_secrets.py index 0824de4725f..e9107532b78 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_error_with_secrets.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/_error_with_secrets.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ErrorWithSecretsConfiguration -from .operations._error_with_secrets_operations import _ErrorWithSecretsOperationsMixin +from .operations import _ErrorWithSecretsOperationsMixin class ErrorWithSecrets(_ErrorWithSecretsOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/__init__.py index 780c0001fb4..d9d4cd4f31d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._error_with_secrets_operations import _ErrorWithSecretsOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/__init__.py index 780c0001fb4..d9d4cd4f31d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._error_with_secrets_operations import _ErrorWithSecretsOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py index a4c461c083a..48c244969db 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py index 1c0323fca33..1ff824baed3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ExtensibleEnums/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py index 97b5c3a5b5f..5f02b77f005 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py index 29a75656e2a..8d1422cc483 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_incorrect_returned_error_model.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_incorrect_returned_error_model.py index 5ed5ae28f51..31a818b2f20 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_incorrect_returned_error_model.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/_incorrect_returned_error_model.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import IncorrectReturnedErrorModelConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._incorrect_returned_error_model_operations import _IncorrectReturnedErrorModelOperationsMixin +from .operations import _IncorrectReturnedErrorModelOperationsMixin class IncorrectReturnedErrorModel( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_incorrect_returned_error_model.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_incorrect_returned_error_model.py index 65493f690dc..92ea16b07f4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_incorrect_returned_error_model.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/_incorrect_returned_error_model.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import IncorrectReturnedErrorModelConfiguration -from .operations._incorrect_returned_error_model_operations import _IncorrectReturnedErrorModelOperationsMixin +from .operations import _IncorrectReturnedErrorModelOperationsMixin class IncorrectReturnedErrorModel( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/operations/__init__.py index 780c0001fb4..a6197fe120e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._incorrect_returned_error_model_operations import _IncorrectReturnedErrorModelOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/operations/__init__.py index 780c0001fb4..a6197fe120e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/incorrecterrorresponse/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._incorrect_returned_error_model_operations import _IncorrectReturnedErrorModelOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py index 10eb713af21..a0c9c2fa6ae 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/IncorrectErrorResponse/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_media_types_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_media_types_client.py index 6e77efb92f9..45b21a6b86f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_media_types_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/_media_types_client.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import MediaTypesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._media_types_client_operations import _MediaTypesClientOperationsMixin +from .operations import _MediaTypesClientOperationsMixin class MediaTypesClient(_MediaTypesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_media_types_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_media_types_client.py index b4f0e33926f..b0664cf4222 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_media_types_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/_media_types_client.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import MediaTypesClientConfiguration -from .operations._media_types_client_operations import _MediaTypesClientOperationsMixin +from .operations import _MediaTypesClientOperationsMixin class MediaTypesClient(_MediaTypesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/operations/__init__.py index 780c0001fb4..6fed75d54d1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._media_types_client_operations import _MediaTypesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/operations/__init__.py index 780c0001fb4..6fed75d54d1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/internaloperation/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._media_types_client_operations import _MediaTypesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml index bbb7753fe0c..206b2008c4f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_media_types_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_media_types_client.py index 6e77efb92f9..45b21a6b86f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_media_types_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/_media_types_client.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import MediaTypesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._media_types_client_operations import _MediaTypesClientOperationsMixin +from .operations import _MediaTypesClientOperationsMixin class MediaTypesClient(_MediaTypesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_media_types_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_media_types_client.py index b4f0e33926f..b0664cf4222 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_media_types_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/_media_types_client.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import MediaTypesClientConfiguration -from .operations._media_types_client_operations import _MediaTypesClientOperationsMixin +from .operations import _MediaTypesClientOperationsMixin class MediaTypesClient(_MediaTypesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/operations/__init__.py index 780c0001fb4..6fed75d54d1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._media_types_client_operations import _MediaTypesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/operations/__init__.py index 780c0001fb4..6fed75d54d1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._media_types_client_operations import _MediaTypesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py index 63f39798790..8ea6173b554 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_merge_patch_json_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_merge_patch_json_client.py index 301d215ce1c..253de12bf43 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_merge_patch_json_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/_merge_patch_json_client.py @@ -16,7 +16,7 @@ from ._configuration import MergePatchJsonClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._merge_patch_json_client_operations import _MergePatchJsonClientOperationsMixin +from .operations import _MergePatchJsonClientOperationsMixin class MergePatchJsonClient(_MergePatchJsonClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_merge_patch_json_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_merge_patch_json_client.py index 7d719145e1b..fd11c5d9fa0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_merge_patch_json_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/_merge_patch_json_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MergePatchJsonClientConfiguration -from .operations._merge_patch_json_client_operations import _MergePatchJsonClientOperationsMixin +from .operations import _MergePatchJsonClientOperationsMixin class MergePatchJsonClient(_MergePatchJsonClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/__init__.py index 780c0001fb4..f08a596f910 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._merge_patch_json_client_operations import _MergePatchJsonClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/__init__.py index 780c0001fb4..f08a596f910 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._merge_patch_json_client_operations import _MergePatchJsonClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py index 1cb779fd90d..30d0c46e62c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_auto_rest_resource_flattening_test_service.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_auto_rest_resource_flattening_test_service.py index 7176ac52e3a..ad85d39edc5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_auto_rest_resource_flattening_test_service.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/_auto_rest_resource_flattening_test_service.py @@ -17,9 +17,7 @@ from . import models as _models from ._configuration import AutoRestResourceFlatteningTestServiceConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._auto_rest_resource_flattening_test_service_operations import ( - _AutoRestResourceFlatteningTestServiceOperationsMixin, -) +from .operations import _AutoRestResourceFlatteningTestServiceOperationsMixin class AutoRestResourceFlatteningTestService( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/_auto_rest_resource_flattening_test_service.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/_auto_rest_resource_flattening_test_service.py index c2dd7f9c1a8..f0261a9dcae 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/_auto_rest_resource_flattening_test_service.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/_auto_rest_resource_flattening_test_service.py @@ -17,9 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import AutoRestResourceFlatteningTestServiceConfiguration -from .operations._auto_rest_resource_flattening_test_service_operations import ( - _AutoRestResourceFlatteningTestServiceOperationsMixin, -) +from .operations import _AutoRestResourceFlatteningTestServiceOperationsMixin class AutoRestResourceFlatteningTestService( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/__init__.py index 780c0001fb4..25291d98060 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._auto_rest_resource_flattening_test_service_operations import _AutoRestResourceFlatteningTestServiceOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/__init__.py index 780c0001fb4..25291d98060 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._auto_rest_resource_flattening_test_service_operations import _AutoRestResourceFlatteningTestServiceOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py index 1098909a796..359ec8788ed 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_multiple_inheritance_service_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_multiple_inheritance_service_client.py index 358a5885397..e80fb9ed4d6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_multiple_inheritance_service_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/_multiple_inheritance_service_client.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import MultipleInheritanceServiceClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._multiple_inheritance_service_client_operations import _MultipleInheritanceServiceClientOperationsMixin +from .operations import _MultipleInheritanceServiceClientOperationsMixin class MultipleInheritanceServiceClient( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/_multiple_inheritance_service_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/_multiple_inheritance_service_client.py index cae5d4f85ea..5f68d507b26 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/_multiple_inheritance_service_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/_multiple_inheritance_service_client.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import MultipleInheritanceServiceClientConfiguration -from .operations._multiple_inheritance_service_client_operations import _MultipleInheritanceServiceClientOperationsMixin +from .operations import _MultipleInheritanceServiceClientOperationsMixin class MultipleInheritanceServiceClient( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/__init__.py index 780c0001fb4..165bf07ebb0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._multiple_inheritance_service_client_operations import _MultipleInheritanceServiceClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/__init__.py index 780c0001fb4..165bf07ebb0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._multiple_inheritance_service_client_operations import _MultipleInheritanceServiceClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py index 24b447fd4e9..35d914c2bf6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py index bf08d4328ac..a7c6009d78e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NoOperations/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py index 99adff7d2c2..468d0bffbe6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/NonStringEnums/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_object_type_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_object_type_client.py index ae04976139a..8fddf9ee201 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_object_type_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/_object_type_client.py @@ -16,7 +16,7 @@ from ._configuration import ObjectTypeClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._object_type_client_operations import _ObjectTypeClientOperationsMixin +from .operations import _ObjectTypeClientOperationsMixin class ObjectTypeClient(_ObjectTypeClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_object_type_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_object_type_client.py index 8c3c7cb69b3..87e6eb4327e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_object_type_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/_object_type_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ObjectTypeClientConfiguration -from .operations._object_type_client_operations import _ObjectTypeClientOperationsMixin +from .operations import _ObjectTypeClientOperationsMixin class ObjectTypeClient(_ObjectTypeClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/__init__.py index 780c0001fb4..672b3b1304c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._object_type_client_operations import _ObjectTypeClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/__init__.py index 780c0001fb4..672b3b1304c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._object_type_client_operations import _ObjectTypeClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py index f81ec7c7005..b2ee93b0deb 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_anything_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_anything_client.py index 006f2c9358f..c438a07d97a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_anything_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/_anything_client.py @@ -16,7 +16,7 @@ from ._configuration import AnythingClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._anything_client_operations import _AnythingClientOperationsMixin +from .operations import _AnythingClientOperationsMixin class AnythingClient(_AnythingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_anything_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_anything_client.py index 743b0ee9ff0..d5809c12117 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_anything_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/_anything_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AnythingClientConfiguration -from .operations._anything_client_operations import _AnythingClientOperationsMixin +from .operations import _AnythingClientOperationsMixin class AnythingClient(_AnythingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/__init__.py index 780c0001fb4..c48e66e46a5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/aio/operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._anything_client_operations import _AnythingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/__init__.py index 780c0001fb4..c48e66e46a5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/packagemode/operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._anything_client_operations import _AnythingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml index 2aafcc9eabf..29069b6d3eb 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -32,7 +32,7 @@ keywords = ["azure", "azure sdk"] dependencies = [ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ] dynamic = [ @@ -49,6 +49,7 @@ readme = {file = ["README.md"], content-type = "text/markdown"} [tool.setuptools.packages.find] exclude = [ "tests*", + "samples*", ] [tool.setuptools.package-data] diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py index 558fbf1fc4e..1016d99b233 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterFlattening/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_parmaterized_endpoint_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_parmaterized_endpoint_client.py index 201c78fea11..3763a3eeb3c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_parmaterized_endpoint_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/_parmaterized_endpoint_client.py @@ -16,7 +16,7 @@ from ._configuration import ParmaterizedEndpointClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._parmaterized_endpoint_client_operations import _ParmaterizedEndpointClientOperationsMixin +from .operations import _ParmaterizedEndpointClientOperationsMixin class ParmaterizedEndpointClient( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_parmaterized_endpoint_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_parmaterized_endpoint_client.py index 84c7567c180..cfdae1b3bbe 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_parmaterized_endpoint_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/_parmaterized_endpoint_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ParmaterizedEndpointClientConfiguration -from .operations._parmaterized_endpoint_client_operations import _ParmaterizedEndpointClientOperationsMixin +from .operations import _ParmaterizedEndpointClientOperationsMixin class ParmaterizedEndpointClient( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/operations/__init__.py index 780c0001fb4..4c85d008a53 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._parmaterized_endpoint_client_operations import _ParmaterizedEndpointClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/operations/__init__.py index 780c0001fb4..4c85d008a53 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/parameterizedendpoint/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._parmaterized_endpoint_client_operations import _ParmaterizedEndpointClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py index 524ec102acd..f6180fe03c7 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ParameterizedEndpoint/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_auto_rest_report_service.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_auto_rest_report_service.py index bdf8933c44e..bc9cd7953d9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_auto_rest_report_service.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/_auto_rest_report_service.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import AutoRestReportServiceConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._auto_rest_report_service_operations import _AutoRestReportServiceOperationsMixin +from .operations import _AutoRestReportServiceOperationsMixin class AutoRestReportService( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_auto_rest_report_service.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_auto_rest_report_service.py index 9cac0168a66..5f52bc5ab59 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_auto_rest_report_service.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/_auto_rest_report_service.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import AutoRestReportServiceConfiguration -from .operations._auto_rest_report_service_operations import _AutoRestReportServiceOperationsMixin +from .operations import _AutoRestReportServiceOperationsMixin class AutoRestReportService( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/__init__.py index 780c0001fb4..d8c17ece0af 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._auto_rest_report_service_operations import _AutoRestReportServiceOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/__init__.py index 780c0001fb4..d8c17ece0af 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._auto_rest_report_service_operations import _AutoRestReportServiceOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py index f8a3dddcd1e..3b41f8a8263 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py index f924e27dfe2..ca6beb0a119 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_reserved_words_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_reserved_words_client.py index f55576850cb..e228c1534cf 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_reserved_words_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/_reserved_words_client.py @@ -17,8 +17,7 @@ from . import models as _models from ._configuration import ReservedWordsClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ImportOperations -from .operations._reserved_words_client_operations import _ReservedWordsClientOperationsMixin +from .operations import ImportOperations, _ReservedWordsClientOperationsMixin class ReservedWordsClient(_ReservedWordsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_reserved_words_client.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_reserved_words_client.py index a6b48a4e22b..7ffde0c1604 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_reserved_words_client.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/_reserved_words_client.py @@ -17,8 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ReservedWordsClientConfiguration -from .operations import ImportOperations -from .operations._reserved_words_client_operations import _ReservedWordsClientOperationsMixin +from .operations import ImportOperations, _ReservedWordsClientOperationsMixin class ReservedWordsClient(_ReservedWordsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/__init__.py index 1128e6aa1f9..b1100780b5a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,6 +14,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._import_operations_operations import ImportOperations # type: ignore +from ._reserved_words_client_operations import _ReservedWordsClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/__init__.py index 1128e6aa1f9..b1100780b5a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/reservedwords/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,6 +14,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._import_operations_operations import ImportOperations # type: ignore +from ._reserved_words_client_operations import _ReservedWordsClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py index bc83d8d534d..0c5f7a08b80 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ReservedWords/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py index 66cb731f5ef..b3f090786ca 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/_autorest_security_aad.py @@ -16,7 +16,7 @@ from ._configuration import AutorestSecurityAadConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._autorest_security_aad_operations import _AutorestSecurityAadOperationsMixin +from .operations import _AutorestSecurityAadOperationsMixin if TYPE_CHECKING: from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py index 3882c4bf512..a4a805fd14b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/_autorest_security_aad.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutorestSecurityAadConfiguration -from .operations._autorest_security_aad_operations import _AutorestSecurityAadOperationsMixin +from .operations import _AutorestSecurityAadOperationsMixin if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/__init__.py index 780c0001fb4..dcfe59638f7 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._autorest_security_aad_operations import _AutorestSecurityAadOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/__init__.py index 780c0001fb4..dcfe59638f7 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/securityaadswagger/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._autorest_security_aad_operations import _AutorestSecurityAadOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py index 19948e1caa7..09669302766 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwagger/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_security_aad_swagger_credential_flag.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_security_aad_swagger_credential_flag.py index c4fa85113da..9e0133c7581 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_security_aad_swagger_credential_flag.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/_security_aad_swagger_credential_flag.py @@ -17,9 +17,7 @@ from ._configuration import SecurityAadSwaggerCredentialFlagConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._security_aad_swagger_credential_flag_operations import ( - _SecurityAadSwaggerCredentialFlagOperationsMixin, -) +from .operations import _SecurityAadSwaggerCredentialFlagOperationsMixin class SecurityAadSwaggerCredentialFlag( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/_security_aad_swagger_credential_flag.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/_security_aad_swagger_credential_flag.py index 28729933807..cd4c8a4757e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/_security_aad_swagger_credential_flag.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/_security_aad_swagger_credential_flag.py @@ -17,9 +17,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import SecurityAadSwaggerCredentialFlagConfiguration -from .operations._security_aad_swagger_credential_flag_operations import ( - _SecurityAadSwaggerCredentialFlagOperationsMixin, -) +from .operations import _SecurityAadSwaggerCredentialFlagOperationsMixin class SecurityAadSwaggerCredentialFlag( diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/operations/__init__.py index 780c0001fb4..9cbd2b43a1e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._security_aad_swagger_credential_flag_operations import _SecurityAadSwaggerCredentialFlagOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/operations/__init__.py index 780c0001fb4..9cbd2b43a1e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/securityaadswaggercredentialflag/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._security_aad_swagger_credential_flag_operations import _SecurityAadSwaggerCredentialFlagOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py index 1e4025c78fd..7a6c48b04a5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityAadSwaggerCredentialFlag/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py index a65a092157f..99842febdd2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/_autorest_security_key.py @@ -17,7 +17,7 @@ from ._configuration import AutorestSecurityKeyConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._autorest_security_key_operations import _AutorestSecurityKeyOperationsMixin +from .operations import _AutorestSecurityKeyOperationsMixin class AutorestSecurityKey(_AutorestSecurityKeyOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py index e86249ebad6..0ab0f2d4471 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/_autorest_security_key.py @@ -17,7 +17,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutorestSecurityKeyConfiguration -from .operations._autorest_security_key_operations import _AutorestSecurityKeyOperationsMixin +from .operations import _AutorestSecurityKeyOperationsMixin class AutorestSecurityKey(_AutorestSecurityKeyOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/__init__.py index 780c0001fb4..f872338eff8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._autorest_security_key_operations import _AutorestSecurityKeyOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/__init__.py index 780c0001fb4..f872338eff8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/securitykeyswagger/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._autorest_security_key_operations import _AutorestSecurityKeyOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py index 5a5f344d2ff..1a5da5eb702 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwagger/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_security_key_swagger_credential_flag.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_security_key_swagger_credential_flag.py index 98a20c97831..7bca266e0ff 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_security_key_swagger_credential_flag.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/_security_key_swagger_credential_flag.py @@ -16,9 +16,7 @@ from ._configuration import SecurityKeySwaggerCredentialFlagConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations._security_key_swagger_credential_flag_operations import ( - _SecurityKeySwaggerCredentialFlagOperationsMixin, -) +from .operations import _SecurityKeySwaggerCredentialFlagOperationsMixin if TYPE_CHECKING: from azure.core.credentials import TokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_security_key_swagger_credential_flag.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_security_key_swagger_credential_flag.py index 9cfea59efc7..1c895c3b1af 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_security_key_swagger_credential_flag.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/_security_key_swagger_credential_flag.py @@ -16,9 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import SecurityKeySwaggerCredentialFlagConfiguration -from .operations._security_key_swagger_credential_flag_operations import ( - _SecurityKeySwaggerCredentialFlagOperationsMixin, -) +from .operations import _SecurityKeySwaggerCredentialFlagOperationsMixin if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/operations/__init__.py index 780c0001fb4..dbe2a2f33ba 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._security_key_swagger_credential_flag_operations import _SecurityKeySwaggerCredentialFlagOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/operations/__init__.py index 780c0001fb4..dbe2a2f33ba 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/securitykeyswaggercredentialflag/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._security_key_swagger_credential_flag_operations import _SecurityKeySwaggerCredentialFlagOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py index d88b08ed49f..404df69490e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/SecurityKeySwaggerCredentialFlag/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py index 9913cf9a106..187cdb27224 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py index 0aa4e4b2fb5..d2053594911 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py index 3dde62c4285..8ce4b49f0db 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_auto_rest_validation_test.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_auto_rest_validation_test.py index d08e1ac098c..c07bcf05f0a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_auto_rest_validation_test.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/_auto_rest_validation_test.py @@ -18,7 +18,7 @@ from . import models as _models from ._configuration import AutoRestValidationTestConfiguration -from .operations._auto_rest_validation_test_operations import _AutoRestValidationTestOperationsMixin +from .operations import _AutoRestValidationTestOperationsMixin class AutoRestValidationTest(_AutoRestValidationTestOperationsMixin): diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_auto_rest_validation_test.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_auto_rest_validation_test.py index 5309f605187..ced893f7b63 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_auto_rest_validation_test.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/_auto_rest_validation_test.py @@ -18,7 +18,7 @@ from .. import models as _models from ._configuration import AutoRestValidationTestConfiguration -from .operations._auto_rest_validation_test_operations import _AutoRestValidationTestOperationsMixin +from .operations import _AutoRestValidationTestOperationsMixin class AutoRestValidationTest(_AutoRestValidationTestOperationsMixin): diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/__init__.py index 780c0001fb4..2010082e93b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._auto_rest_validation_test_operations import _AutoRestValidationTestOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/__init__.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/__init__.py index 780c0001fb4..2010082e93b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._auto_rest_validation_test_operations import _AutoRestValidationTestOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py index c320e2f7335..8fe420604c0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py index 63298db94cb..248f4c69e70 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "msrest>=0.7.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py index 5a40fcb0ab8..642d461eba5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AdditionalPropertiesVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_client.py index a39ac1281fa..b41d8770ed1 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AnythingClientConfiguration -from ._operations._operations import _AnythingClientOperationsMixin +from ._operations import _AnythingClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_operations/__init__.py index 780c0001fb4..0a5424f09bc 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AnythingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_client.py index c5c5a605f5b..3e1e99cf700 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AnythingClientConfiguration -from ._operations._operations import _AnythingClientOperationsMixin +from ._operations import _AnythingClientOperationsMixin class AnythingClient(_AnythingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_operations/__init__.py index 780c0001fb4..0a5424f09bc 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/anythingversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AnythingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py index 30034d83c6d..a00f3df8565 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/AnythingVersionTolerant/setup.py @@ -25,7 +25,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py index 3288447fb8a..29b80f7204b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyArrayVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py index 5f06103f0e9..6b3c9ca511a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBinaryVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py index 242a9371671..772657e6eec 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyBooleanVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py index 3d7baf22ccd..5c18edfe438 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyByteVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py index e1cc3889509..6c91ee01007 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyComplexVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py index ea37e96529b..45492e2a325 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeRfc1123VersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py index 3772b30b471..50a84f06f94 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateTimeVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py index c487af06187..d3ff914750d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDateVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py index f6386b0f2e0..c7bf4b52cee 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDictionaryVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py index 400b90dee36..d0c3ed5a74e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyDurationVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py index 29134ca1b10..e48bd3448d3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFileVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py index 7f7d419fd79..d9edffbaa85 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormDataVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py index daa487136fa..9c5567b14db 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyFormUrlEncodedDataVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py index 293e7858e06..fc4ec79cf88 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyIntegerVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py index 3c3b3e2d3b3..b9a14d7bbff 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyNumberVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py index 5443f89a881..ba2c8cd85d2 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyStringVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py index 8197d64f66f..12076cfd876 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/BodyTimeVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_client.py index 247fddfb5af..c3211a06fb5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_client.py @@ -16,7 +16,7 @@ from . import models as _models from ._configuration import ClientWithEnumConfiguration -from ._operations._operations import _ClientWithEnumOperationsMixin +from ._operations import _ClientWithEnumOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_operations/__init__.py index 780c0001fb4..55a0cefe57a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ClientWithEnumOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_client.py index cc3883eb1e5..d0158eb6ea1 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_client.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ClientWithEnumConfiguration -from ._operations._operations import _ClientWithEnumOperationsMixin +from ._operations import _ClientWithEnumOperationsMixin class ClientWithEnum(_ClientWithEnumOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_operations/__init__.py index 780c0001fb4..55a0cefe57a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/clientenumversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ClientWithEnumOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py index 8807d0de347..16a672dae72 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ClientEnumVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py index 43ab422bc31..1b1238c4e80 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ConstantsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py index 1dc42f910a7..d1cf9202418 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriMoreOptionsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py index fb2cea48e37..338604a6c10 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/CustomBaseUriVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_client.py index 3123207ace5..4af0cfe098a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ErrorWithSecretsConfiguration -from ._operations._operations import _ErrorWithSecretsOperationsMixin +from ._operations import _ErrorWithSecretsOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_operations/__init__.py index 780c0001fb4..6c8dbd8582e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ErrorWithSecretsOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_client.py index 8831440b294..3aa219f73fc 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ErrorWithSecretsConfiguration -from ._operations._operations import _ErrorWithSecretsOperationsMixin +from ._operations import _ErrorWithSecretsOperationsMixin class ErrorWithSecrets(_ErrorWithSecretsOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_operations/__init__.py index 780c0001fb4..6c8dbd8582e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/errorwithsecretsversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ErrorWithSecretsOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py index e3c2ed83aac..4b98d36dc2d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ErrorWithSecretsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py index ce05cbf78c7..c65f7d5e648 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ExtensibleEnumsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py index a474e0ff66a..7cda9127987 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HeaderVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py index f87eb21c235..4c5d756cde7 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_client.py index 608c1fb8681..d3743eba56a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import IncorrectReturnedErrorModelConfiguration -from ._operations._operations import _IncorrectReturnedErrorModelOperationsMixin +from ._operations import _IncorrectReturnedErrorModelOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_operations/__init__.py index 780c0001fb4..bebcb6ceae2 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _IncorrectReturnedErrorModelOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_client.py index f7f55e04e29..a5b3e353d96 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import IncorrectReturnedErrorModelConfiguration -from ._operations._operations import _IncorrectReturnedErrorModelOperationsMixin +from ._operations import _IncorrectReturnedErrorModelOperationsMixin class IncorrectReturnedErrorModel( diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_operations/__init__.py index 780c0001fb4..bebcb6ceae2 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/incorrecterrorresponseversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _IncorrectReturnedErrorModelOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py index 07a3372ab15..3ac2c69baa5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/IncorrectErrorResponseVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_client.py index 9f090c1d9db..f752c6d9e60 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import MediaTypesClientConfiguration -from ._operations._operations import _MediaTypesClientOperationsMixin +from ._operations import _MediaTypesClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_operations/__init__.py index 780c0001fb4..844e82a2d12 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MediaTypesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_client.py index dc2a8d64e8e..11b5a12188e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MediaTypesClientConfiguration -from ._operations._operations import _MediaTypesClientOperationsMixin +from ._operations import _MediaTypesClientOperationsMixin class MediaTypesClient(_MediaTypesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/__init__.py index 780c0001fb4..844e82a2d12 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/mediatypesversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MediaTypesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py index 57fd24719cd..7ba79b9305c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MediaTypesVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_client.py index fda55f360a2..20e877c0b22 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import MergePatchJsonClientConfiguration -from ._operations._operations import _MergePatchJsonClientOperationsMixin +from ._operations import _MergePatchJsonClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_operations/__init__.py index 780c0001fb4..3ee3933e967 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MergePatchJsonClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_client.py index 27918df50fc..384b27ba68a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MergePatchJsonClientConfiguration -from ._operations._operations import _MergePatchJsonClientOperationsMixin +from ._operations import _MergePatchJsonClientOperationsMixin class MergePatchJsonClient(_MergePatchJsonClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_operations/__init__.py index 780c0001fb4..3ee3933e967 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/mergepatchjsonversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MergePatchJsonClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py index 9a3d60523aa..b2d6af8b535 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MergePatchJsonVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_client.py index 6f4e2192f60..f5d261d711c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AutoRestResourceFlatteningTestServiceConfiguration -from ._operations._operations import _AutoRestResourceFlatteningTestServiceOperationsMixin +from ._operations import _AutoRestResourceFlatteningTestServiceOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_operations/__init__.py index 780c0001fb4..08ea37c94d6 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/_operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutoRestResourceFlatteningTestServiceOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_client.py index 55078bb695e..929bb1f41f2 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutoRestResourceFlatteningTestServiceConfiguration -from ._operations._operations import _AutoRestResourceFlatteningTestServiceOperationsMixin +from ._operations import _AutoRestResourceFlatteningTestServiceOperationsMixin class AutoRestResourceFlatteningTestService( diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_operations/__init__.py index 780c0001fb4..08ea37c94d6 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/modelflatteningversiontolerant/aio/_operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutoRestResourceFlatteningTestServiceOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py index 468ba5f8987..46fbc9fdfa3 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ModelFlatteningVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_client.py index fa349e1860b..609ff124903 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import MultipleInheritanceServiceClientConfiguration -from ._operations._operations import _MultipleInheritanceServiceClientOperationsMixin +from ._operations import _MultipleInheritanceServiceClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/__init__.py index 780c0001fb4..685d9dfe021 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/_operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MultipleInheritanceServiceClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_client.py index ebb08e52d95..de05c306e6b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MultipleInheritanceServiceClientConfiguration -from ._operations._operations import _MultipleInheritanceServiceClientOperationsMixin +from ._operations import _MultipleInheritanceServiceClientOperationsMixin class MultipleInheritanceServiceClient( diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_operations/__init__.py index 780c0001fb4..685d9dfe021 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/multipleinheritanceversiontolerant/aio/_operations/__init__.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -12,6 +13,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _MultipleInheritanceServiceClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py index ba3246fc65e..2f48c7e0516 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/MultipleInheritanceVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_client.py index a39ac1281fa..b41d8770ed1 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AnythingClientConfiguration -from ._operations._operations import _AnythingClientOperationsMixin +from ._operations import _AnythingClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_operations/__init__.py index 780c0001fb4..0a5424f09bc 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AnythingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_client.py index c5c5a605f5b..3e1e99cf700 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AnythingClientConfiguration -from ._operations._operations import _AnythingClientOperationsMixin +from ._operations import _AnythingClientOperationsMixin class AnythingClient(_AnythingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_operations/__init__.py index 780c0001fb4..0a5424f09bc 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/anything_client/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AnythingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py index f50b4996cda..eccb2a05e54 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoNamespaceFlagVersionTolerant/setup.py @@ -25,7 +25,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py index 6c90c5c86c5..b3487080877 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NoOperationsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py index 7676cfb4f96..182b19dba6a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/NonStringEnumsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_client.py index 3e2ed1a2fb5..60e3abbc949 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ObjectTypeClientConfiguration -from ._operations._operations import _ObjectTypeClientOperationsMixin +from ._operations import _ObjectTypeClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/__init__.py index 780c0001fb4..6a54c47f919 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ObjectTypeClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_client.py index d62ca3a998a..f734bc8d17a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ObjectTypeClientConfiguration -from ._operations._operations import _ObjectTypeClientOperationsMixin +from ._operations import _ObjectTypeClientOperationsMixin class ObjectTypeClient(_ObjectTypeClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_operations/__init__.py index 780c0001fb4..6a54c47f919 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ObjectTypeClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py index 10d2ca3d6be..457b8cba33a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py index b95414e70ea..3f206e3aff4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterFlatteningVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_client.py index 2275d87a1c5..e50ae5856e1 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import ParmaterizedEndpointClientConfiguration -from ._operations._operations import _ParmaterizedEndpointClientOperationsMixin +from ._operations import _ParmaterizedEndpointClientOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_operations/__init__.py index 780c0001fb4..514e40fd8e2 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ParmaterizedEndpointClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_client.py index 5d99e9494c6..94266f15b2e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ParmaterizedEndpointClientConfiguration -from ._operations._operations import _ParmaterizedEndpointClientOperationsMixin +from ._operations import _ParmaterizedEndpointClientOperationsMixin class ParmaterizedEndpointClient( diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_operations/__init__.py index 780c0001fb4..514e40fd8e2 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/parameterizedendpointversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _ParmaterizedEndpointClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py index 2ae7effd091..d199dd15c22 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ParameterizedEndpointVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_client.py index 5fe3d7c1c19..228f73091da 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AutoRestReportServiceConfiguration -from ._operations._operations import _AutoRestReportServiceOperationsMixin +from ._operations import _AutoRestReportServiceOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_operations/__init__.py index 780c0001fb4..8526370726c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutoRestReportServiceOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_client.py index def3b566304..ec5d9e205a4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutoRestReportServiceConfiguration -from ._operations._operations import _AutoRestReportServiceOperationsMixin +from ._operations import _AutoRestReportServiceOperationsMixin class AutoRestReportService( diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_operations/__init__.py index 780c0001fb4..8526370726c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/reportversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutoRestReportServiceOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py index e844f289d7e..23874f3e77e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReportVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py index 5d78d91beec..693900e99bd 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_client.py index 6b192d7d79f..0137d708ad4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/_client.py @@ -16,8 +16,7 @@ from ._configuration import ReservedWordsClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ImportOperations -from .operations._operations import _ReservedWordsClientOperationsMixin +from .operations import ImportOperations, _ReservedWordsClientOperationsMixin class ReservedWordsClient(_ReservedWordsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_client.py index 9a8134ef2dd..1ea8bf14580 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/_client.py @@ -16,8 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ReservedWordsClientConfiguration -from .operations import ImportOperations -from .operations._operations import _ReservedWordsClientOperationsMixin +from .operations import ImportOperations, _ReservedWordsClientOperationsMixin class ReservedWordsClient(_ReservedWordsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/operations/__init__.py index ec4bc540d37..f88ab5ba2d9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/aio/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import ImportOperations # type: ignore +from ._operations import _ReservedWordsClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/operations/__init__.py index ec4bc540d37..f88ab5ba2d9 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/reservedwordsversiontolerant/operations/__init__.py @@ -13,6 +13,7 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import ImportOperations # type: ignore +from ._operations import _ReservedWordsClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py index 1282c0d24d0..37ead6e1cf4 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ReservedWordsVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_client.py index 388047eeac2..9bcb74f47ba 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AutorestSecurityAadConfiguration -from ._operations._operations import _AutorestSecurityAadOperationsMixin +from ._operations import _AutorestSecurityAadOperationsMixin from ._utils.serialization import Deserializer, Serializer if TYPE_CHECKING: diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_operations/__init__.py index 780c0001fb4..39bfe540693 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutorestSecurityAadOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_client.py index 2c9e8203ec9..9a29253e761 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutorestSecurityAadConfiguration -from ._operations._operations import _AutorestSecurityAadOperationsMixin +from ._operations import _AutorestSecurityAadOperationsMixin if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_operations/__init__.py index 780c0001fb4..39bfe540693 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/securityaadswaggerversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutorestSecurityAadOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py index 5b88f7f5b54..f683594bb0e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityAadSwaggerVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_client.py index 3c29fc509fd..0592cd3398e 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_client.py @@ -16,7 +16,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AutorestSecurityKeyConfiguration -from ._operations._operations import _AutorestSecurityKeyOperationsMixin +from ._operations import _AutorestSecurityKeyOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_operations/__init__.py index 780c0001fb4..7dc01734d62 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutorestSecurityKeyOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_client.py index fe4f2cadd4c..90f527366d5 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_client.py @@ -17,7 +17,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutorestSecurityKeyConfiguration -from ._operations._operations import _AutorestSecurityKeyOperationsMixin +from ._operations import _AutorestSecurityKeyOperationsMixin class AutorestSecurityKey(_AutorestSecurityKeyOperationsMixin): # pylint: disable=client-accepts-api-version-keyword diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_operations/__init__.py index 780c0001fb4..7dc01734d62 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/securitykeyswaggerversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutorestSecurityKeyOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py index 83c81bb0cf6..13ecf83f551 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/SecurityKeySwaggerVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py index 7816f0697d0..39f5df43dac 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlMultiCollectionFormatVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py index fdc3396da09..9585bd7f48d 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/UrlVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py index 9508ff2fc4e..ddb58e0200a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_client.py index 5524cd6b37b..1f16ab1576a 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import HttpRequest, HttpResponse from ._configuration import AutoRestValidationTestConfiguration -from ._operations._operations import _AutoRestValidationTestOperationsMixin +from ._operations import _AutoRestValidationTestOperationsMixin from ._utils.serialization import Deserializer, Serializer diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_operations/__init__.py index 780c0001fb4..2349c330a33 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutoRestValidationTestOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_client.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_client.py index 86fd2c656cb..2e16a97e67c 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_client.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_client.py @@ -16,7 +16,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AutoRestValidationTestConfiguration -from ._operations._operations import _AutoRestValidationTestOperationsMixin +from ._operations import _AutoRestValidationTestOperationsMixin class AutoRestValidationTest(_AutoRestValidationTestOperationsMixin): diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_operations/__init__.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_operations/__init__.py index 780c0001fb4..2349c330a33 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_operations/__init__.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/ValidationVersionTolerant/validationversiontolerant/aio/_operations/__init__.py @@ -12,6 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import +from ._operations import _AutoRestValidationTestOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all from ._patch import * diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py index 24bc8897ffd..c67c714be3b 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py index 7dde5c58c42..3089e889215 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmsErrorResponseVersionTolerant/setup.py @@ -24,7 +24,7 @@ include_package_data=True, install_requires=[ "isodate>=0.6.1", - "azure-core>=1.30.0", + "azure-core>=1.35.0", "typing-extensions>=4.6.0", ], long_description="""\ From d947921dc3a7b41c782f23ad72e5ed3855a9587b Mon Sep 17 00:00:00 2001 From: swathipil Date: Wed, 30 Jul 2025 13:09:00 -0700 Subject: [PATCH 24/48] remove setup.py file --- packages/autorest.python/autorest/__init__.py | 11 +++++++++++ packages/autorest.python/autorest/codegen.py | 1 + 2 files changed, 12 insertions(+) diff --git a/packages/autorest.python/autorest/__init__.py b/packages/autorest.python/autorest/__init__.py index 0d83c0de77d..df2be39e1e1 100644 --- a/packages/autorest.python/autorest/__init__.py +++ b/packages/autorest.python/autorest/__init__.py @@ -28,6 +28,17 @@ def read_file(self, path: Union[str, Path]) -> str: def write_file(self, filename: Union[str, Path], file_content: str) -> None: return self._autorestapi.write_file(filename, file_content) + def remove_file(self, filename: Union[str, Path]) -> None: + try: + # Get the output folder from AutoRest configuration to resolve against the correct base + output_folder = self._autorestapi.get_value("outputFolderUri") + # Convert URI to file system path by removing file:// prefix if present + file_path = Path(output_folder.lstrip("file:")) / Path(filename) + if file_path.is_file(): + file_path.unlink() + except (FileNotFoundError, OSError): + pass + def list_file(self) -> List[str]: return self._autorestapi.list_inputs() diff --git a/packages/autorest.python/autorest/codegen.py b/packages/autorest.python/autorest/codegen.py index 8ef85a6b5a9..13dad505c97 100644 --- a/packages/autorest.python/autorest/codegen.py +++ b/packages/autorest.python/autorest/codegen.py @@ -64,6 +64,7 @@ def get_options(self) -> Dict[str, Any]: "no-async": self._autorestapi.get_boolean_value("no-async"), "no-namespace-folders": self._autorestapi.get_boolean_value("no-namespace-folders"), "basic-setup-py": self._autorestapi.get_boolean_value("basic-setup-py"), + "keep-setup-py": self._autorestapi.get_boolean_value("keep-setup-py"), "package-name": self._autorestapi.get_value("package-name"), "package-version": self._autorestapi.get_value("package-version"), "client-side-validation": self._autorestapi.get_boolean_value("client-side-validation"), From 3001d71e09c3694e18ffb0bd46cbe52752c54474 Mon Sep 17 00:00:00 2001 From: swathipil Date: Wed, 30 Jul 2025 13:29:25 -0700 Subject: [PATCH 25/48] read from correct path for autorest --- packages/autorest.python/autorest/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/autorest.python/autorest/__init__.py b/packages/autorest.python/autorest/__init__.py index df2be39e1e1..d4cee52b162 100644 --- a/packages/autorest.python/autorest/__init__.py +++ b/packages/autorest.python/autorest/__init__.py @@ -22,6 +22,11 @@ def __init__(self, *, output_folder: Union[str, Path], autorestapi: AutorestAPI) super().__init__(output_folder=output_folder) self._autorestapi = autorestapi + def get_output_folder(self) -> str: + # Get the output folder from AutoRest configuration to resolve against the correct base and + # convert URI to file system path by removing file:// prefix if present + return self._autorestapi.get_value("outputFolderUri").lstrip("file:") + def read_file(self, path: Union[str, Path]) -> str: return self._autorestapi.read_file(path) @@ -30,10 +35,7 @@ def write_file(self, filename: Union[str, Path], file_content: str) -> None: def remove_file(self, filename: Union[str, Path]) -> None: try: - # Get the output folder from AutoRest configuration to resolve against the correct base - output_folder = self._autorestapi.get_value("outputFolderUri") - # Convert URI to file system path by removing file:// prefix if present - file_path = Path(output_folder.lstrip("file:")) / Path(filename) + file_path = self.get_output_folder() / Path(filename) if file_path.is_file(): file_path.unlink() except (FileNotFoundError, OSError): From f8e96e6366156a4e72104ee9402edf68f2eac2e3 Mon Sep 17 00:00:00 2001 From: swathipil Date: Wed, 30 Jul 2025 13:52:34 -0700 Subject: [PATCH 26/48] mypy --- packages/autorest.python/autorest/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/autorest.python/autorest/__init__.py b/packages/autorest.python/autorest/__init__.py index d4cee52b162..b71e984d4ad 100644 --- a/packages/autorest.python/autorest/__init__.py +++ b/packages/autorest.python/autorest/__init__.py @@ -22,10 +22,10 @@ def __init__(self, *, output_folder: Union[str, Path], autorestapi: AutorestAPI) super().__init__(output_folder=output_folder) self._autorestapi = autorestapi - def get_output_folder(self) -> str: + def get_output_folder(self) -> Path: # Get the output folder from AutoRest configuration to resolve against the correct base and # convert URI to file system path by removing file:// prefix if present - return self._autorestapi.get_value("outputFolderUri").lstrip("file:") + return Path(self._autorestapi.get_value("outputFolderUri").lstrip("file:")) def read_file(self, path: Union[str, Path]) -> str: return self._autorestapi.read_file(path) From a00325e7d4a6dbdc6e0830b04a429923e16115a3 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Wed, 30 Jul 2025 21:04:46 +0000 Subject: [PATCH 27/48] Update dependencies --- packages/autorest.python/package.json | 4 ++-- packages/typespec-python/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 5039a4a03ff..0d387e381de 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDE4Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" @@ -47,4 +47,4 @@ "requirements.txt", "generator/" ] -} +} \ No newline at end of file diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 41cb50b78db..30def202bac 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDE4Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { @@ -103,4 +103,4 @@ "chalk": "5.3.0", "@types/fs-extra": "11.0.4" } -} +} \ No newline at end of file From c737cf6828e3f5309ec4f6c08ab4856ad6362ba0 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Wed, 30 Jul 2025 21:33:05 +0000 Subject: [PATCH 28/48] Update dependencies --- packages/autorest.python/package.json | 2 +- packages/typespec-python/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index f904d569551..99f68f3dad9 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDE4Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 4c18c1fc106..ca3f5c53269 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDE4Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { From c1f0deb76c68e7a5ee29adb574757524adf44cb7 Mon Sep 17 00:00:00 2001 From: swathipil Date: Wed, 30 Jul 2025 14:42:14 -0700 Subject: [PATCH 29/48] update pnpm-lock file --- pnpm-lock.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6f02f3712d..dbf46d07233 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1668,9 +1668,9 @@ packages: peerDependencies: '@typespec/compiler': ^1.2.1 - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz': - resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz} - version: 0.14.0 + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz} + version: 0.14.1 engines: {node: '>=20.0.0'} peerDependencies: '@azure-tools/typespec-autorest': '>=0.58.0 <1.0.0' @@ -6422,7 +6422,7 @@ snapshots: dependencies: '@typespec/compiler': 1.2.1(@types/node@22.13.17) - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE0ODczNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.0.tgz(iurth4uuk4s6znzuuc7ncenk2q)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q)': dependencies: '@azure-tools/typespec-autorest': 0.58.0(vddu6w2yloigenmssnpyjivoim) '@azure-tools/typespec-azure-core': 0.58.0(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))(@typespec/rest@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))) From b43821bfcf577dcc7ee1b61e7cfa6e2d9f09e8e7 Mon Sep 17 00:00:00 2001 From: swathipil Date: Wed, 30 Jul 2025 15:58:36 -0700 Subject: [PATCH 30/48] update typespec-python pyproject.toml files for python 3.13 --- .../test/azure/generated/authentication-api-key/pyproject.toml | 1 + .../azure/generated/authentication-http-custom/pyproject.toml | 1 + .../test/azure/generated/authentication-oauth2/pyproject.toml | 1 + .../test/azure/generated/authentication-union/pyproject.toml | 1 + .../generated/azure-client-generator-core-access/pyproject.toml | 1 + .../pyproject.toml | 1 + .../azure-client-generator-core-client-location/pyproject.toml | 1 + .../pyproject.toml | 1 + .../azure-client-generator-core-flatten-property/pyproject.toml | 1 + .../azure-client-generator-core-override/pyproject.toml | 1 + .../generated/azure-client-generator-core-usage/pyproject.toml | 1 + .../test/azure/generated/azure-core-basic/pyproject.toml | 1 + .../test/azure/generated/azure-core-lro-rpc/pyproject.toml | 1 + .../test/azure/generated/azure-core-lro-standard/pyproject.toml | 1 + .../test/azure/generated/azure-core-model/pyproject.toml | 1 + .../test/azure/generated/azure-core-page/pyproject.toml | 1 + .../test/azure/generated/azure-core-scalar/pyproject.toml | 1 + .../test/azure/generated/azure-core-traits/pyproject.toml | 1 + .../test/azure/generated/azure-encode-duration/pyproject.toml | 1 + .../test/azure/generated/azure-example-basic/pyproject.toml | 1 + .../test/azure/generated/azure-payload-pageable/pyproject.toml | 1 + .../azure-resource-manager-common-properties/pyproject.toml | 1 + .../generated/azure-resource-manager-large-header/pyproject.toml | 1 + .../generated/azure-resource-manager-non-resource/pyproject.toml | 1 + .../azure-resource-manager-operation-templates/pyproject.toml | 1 + .../generated/azure-resource-manager-resources/pyproject.toml | 1 + .../azure-special-headers-client-request-id/pyproject.toml | 1 + .../test/azure/generated/client-namespace/pyproject.toml | 1 + .../test/azure/generated/client-naming/pyproject.toml | 1 + .../test/azure/generated/client-structure-default/pyproject.toml | 1 + .../azure/generated/client-structure-multiclient/pyproject.toml | 1 + .../generated/client-structure-renamedoperation/pyproject.toml | 1 + .../generated/client-structure-twooperationgroup/pyproject.toml | 1 + .../test/azure/generated/encode-bytes/pyproject.toml | 1 + .../test/azure/generated/encode-datetime/pyproject.toml | 1 + .../test/azure/generated/encode-duration/pyproject.toml | 1 + .../test/azure/generated/encode-numeric/pyproject.toml | 1 + .../test/azure/generated/headasbooleanfalse/pyproject.toml | 1 + .../test/azure/generated/headasbooleantrue/pyproject.toml | 1 + .../test/azure/generated/parameters-basic/pyproject.toml | 1 + .../azure/generated/parameters-body-optionality/pyproject.toml | 1 + .../azure/generated/parameters-collection-format/pyproject.toml | 1 + .../test/azure/generated/parameters-path/pyproject.toml | 1 + .../test/azure/generated/parameters-spread/pyproject.toml | 1 + .../azure/generated/payload-content-negotiation/pyproject.toml | 1 + .../test/azure/generated/payload-json-merge-patch/pyproject.toml | 1 + .../test/azure/generated/payload-media-type/pyproject.toml | 1 + .../test/azure/generated/payload-multipart/pyproject.toml | 1 + .../test/azure/generated/payload-pageable/pyproject.toml | 1 + .../test/azure/generated/payload-xml/pyproject.toml | 1 + .../test/azure/generated/resiliency-srv-driven1/pyproject.toml | 1 + .../test/azure/generated/resiliency-srv-driven2/pyproject.toml | 1 + .../azure/generated/response-status-code-range/pyproject.toml | 1 + .../typespec-python/test/azure/generated/routes/pyproject.toml | 1 + .../generated/serialization-encoded-name-json/pyproject.toml | 1 + .../azure/generated/server-endpoint-not-defined/pyproject.toml | 1 + .../test/azure/generated/server-path-multiple/pyproject.toml | 1 + .../test/azure/generated/server-path-single/pyproject.toml | 1 + .../azure/generated/server-versions-not-versioned/pyproject.toml | 1 + .../azure/generated/server-versions-versioned/pyproject.toml | 1 + .../generated/special-headers-conditional-request/pyproject.toml | 1 + .../azure/generated/special-headers-repeatability/pyproject.toml | 1 + .../test/azure/generated/special-words/pyproject.toml | 1 + .../test/azure/generated/streaming-jsonl/pyproject.toml | 1 + .../test/azure/generated/typetest-array/pyproject.toml | 1 + .../test/azure/generated/typetest-dictionary/pyproject.toml | 1 + .../test/azure/generated/typetest-enum-extensible/pyproject.toml | 1 + .../test/azure/generated/typetest-enum-fixed/pyproject.toml | 1 + .../test/azure/generated/typetest-model-empty/pyproject.toml | 1 + .../generated/typetest-model-enumdiscriminator/pyproject.toml | 1 + .../generated/typetest-model-nesteddiscriminator/pyproject.toml | 1 + .../generated/typetest-model-notdiscriminated/pyproject.toml | 1 + .../test/azure/generated/typetest-model-recursive/pyproject.toml | 1 + .../generated/typetest-model-singlediscriminator/pyproject.toml | 1 + .../test/azure/generated/typetest-model-usage/pyproject.toml | 1 + .../azure/generated/typetest-model-visibility/pyproject.toml | 1 + .../typetest-property-additionalproperties/pyproject.toml | 1 + .../azure/generated/typetest-property-nullable/pyproject.toml | 1 + .../azure/generated/typetest-property-optional/pyproject.toml | 1 + .../azure/generated/typetest-property-valuetypes/pyproject.toml | 1 + .../test/azure/generated/typetest-scalar/pyproject.toml | 1 + .../test/azure/generated/typetest-union/pyproject.toml | 1 + .../test/azure/generated/versioning-added/pyproject.toml | 1 + .../test/azure/generated/versioning-madeoptional/pyproject.toml | 1 + .../test/azure/generated/versioning-removed/pyproject.toml | 1 + .../test/azure/generated/versioning-renamedfrom/pyproject.toml | 1 + .../generated/versioning-returntypechangedfrom/pyproject.toml | 1 + .../azure/generated/versioning-typechangedfrom/pyproject.toml | 1 + .../unbranded/generated/authentication-api-key/pyproject.toml | 1 + .../generated/authentication-http-custom/pyproject.toml | 1 + .../unbranded/generated/authentication-oauth2/pyproject.toml | 1 + .../test/unbranded/generated/authentication-union/pyproject.toml | 1 + .../test/unbranded/generated/encode-bytes/pyproject.toml | 1 + .../test/unbranded/generated/encode-datetime/pyproject.toml | 1 + .../test/unbranded/generated/encode-duration/pyproject.toml | 1 + .../test/unbranded/generated/encode-numeric/pyproject.toml | 1 + .../test/unbranded/generated/headasbooleanfalse/pyproject.toml | 1 + .../test/unbranded/generated/headasbooleantrue/pyproject.toml | 1 + .../test/unbranded/generated/parameters-basic/pyproject.toml | 1 + .../generated/parameters-body-optionality/pyproject.toml | 1 + .../generated/parameters-collection-format/pyproject.toml | 1 + .../test/unbranded/generated/parameters-path/pyproject.toml | 1 + .../test/unbranded/generated/parameters-spread/pyproject.toml | 1 + .../generated/payload-content-negotiation/pyproject.toml | 1 + .../unbranded/generated/payload-json-merge-patch/pyproject.toml | 1 + .../test/unbranded/generated/payload-media-type/pyproject.toml | 1 + .../test/unbranded/generated/payload-multipart/pyproject.toml | 1 + .../test/unbranded/generated/payload-pageable/pyproject.toml | 1 + .../test/unbranded/generated/payload-xml/pyproject.toml | 1 + .../generated/response-status-code-range/pyproject.toml | 1 + .../test/unbranded/generated/routes/pyproject.toml | 1 + .../generated/serialization-encoded-name-json/pyproject.toml | 1 + .../generated/server-endpoint-not-defined/pyproject.toml | 1 + .../test/unbranded/generated/server-path-multiple/pyproject.toml | 1 + .../test/unbranded/generated/server-path-single/pyproject.toml | 1 + .../generated/server-versions-not-versioned/pyproject.toml | 1 + .../unbranded/generated/server-versions-versioned/pyproject.toml | 1 + .../generated/special-headers-conditional-request/pyproject.toml | 1 + .../generated/special-headers-repeatability/pyproject.toml | 1 + .../test/unbranded/generated/special-words/pyproject.toml | 1 + .../test/unbranded/generated/streaming-jsonl/pyproject.toml | 1 + .../test/unbranded/generated/typetest-array/pyproject.toml | 1 + .../test/unbranded/generated/typetest-dictionary/pyproject.toml | 1 + .../unbranded/generated/typetest-enum-extensible/pyproject.toml | 1 + .../test/unbranded/generated/typetest-enum-fixed/pyproject.toml | 1 + .../test/unbranded/generated/typetest-model-empty/pyproject.toml | 1 + .../generated/typetest-model-enumdiscriminator/pyproject.toml | 1 + .../generated/typetest-model-nesteddiscriminator/pyproject.toml | 1 + .../generated/typetest-model-notdiscriminated/pyproject.toml | 1 + .../unbranded/generated/typetest-model-recursive/pyproject.toml | 1 + .../generated/typetest-model-singlediscriminator/pyproject.toml | 1 + .../test/unbranded/generated/typetest-model-usage/pyproject.toml | 1 + .../unbranded/generated/typetest-model-visibility/pyproject.toml | 1 + .../typetest-property-additionalproperties/pyproject.toml | 1 + .../generated/typetest-property-nullable/pyproject.toml | 1 + .../generated/typetest-property-optional/pyproject.toml | 1 + .../generated/typetest-property-valuetypes/pyproject.toml | 1 + .../test/unbranded/generated/typetest-scalar/pyproject.toml | 1 + .../test/unbranded/generated/typetest-union/pyproject.toml | 1 + .../test/unbranded/generated/versioning-added/pyproject.toml | 1 + .../unbranded/generated/versioning-madeoptional/pyproject.toml | 1 + .../test/unbranded/generated/versioning-removed/pyproject.toml | 1 + .../unbranded/generated/versioning-renamedfrom/pyproject.toml | 1 + .../generated/versioning-returntypechangedfrom/pyproject.toml | 1 + .../generated/versioning-typechangedfrom/pyproject.toml | 1 + 145 files changed, 145 insertions(+) diff --git a/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml index 481a653aece..4ac48b5af28 100644 --- a/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-api-key/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml index a4e6dde9b62..734538ef598 100644 --- a/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-http-custom/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml index c1e53d6c0a9..258f942068a 100644 --- a/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-oauth2/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml index e38bed1db07..f3fc4fe9f89 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml index f50221419d1..b0affd00ca9 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml index d23cfa192d3..756d5cc049e 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml index a2f55f0c4b3..b9a360d8439 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml index 97d82c87420..7fcf596e367 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-deserialize-empty-string-as-null/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml index 37ee3866e78..3e1d7e1ff6a 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-flatten-property/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml index dede476b4cc..9cf6a6fba54 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml index 72fb2af95d9..4fb3b637201 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml index d474d59fddc..030ec4ef6a7 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-basic/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml index 57427c4a461..e6b9ab3291d 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-rpc/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml index c1bbb56809d..40cd2dbae7e 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-lro-standard/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml index e7590e1a1c8..f944c6dd83d 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-model/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml index f48693ab434..488f66fda8b 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-page/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml index ac0dc7a3124..5d49e3d85b2 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml index 3122eeab3a6..0103442bf9b 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-core-traits/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml index 1456181a384..0bcc9ec131e 100644 --- a/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-encode-duration/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml index e64c3ea1b4d..b46a2d01643 100644 --- a/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-example-basic/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml index 72defd0031e..971d104fa10 100644 --- a/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-payload-pageable/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml index e2113d5d0bb..3ca3951b57b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml index 13f6d55676a..b8e28ac9b31 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml index e3527ed39c7..1ac5e713bff 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml index 194b585ce47..1bbfd9eea4e 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml index e97986651a3..7db00ec344a 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml index 61b6d6e0724..0219e07afd9 100644 --- a/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/azure-special-headers-client-request-id/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml b/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml index 8bb732c33b9..5a2e1ef6ee1 100644 --- a/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-namespace/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml b/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml index 530643422e4..0082571e108 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-naming/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml index e8222cce0f6..4fcc2de895a 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-structure-default/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml index caa264770e6..56d6616c068 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-structure-multiclient/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml index c271206ff33..2469c45459c 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml index d46a45f78e7..e8e3963f505 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml index b92cf83afe9..c7fa74cce92 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/encode-bytes/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml index 6588b09239d..73ce782558f 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/encode-datetime/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml index 3fb2c54085c..6b2a46023c1 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/encode-duration/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml b/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml index 7aeb9120ac6..fc5c8b1e08c 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/encode-numeric/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml b/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml index bbbdd9fbd35..2e42cb2480a 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/headasbooleanfalse/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml b/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml index 193f48b9c0b..9710e0e4a98 100644 --- a/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/headasbooleantrue/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml index 72188b0e549..e5398071929 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-basic/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml index feac487d10b..8f534019e96 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml index cb16c23e958..a749707b4d9 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml index fbfe9f2fed8..853a2bc868d 100644 --- a/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-path/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml b/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml index e9cf17414fc..66674338ccc 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/parameters-spread/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml index e4f74a833f4..06e7a72d2f9 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml index 4d86e0a2532..ec820604507 100644 --- a/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-json-merge-patch/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml index 981dd5ec4a5..be7d63ac6d5 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-media-type/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml index d970dd955bc..516f7b559bc 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-multipart/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml index c8f762397a4..f40dc75155f 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-pageable/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml b/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml index b4adcf8971c..48b2b148c64 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/payload-xml/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml index 2bd6e3dde6f..7b86ca7c3b2 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven1/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml index 62503ae2e4e..070b2bf7d01 100644 --- a/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/resiliency-srv-driven2/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml b/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml index f91fd7aa4ec..2183f5659bf 100644 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/routes/pyproject.toml b/packages/typespec-python/test/azure/generated/routes/pyproject.toml index 90374cfe53e..2bf8b4f766e 100644 --- a/packages/typespec-python/test/azure/generated/routes/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/routes/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml index 7c4297d4da3..9ef770e5ea5 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml index 97235ea0c13..1877dc386cb 100644 --- a/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-endpoint-not-defined/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml b/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml index 7ed51328284..b8719b91032 100644 --- a/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-path-multiple/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml b/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml index b62d04bbe1d..f48d72213ac 100644 --- a/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-path-single/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml index b5f889dfdd7..bd46123c28e 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-versions-not-versioned/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml b/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml index 2b6ad720d72..b18e5d97e6d 100644 --- a/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/server-versions-versioned/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml index b4430b9586f..fc5ff872550 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/special-headers-conditional-request/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml b/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml index 475012889ad..3076fadc544 100644 --- a/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/special-headers-repeatability/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/special-words/pyproject.toml b/packages/typespec-python/test/azure/generated/special-words/pyproject.toml index 2910e9f34fb..d7cce92430d 100644 --- a/packages/typespec-python/test/azure/generated/special-words/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/special-words/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml b/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml index 9ef8c4633a0..173a889ce8f 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml index fbf8e75d44d..01cba7d34a2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-array/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml index a468a09080e..4fc5954c6c8 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml index b86603fc8a6..10b911c4f1a 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml index cad824040aa..b09f9e4aa65 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml index bdeda4e3337..983221257b6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-empty/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml index 388ab338b89..9f796c7bdf7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-enumdiscriminator/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml index f8be724361e..46e529fd8d6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-nesteddiscriminator/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml index 7a00ddf371d..50b12c5f8b3 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-notdiscriminated/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml index 25703d51c90..5f54f0688d4 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-recursive/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml index 5d1600f021d..3bc86bc1b60 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-singlediscriminator/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml index 8cb506cd2f7..bd853ab5b34 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-usage/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml index 9d92833dd47..2f72113b091 100644 --- a/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-model-visibility/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml index 7148bc113b0..d1ab63f4331 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml index ddeb59c7a15..c19850b1954 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml index a30022b7175..b3aaad8d9a9 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml index 5333cea0bb9..23cb89199d7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml index 29564257a88..877dfe055b4 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml b/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml index 83c52d7a045..6591dfce217 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/typetest-union/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml index 89a81c7a58e..57673df755c 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-added/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml index 48fda2716ff..b54012b3bdb 100644 --- a/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-madeoptional/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml index 59762b8806c..8de8a69175f 100644 --- a/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-removed/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml index 57e532a342e..9383bfc97d8 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml index a9280f6baa5..8b1e3b6fb7e 100644 --- a/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-returntypechangedfrom/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml index ef5fe1f880d..4a558260bc2 100644 --- a/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/versioning-typechangedfrom/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml index 73ce718d269..5952d5e4c82 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml index b270fb32de4..3ca79881a52 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml index b3f9188dfdf..8916fa9ce60 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml index dd5d454ce7e..96d16805e15 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml index d1cc9280a9e..9d58cbe4ea3 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml index c11e7c8539f..43b1cb25c64 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml index 4f73640a9fb..16f5e06d2da 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml index 30830a5f05d..604e7969c47 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml index 413f849d138..1f3969481a7 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml index 4d75d5a83f7..26cf58a5420 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml index df6f4a5ee50..126d2dab048 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml index 75240738fb4..96322ad77c9 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml index f17403ab3d6..e6e969713bf 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml index 9006d80d8a3..8fa05062357 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml index 6e7a66c297f..1cc67beddcb 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml index 2baba256b91..0766dc3b5db 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml index 130fff2a0f7..7fccc37429f 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml index cd9f75d482a..cdd3571fe08 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml index 5aa89935d95..a2017c0066e 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml index a94b1fd6003..68c04a9658a 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml index a78893f7ed7..804bcbdf421 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml b/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml index 658e62e8e9e..2ecf5494741 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml index a550930cf3e..c07ab649a3c 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml index f3a37c74a5d..85719b8c998 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml index c232273d079..e532c145603 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml index 9fd95e94cfd..75b5b0e2a08 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml index 7f505da44ac..c7a6004af37 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml index 46c9f3a3a1c..eedc8c1a794 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml index 01cf2c34a78..0446bfb0b3b 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml index 1d32f1682d7..69b034c8639 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml index 56da3dfe494..41718458bcd 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml index 143c2214db5..4cb67576e87 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml index 9d4bfed95fa..fe1a537dd23 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml index 88d9d41c42f..8f3a289f06d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml index bb6c188b87c..321fef9258b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml index 28e678366a6..fb4a7e2042d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml index 8ab97e99232..510f325b1ac 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml index 55be2c138f9..89cca5fdd47 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml index 5244ec98e1c..b855f5c3ce2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml index 9b68c161ba1..78a227f9606 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml index c5eea408e9b..21ce680c79b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml index 0ba5e07e10e..1ead0dcefd3 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml index cd098fe3ccd..3df803c7f86 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml index 770668c10bf..33b7c685099 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml index 1c4e2a630d5..ffcdf1a1bda 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml index c2530511429..43917566e5e 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml index 88d71b90a20..a9377c60821 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml index a99b94c13d1..5cc24451150 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml index f2d7b9aac40..a890baab422 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml index ede232d7ba7..afe225a20d7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml index f899deca2a2..b7a43f50964 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml index d6c8e50e6e4..1b110bce5d8 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml index ad840f61e5e..83a0183cc5e 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml index a3d7fb43d53..b66ba5df6ea 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml index 0fa3c89f5dc..7a57efa9e10 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml index ddbd0963621..968339b15d2 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml index 4e33c27c542..064735c2bf1 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" From 017f82f00fd2298371391b2b3e77439545a10344 Mon Sep 17 00:00:00 2001 From: swathipil Date: Wed, 30 Jul 2025 16:04:03 -0700 Subject: [PATCH 31/48] update pyproject.toml for py 3.13 autorest.python --- .../Expected/AcceptanceTests/PackageModeBatch/pyproject.toml | 1 + .../Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml | 1 + .../Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml | 1 + .../Expected/AcceptanceTests/InternalOperation/pyproject.toml | 1 + .../Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml | 1 + 5 files changed, 5 insertions(+) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml index 13a67155465..d68e3b24af0 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml index 6051bac5f82..34a6e2d2813 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml index 049eb8b6399..726c0b3c86f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml index 206b2008c4f..d0b66750f1a 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/InternalOperation/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml index 29069b6d3eb..bb98eac5183 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", ] requires-python = ">=3.9" From fa8ce3aeec8dcbf01b18427f8583ada9d6a45f25 Mon Sep 17 00:00:00 2001 From: swathipil Date: Thu, 31 Jul 2025 10:37:42 -0700 Subject: [PATCH 32/48] fix expected spacing in pyproject description --- .../PackageModeBatch/pyproject.toml | 2 +- .../PackageModeDataPlane/pyproject.toml | 2 +- .../PackageModeMgmtPlane/pyproject.toml | 2 +- .../PackageModeDataPlane/pyproject.toml | 2 +- .../typespec-python/scripts/eng/regenerate.ts | 15 +++++++++++---- .../pyproject.toml | 2 +- .../pyproject.toml | 2 +- .../pyproject.toml | 2 +- .../pyproject.toml | 2 +- .../pyproject.toml | 2 +- .../pyproject.toml | 2 +- 11 files changed, 21 insertions(+), 14 deletions(-) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml index d68e3b24af0..6ee8eaad563 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeBatch/pyproject.toml @@ -14,7 +14,7 @@ name = "azure-packagemode-batch" authors = [ { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, ] -description = "Microsoft CorporationAzure Package Mode Batch Mgmt Plane Client Library for Python" +description = "Microsoft Corporation Azure Package Mode Batch Mgmt Plane Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml index 34a6e2d2813..e23a169b11c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -14,7 +14,7 @@ name = "azure-packagemode-dataplane" authors = [ { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, ] -description = "Microsoft CorporationAzure Package Mode Data Plane Client Library for Python" +description = "Microsoft Corporation Azure Package Mode Data Plane Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml index 726c0b3c86f..83c8570230b 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/PackageModeMgmtPlane/pyproject.toml @@ -14,7 +14,7 @@ name = "azure-package-mode" authors = [ { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, ] -description = "Microsoft CorporationAzure Package Mode Client Library for Python" +description = "Microsoft Corporation Azure Package Mode Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml index bb98eac5183..d74787c19a8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -14,7 +14,7 @@ name = "packagemode" authors = [ { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, ] -description = "Microsoft CorporationAzure Package Mode Client Library for Python" +description = "Microsoft Corporation Azure Package Mode Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/scripts/eng/regenerate.ts b/packages/typespec-python/scripts/eng/regenerate.ts index d6d7b81e4bc..f9f09658bfd 100644 --- a/packages/typespec-python/scripts/eng/regenerate.ts +++ b/packages/typespec-python/scripts/eng/regenerate.ts @@ -136,10 +136,17 @@ const EMITTER_OPTIONS: Record | Record Date: Thu, 31 Jul 2025 10:38:03 -0700 Subject: [PATCH 33/48] add keep setup py tests --- .../setuppy-authentication-union/CHANGELOG.md | 5 + .../setuppy-authentication-union/LICENSE | 21 + .../setuppy-authentication-union/MANIFEST.in | 7 + .../setuppy-authentication-union/README.md | 43 + .../apiview-properties.json | 9 + .../dev_requirements.txt | 3 + .../generated_tests/conftest.py | 35 + .../generated_tests/test_union.py | 31 + .../generated_tests/test_union_async.py | 32 + .../generated_tests/testpreparer.py | 24 + .../generated_tests/testpreparer_async.py | 20 + .../setuppy-authentication-union/setup.py | 72 + .../setuppy/__init__.py | 1 + .../setuppy/authentication/__init__.py | 1 + .../setuppy/authentication/union/__init__.py | 32 + .../setuppy/authentication/union/_client.py | 104 + .../authentication/union/_configuration.py | 68 + .../union/_operations/__init__.py | 23 + .../union/_operations/_operations.py | 137 ++ .../union/_operations/_patch.py | 21 + .../setuppy/authentication/union/_patch.py | 21 + .../authentication/union/_utils/__init__.py | 6 + .../authentication/union/_utils/model_base.py | 1232 ++++++++++ .../union/_utils/serialization.py | 2032 +++++++++++++++++ .../authentication/union/_utils/utils.py | 25 + .../setuppy/authentication/union/_version.py | 9 + .../authentication/union/aio/__init__.py | 29 + .../authentication/union/aio/_client.py | 106 + .../union/aio/_configuration.py | 68 + .../union/aio/_operations/__init__.py | 23 + .../union/aio/_operations/_operations.py | 123 + .../union/aio/_operations/_patch.py | 21 + .../authentication/union/aio/_patch.py | 21 + .../setuppy/authentication/union/py.typed | 1 + .../asynctests/test_authentication_async.py | 11 +- .../test_authentication.py | 12 +- .../setuppy-authentication-union/CHANGELOG.md | 5 + .../setuppy-authentication-union/MANIFEST.in | 7 + .../setuppy-authentication-union/README.md | 30 + .../setuppy-authentication-union/setup.py | 63 + .../setuppy/__init__.py | 1 + .../setuppy/authentication/__init__.py | 1 + .../setuppy/authentication/union/__init__.py | 26 + .../setuppy/authentication/union/_client.py | 91 + .../authentication/union/_configuration.py | 70 + .../union/_operations/__init__.py | 17 + .../union/_operations/_operations.py | 124 + .../union/_operations/_patch.py | 18 + .../setuppy/authentication/union/_patch.py | 18 + .../authentication/union/_utils/__init__.py | 0 .../authentication/union/_utils/model_base.py | 1226 ++++++++++ .../union/_utils/serialization.py | 2026 ++++++++++++++++ .../authentication/union/_utils/utils.py | 18 + .../setuppy/authentication/union/_version.py | 3 + .../authentication/union/aio/__init__.py | 23 + .../authentication/union/aio/_client.py | 93 + .../union/aio/_configuration.py | 70 + .../union/aio/_operations/__init__.py | 17 + .../union/aio/_operations/_operations.py | 113 + .../union/aio/_operations/_patch.py | 18 + .../authentication/union/aio/_patch.py | 18 + .../setuppy/authentication/union/py.typed | 1 + 62 files changed, 8517 insertions(+), 9 deletions(-) create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/CHANGELOG.md create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/LICENSE create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/MANIFEST.in create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/README.md create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/apiview-properties.json create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/dev_requirements.txt create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/conftest.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/test_union.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/test_union_async.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/testpreparer.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/testpreparer_async.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setup.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_client.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_configuration.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_operations.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/model_base.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/serialization.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/utils.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_version.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_client.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_configuration.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/__init__.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_operations.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_patch.py create mode 100644 packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/py.typed create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/CHANGELOG.md create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/MANIFEST.in create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/README.md create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setup.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/__init__.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/__init__.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/__init__.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_client.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_configuration.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/__init__.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_operations.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_patch.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_patch.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/__init__.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/model_base.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/serialization.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/utils.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_version.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/__init__.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_client.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_configuration.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/__init__.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_operations.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_patch.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_patch.py create mode 100644 packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/py.typed diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/CHANGELOG.md b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/CHANGELOG.md new file mode 100644 index 00000000000..628743d283a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/LICENSE b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/LICENSE new file mode 100644 index 00000000000..63447fd8bbb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/MANIFEST.in b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/MANIFEST.in new file mode 100644 index 00000000000..7a644cc6a10 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/MANIFEST.in @@ -0,0 +1,7 @@ +include *.md +include LICENSE +include setuppy/authentication/union/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include setuppy/__init__.py +include setuppy/authentication/__init__.py diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/README.md b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/README.md new file mode 100644 index 00000000000..d851b18f709 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/README.md @@ -0,0 +1,43 @@ +# Setuppy Authentication Union client library for Python + + +## Getting started + +### Install the package + +```bash +python -m pip install setuppy-authentication-union +``` + +#### Prequisites + +- Python 3.9 or later is required to use this package. +- You need an [Azure subscription][azure_sub] to use this package. +- An existing Setuppy Authentication Union instance. + + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require +you to agree to a Contributor License Agreement (CLA) declaring that you have +the right to, and actually do, grant us the rights to use your contribution. +For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether +you need to provide a CLA and decorate the PR appropriately (e.g., label, +comment). Simply follow the instructions provided by the bot. You will only +need to do this once across all repos using our CLA. + +This project has adopted the +[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, +see the Code of Conduct FAQ or contact opencode@microsoft.com with any +additional questions or comments. + + +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials +[azure_identity_pip]: https://pypi.org/project/azure-identity/ +[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential +[pip]: https://pypi.org/project/pip/ +[azure_sub]: https://azure.microsoft.com/free/ diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/apiview-properties.json b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/apiview-properties.json new file mode 100644 index 00000000000..cdb12a7f481 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/apiview-properties.json @@ -0,0 +1,9 @@ +{ + "CrossLanguagePackageId": "Authentication.Union", + "CrossLanguageDefinitionId": { + "setuppy.authentication.union.UnionClient.valid_key": "Authentication.Union.validKey", + "setuppy.authentication.union.aio.UnionClient.valid_key": "Authentication.Union.validKey", + "setuppy.authentication.union.UnionClient.valid_token": "Authentication.Union.validToken", + "setuppy.authentication.union.aio.UnionClient.valid_token": "Authentication.Union.validToken" + } +} \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/dev_requirements.txt b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/dev_requirements.txt new file mode 100644 index 00000000000..10548647144 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/dev_requirements.txt @@ -0,0 +1,3 @@ +-e ../../../tools/azure-sdk-tools +../../core/azure-core +aiohttp \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/conftest.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/conftest.py new file mode 100644 index 00000000000..5e28d6377c8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/conftest.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import os +import pytest +from dotenv import load_dotenv +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) + +load_dotenv() + + +# For security, please avoid record sensitive identity information in recordings +@pytest.fixture(scope="session", autouse=True) +def add_sanitizers(test_proxy): + union_subscription_id = os.environ.get("UNION_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + union_tenant_id = os.environ.get("UNION_TENANT_ID", "00000000-0000-0000-0000-000000000000") + union_client_id = os.environ.get("UNION_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + union_client_secret = os.environ.get("UNION_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=union_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=union_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=union_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=union_client_secret, value="00000000-0000-0000-0000-000000000000") + + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") + add_header_regex_sanitizer(key="Cookie", value="cookie;") + add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/test_union.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/test_union.py new file mode 100644 index 00000000000..fdfea7e808b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/test_union.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnion(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_valid_key(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.valid_key() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_valid_token(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.valid_token() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/test_union_async.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/test_union_async.py new file mode 100644 index 00000000000..7efe4a658f5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/test_union_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_valid_key(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.valid_key() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_valid_token(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.valid_token() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/testpreparer.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/testpreparer.py new file mode 100644 index 00000000000..3c03f7590a0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/testpreparer.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from devtools_testutils import AzureRecordedTestCase, PowerShellPreparer +import functools +from setuppy.authentication.union import UnionClient + + +class UnionClientTestBase(AzureRecordedTestCase): + + def create_client(self, endpoint): + credential = self.get_credential(UnionClient) + return self.create_client_from_credential( + UnionClient, + credential=credential, + endpoint=endpoint, + ) + + +UnionPreparer = functools.partial(PowerShellPreparer, "union", union_endpoint="https://fake_union_endpoint.com") diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/testpreparer_async.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/testpreparer_async.py new file mode 100644 index 00000000000..8df40fb02e0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/generated_tests/testpreparer_async.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from devtools_testutils import AzureRecordedTestCase +from setuppy.authentication.union.aio import UnionClient + + +class UnionClientTestBaseAsync(AzureRecordedTestCase): + + def create_async_client(self, endpoint): + credential = self.get_credential(UnionClient, is_async=True) + return self.create_client_from_credential( + UnionClient, + credential=credential, + endpoint=endpoint, + ) diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setup.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setup.py new file mode 100644 index 00000000000..d81ebf167e1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setup.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "setuppy-authentication-union" +PACKAGE_PPRINT_NAME = "Setuppy Authentication Union" +PACKAGE_NAMESPACE = "setuppy.authentication.union" + +# a.b.c => a/b/c +package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +setup( + name=PACKAGE_NAME, + version=version, + description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="Microsoft Corporation", + author_email="azpysdkhelp@microsoft.com", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", + keywords="azure, azure sdk", + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "setuppy", + "setuppy.authentication", + ] + ), + include_package_data=True, + package_data={ + "setuppy.authentication.union": ["py.typed"], + }, + install_requires=[ + "isodate>=0.6.1", + "azure-core>=1.35.0", + "typing-extensions>=4.6.0", + ], + python_requires=">=3.9", +) diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/__init__.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/__init__.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/__init__.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/__init__.py new file mode 100644 index 00000000000..acbdf9852b1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/__init__.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import UnionClient # type: ignore +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "UnionClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_client.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_client.py new file mode 100644 index 00000000000..667dadb9ad9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_client.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, TYPE_CHECKING, Union +from typing_extensions import Self + +from azure.core import PipelineClient +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies +from azure.core.rest import HttpRequest, HttpResponse + +from ._configuration import UnionClientConfiguration +from ._operations import _UnionClientOperationsMixin +from ._utils.serialization import Deserializer, Serializer + +if TYPE_CHECKING: + from azure.core.credentials import TokenCredential + + +class UnionClient(_UnionClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword + """Illustrates clients generated with ApiKey and OAuth2 authentication. + + :param credential: Credential used to authenticate requests to the service. Is either a key + credential type or a token credential type. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential or + ~azure.core.credentials.TokenCredential + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( + self, + credential: Union[AzureKeyCredential, "TokenCredential"], + *, + endpoint: str = "http://localhost:3000", + **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = UnionClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> Self: + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_configuration.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_configuration.py new file mode 100644 index 00000000000..d749c11fc49 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_configuration.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING, Union + +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies + +from ._version import VERSION + +if TYPE_CHECKING: + from azure.core.credentials import TokenCredential + + +class UnionClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for UnionClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential used to authenticate requests to the service. Is either a key + credential type or a token credential type. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential or + ~azure.core.credentials.TokenCredential + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__( + self, + credential: Union[AzureKeyCredential, "TokenCredential"], + endpoint: str = "http://localhost:3000", + **kwargs: Any, + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.endpoint = endpoint + self.credential_scopes = kwargs.pop("credential_scopes", ["https://security.microsoft.com/.default"]) + kwargs.setdefault("sdk_moniker", "setuppy-authentication-union/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _infer_policy(self, **kwargs): + if isinstance(self.credential, AzureKeyCredential): + return policies.AzureKeyCredentialPolicy(self.credential, "x-ms-api-key", **kwargs) + if hasattr(self.credential, "get_token"): + return policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + raise TypeError(f"Unsupported credential: {self.credential}") + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = self._infer_policy(**kwargs) diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/__init__.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/__init__.py new file mode 100644 index 00000000000..059fddc84ee --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import _UnionClientOperationsMixin # type: ignore # pylint: disable=unused-import + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_operations.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_operations.py new file mode 100644 index 00000000000..209472215fd --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_operations.py @@ -0,0 +1,137 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core import PipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import HttpRequest, HttpResponse +from azure.core.tracing.decorator import distributed_trace + +from .._configuration import UnionClientConfiguration +from .._utils.serialization import Serializer +from .._utils.utils import ClientMixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_union_valid_key_request(**kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/authentication/union/validkey" + + return HttpRequest(method="GET", url=_url, **kwargs) + + +def build_union_valid_token_request(**kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/authentication/union/validtoken" + + return HttpRequest(method="GET", url=_url, **kwargs) + + +class _UnionClientOperationsMixin(ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], UnionClientConfiguration]): + + @distributed_trace + def valid_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Check whether client is authenticated. + + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_union_valid_key_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def valid_token(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Check whether client is authenticated. + + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_union_valid_token_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_patch.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_patch.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/__init__.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/__init__.py new file mode 100644 index 00000000000..8026245c2ab --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/model_base.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/model_base.py new file mode 100644 index 00000000000..49d5c725938 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/model_base.py @@ -0,0 +1,1232 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +from typing_extensions import Self +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field( + attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str +) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: typing.Set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: # pylint: disable=too-many-nested-blocks + if isinstance(args[0], ET.Element): + existed_attr_keys = [] + model_meta = getattr(self, "_xml", {}) + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + if prop_meta.get("itemsName"): + xml_name = prop_meta.get("itemsName") + xml_ns = prop_meta.get("itemNs") + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = args[0].findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) + continue + + # text element is primitive type + if prop_meta.get("text", False): + if args[0].text is not None: + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = args[0].find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in args[0]: + if e.tag not in existed_attr_keys: + dict_to_pass[e.tag] = _convert_element(e) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: typing.Dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: typing.List[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + if annotation._name == "Dict": # pyright: ignore + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value) + except ValueError: + # for unknown value, return raw value + return value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, value, module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + + @property + def _class_type(self) -> typing.Any: + return getattr(self._type, "args", [None])[0] + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + item = obj.get(self._rest_name) + if item is None: + return item + if self._is_model: + return item + return _deserialize(self._type, _serialize(item, self._format), rf=self) + + def __set__(self, obj: Model, value) -> None: + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, typing.List[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + wrapped_element = _create_xml_element( + model_meta.get("name", o.__class__.__name__), + model_meta.get("prefix"), + model_meta.get("ns"), + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # if no ns for prop, use model's + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + xml_name = prop_meta.get("name", k) + if prop_meta.get("ns"): + ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore + xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore + # attribute should be primitive type + wrapped_element.set(xml_name, _get_primitive_type_value(v)) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": parent_meta.get("ns") if parent_meta else None, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[typing.Dict[str, typing.Any]], +) -> ET.Element: + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _create_xml_element(tag, prefix=None, ns=None): + if prefix and ns: + ET.register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: typing.Dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: typing.List[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/serialization.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/serialization.py new file mode 100644 index 00000000000..eb86ea23c96 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/serialization.py @@ -0,0 +1,2032 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + MutableMapping, + List, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore +from typing_extensions import Self + +from azure.core.exceptions import DeserializationError, SerializationError +from azure.core.serialization import NULL as CoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + :return: The deserialized data. + :rtype: object + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) from err + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError as err: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + +TZ_UTC = datetime.timezone.utc + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Optional[Dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to server from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: # pylint: disable=broad-exception-caught + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def from_dict( + cls, + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> Self: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str + """ + return key.replace("\\.", ".") + + +class Serializer: # pylint: disable=too-many-public-methods + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): + """Serialize data into a string according to type. + + :param object target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises SerializationError: if serialization fails. + :returns: The serialized data. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() # pylint: disable=protected-access + try: + attributes = target_obj._attribute_map # pylint: disable=protected-access + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError as err: + if isinstance(err, SerializationError): + raise + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise SerializationError(msg) from err + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access + except DeserializationError as err: + raise SerializationError("Unable to build a model: " + str(err)) from err + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param str name: The name of the query parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, list + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + do_quote = not kwargs.get("skip_quote", False) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param str name: The name of the header. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is CoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + if data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param obj data: Object to be serialized. + :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec # pylint: disable=eval-used + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param str data: Object to be serialized. + :rtype: str + :return: serialized object + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list data: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + Defaults to False. + :rtype: list, str + :return: serialized iterable + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized.append(None) + + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :rtype: dict + :return: serialized dictionary + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + :return: serialized object + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + if obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError as exc: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) from exc + + @staticmethod + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument + """Serialize bytearray into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument + """Serialize str into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Decimal object to float. + + :param decimal attr: Object to be serialized. + :rtype: float + :return: serialized decimal + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument + """Serialize long (Py2) or int (Py3). + + :param int attr: Object to be serialized. + :rtype: int/long + :return: serialized long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + :return: serialized date + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + :return: serialized time + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises TypeError: if format invalid. + :return: serialized rfc + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises SerializationError: if format invalid. + :return: serialized iso + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise SerializationError(msg) from err + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise TypeError(msg) from err + + @staticmethod + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises SerializationError: if format invalid + :return: serialied unix + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc + + +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer: + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, str): + return self.deserialize_data(data, response) + if isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None or data is CoreNull: + return data + try: + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise DeserializationError(msg) from err + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple + """ + if target is None: + return None, None + + if isinstance(target, str): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object + """ + try: + return self(target_obj, data, content_type=content_type) + except: # pylint: disable=bare-except + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties # type: ignore + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) from err + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) from exp + + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise DeserializationError(msg) from err + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. + :rtype: dict + :raises TypeError: if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, str): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :return: Deserialized basic type. + :rtype: str, int, float or bool + :raises TypeError: if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + if isinstance(attr, str): + if attr.lower() in ["true", "1"]: + return True + if attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec # pylint: disable=eval-used + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :return: Deserialized string. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + try: + return list(enum_obj.__members__.values())[data] + except IndexError as exc: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) from exc + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :return: Deserialized bytearray + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :return: Deserialized base64 string + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(str(attr)) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise DeserializationError(msg) from err + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :return: Deserialized int + :rtype: long or int + :raises ValueError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :return: Deserialized date + :rtype: Date + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=0, defaultday=0) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :return: Deserialized time + :rtype: datetime.time + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :return: Deserialized datetime + :rtype: Datetime + :raises DeserializationError: if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + attr = int(attr) + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise DeserializationError(msg) from err + return date_obj diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/utils.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/utils.py new file mode 100644 index 00000000000..35c9c836f85 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/utils.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import Generic, TYPE_CHECKING, TypeVar + +if TYPE_CHECKING: + from .serialization import Deserializer, Serializer + + +TClient = TypeVar("TClient") +TConfig = TypeVar("TConfig") + + +class ClientMixinABC(ABC, Generic[TClient, TConfig]): + """DO NOT use this class. It is for internal typing use only.""" + + _client: TClient + _config: TConfig + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_version.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_version.py new file mode 100644 index 00000000000..be71c81bd28 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/__init__.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/__init__.py new file mode 100644 index 00000000000..4e89685076c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/__init__.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import UnionClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "UnionClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_client.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_client.py new file mode 100644 index 00000000000..7bcbfc2c01d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_client.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING, Union +from typing_extensions import Self + +from azure.core import AsyncPipelineClient +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from .._utils.serialization import Deserializer, Serializer +from ._configuration import UnionClientConfiguration +from ._operations import _UnionClientOperationsMixin + +if TYPE_CHECKING: + from azure.core.credentials_async import AsyncTokenCredential + + +class UnionClient(_UnionClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword + """Illustrates clients generated with ApiKey and OAuth2 authentication. + + :param credential: Credential used to authenticate requests to the service. Is either a key + credential type or a token credential type. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential or + ~azure.core.credentials_async.AsyncTokenCredential + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( + self, + credential: Union[AzureKeyCredential, "AsyncTokenCredential"], + *, + endpoint: str = "http://localhost:3000", + **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = UnionClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + policies.RequestIdPolicy(**kwargs), + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.redirect_policy, + self._config.retry_policy, + self._config.authentication_policy, + self._config.custom_hook_policy, + self._config.logging_policy, + policies.DistributedTracingPolicy(**kwargs), + policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, + self._config.http_logging_policy, + ] + self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request( + self, request: HttpRequest, *, stream: bool = False, **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> Self: + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_configuration.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_configuration.py new file mode 100644 index 00000000000..db8cca0c74e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_configuration.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING, Union + +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import policies + +from .._version import VERSION + +if TYPE_CHECKING: + from azure.core.credentials_async import AsyncTokenCredential + + +class UnionClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for UnionClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential used to authenticate requests to the service. Is either a key + credential type or a token credential type. Required. + :type credential: ~azure.core.credentials.AzureKeyCredential or + ~azure.core.credentials_async.AsyncTokenCredential + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__( + self, + credential: Union[AzureKeyCredential, "AsyncTokenCredential"], + endpoint: str = "http://localhost:3000", + **kwargs: Any, + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.endpoint = endpoint + self.credential_scopes = kwargs.pop("credential_scopes", ["https://security.microsoft.com/.default"]) + kwargs.setdefault("sdk_moniker", "setuppy-authentication-union/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _infer_policy(self, **kwargs): + if isinstance(self.credential, AzureKeyCredential): + return policies.AzureKeyCredentialPolicy(self.credential, "x-ms-api-key", **kwargs) + if hasattr(self.credential, "get_token"): + return policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + raise TypeError(f"Unsupported credential: {self.credential}") + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = self._infer_policy(**kwargs) diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/__init__.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/__init__.py new file mode 100644 index 00000000000..059fddc84ee --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import _UnionClientOperationsMixin # type: ignore # pylint: disable=unused-import + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_operations.py new file mode 100644 index 00000000000..17ffa16469e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_operations.py @@ -0,0 +1,123 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core import AsyncPipelineClient +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ..._operations._operations import build_union_valid_key_request, build_union_valid_token_request +from ..._utils.utils import ClientMixinABC +from .._configuration import UnionClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class _UnionClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], UnionClientConfiguration] +): + + @distributed_trace_async + async def valid_key(self, **kwargs: Any) -> None: + """Check whether client is authenticated. + + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_union_valid_key_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace_async + async def valid_token(self, **kwargs: Any) -> None: + """Check whether client is authenticated. + + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_union_valid_token_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_patch.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_patch.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_patch.py new file mode 100644 index 00000000000..8bcb627aa47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_patch.py @@ -0,0 +1,21 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/py.typed b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setuppy/authentication/union/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_authentication_async.py b/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_authentication_async.py index bb92d42bc4a..357eed73603 100644 --- a/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_authentication_async.py +++ b/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_authentication_async.py @@ -8,6 +8,7 @@ from authentication.http.custom.aio import CustomClient from authentication.oauth2.aio import OAuth2Client from authentication.union.aio import UnionClient +from setuppy.authentication.union.aio import UnionClient as SetuppyUnionClient # Utilities functions @@ -99,14 +100,16 @@ async def test_oauth2_invalid(oauth2_client, core_library): @pytest.mark.asyncio -async def test_union_keyvalid(api_key_client): - client = api_key_client(UnionClient) +@pytest.mark.parametrize("union_client_type", [UnionClient, SetuppyUnionClient]) +async def test_union_keyvalid(api_key_client, union_client_type): + client = api_key_client(union_client_type) await client.valid_key() @pytest.mark.asyncio -async def test_union_tokenvalid(oauth2_client): - client = oauth2_client(UnionClient) +@pytest.mark.parametrize("union_client_type", [UnionClient, SetuppyUnionClient]) +async def test_union_tokenvalid(oauth2_client, union_client_type): + client = oauth2_client(union_client_type) await client.valid_token(enforce_https=False) diff --git a/packages/typespec-python/test/generic_mock_api_tests/test_authentication.py b/packages/typespec-python/test/generic_mock_api_tests/test_authentication.py index 5c1dc39a913..2c65431f8e8 100644 --- a/packages/typespec-python/test/generic_mock_api_tests/test_authentication.py +++ b/packages/typespec-python/test/generic_mock_api_tests/test_authentication.py @@ -7,6 +7,7 @@ from authentication.apikey import ApiKeyClient from authentication.oauth2 import OAuth2Client from authentication.union import UnionClient +from setuppy.authentication.union import UnionClient as SetuppyUnionClient from authentication.http.custom import CustomClient @@ -94,13 +95,14 @@ def test_oauth2_invalid(oauth2_client, core_library): assert ex.value.status_code == 403 -def test_union_keyvalid(api_key_client): - client = api_key_client(UnionClient) +@pytest.mark.parametrize("union_client_type", [UnionClient, SetuppyUnionClient]) +def test_union_keyvalid(api_key_client, union_client_type): + client = api_key_client(union_client_type) client.valid_key() - -def test_union_tokenvalid(oauth2_client): - client = oauth2_client(UnionClient) +@pytest.mark.parametrize("union_client_type", [UnionClient, SetuppyUnionClient]) +def test_union_tokenvalid(oauth2_client, union_client_type): + client = oauth2_client(union_client_type) client.valid_token(enforce_https=False) diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/CHANGELOG.md b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/CHANGELOG.md new file mode 100644 index 00000000000..628743d283a --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (1970-01-01) + +- Initial version diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/MANIFEST.in b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/MANIFEST.in new file mode 100644 index 00000000000..7a644cc6a10 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/MANIFEST.in @@ -0,0 +1,7 @@ +include *.md +include LICENSE +include setuppy/authentication/union/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include setuppy/__init__.py +include setuppy/authentication/__init__.py diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/README.md b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/README.md new file mode 100644 index 00000000000..12036055cd6 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/README.md @@ -0,0 +1,30 @@ +# Overview + +This package is generated by `@typespec/http-client-python` with Typespec. + +## Getting started + +### Prequisites + +- Python 3.9 or later is required to use this package. + +### Install the package + +Step into folder where setup.py is then run: + +```bash +pip install -e . +``` + +### Examples + +```python +>>> from setuppy.authentication.union import UnionClient +>>> from corehttp.exceptions import HttpResponseError + +>>> client = UnionClient(endpoint='') +>>> try: + + except HttpResponseError as e: + print('service responds error: {}'.format(e.response.json())) +``` diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setup.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setup.py new file mode 100644 index 00000000000..f18e1fd4ca4 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setup.py @@ -0,0 +1,63 @@ +# coding=utf-8 + + +import os +import re +from setuptools import setup, find_packages + + +PACKAGE_NAME = "setuppy-authentication-union" +PACKAGE_PPRINT_NAME = "Setuppy Authentication Union" +PACKAGE_NAMESPACE = "setuppy.authentication.union" + +# a.b.c => a/b/c +package_folder_path = PACKAGE_NAMESPACE.replace(".", "/") + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError("Cannot find version information") + + +setup( + name=PACKAGE_NAME, + version=version, + description=" {} Client Library for Python".format(PACKAGE_PPRINT_NAME), + long_description=open("README.md", "r").read(), + long_description_content_type="text/markdown", + license="MIT License", + author="", + classifiers=[ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: MIT License", + ], + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "setuppy", + "setuppy.authentication", + ] + ), + include_package_data=True, + package_data={ + "setuppy.authentication.union": ["py.typed"], + }, + install_requires=[ + "isodate>=0.6.1", + "corehttp[requests]>=1.0.0b6", + "typing-extensions>=4.6.0", + ], + python_requires=">=3.9", +) diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/__init__.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/__init__.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/__init__.py new file mode 100644 index 00000000000..d55ccad1f57 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/__init__.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/__init__.py new file mode 100644 index 00000000000..38921c766ab --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/__init__.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import UnionClient # type: ignore +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "UnionClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_client.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_client.py new file mode 100644 index 00000000000..171a71a4f5f --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_client.py @@ -0,0 +1,91 @@ +# coding=utf-8 + +from copy import deepcopy +from typing import Any, TYPE_CHECKING, Union +from typing_extensions import Self + +from corehttp.credentials import ServiceKeyCredential +from corehttp.rest import HttpRequest, HttpResponse +from corehttp.runtime import PipelineClient, policies + +from ._configuration import UnionClientConfiguration +from ._operations import _UnionClientOperationsMixin +from ._utils.serialization import Deserializer, Serializer + +if TYPE_CHECKING: + from corehttp.credentials import TokenCredential + + +class UnionClient(_UnionClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword + """Illustrates clients generated with ApiKey and OAuth2 authentication. + + :param credential: Credential used to authenticate requests to the service. Is either a key + credential type or a token credential type. Required. + :type credential: ~corehttp.credentials.ServiceKeyCredential or + ~corehttp.credentials.TokenCredential + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( + self, + credential: Union[ServiceKeyCredential, "TokenCredential"], + *, + endpoint: str = "http://localhost:3000", + **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = UnionClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.retry_policy, + self._config.authentication_policy, + self._config.logging_policy, + ] + self._client: PipelineClient = PipelineClient(endpoint=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from corehttp.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~corehttp.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~corehttp.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> Self: + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_configuration.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_configuration.py new file mode 100644 index 00000000000..06a2a17ea73 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 + +from typing import Any, TYPE_CHECKING, Union + +from corehttp.credentials import ServiceKeyCredential +from corehttp.runtime import policies + +from ._version import VERSION + +if TYPE_CHECKING: + from corehttp.credentials import TokenCredential + + +class UnionClientConfiguration: + """Configuration for UnionClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential used to authenticate requests to the service. Is either a key + credential type or a token credential type. Required. + :type credential: ~corehttp.credentials.ServiceKeyCredential or + ~corehttp.credentials.TokenCredential + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__( + self, + credential: Union[ServiceKeyCredential, "TokenCredential"], + endpoint: str = "http://localhost:3000", + **kwargs: Any, + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.endpoint = endpoint + self.credential_scopes = kwargs.pop("credential_scopes", ["https://security.microsoft.com/.default"]) + kwargs.setdefault("sdk_moniker", "setuppy-authentication-union/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _infer_policy(self, **kwargs): + if isinstance(self.credential, ServiceKeyCredential): + return policies.ServiceKeyCredentialPolicy(self.credential, "x-ms-api-key", **kwargs) + if hasattr(self.credential, "get_token"): + return policies.BearerTokenCredentialPolicy( + self.credential, + *self.credential_scopes, + auth_flows=[ + { + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": [{"value": "https://security.microsoft.com/.default"}], + "type": "implicit", + } + ], + **kwargs, + ) + raise TypeError(f"Unsupported credential: {self.credential}") + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = self._infer_policy(**kwargs) diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/__init__.py new file mode 100644 index 00000000000..d723b389815 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import _UnionClientOperationsMixin # type: ignore # pylint: disable=unused-import + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_operations.py new file mode 100644 index 00000000000..abcaa1b0bfe --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_operations.py @@ -0,0 +1,124 @@ +# coding=utf-8 +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar + +from corehttp.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from corehttp.rest import HttpRequest, HttpResponse +from corehttp.runtime import PipelineClient +from corehttp.runtime.pipeline import PipelineResponse + +from .._configuration import UnionClientConfiguration +from .._utils.serialization import Serializer +from .._utils.utils import ClientMixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_union_valid_key_request(**kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/authentication/union/validkey" + + return HttpRequest(method="GET", url=_url, **kwargs) + + +def build_union_valid_token_request(**kwargs: Any) -> HttpRequest: + # Construct URL + _url = "/authentication/union/validtoken" + + return HttpRequest(method="GET", url=_url, **kwargs) + + +class _UnionClientOperationsMixin(ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], UnionClientConfiguration]): + + def valid_key(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Check whether client is authenticated. + + :return: None + :rtype: None + :raises ~corehttp.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_union_valid_key_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client.pipeline.run(_request, stream=_stream, **kwargs) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + def valid_token(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Check whether client is authenticated. + + :return: None + :rtype: None + :raises ~corehttp.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_union_valid_token_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client.pipeline.run(_request, stream=_stream, **kwargs) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_patch.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_patch.py new file mode 100644 index 00000000000..894b28a174c --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_operations/_patch.py @@ -0,0 +1,18 @@ +# coding=utf-8 + +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_patch.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_patch.py new file mode 100644 index 00000000000..894b28a174c --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_patch.py @@ -0,0 +1,18 @@ +# coding=utf-8 + +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/__init__.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/model_base.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/model_base.py new file mode 100644 index 00000000000..e69ff2ca36d --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/model_base.py @@ -0,0 +1,1226 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +from typing_extensions import Self +import isodate +from corehttp.exceptions import DeserializationError +from corehttp.utils import CaseInsensitiveEnumMeta +from corehttp.runtime.pipeline import PipelineResponse +from corehttp.serialization import _Null + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field( + attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str +) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: typing.Set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass = { + rest_field._rest_name: rest_field._default + for rest_field in self._attr_to_rest_field.values() + if rest_field._default is not _UNSET + } + if args: # pylint: disable=too-many-nested-blocks + if isinstance(args[0], ET.Element): + existed_attr_keys = [] + model_meta = getattr(self, "_xml", {}) + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + if prop_meta.get("itemsName"): + xml_name = prop_meta.get("itemsName") + xml_ns = prop_meta.get("itemNs") + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = args[0].findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) + continue + + # text element is primitive type + if prop_meta.get("text", False): + if args[0].text is not None: + dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = args[0].find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in args[0]: + if e.tag not in existed_attr_keys: + dict_to_pass[e.tag] = _convert_element(e) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + super().__init__(dict_to_pass) + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: typing.Dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: typing.List[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + if annotation._name == "Dict": # pyright: ignore + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value) + except ValueError: + # for unknown value, return raw value + return value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, value, module, rf, format) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + + @property + def _class_type(self) -> typing.Any: + return getattr(self._type, "args", [None])[0] + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + item = obj.get(self._rest_name) + if item is None: + return item + if self._is_model: + return item + return _deserialize(self._type, _serialize(item, self._format), rf=self) + + def __set__(self, obj: Model, value) -> None: + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[typing.List[str]] = None, + xml: typing.Optional[typing.Dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, typing.List[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + wrapped_element = _create_xml_element( + model_meta.get("name", o.__class__.__name__), + model_meta.get("prefix"), + model_meta.get("ns"), + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # if no ns for prop, use model's + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + xml_name = prop_meta.get("name", k) + if prop_meta.get("ns"): + ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore + xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore + # attribute should be primitive type + wrapped_element.set(xml_name, _get_primitive_type_value(v)) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": parent_meta.get("ns") if parent_meta else None, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[typing.Dict[str, typing.Any]], +) -> ET.Element: + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _create_xml_element(tag, prefix=None, ns=None): + if prefix and ns: + ET.register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: typing.Dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: typing.List[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/serialization.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/serialization.py new file mode 100644 index 00000000000..99f537b5eb6 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/serialization.py @@ -0,0 +1,2026 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 + +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + MutableMapping, + List, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore +from typing_extensions import Self + +from corehttp.exceptions import DeserializationError, SerializationError +from corehttp.serialization import NULL as CoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + :return: The deserialized data. + :rtype: object + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) from err + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError as err: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise DeserializationError("XML is invalid") from err + elif content_type.startswith("text/"): + return data_as_str + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + +TZ_UTC = datetime.timezone.utc + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Optional[Dict[str, Any]] = {} + for k in kwargs: # pylint: disable=consider-using-dict-items + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to server from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: # pylint: disable=broad-exception-caught + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def from_dict( + cls, + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> Self: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises DeserializationError: if something went wrong + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str + """ + return key.replace("\\.", ".") + + +class Serializer: # pylint: disable=too-many-public-methods + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): + """Serialize data into a string according to type. + + :param object target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises SerializationError: if serialization fails. + :returns: The serialized data. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() # pylint: disable=protected-access + try: + attributes = target_obj._attribute_map # pylint: disable=protected-access + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError as err: + if isinstance(err, SerializationError): + raise + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise SerializationError(msg) from err + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access + except DeserializationError as err: + raise SerializationError("Unable to build a model: " + str(err)) from err + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param str name: The name of the query parameter. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, list + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + do_quote = not kwargs.get("skip_quote", False) + return self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param str name: The name of the header. + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is CoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + if data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param obj data: Object to be serialized. + :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec # pylint: disable=eval-used + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param str data: Object to be serialized. + :rtype: str + :return: serialized object + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list data: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + Defaults to False. + :rtype: list, str + :return: serialized iterable + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized.append(None) + + if kwargs.get("do_quote", False): + serialized = ["" if s is None else quote(str(s), safe="") for s in serialized] + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :rtype: dict + :return: serialized dictionary + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError as err: + if isinstance(err, SerializationError): + raise + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + :return: serialized object + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + if obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError as exc: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) from exc + + @staticmethod + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument + """Serialize bytearray into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument + """Serialize str into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Decimal object to float. + + :param decimal attr: Object to be serialized. + :rtype: float + :return: serialized decimal + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument + """Serialize long (Py2) or int (Py3). + + :param int attr: Object to be serialized. + :rtype: int/long + :return: serialized long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + :return: serialized date + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + :return: serialized time + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises TypeError: if format invalid. + :return: serialized rfc + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises SerializationError: if format invalid. + :return: serialized iso + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise SerializationError(msg) from err + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise TypeError(msg) from err + + @staticmethod + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises SerializationError: if format invalid + :return: serialied unix + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc + + +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer: + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, str): + return self.deserialize_data(data, response) + if isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None or data is CoreNull: + return data + try: + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise DeserializationError(msg) from err + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple + """ + if target is None: + return None, None + + if isinstance(target, str): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object + """ + try: + return self(target_obj, data, content_type=content_type) + except: # pylint: disable=bare-except + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (str, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties # type: ignore + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) from err + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) from exp + + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises DeserializationError: if deserialization fails. + :return: Deserialized object. + :rtype: object + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise DeserializationError(msg) from err + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. + :rtype: dict + :raises TypeError: if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, str): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :return: Deserialized basic type. + :rtype: str, int, float or bool + :raises TypeError: if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + if isinstance(attr, str): + if attr.lower() in ["true", "1"]: + return True + if attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec # pylint: disable=eval-used + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :return: Deserialized string. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + try: + return list(enum_obj.__members__.values())[data] + except IndexError as exc: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) from exc + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :return: Deserialized bytearray + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :return: Deserialized base64 string + :rtype: bytearray + :raises TypeError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(str(attr)) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise DeserializationError(msg) from err + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :return: Deserialized int + :rtype: long or int + :raises ValueError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :return: Deserialized date + :rtype: Date + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=0, defaultday=0) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :return: Deserialized time + :rtype: datetime.time + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime + :rtype: Datetime + :raises DeserializationError: if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :return: Deserialized datetime + :rtype: Datetime + :raises DeserializationError: if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + attr = int(attr) + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise DeserializationError(msg) from err + return date_obj diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/utils.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/utils.py new file mode 100644 index 00000000000..02aa2f816ea --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_utils/utils.py @@ -0,0 +1,18 @@ +from abc import ABC +from typing import Generic, TYPE_CHECKING, TypeVar + +if TYPE_CHECKING: + from .serialization import Deserializer, Serializer + + +TClient = TypeVar("TClient") +TConfig = TypeVar("TConfig") + + +class ClientMixinABC(ABC, Generic[TClient, TConfig]): + """DO NOT use this class. It is for internal typing use only.""" + + _client: TClient + _config: TConfig + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_version.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_version.py new file mode 100644 index 00000000000..9f6458b8cda --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/_version.py @@ -0,0 +1,3 @@ +# coding=utf-8 + +VERSION = "1.0.0b1" diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/__init__.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/__init__.py new file mode 100644 index 00000000000..291f8572d59 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import UnionClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "UnionClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_client.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_client.py new file mode 100644 index 00000000000..0ee916f5411 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_client.py @@ -0,0 +1,93 @@ +# coding=utf-8 + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING, Union +from typing_extensions import Self + +from corehttp.credentials import ServiceKeyCredential +from corehttp.rest import AsyncHttpResponse, HttpRequest +from corehttp.runtime import AsyncPipelineClient, policies + +from .._utils.serialization import Deserializer, Serializer +from ._configuration import UnionClientConfiguration +from ._operations import _UnionClientOperationsMixin + +if TYPE_CHECKING: + from corehttp.credentials import AsyncTokenCredential + + +class UnionClient(_UnionClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword + """Illustrates clients generated with ApiKey and OAuth2 authentication. + + :param credential: Credential used to authenticate requests to the service. Is either a key + credential type or a token credential type. Required. + :type credential: ~corehttp.credentials.ServiceKeyCredential or + ~corehttp.credentials.AsyncTokenCredential + :keyword endpoint: Service host. Default value is "http://localhost:3000". + :paramtype endpoint: str + """ + + def __init__( + self, + credential: Union[ServiceKeyCredential, "AsyncTokenCredential"], + *, + endpoint: str = "http://localhost:3000", + **kwargs: Any + ) -> None: + _endpoint = "{endpoint}" + self._config = UnionClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) + + _policies = kwargs.pop("policies", None) + if _policies is None: + _policies = [ + self._config.headers_policy, + self._config.user_agent_policy, + self._config.proxy_policy, + policies.ContentDecodePolicy(**kwargs), + self._config.retry_policy, + self._config.authentication_policy, + self._config.logging_policy, + ] + self._client: AsyncPipelineClient = AsyncPipelineClient(endpoint=_endpoint, policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request( + self, request: HttpRequest, *, stream: bool = False, **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from corehttp.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~corehttp.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~corehttp.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> Self: + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_configuration.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_configuration.py new file mode 100644 index 00000000000..a3de317a4f4 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 + +from typing import Any, TYPE_CHECKING, Union + +from corehttp.credentials import ServiceKeyCredential +from corehttp.runtime import policies + +from .._version import VERSION + +if TYPE_CHECKING: + from corehttp.credentials import AsyncTokenCredential + + +class UnionClientConfiguration: + """Configuration for UnionClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential used to authenticate requests to the service. Is either a key + credential type or a token credential type. Required. + :type credential: ~corehttp.credentials.ServiceKeyCredential or + ~corehttp.credentials.AsyncTokenCredential + :param endpoint: Service host. Default value is "http://localhost:3000". + :type endpoint: str + """ + + def __init__( + self, + credential: Union[ServiceKeyCredential, "AsyncTokenCredential"], + endpoint: str = "http://localhost:3000", + **kwargs: Any, + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.credential = credential + self.endpoint = endpoint + self.credential_scopes = kwargs.pop("credential_scopes", ["https://security.microsoft.com/.default"]) + kwargs.setdefault("sdk_moniker", "setuppy-authentication-union/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _infer_policy(self, **kwargs): + if isinstance(self.credential, ServiceKeyCredential): + return policies.ServiceKeyCredentialPolicy(self.credential, "x-ms-api-key", **kwargs) + if hasattr(self.credential, "get_token"): + return policies.AsyncBearerTokenCredentialPolicy( + self.credential, + *self.credential_scopes, + auth_flows=[ + { + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": [{"value": "https://security.microsoft.com/.default"}], + "type": "implicit", + } + ], + **kwargs, + ) + raise TypeError(f"Unsupported credential: {self.credential}") + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = self._infer_policy(**kwargs) diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/__init__.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/__init__.py new file mode 100644 index 00000000000..d723b389815 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import _UnionClientOperationsMixin # type: ignore # pylint: disable=unused-import + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_operations.py new file mode 100644 index 00000000000..66e4eb56094 --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_operations.py @@ -0,0 +1,113 @@ +# coding=utf-8 +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar + +from corehttp.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from corehttp.rest import AsyncHttpResponse, HttpRequest +from corehttp.runtime import AsyncPipelineClient +from corehttp.runtime.pipeline import PipelineResponse + +from ..._operations._operations import build_union_valid_key_request, build_union_valid_token_request +from ..._utils.utils import ClientMixinABC +from .._configuration import UnionClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class _UnionClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], UnionClientConfiguration] +): + + async def valid_key(self, **kwargs: Any) -> None: + """Check whether client is authenticated. + + :return: None + :rtype: None + :raises ~corehttp.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_union_valid_key_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client.pipeline.run( # type: ignore + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + async def valid_token(self, **kwargs: Any) -> None: + """Check whether client is authenticated. + + :return: None + :rtype: None + :raises ~corehttp.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_union_valid_token_request( + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client.pipeline.run( # type: ignore + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_patch.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_patch.py new file mode 100644 index 00000000000..894b28a174c --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_operations/_patch.py @@ -0,0 +1,18 @@ +# coding=utf-8 + +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_patch.py b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_patch.py new file mode 100644 index 00000000000..894b28a174c --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/aio/_patch.py @@ -0,0 +1,18 @@ +# coding=utf-8 + +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/py.typed b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/packages/typespec-python/test/unbranded/generated/setuppy-authentication-union/setuppy/authentication/union/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file From b8cbd67eba3d4f85a235bee138885244c35ecc13 Mon Sep 17 00:00:00 2001 From: swathipil Date: Thu, 31 Jul 2025 11:55:59 -0700 Subject: [PATCH 34/48] add test for checking azure-sdk-build sections aren't removed on regen --- .../authentication-union/pyproject.toml | 3 + .../unittests/test_parse_pyproject.py | 90 +++++++++++++++++++ .../authentication-union/pyproject.toml | 3 + 3 files changed, 96 insertions(+) create mode 100644 packages/typespec-python/test/generic_mock_api_tests/unittests/test_parse_pyproject.py diff --git a/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml index f3fc4fe9f89..5c8de737f76 100644 --- a/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml +++ b/packages/typespec-python/test/azure/generated/authentication-union/pyproject.toml @@ -56,3 +56,6 @@ exclude = [ [tool.setuptools.package-data] pytyped = ["py.typed"] + +[tool.azure-sdk-build] +pyright = false diff --git a/packages/typespec-python/test/generic_mock_api_tests/unittests/test_parse_pyproject.py b/packages/typespec-python/test/generic_mock_api_tests/unittests/test_parse_pyproject.py new file mode 100644 index 00000000000..f9d75c1d506 --- /dev/null +++ b/packages/typespec-python/test/generic_mock_api_tests/unittests/test_parse_pyproject.py @@ -0,0 +1,90 @@ +import importlib.metadata +import importlib.util +from pathlib import Path +from typing import Dict, Any +try: + import tomllib +except ImportError: + import tomli as tomllib + + +def check_no_setup_py(package_path: str) -> None: + """ + Check that setup.py does not exist in the package directory. + + Args: + package_path: Relative path to the package directory + + Raises: + AssertionError: If setup.py exists in the package directory + """ + package_dir = Path(__file__).parent / package_path + setup_py_path = package_dir / "setup.py" + + assert not setup_py_path.exists(), f"setup.py should not exist at {setup_py_path} when using pyproject.toml" + + +def get_pyproject_section(package_path: str, section_name: str) -> Dict[str, Any]: + """ + Get a specific section from a package's pyproject.toml file. + + Args: + package_path: Relative path to the package directory containing pyproject.toml + section_name: Dot-separated section name (e.g., "tool.azure-sdk-build") + + Returns: + Dictionary containing the section data + + Raises: + AssertionError: If pyproject.toml not found or section missing + """ + try: + # Convert to absolute path and find pyproject.toml + package_dir = Path(__file__).parent / package_path + pyproject_path = package_dir / "pyproject.toml" + + # Assert pyproject.toml exists + assert pyproject_path.exists(), f"pyproject.toml not found at {pyproject_path}" + + # Parse pyproject.toml + with open(pyproject_path, "rb") as f: + data = tomllib.load(f) + + # Check that the project name matches the folder name + if "project" in data and "name" in data["project"]: + expected_name = package_dir.name + actual_name = data["project"]["name"] + assert actual_name == expected_name, f"Project name '{actual_name}' in pyproject.toml does not match folder name '{expected_name}'" + + # Navigate to the requested section + section_parts = section_name.split(".") + current_data = data + + for part in section_parts: + assert part in current_data, f"pyproject.toml does not contain [{'.'.join(section_parts[:section_parts.index(part)+1])}] section" + current_data = current_data[part] + + return current_data + + except Exception as e: + raise AssertionError(f"Error checking pyproject.toml at '{package_path}': {e}") + +def test_azure_sdk_build(): + """Test that authentication-union packages have pyproject.toml with [tool.azure-sdk-build] pyright = false.""" + + # Need to check the file directly, since installed distribution metadata won't include custom sections. + test_paths = [ + "../../unbranded/generated/authentication-union", + "../../azure/generated/authentication-union" + ] + + for package_path in test_paths: + # First check that setup.py doesn't exist + check_no_setup_py(package_path) + + # Get the [tool.azure-sdk-build] section + azure_sdk_build = get_pyproject_section(package_path, "tool.azure-sdk-build") + + # Check for pyright = false + assert "pyright" in azure_sdk_build, f"[tool.azure-sdk-build] section does not contain 'pyright' setting in {package_path}" + assert azure_sdk_build["pyright"] is False, f"Expected pyright = false, but got pyright = {azure_sdk_build['pyright']} in {package_path}" diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml index 96d16805e15..2a3833d279e 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml @@ -46,3 +46,6 @@ exclude = [ [tool.setuptools.package-data] pytyped = ["py.typed"] + +[tool.azure-sdk-build] +pyright = false From d968d0a03d75b2bf1cd64aa967c3dba1d5d186c5 Mon Sep 17 00:00:00 2001 From: swathipil Date: Thu, 31 Jul 2025 12:57:03 -0700 Subject: [PATCH 35/48] update test readme to use relative output folder path --- .../AcceptanceTests/PackageModeDataPlane/pyproject.toml | 3 +++ .../legacy/specification/packagemodedataplane/README.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml index d74787c19a8..ac1deaa65a1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane/pyproject.toml @@ -55,3 +55,6 @@ exclude = [ [tool.setuptools.package-data] pytyped = ["py.typed"] + +[tool.azure-sdk-build] +pyright = false diff --git a/packages/autorest.python/test/vanilla/legacy/specification/packagemodedataplane/README.md b/packages/autorest.python/test/vanilla/legacy/specification/packagemodedataplane/README.md index d0643acdeeb..8abd7a43d2e 100644 --- a/packages/autorest.python/test/vanilla/legacy/specification/packagemodedataplane/README.md +++ b/packages/autorest.python/test/vanilla/legacy/specification/packagemodedataplane/README.md @@ -4,7 +4,7 @@ ``` yaml input-file: ../../../../../node_modules/@microsoft.azure/autorest.testserver/swagger/any-type.json -output-folder: $(python-sdks-folder)/vanilla/legacy/Expected/AcceptanceTests/PackageModeDataPlane +output-folder: ../../Expected/AcceptanceTests/PackageModeDataPlane namespace: packagemode package-name: packagemode package-pprint-name: Azure Package Mode From efa12ba7ceb84bd4f2d226d413a88975ae6b35c0 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 31 Jul 2025 20:04:14 +0000 Subject: [PATCH 36/48] Update dependencies --- packages/autorest.python/package.json | 2 +- packages/typespec-python/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 99f68f3dad9..3dbe358b06e 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index ca3f5c53269..f427d4070f8 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { From e95ece924e25ed70791a95ac00161c1e9dce0411 Mon Sep 17 00:00:00 2001 From: swathipil Date: Thu, 31 Jul 2025 13:05:23 -0700 Subject: [PATCH 37/48] fix prettier --- .../typespec-python/scripts/eng/regenerate.ts | 4 +- .../test_authentication.py | 1 + .../unittests/test_parse_pyproject.py | 57 +++++++++++-------- 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/packages/typespec-python/scripts/eng/regenerate.ts b/packages/typespec-python/scripts/eng/regenerate.ts index f9f09658bfd..366bb1e813e 100644 --- a/packages/typespec-python/scripts/eng/regenerate.ts +++ b/packages/typespec-python/scripts/eng/regenerate.ts @@ -143,9 +143,9 @@ const EMITTER_OPTIONS: Record | Record None: """ Check that setup.py does not exist in the package directory. - + Args: package_path: Relative path to the package directory - + Raises: AssertionError: If setup.py exists in the package directory """ package_dir = Path(__file__).parent / package_path setup_py_path = package_dir / "setup.py" - + assert not setup_py_path.exists(), f"setup.py should not exist at {setup_py_path} when using pyproject.toml" def get_pyproject_section(package_path: str, section_name: str) -> Dict[str, Any]: """ Get a specific section from a package's pyproject.toml file. - + Args: package_path: Relative path to the package directory containing pyproject.toml section_name: Dot-separated section name (e.g., "tool.azure-sdk-build") - + Returns: Dictionary containing the section data - + Raises: AssertionError: If pyproject.toml not found or section missing """ @@ -42,49 +43,55 @@ def get_pyproject_section(package_path: str, section_name: str) -> Dict[str, Any # Convert to absolute path and find pyproject.toml package_dir = Path(__file__).parent / package_path pyproject_path = package_dir / "pyproject.toml" - + # Assert pyproject.toml exists assert pyproject_path.exists(), f"pyproject.toml not found at {pyproject_path}" - + # Parse pyproject.toml with open(pyproject_path, "rb") as f: data = tomllib.load(f) - + # Check that the project name matches the folder name if "project" in data and "name" in data["project"]: expected_name = package_dir.name actual_name = data["project"]["name"] - assert actual_name == expected_name, f"Project name '{actual_name}' in pyproject.toml does not match folder name '{expected_name}'" - + assert ( + actual_name == expected_name + ), f"Project name '{actual_name}' in pyproject.toml does not match folder name '{expected_name}'" + # Navigate to the requested section section_parts = section_name.split(".") current_data = data - + for part in section_parts: - assert part in current_data, f"pyproject.toml does not contain [{'.'.join(section_parts[:section_parts.index(part)+1])}] section" + assert ( + part in current_data + ), f"pyproject.toml does not contain [{'.'.join(section_parts[:section_parts.index(part)+1])}] section" current_data = current_data[part] - + return current_data - + except Exception as e: raise AssertionError(f"Error checking pyproject.toml at '{package_path}': {e}") + def test_azure_sdk_build(): """Test that authentication-union packages have pyproject.toml with [tool.azure-sdk-build] pyright = false.""" - + # Need to check the file directly, since installed distribution metadata won't include custom sections. - test_paths = [ - "../../unbranded/generated/authentication-union", - "../../azure/generated/authentication-union" - ] - + test_paths = ["../../unbranded/generated/authentication-union", "../../azure/generated/authentication-union"] + for package_path in test_paths: # First check that setup.py doesn't exist check_no_setup_py(package_path) - + # Get the [tool.azure-sdk-build] section azure_sdk_build = get_pyproject_section(package_path, "tool.azure-sdk-build") - + # Check for pyright = false - assert "pyright" in azure_sdk_build, f"[tool.azure-sdk-build] section does not contain 'pyright' setting in {package_path}" - assert azure_sdk_build["pyright"] is False, f"Expected pyright = false, but got pyright = {azure_sdk_build['pyright']} in {package_path}" + assert ( + "pyright" in azure_sdk_build + ), f"[tool.azure-sdk-build] section does not contain 'pyright' setting in {package_path}" + assert ( + azure_sdk_build["pyright"] is False + ), f"Expected pyright = false, but got pyright = {azure_sdk_build['pyright']} in {package_path}" From e11a5534d8f9f9a9f825c06b18b2243d38548880 Mon Sep 17 00:00:00 2001 From: swathipil Date: Thu, 31 Jul 2025 13:09:52 -0700 Subject: [PATCH 38/48] update lock file --- pnpm-lock.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dbf46d07233..56ef70b829f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1668,8 +1668,8 @@ packages: peerDependencies: '@typespec/compiler': ^1.2.1 - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz': - resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz} version: 0.14.1 engines: {node: '>=20.0.0'} peerDependencies: @@ -6422,7 +6422,7 @@ snapshots: dependencies: '@typespec/compiler': 1.2.1(@types/node@22.13.17) - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2MDI0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q)': dependencies: '@azure-tools/typespec-autorest': 0.58.0(vddu6w2yloigenmssnpyjivoim) '@azure-tools/typespec-azure-core': 0.58.0(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))(@typespec/rest@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))) From 6cb48428550ddfc01848f5621a7fb397dcef62c8 Mon Sep 17 00:00:00 2001 From: swathipil Date: Thu, 31 Jul 2025 13:14:54 -0700 Subject: [PATCH 39/48] cspell --- cspell.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/cspell.yaml b/cspell.yaml index b1b516b3983..3c256628635 100644 --- a/cspell.yaml +++ b/cspell.yaml @@ -115,6 +115,7 @@ words: - securityaadswagger - securityaadswaggercredentialflag - securityaadswaggerversiontolerant + - setuppy - siameeee - spheredpg - subclient From c63f6ed9a155551f41e91d26d12b052e9b90b64e Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 31 Jul 2025 23:28:14 +0000 Subject: [PATCH 40/48] Update dependencies --- packages/autorest.python/package.json | 2 +- packages/typespec-python/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index 3dbe358b06e..b9ca2efedaf 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index f427d4070f8..f08bc97e8b7 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { From d34fa10ae83be06e62b4087b7b5fe7fbf4f25b3e Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 31 Jul 2025 23:29:10 +0000 Subject: [PATCH 41/48] Update dependencies (2025-07-31 23:29:10) --- pnpm-lock.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 56ef70b829f..7e767a37b5a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1668,8 +1668,8 @@ packages: peerDependencies: '@typespec/compiler': ^1.2.1 - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz': - resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz} version: 0.14.1 engines: {node: '>=20.0.0'} peerDependencies: @@ -6422,7 +6422,7 @@ snapshots: dependencies: '@typespec/compiler': 1.2.1(@types/node@22.13.17) - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTE5OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTE2NTM4MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.14.1.tgz(iurth4uuk4s6znzuuc7ncenk2q)': dependencies: '@azure-tools/typespec-autorest': 0.58.0(vddu6w2yloigenmssnpyjivoim) '@azure-tools/typespec-azure-core': 0.58.0(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))(@typespec/rest@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/http@1.2.1(@typespec/compiler@1.2.1(@types/node@22.13.17))(@typespec/streams@0.72.1(@typespec/compiler@1.2.1(@types/node@22.13.17))))) From 628eb3709cf5771ecffdef926182abeb7ac0eb08 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 31 Jul 2025 23:33:53 +0000 Subject: [PATCH 42/48] Regenerate for typespec-python (2025-07-31 23:33:53) --- .../unbranded/generated/authentication-api-key/pyproject.toml | 2 +- .../generated/authentication-http-custom/pyproject.toml | 2 +- .../unbranded/generated/authentication-oauth2/pyproject.toml | 2 +- .../unbranded/generated/authentication-union/pyproject.toml | 2 +- .../test/unbranded/generated/encode-bytes/pyproject.toml | 2 +- .../test/unbranded/generated/encode-datetime/pyproject.toml | 2 +- .../test/unbranded/generated/encode-duration/pyproject.toml | 2 +- .../test/unbranded/generated/encode-numeric/pyproject.toml | 2 +- .../test/unbranded/generated/headasbooleanfalse/pyproject.toml | 2 +- .../test/unbranded/generated/headasbooleantrue/pyproject.toml | 2 +- .../test/unbranded/generated/parameters-basic/pyproject.toml | 2 +- .../generated/parameters-body-optionality/pyproject.toml | 2 +- .../generated/parameters-collection-format/pyproject.toml | 2 +- .../test/unbranded/generated/parameters-path/pyproject.toml | 2 +- .../test/unbranded/generated/parameters-spread/pyproject.toml | 2 +- .../generated/payload-content-negotiation/pyproject.toml | 2 +- .../unbranded/generated/payload-json-merge-patch/pyproject.toml | 2 +- .../test/unbranded/generated/payload-media-type/pyproject.toml | 2 +- .../test/unbranded/generated/payload-multipart/pyproject.toml | 2 +- .../test/unbranded/generated/payload-pageable/pyproject.toml | 2 +- .../test/unbranded/generated/payload-xml/pyproject.toml | 2 +- .../generated/response-status-code-range/pyproject.toml | 2 +- .../test/unbranded/generated/routes/pyproject.toml | 2 +- .../generated/serialization-encoded-name-json/pyproject.toml | 2 +- .../generated/server-endpoint-not-defined/pyproject.toml | 2 +- .../unbranded/generated/server-path-multiple/pyproject.toml | 2 +- .../test/unbranded/generated/server-path-single/pyproject.toml | 2 +- .../generated/server-versions-not-versioned/pyproject.toml | 2 +- .../generated/server-versions-versioned/pyproject.toml | 2 +- .../special-headers-conditional-request/pyproject.toml | 2 +- .../generated/special-headers-repeatability/pyproject.toml | 2 +- .../test/unbranded/generated/special-words/pyproject.toml | 2 +- .../test/unbranded/generated/streaming-jsonl/pyproject.toml | 2 +- .../test/unbranded/generated/typetest-array/pyproject.toml | 2 +- .../test/unbranded/generated/typetest-dictionary/pyproject.toml | 2 +- .../unbranded/generated/typetest-enum-extensible/pyproject.toml | 2 +- .../test/unbranded/generated/typetest-enum-fixed/pyproject.toml | 2 +- .../unbranded/generated/typetest-model-empty/pyproject.toml | 2 +- .../generated/typetest-model-enumdiscriminator/pyproject.toml | 2 +- .../generated/typetest-model-nesteddiscriminator/pyproject.toml | 2 +- .../generated/typetest-model-notdiscriminated/pyproject.toml | 2 +- .../unbranded/generated/typetest-model-recursive/pyproject.toml | 2 +- .../generated/typetest-model-singlediscriminator/pyproject.toml | 2 +- .../unbranded/generated/typetest-model-usage/pyproject.toml | 2 +- .../generated/typetest-model-visibility/pyproject.toml | 2 +- .../typetest-property-additionalproperties/pyproject.toml | 2 +- .../generated/typetest-property-nullable/pyproject.toml | 2 +- .../generated/typetest-property-optional/pyproject.toml | 2 +- .../generated/typetest-property-valuetypes/pyproject.toml | 2 +- .../test/unbranded/generated/typetest-scalar/pyproject.toml | 2 +- .../test/unbranded/generated/typetest-union/pyproject.toml | 2 +- .../test/unbranded/generated/versioning-added/pyproject.toml | 2 +- .../unbranded/generated/versioning-madeoptional/pyproject.toml | 2 +- .../test/unbranded/generated/versioning-removed/pyproject.toml | 2 +- .../unbranded/generated/versioning-renamedfrom/pyproject.toml | 2 +- .../generated/versioning-returntypechangedfrom/pyproject.toml | 2 +- .../generated/versioning-typechangedfrom/pyproject.toml | 2 +- 57 files changed, 57 insertions(+), 57 deletions(-) diff --git a/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml index 5952d5e4c82..8c201d80703 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-api-key/pyproject.toml @@ -8,7 +8,7 @@ name = "authentication-apikey" authors = [ { name = "" }, ] -description = "Authentication Apikey Client Library for Python" +description = " Authentication Apikey Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml index 3ca79881a52..ae6574e5ddd 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-http-custom/pyproject.toml @@ -8,7 +8,7 @@ name = "authentication-http-custom" authors = [ { name = "" }, ] -description = "Authentication Http Custom Client Library for Python" +description = " Authentication Http Custom Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml index 8916fa9ce60..88c8611d2af 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-oauth2/pyproject.toml @@ -8,7 +8,7 @@ name = "authentication-oauth2" authors = [ { name = "" }, ] -description = "Authentication Oauth2 Client Library for Python" +description = " Authentication Oauth2 Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml index 2a3833d279e..32eeeb6fdaa 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml @@ -8,7 +8,7 @@ name = "authentication-union" authors = [ { name = "" }, ] -description = "Authentication Union Client Library for Python" +description = " Authentication Union Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml index 9d58cbe4ea3..0a1a2125f23 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/pyproject.toml @@ -8,7 +8,7 @@ name = "encode-bytes" authors = [ { name = "" }, ] -description = "Encode Bytes Client Library for Python" +description = " Encode Bytes Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml index 43b1cb25c64..c144d3a0423 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/pyproject.toml @@ -8,7 +8,7 @@ name = "encode-datetime" authors = [ { name = "" }, ] -description = "Encode Datetime Client Library for Python" +description = " Encode Datetime Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml index 16f5e06d2da..2de71007216 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/pyproject.toml @@ -8,7 +8,7 @@ name = "encode-duration" authors = [ { name = "" }, ] -description = "Encode Duration Client Library for Python" +description = " Encode Duration Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml b/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml index 604e7969c47..eaa0d92eaed 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/pyproject.toml @@ -8,7 +8,7 @@ name = "encode-numeric" authors = [ { name = "" }, ] -description = "Encode Numeric Client Library for Python" +description = " Encode Numeric Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml index 1f3969481a7..f43c151eb62 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/headasbooleanfalse/pyproject.toml @@ -8,7 +8,7 @@ name = "headasbooleanfalse" authors = [ { name = "" }, ] -description = "Headasbooleanfalse Client Library for Python" +description = " Headasbooleanfalse Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml index 26cf58a5420..17f7d93bacd 100644 --- a/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/headasbooleantrue/pyproject.toml @@ -8,7 +8,7 @@ name = "headasbooleantrue" authors = [ { name = "" }, ] -description = "Headasbooleantrue Client Library for Python" +description = " Headasbooleantrue Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml index 126d2dab048..4682022a630 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/pyproject.toml @@ -8,7 +8,7 @@ name = "parameters-basic" authors = [ { name = "" }, ] -description = "Parameters Basic Client Library for Python" +description = " Parameters Basic Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml index 96322ad77c9..fcc9e5724c0 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/pyproject.toml @@ -8,7 +8,7 @@ name = "parameters-bodyoptionality" authors = [ { name = "" }, ] -description = "Parameters Bodyoptionality Client Library for Python" +description = " Parameters Bodyoptionality Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml index e6e969713bf..ebfd8241a2d 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/pyproject.toml @@ -8,7 +8,7 @@ name = "parameters-collectionformat" authors = [ { name = "" }, ] -description = "Parameters Collectionformat Client Library for Python" +description = " Parameters Collectionformat Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml index 8fa05062357..d5eabfaa14a 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-path/pyproject.toml @@ -8,7 +8,7 @@ name = "parameters-path" authors = [ { name = "" }, ] -description = "Parameters Path Client Library for Python" +description = " Parameters Path Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml b/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml index 1cc67beddcb..e344062a478 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/pyproject.toml @@ -8,7 +8,7 @@ name = "parameters-spread" authors = [ { name = "" }, ] -description = "Parameters Spread Client Library for Python" +description = " Parameters Spread Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml index 0766dc3b5db..8e0499c922c 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/pyproject.toml @@ -8,7 +8,7 @@ name = "payload-contentnegotiation" authors = [ { name = "" }, ] -description = "Payload Contentnegotiation Client Library for Python" +description = " Payload Contentnegotiation Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml index 7fccc37429f..f47aad416f6 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-json-merge-patch/pyproject.toml @@ -8,7 +8,7 @@ name = "payload-jsonmergepatch" authors = [ { name = "" }, ] -description = "Payload Jsonmergepatch Client Library for Python" +description = " Payload Jsonmergepatch Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml index cdd3571fe08..4f0cc2bd652 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/pyproject.toml @@ -8,7 +8,7 @@ name = "payload-mediatype" authors = [ { name = "" }, ] -description = "Payload Mediatype Client Library for Python" +description = " Payload Mediatype Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml index a2017c0066e..d0936872f08 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/pyproject.toml @@ -8,7 +8,7 @@ name = "payload-multipart" authors = [ { name = "" }, ] -description = "Payload Multipart Client Library for Python" +description = " Payload Multipart Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml index 68c04a9658a..77fde8e4304 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/pyproject.toml @@ -8,7 +8,7 @@ name = "payload-pageable" authors = [ { name = "" }, ] -description = "Payload Pageable Client Library for Python" +description = " Payload Pageable Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml b/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml index 804bcbdf421..b992fdda2ec 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/pyproject.toml @@ -8,7 +8,7 @@ name = "payload-xml" authors = [ { name = "" }, ] -description = "Payload Xml Client Library for Python" +description = " Payload Xml Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml b/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml index 2ecf5494741..ceaf88b5c47 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/pyproject.toml @@ -8,7 +8,7 @@ name = "response-statuscoderange" authors = [ { name = "" }, ] -description = "Response Statuscoderange Client Library for Python" +description = " Response Statuscoderange Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml index c07ab649a3c..b1c7162019c 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/routes/pyproject.toml @@ -8,7 +8,7 @@ name = "routes" authors = [ { name = "" }, ] -description = "Routes Client Library for Python" +description = " Routes Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml index 85719b8c998..8d735634fa8 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/pyproject.toml @@ -8,7 +8,7 @@ name = "serialization-encodedname-json" authors = [ { name = "" }, ] -description = "Serialization Encodedname Json Client Library for Python" +description = " Serialization Encodedname Json Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml index e532c145603..5d99ef10248 100644 --- a/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-endpoint-not-defined/pyproject.toml @@ -8,7 +8,7 @@ name = "server-endpoint-notdefined" authors = [ { name = "" }, ] -description = "Server Endpoint Notdefined Client Library for Python" +description = " Server Endpoint Notdefined Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml index 75b5b0e2a08..3d0d27a1230 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-path-multiple/pyproject.toml @@ -8,7 +8,7 @@ name = "server-path-multiple" authors = [ { name = "" }, ] -description = "Server Path Multiple Client Library for Python" +description = " Server Path Multiple Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml index c7a6004af37..80f3b9546bf 100644 --- a/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-path-single/pyproject.toml @@ -8,7 +8,7 @@ name = "server-path-single" authors = [ { name = "" }, ] -description = "Server Path Single Client Library for Python" +description = " Server Path Single Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml index eedc8c1a794..2f04ce6964b 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-versions-not-versioned/pyproject.toml @@ -8,7 +8,7 @@ name = "server-versions-notversioned" authors = [ { name = "" }, ] -description = "Server Versions Notversioned Client Library for Python" +description = " Server Versions Notversioned Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml index 0446bfb0b3b..0a4cf05e236 100644 --- a/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/server-versions-versioned/pyproject.toml @@ -8,7 +8,7 @@ name = "server-versions-versioned" authors = [ { name = "" }, ] -description = "Server Versions Versioned Client Library for Python" +description = " Server Versions Versioned Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml index 69b034c8639..8d881f88f90 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-headers-conditional-request/pyproject.toml @@ -8,7 +8,7 @@ name = "specialheaders-conditionalrequest" authors = [ { name = "" }, ] -description = "Specialheaders Conditionalrequest Client Library for Python" +description = " Specialheaders Conditionalrequest Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml index 41718458bcd..61154059ae8 100644 --- a/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-headers-repeatability/pyproject.toml @@ -8,7 +8,7 @@ name = "specialheaders-repeatability" authors = [ { name = "" }, ] -description = "Specialheaders Repeatability Client Library for Python" +description = " Specialheaders Repeatability Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml b/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml index 4cb67576e87..d79a5420d67 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/special-words/pyproject.toml @@ -8,7 +8,7 @@ name = "specialwords" authors = [ { name = "" }, ] -description = "Specialwords Client Library for Python" +description = " Specialwords Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml index fe1a537dd23..4d38a74932d 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/pyproject.toml @@ -8,7 +8,7 @@ name = "streaming-jsonl" authors = [ { name = "" }, ] -description = "Streaming Jsonl Client Library for Python" +description = " Streaming Jsonl Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml index 8f3a289f06d..e4f8583e0c8 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-array" authors = [ { name = "" }, ] -description = "Typetest Array Client Library for Python" +description = " Typetest Array Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml index 321fef9258b..f8c6a7cfe83 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-dictionary" authors = [ { name = "" }, ] -description = "Typetest Dictionary Client Library for Python" +description = " Typetest Dictionary Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml index fb4a7e2042d..663690d1c5d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-enum-extensible" authors = [ { name = "" }, ] -description = "Typetest Enum Extensible Client Library for Python" +description = " Typetest Enum Extensible Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml index 510f325b1ac..555e2c006d0 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-enum-fixed" authors = [ { name = "" }, ] -description = "Typetest Enum Fixed Client Library for Python" +description = " Typetest Enum Fixed Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml index 89cca5fdd47..009c348d171 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-empty/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-model-empty" authors = [ { name = "" }, ] -description = "Typetest Model Empty Client Library for Python" +description = " Typetest Model Empty Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml index b855f5c3ce2..f5b0cdf6d4b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-enumdiscriminator/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-model-enumdiscriminator" authors = [ { name = "" }, ] -description = "Typetest Model Enumdiscriminator Client Library for Python" +description = " Typetest Model Enumdiscriminator Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml index 78a227f9606..3a3d7474799 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-nesteddiscriminator/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-model-nesteddiscriminator" authors = [ { name = "" }, ] -description = "Typetest Model Nesteddiscriminator Client Library for Python" +description = " Typetest Model Nesteddiscriminator Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml index 21ce680c79b..daebd32a944 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-notdiscriminated/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-model-notdiscriminated" authors = [ { name = "" }, ] -description = "Typetest Model Notdiscriminated Client Library for Python" +description = " Typetest Model Notdiscriminated Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml index 1ead0dcefd3..f1067a364e0 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-recursive/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-model-recursive" authors = [ { name = "" }, ] -description = "Typetest Model Recursive Client Library for Python" +description = " Typetest Model Recursive Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml index 3df803c7f86..97eb66df750 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-singlediscriminator/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-model-singlediscriminator" authors = [ { name = "" }, ] -description = "Typetest Model Singlediscriminator Client Library for Python" +description = " Typetest Model Singlediscriminator Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml index 33b7c685099..6f7e415dfa7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-usage/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-model-usage" authors = [ { name = "" }, ] -description = "Typetest Model Usage Client Library for Python" +description = " Typetest Model Usage Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml index ffcdf1a1bda..9a694166b5b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-model-visibility/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-model-visibility" authors = [ { name = "" }, ] -description = "Typetest Model Visibility Client Library for Python" +description = " Typetest Model Visibility Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml index 43917566e5e..dc8cc82dc40 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-property-additionalproperties" authors = [ { name = "" }, ] -description = "Typetest Property Additionalproperties Client Library for Python" +description = " Typetest Property Additionalproperties Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml index a9377c60821..b7dea050a56 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-property-nullable" authors = [ { name = "" }, ] -description = "Typetest Property Nullable Client Library for Python" +description = " Typetest Property Nullable Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml index 5cc24451150..62d8786f7bb 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-property-optional" authors = [ { name = "" }, ] -description = "Typetest Property Optional Client Library for Python" +description = " Typetest Property Optional Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml index a890baab422..deb7d5f08a2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-property-valuetypes" authors = [ { name = "" }, ] -description = "Typetest Property Valuetypes Client Library for Python" +description = " Typetest Property Valuetypes Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml index afe225a20d7..2188fc5cc56 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-scalar" authors = [ { name = "" }, ] -description = "Typetest Scalar Client Library for Python" +description = " Typetest Scalar Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml index b7a43f50964..2512a156e4c 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/pyproject.toml @@ -8,7 +8,7 @@ name = "typetest-union" authors = [ { name = "" }, ] -description = "Typetest Union Client Library for Python" +description = " Typetest Union Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml index 1b110bce5d8..f1d1191a154 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/pyproject.toml @@ -8,7 +8,7 @@ name = "versioning-added" authors = [ { name = "" }, ] -description = "Versioning Added Client Library for Python" +description = " Versioning Added Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml index 83a0183cc5e..619581fa9d9 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-madeoptional/pyproject.toml @@ -8,7 +8,7 @@ name = "versioning-madeoptional" authors = [ { name = "" }, ] -description = "Versioning Madeoptional Client Library for Python" +description = " Versioning Madeoptional Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml index b66ba5df6ea..6cbc3039bfa 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-removed/pyproject.toml @@ -8,7 +8,7 @@ name = "versioning-removed" authors = [ { name = "" }, ] -description = "Versioning Removed Client Library for Python" +description = " Versioning Removed Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml index 7a57efa9e10..292c45580ad 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/pyproject.toml @@ -8,7 +8,7 @@ name = "versioning-renamedfrom" authors = [ { name = "" }, ] -description = "Versioning Renamedfrom Client Library for Python" +description = " Versioning Renamedfrom Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml index 968339b15d2..a32b6823640 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-returntypechangedfrom/pyproject.toml @@ -8,7 +8,7 @@ name = "versioning-returntypechangedfrom" authors = [ { name = "" }, ] -description = "Versioning Returntypechangedfrom Client Library for Python" +description = " Versioning Returntypechangedfrom Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", diff --git a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml index 064735c2bf1..9da095c3f10 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/versioning-typechangedfrom/pyproject.toml @@ -8,7 +8,7 @@ name = "versioning-typechangedfrom" authors = [ { name = "" }, ] -description = "Versioning Typechangedfrom Client Library for Python" +description = " Versioning Typechangedfrom Client Library for Python" license = {text = "MIT License"} classifiers = [ "Development Status :: 4 - Beta", From f6b0f79801fd083a78860e72a94a75ecc9a156f0 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Thu, 31 Jul 2025 23:50:07 +0000 Subject: [PATCH 43/48] Regenerate for autorest.python (2025-07-31 23:50:07) --- .../test/azure-mgmt-test/setup.py | 76 ------------------- 1 file changed, 76 deletions(-) delete mode 100644 packages/autorest.python/samples/specification/azure-mgmt-test/test/azure-mgmt-test/setup.py diff --git a/packages/autorest.python/samples/specification/azure-mgmt-test/test/azure-mgmt-test/setup.py b/packages/autorest.python/samples/specification/azure-mgmt-test/test/azure-mgmt-test/setup.py deleted file mode 100644 index aeb15b72d46..00000000000 --- a/packages/autorest.python/samples/specification/azure-mgmt-test/test/azure-mgmt-test/setup.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-test" -PACKAGE_PPRINT_NAME = "Test Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - ( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py") - ), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - install_requires=[ - "isodate>=0.6.1", - "typing-extensions>=4.6.0", - "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", - ], - python_requires=">=3.8", -) From 0c152888579a379416c95b6084ede892b85465ac Mon Sep 17 00:00:00 2001 From: swathipil Date: Fri, 1 Aug 2025 00:11:22 -0700 Subject: [PATCH 44/48] nit --- .../test/azure/generated/setuppy-authentication-union/setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setup.py b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setup.py index 6cce1838957..d81ebf167e1 100644 --- a/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setup.py +++ b/packages/typespec-python/test/azure/generated/setuppy-authentication-union/setup.py @@ -1,7 +1,5 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# coding=utf-8 -# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) Python Code Generator. From 86d1fce5080a9e9dc46d0440a2ccbd3aaeb99fc7 Mon Sep 17 00:00:00 2001 From: swathipil Date: Fri, 1 Aug 2025 00:46:54 -0700 Subject: [PATCH 45/48] add setuppy to test reqs --- packages/typespec-python/test/azure/requirements.txt | 1 + packages/typespec-python/test/unbranded/requirements.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/typespec-python/test/azure/requirements.txt b/packages/typespec-python/test/azure/requirements.txt index cc49510dac9..1a983b563e8 100644 --- a/packages/typespec-python/test/azure/requirements.txt +++ b/packages/typespec-python/test/azure/requirements.txt @@ -76,6 +76,7 @@ azure-mgmt-core==1.6.0 -e ./generated/headasbooleantrue -e ./generated/headasbooleanfalse -e ./generated/parameters-body-optionality +-e ./generated/setuppy-authentication-union -e ./generated/special-headers-repeatability -e ./generated/special-headers-conditional-request -e ./generated/encode-datetime diff --git a/packages/typespec-python/test/unbranded/requirements.txt b/packages/typespec-python/test/unbranded/requirements.txt index b4b97840559..890a6a33333 100644 --- a/packages/typespec-python/test/unbranded/requirements.txt +++ b/packages/typespec-python/test/unbranded/requirements.txt @@ -43,6 +43,7 @@ pytest-asyncio==0.14.0;python_full_version>="3.5.2" -e ./generated/headasbooleantrue -e ./generated/headasbooleanfalse -e ./generated/parameters-body-optionality +-e ./generated/setuppy-authentication-union -e ./generated/special-headers-repeatability -e ./generated/special-headers-conditional-request -e ./generated/encode-datetime From ca9f486cece185d847182155aa1ef9672996e045 Mon Sep 17 00:00:00 2001 From: swathipil Date: Fri, 1 Aug 2025 01:44:28 -0700 Subject: [PATCH 46/48] fix sensitive words test --- .../generic_mock_api_tests/unittests/test_parse_pyproject.py | 2 +- .../unbranded/generated/authentication-union/pyproject.toml | 3 --- .../test/unbranded/mock_api_tests/test_unbranded.py | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/typespec-python/test/generic_mock_api_tests/unittests/test_parse_pyproject.py b/packages/typespec-python/test/generic_mock_api_tests/unittests/test_parse_pyproject.py index 3ac0f11f889..0cf56d17185 100644 --- a/packages/typespec-python/test/generic_mock_api_tests/unittests/test_parse_pyproject.py +++ b/packages/typespec-python/test/generic_mock_api_tests/unittests/test_parse_pyproject.py @@ -79,7 +79,7 @@ def test_azure_sdk_build(): """Test that authentication-union packages have pyproject.toml with [tool.azure-sdk-build] pyright = false.""" # Need to check the file directly, since installed distribution metadata won't include custom sections. - test_paths = ["../../unbranded/generated/authentication-union", "../../azure/generated/authentication-union"] + test_paths = ["../../azure/generated/authentication-union"] for package_path in test_paths: # First check that setup.py doesn't exist diff --git a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml index 32eeeb6fdaa..358f5d9d099 100644 --- a/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml +++ b/packages/typespec-python/test/unbranded/generated/authentication-union/pyproject.toml @@ -46,6 +46,3 @@ exclude = [ [tool.setuptools.package-data] pytyped = ["py.typed"] - -[tool.azure-sdk-build] -pyright = false diff --git a/packages/typespec-python/test/unbranded/mock_api_tests/test_unbranded.py b/packages/typespec-python/test/unbranded/mock_api_tests/test_unbranded.py index 10ded3a2180..1a1948f91ed 100644 --- a/packages/typespec-python/test/unbranded/mock_api_tests/test_unbranded.py +++ b/packages/typespec-python/test/unbranded/mock_api_tests/test_unbranded.py @@ -54,4 +54,4 @@ def test_sensitive_word(): check_folder = (Path(os.path.dirname(__file__)) / "../generated").resolve() assert [] == check_sensitive_word(check_folder, "azure") # after update cadl-ranch, it shall also equal to [] - assert ["authentication-oauth2", "authentication-union"] == check_sensitive_word(check_folder, "microsoft") + assert ["authentication-oauth2", "authentication-union", "setuppy-authentication-union"] == check_sensitive_word(check_folder, "microsoft") From d34b3224d69018b1d64f7f20f0e71db795fd4270 Mon Sep 17 00:00:00 2001 From: swathipil Date: Fri, 1 Aug 2025 08:05:41 -0700 Subject: [PATCH 47/48] black --- .../test/unbranded/mock_api_tests/test_unbranded.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/typespec-python/test/unbranded/mock_api_tests/test_unbranded.py b/packages/typespec-python/test/unbranded/mock_api_tests/test_unbranded.py index 1a1948f91ed..df4549b3907 100644 --- a/packages/typespec-python/test/unbranded/mock_api_tests/test_unbranded.py +++ b/packages/typespec-python/test/unbranded/mock_api_tests/test_unbranded.py @@ -54,4 +54,6 @@ def test_sensitive_word(): check_folder = (Path(os.path.dirname(__file__)) / "../generated").resolve() assert [] == check_sensitive_word(check_folder, "azure") # after update cadl-ranch, it shall also equal to [] - assert ["authentication-oauth2", "authentication-union", "setuppy-authentication-union"] == check_sensitive_word(check_folder, "microsoft") + assert ["authentication-oauth2", "authentication-union", "setuppy-authentication-union"] == check_sensitive_word( + check_folder, "microsoft" + ) From 514334a785c270182dd5197faaa5efe62c2eedc0 Mon Sep 17 00:00:00 2001 From: swathipil Date: Fri, 1 Aug 2025 12:06:03 -0700 Subject: [PATCH 48/48] revert multiapi setup.py --- .../AcceptanceTests/Multiapi/setup.py | 43 +++++++++++------- .../MultiapiCredentialDefaultPolicy/setup.py | 45 +++++++++++-------- .../MultiapiCustomBaseUrl/setup.py | 45 +++++++++++-------- .../MultiapiDataPlane/setup.py | 45 +++++++++++-------- .../MultiapiKeywordOnly/setup.py | 45 +++++++++++-------- .../AcceptanceTests/MultiapiNoAsync/setup.py | 43 +++++++++++------- .../AcceptanceTests/MultiapiSecurity/setup.py | 43 +++++++++++------- .../MultiapiWithSubmodule/setup.py | 43 +++++++++++------- 8 files changed, 212 insertions(+), 140 deletions(-) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py index 75b4710a660..56b1c25baf0 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/Multiapi/setup.py @@ -1,33 +1,42 @@ # coding=utf-8 -# -------------------------------------------------------------------------- +#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +# coding: utf-8 from setuptools import setup, find_packages +NAME = "multiapi" +VERSION = "0.1.0" -PACKAGE_NAME = "multiapi" -version = "0.1.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] setup( - name=PACKAGE_NAME, - version=version, + name=NAME, + version=VERSION, description="multiapi", author_email="", url="", - keywords="azure, azure sdk", + keywords=["Swagger", "multiapi"], + install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], long_description="""\ - Service client for multiapi client testing. - """, + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + """ ) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py index 6af00dbff11..2d4cdb23283 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/setup.py @@ -1,33 +1,42 @@ # coding=utf-8 -# -------------------------------------------------------------------------- +#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +# coding: utf-8 from setuptools import setup, find_packages +NAME = "multiapicredentialdefaultpolicy" +VERSION = "0.1.0" -PACKAGE_NAME = "multiapicredentialdefaultpolicy" -version = "0.1.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] setup( - name=PACKAGE_NAME, - version=version, - description="multiapicredentialdefaultpolicy", + name=NAME, + version=VERSION, + description="multiapi with a non BearerTokenCredentialPolicy auth policy", author_email="", url="", - keywords="azure, azure sdk", + keywords=["Swagger", "multiapicredentialdefaultpolicy"], + install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], long_description="""\ - Service client for multiapi client testing. - """, + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + """ ) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py index c1763c41afb..aceae3fc0ed 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/setup.py @@ -1,33 +1,42 @@ # coding=utf-8 -# -------------------------------------------------------------------------- +#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +# coding: utf-8 from setuptools import setup, find_packages +NAME = "multiapicustombaseurl" +VERSION = "0.1.0" -PACKAGE_NAME = "multiapicustombaseurl" -version = "0.1.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] setup( - name=PACKAGE_NAME, - version=version, - description="multiapicustombaseurl", + name=NAME, + version=VERSION, + description="multiapi custom base url", author_email="", url="", - keywords="azure, azure sdk", + keywords=["Swagger", "multiapicustombaseurl"], + install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], long_description="""\ - Service client for multiapi custom base url testing. - """, + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + """ ) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py index bdaf37a9bbc..bdf3207721e 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiDataPlane/setup.py @@ -1,33 +1,42 @@ # coding=utf-8 -# -------------------------------------------------------------------------- +#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +# coding: utf-8 from setuptools import setup, find_packages +NAME = "multiapidataplane" +VERSION = "0.1.0" -PACKAGE_NAME = "multiapidataplane" -version = "0.1.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] setup( - name=PACKAGE_NAME, - version=version, - description="multiapidataplane", + name=NAME, + version=VERSION, + description="multiapi data plane", author_email="", url="", - keywords="azure, azure sdk", + keywords=["Swagger", "multiapidataplane"], + install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], long_description="""\ - Service client for multiapi client testing. - """, + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + """ ) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py index 34eb726466d..b79c0895e7f 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiKeywordOnly/setup.py @@ -1,33 +1,42 @@ # coding=utf-8 -# -------------------------------------------------------------------------- +#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +# coding: utf-8 from setuptools import setup, find_packages +NAME = "multiapikeywordonly" +VERSION = "0.1.0" -PACKAGE_NAME = "multiapikeywordonly" -version = "0.1.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] setup( - name=PACKAGE_NAME, - version=version, - description="multiapikeywordonly", + name=NAME, + version=VERSION, + description="multiapi custom base url", author_email="", url="", - keywords="azure, azure sdk", + keywords=["Swagger", "multiapikeywordonly"], + install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], long_description="""\ - Service client for multiapi client testing. - """, + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + """ ) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py index da8f836f5d3..3815c124281 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiNoAsync/setup.py @@ -1,33 +1,42 @@ # coding=utf-8 -# -------------------------------------------------------------------------- +#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +# coding: utf-8 from setuptools import setup, find_packages +NAME = "multiapinoasync" +VERSION = "0.1.0" -PACKAGE_NAME = "multiapinoasync" -version = "0.1.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] setup( - name=PACKAGE_NAME, - version=version, + name=NAME, + version=VERSION, description="multiapinoasync", author_email="", url="", - keywords="azure, azure sdk", + keywords=["Swagger", "multiapinoasync"], + install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], long_description="""\ - Service client for multiapi client testing. - """, + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + """ ) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py index 269a7e66649..5466ba46ec5 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiSecurity/setup.py @@ -1,33 +1,42 @@ # coding=utf-8 -# -------------------------------------------------------------------------- +#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +# coding: utf-8 from setuptools import setup, find_packages +NAME = "multiapisecurity" +VERSION = "0.1.0" -PACKAGE_NAME = "multiapisecurity" -version = "0.1.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] setup( - name=PACKAGE_NAME, - version=version, + name=NAME, + version=VERSION, description="multiapisecurity", author_email="", url="", - keywords="azure, azure sdk", + keywords=["Swagger", "multiapisecurity"], + install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], long_description="""\ - Service client for multiapi client testing. - """, + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + """ ) diff --git a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py index c5516505502..88c5ed83436 100644 --- a/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py +++ b/packages/autorest.python/test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/setup.py @@ -1,33 +1,42 @@ # coding=utf-8 -# -------------------------------------------------------------------------- +#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +# coding: utf-8 from setuptools import setup, find_packages +NAME = "multiapiwithsubmodule" +VERSION = "0.1.0" -PACKAGE_NAME = "multiapiwithsubmodule" -version = "0.1.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +REQUIRES = ["msrest>=0.6.0", "azure-core<2.0.0,>=1.2.0"] setup( - name=PACKAGE_NAME, - version=version, + name=NAME, + version=VERSION, description="multiapiwithsubmodule", author_email="", url="", - keywords="azure, azure sdk", + keywords=["Swagger", "multiapiwithsubmodule"], + install_requires=REQUIRES, packages=find_packages(), include_package_data=True, - install_requires=[ - "msrest>=0.7.1", - "azure-mgmt-core>=1.5.0", - "typing-extensions>=4.6.0", - ], long_description="""\ - Service client for multiapi client testing. - """, + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + """ )