@typespec/http-client-python 0.30.1 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/emitter/http.d.ts.map +1 -1
- package/dist/emitter/http.js +6 -5
- package/dist/emitter/http.js.map +1 -1
- package/dist/emitter/types.d.ts.map +1 -1
- package/dist/emitter/types.js +2 -1
- package/dist/emitter/types.js.map +1 -1
- package/emitter/src/http.ts +5 -5
- package/emitter/src/types.ts +2 -1
- package/emitter/temp/tsconfig.tsbuildinfo +1 -1
- package/eng/scripts/ci/regenerate-common.ts +2 -5
- package/eng/scripts/setup/__pycache__/package_manager.cpython-311.pyc +0 -0
- package/eng/scripts/setup/__pycache__/venvtools.cpython-311.pyc +0 -0
- package/generator/build/lib/pygen/codegen/serializers/general_serializer.py +1 -1
- package/generator/build/lib/pygen/preprocess/__init__.py +16 -8
- package/generator/component-detection-pip-report.json +2 -2
- package/generator/dist/pygen-0.1.0-py3-none-any.whl +0 -0
- package/generator/pygen/codegen/serializers/general_serializer.py +1 -1
- package/generator/pygen/preprocess/__init__.py +16 -8
- package/generator/pygen.egg-info/PKG-INFO +1 -0
- package/generator/setup.py +1 -0
- package/package.json +31 -31
|
@@ -70,11 +70,7 @@ export interface BuildTaskGroupsOptions {
|
|
|
70
70
|
|
|
71
71
|
// ---- Public constants ----
|
|
72
72
|
|
|
73
|
-
export const SKIP_SPECS: string[] = [
|
|
74
|
-
"type/file",
|
|
75
|
-
"service/multiple-services",
|
|
76
|
-
"azure/client-generator-core/response-as-bool",
|
|
77
|
-
];
|
|
73
|
+
export const SKIP_SPECS: string[] = ["type/file"];
|
|
78
74
|
|
|
79
75
|
export const SpecialFlags: Record<string, Record<string, any>> = {
|
|
80
76
|
azure: {
|
|
@@ -728,6 +724,7 @@ export async function prepareBaselineOfGeneratedCode(generatedFolder: string): P
|
|
|
728
724
|
"azure/generation-subdir2",
|
|
729
725
|
"unbranded/generation-subdir",
|
|
730
726
|
"unbranded/generation-subdir2",
|
|
727
|
+
"azure/azure-client-generator-core-alternate-type",
|
|
731
728
|
];
|
|
732
729
|
|
|
733
730
|
const sourceRoot = join(tempDir, ...sourceSubdir.split("/"));
|
|
Binary file
|
|
Binary file
|
|
@@ -378,6 +378,8 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
378
378
|
if type.get("values"):
|
|
379
379
|
# we're enums - enum values are UPPER_CASE so no padding needed for reserved words
|
|
380
380
|
for value in type["values"]:
|
|
381
|
+
if value.get("isExactName", False):
|
|
382
|
+
continue
|
|
381
383
|
upper_name = value["name"].upper()
|
|
382
384
|
if upper_name[0] in "0123456789":
|
|
383
385
|
upper_name = "ENUM_" + upper_name
|
|
@@ -473,15 +475,21 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
473
475
|
) -> None:
|
|
474
476
|
yaml_data["groupName"] = self.pad_reserved_words(yaml_data["groupName"], PadType.OPERATION_GROUP, yaml_data)
|
|
475
477
|
yaml_data["groupName"] = to_snake_case(yaml_data["groupName"])
|
|
476
|
-
yaml_data
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
+
|
|
481
|
-
+ "_initial"
|
|
482
|
-
)
|
|
478
|
+
if yaml_data.get("isExactName", False):
|
|
479
|
+
# exact() client name: keep the operation name as-is without lowercasing,
|
|
480
|
+
# snake-casing, or padding reserved words.
|
|
481
|
+
if yaml_data.get("isLroInitialOperation") is True:
|
|
482
|
+
yaml_data["name"] = "_" + extract_original_name(yaml_data["name"]) + "_initial"
|
|
483
483
|
else:
|
|
484
|
-
yaml_data["name"] =
|
|
484
|
+
yaml_data["name"] = yaml_data["name"].lower()
|
|
485
|
+
if yaml_data.get("isLroInitialOperation") is True:
|
|
486
|
+
yaml_data["name"] = (
|
|
487
|
+
"_"
|
|
488
|
+
+ self.pad_reserved_words(extract_original_name(yaml_data["name"]), PadType.METHOD, yaml_data)
|
|
489
|
+
+ "_initial"
|
|
490
|
+
)
|
|
491
|
+
else:
|
|
492
|
+
yaml_data["name"] = self.pad_reserved_words(yaml_data["name"], PadType.METHOD, yaml_data)
|
|
485
493
|
yaml_data["description"] = update_description(yaml_data["description"], yaml_data["name"])
|
|
486
494
|
yaml_data["summary"] = update_description(yaml_data.get("summary", ""))
|
|
487
495
|
body_parameter = yaml_data.get("bodyParameter")
|
|
@@ -125,9 +125,9 @@
|
|
|
125
125
|
"implementation_version": "3.11.15",
|
|
126
126
|
"os_name": "posix",
|
|
127
127
|
"platform_machine": "x86_64",
|
|
128
|
-
"platform_release": "6.17.0-
|
|
128
|
+
"platform_release": "6.17.0-1015-azure",
|
|
129
129
|
"platform_system": "Linux",
|
|
130
|
-
"platform_version": "#
|
|
130
|
+
"platform_version": "#15~24.04.1-Ubuntu SMP Wed May 6 22:37:49 UTC 2026",
|
|
131
131
|
"python_full_version": "3.11.15",
|
|
132
132
|
"platform_python_implementation": "CPython",
|
|
133
133
|
"python_version": "3.11",
|
|
Binary file
|
|
@@ -378,6 +378,8 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
378
378
|
if type.get("values"):
|
|
379
379
|
# we're enums - enum values are UPPER_CASE so no padding needed for reserved words
|
|
380
380
|
for value in type["values"]:
|
|
381
|
+
if value.get("isExactName", False):
|
|
382
|
+
continue
|
|
381
383
|
upper_name = value["name"].upper()
|
|
382
384
|
if upper_name[0] in "0123456789":
|
|
383
385
|
upper_name = "ENUM_" + upper_name
|
|
@@ -473,15 +475,21 @@ class PreProcessPlugin(YamlUpdatePlugin):
|
|
|
473
475
|
) -> None:
|
|
474
476
|
yaml_data["groupName"] = self.pad_reserved_words(yaml_data["groupName"], PadType.OPERATION_GROUP, yaml_data)
|
|
475
477
|
yaml_data["groupName"] = to_snake_case(yaml_data["groupName"])
|
|
476
|
-
yaml_data
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
+
|
|
481
|
-
+ "_initial"
|
|
482
|
-
)
|
|
478
|
+
if yaml_data.get("isExactName", False):
|
|
479
|
+
# exact() client name: keep the operation name as-is without lowercasing,
|
|
480
|
+
# snake-casing, or padding reserved words.
|
|
481
|
+
if yaml_data.get("isLroInitialOperation") is True:
|
|
482
|
+
yaml_data["name"] = "_" + extract_original_name(yaml_data["name"]) + "_initial"
|
|
483
483
|
else:
|
|
484
|
-
yaml_data["name"] =
|
|
484
|
+
yaml_data["name"] = yaml_data["name"].lower()
|
|
485
|
+
if yaml_data.get("isLroInitialOperation") is True:
|
|
486
|
+
yaml_data["name"] = (
|
|
487
|
+
"_"
|
|
488
|
+
+ self.pad_reserved_words(extract_original_name(yaml_data["name"]), PadType.METHOD, yaml_data)
|
|
489
|
+
+ "_initial"
|
|
490
|
+
)
|
|
491
|
+
else:
|
|
492
|
+
yaml_data["name"] = self.pad_reserved_words(yaml_data["name"], PadType.METHOD, yaml_data)
|
|
485
493
|
yaml_data["description"] = update_description(yaml_data["description"], yaml_data["name"])
|
|
486
494
|
yaml_data["summary"] = update_description(yaml_data.get("summary", ""))
|
|
487
495
|
body_parameter = yaml_data.get("bodyParameter")
|
|
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
16
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
17
|
Description-Content-Type: text/markdown
|
|
17
18
|
License-File: LICENSE
|
package/generator/setup.py
CHANGED
|
@@ -38,6 +38,7 @@ setup(
|
|
|
38
38
|
"Programming Language :: Python :: 3.10",
|
|
39
39
|
"Programming Language :: Python :: 3.11",
|
|
40
40
|
"Programming Language :: Python :: 3.12",
|
|
41
|
+
"Programming Language :: Python :: 3.14",
|
|
41
42
|
"License :: OSI Approved :: MIT License",
|
|
42
43
|
],
|
|
43
44
|
packages=find_packages(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/http-client-python",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec emitter for Python SDKs",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -60,20 +60,20 @@
|
|
|
60
60
|
"emitter"
|
|
61
61
|
],
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@azure-tools/typespec-autorest": ">=0.
|
|
64
|
-
"@azure-tools/typespec-azure-core": ">=0.
|
|
65
|
-
"@azure-tools/typespec-azure-resource-manager": ">=0.
|
|
66
|
-
"@azure-tools/typespec-azure-rulesets": ">=0.
|
|
67
|
-
"@azure-tools/typespec-client-generator-core": ">=0.
|
|
68
|
-
"@typespec/compiler": "^1.
|
|
69
|
-
"@typespec/http": "^1.
|
|
70
|
-
"@typespec/openapi": "^1.
|
|
71
|
-
"@typespec/rest": ">=0.
|
|
72
|
-
"@typespec/versioning": ">=0.
|
|
73
|
-
"@typespec/events": ">=0.
|
|
74
|
-
"@typespec/sse": ">=0.
|
|
75
|
-
"@typespec/streams": ">=0.
|
|
76
|
-
"@typespec/xml": ">=0.
|
|
63
|
+
"@azure-tools/typespec-autorest": ">=0.69.0 <1.0.0",
|
|
64
|
+
"@azure-tools/typespec-azure-core": ">=0.69.0 <1.0.0",
|
|
65
|
+
"@azure-tools/typespec-azure-resource-manager": ">=0.69.0 <1.0.0",
|
|
66
|
+
"@azure-tools/typespec-azure-rulesets": ">=0.69.0 <1.0.0",
|
|
67
|
+
"@azure-tools/typespec-client-generator-core": ">=0.69.0 <1.0.0",
|
|
68
|
+
"@typespec/compiler": "^1.13.0",
|
|
69
|
+
"@typespec/http": "^1.13.0",
|
|
70
|
+
"@typespec/openapi": "^1.13.0",
|
|
71
|
+
"@typespec/rest": ">=0.83.0 <1.0.0",
|
|
72
|
+
"@typespec/versioning": ">=0.83.0 <1.0.0",
|
|
73
|
+
"@typespec/events": ">=0.83.0 <1.0.0",
|
|
74
|
+
"@typespec/sse": ">=0.83.0 <1.0.0",
|
|
75
|
+
"@typespec/streams": ">=0.83.0 <1.0.0",
|
|
76
|
+
"@typespec/xml": ">=0.83.0 <1.0.0"
|
|
77
77
|
},
|
|
78
78
|
"playgroundConfig": {
|
|
79
79
|
"assets": [
|
|
@@ -98,24 +98,24 @@
|
|
|
98
98
|
"tsx": "^4.21.0"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@azure-tools/typespec-autorest": "~0.
|
|
102
|
-
"@azure-tools/typespec-azure-core": "~0.
|
|
103
|
-
"@azure-tools/typespec-azure-resource-manager": "~0.
|
|
104
|
-
"@azure-tools/typespec-azure-rulesets": "~0.
|
|
105
|
-
"@azure-tools/typespec-client-generator-core": "~0.
|
|
106
|
-
"@azure-tools/azure-http-specs": "0.1.0-alpha.
|
|
107
|
-
"@typespec/compiler": "^1.
|
|
108
|
-
"@typespec/http": "^1.
|
|
109
|
-
"@typespec/openapi": "^1.
|
|
110
|
-
"@typespec/rest": "~0.
|
|
111
|
-
"@typespec/versioning": "~0.
|
|
112
|
-
"@typespec/events": "~0.
|
|
101
|
+
"@azure-tools/typespec-autorest": "~0.69.0",
|
|
102
|
+
"@azure-tools/typespec-azure-core": "~0.69.0",
|
|
103
|
+
"@azure-tools/typespec-azure-resource-manager": "~0.69.0",
|
|
104
|
+
"@azure-tools/typespec-azure-rulesets": "~0.69.0",
|
|
105
|
+
"@azure-tools/typespec-client-generator-core": "~0.69.0",
|
|
106
|
+
"@azure-tools/azure-http-specs": "0.1.0-alpha.42",
|
|
107
|
+
"@typespec/compiler": "^1.13.0",
|
|
108
|
+
"@typespec/http": "^1.13.0",
|
|
109
|
+
"@typespec/openapi": "^1.13.0",
|
|
110
|
+
"@typespec/rest": "~0.83.0",
|
|
111
|
+
"@typespec/versioning": "~0.83.0",
|
|
112
|
+
"@typespec/events": "~0.83.0",
|
|
113
113
|
"@typespec/spector": "0.1.0-alpha.25",
|
|
114
114
|
"@typespec/spec-api": "0.1.0-alpha.14",
|
|
115
|
-
"@typespec/sse": "~0.
|
|
116
|
-
"@typespec/streams": "~0.
|
|
117
|
-
"@typespec/xml": "~0.
|
|
118
|
-
"@typespec/http-specs": "0.1.0-alpha.
|
|
115
|
+
"@typespec/sse": "~0.83.0",
|
|
116
|
+
"@typespec/streams": "~0.83.0",
|
|
117
|
+
"@typespec/xml": "~0.83.0",
|
|
118
|
+
"@typespec/http-specs": "0.1.0-alpha.38",
|
|
119
119
|
"@types/js-yaml": "~4.0.5",
|
|
120
120
|
"@types/node": "~25.0.2",
|
|
121
121
|
"@types/semver": "7.5.8",
|