Skip to content

Commit 2c38914

Browse files
committed
merge main
2 parents 1b5d9a6 + f3ec099 commit 2c38914

File tree

1,546 files changed

+83597
-43353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,546 files changed

+83597
-43353
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@
856856

857857
# Add owners for notifications for specific pipelines
858858
/eng/pipelines/templates/jobs/tests-nightly-python.yml @lmazuel @mccoyp
859-
/eng/pipelines/aggregate-reports.yml @lmazuel @mccoyp @YalinLi0312 @kristapratico
859+
/eng/pipelines/aggregate-reports.yml @lmazuel @mccoyp @pvaneck
860860
/eng/common/pipelines/codeowners-linter.yml @lmazuel @mccoyp
861861
/eng/pipelines/docindex.yml @danieljurek @scbedd @weshaggard @benbp
862862

.vscode/cspell.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,12 @@
11731173
"nbconvert",
11741174
"rollupby",
11751175
"milli",
1176-
"resourceid"
1176+
"resourceid",
1177+
"Exceps",
1178+
"processiorate",
1179+
"processiobytessec",
1180+
"iowait",
1181+
"softirq"
11771182
]
11781183
},
11791184
{
@@ -1193,7 +1198,8 @@
11931198
"psutil",
11941199
"psycopg",
11951200
"uninstrument",
1196-
"uninstrumented"
1201+
"uninstrumented",
1202+
"scputimes"
11971203
]
11981204
},
11991205
{
@@ -1203,6 +1209,8 @@
12031209
"ikey",
12041210
"msecs",
12051211
"mycontainer",
1212+
"pclp",
1213+
"pcsp",
12061214
"semconv",
12071215
"updown",
12081216
"uvicorn"

doc/analyze_check_versions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ This table is to clarify the currently pinned version of tools we run in CI and
55

66
| Tool | Current Version | Next Version | Next Version Merge Date |
77
|------|-----------------|--------------|-------------------------|
8-
Pylint | 3.2.7 | 3.2.7 | 2025-10-13 |
9-
Pylint Guidelines Checker | 0.5.6 | 0.5.7 | 2025-10-13 |
10-
MyPy | 1.14.1 | 1.14.1 | 2025-10-13 |
11-
Pyright | 1.1.391 | 1.1.391 | 2025-10-13 |
8+
Pylint | 3.2.7 | 3.2.7 | 2026-01-12 |
9+
Pylint Guidelines Checker | 0.5.6 | 0.5.7 | 2026-01-12 |
10+
MyPy | 1.14.1 | 1.18.1 | 2026-01-12 |
11+
Pyright | 1.1.391 | 1.1.405 | 2026-01-12 |
1212
Sphinx | 8.2.0 | N/A | N/A |
1313
Black | 24.4.0 | N/A | N/A |
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
# Azure Python SDK Breaking Changes Review and Resolution Guide for TypeSpec Migration
2+
3+
The Azure Python SDK generally prohibits breaking changes unless they result from service behavior modifications. This guide helps you identify, review, and resolve breaking changes that may occur in new SDK versions due to migration of service specifications from Swagger to TypeSpec.
4+
5+
Breaking changes can be resolved by:
6+
7+
1. Client Customizations
8+
9+
Client customizations should be implemented in a file named `client.tsp` located in the service's specification directory alongside the main entry point `main.tsp`. This `client.tsp` becomes the new specification entry point, so import `main.tsp` in the `client.tsp` file. **Do not** import `client.tsp` in the `main.tsp` file.
10+
11+
```tsp
12+
import "./main.tsp";
13+
import "@azure-tools/typespec-client-generator-core";
14+
15+
using Azure.ClientGenerator.Core;
16+
17+
// Add your customizations here
18+
```
19+
20+
2. TypeSpec Configuration Changes
21+
22+
TypeSpec configuration changes should be made in the `tspconfig.yaml` file located in the service's specification directory. This file is used to configure the TypeSpec compiler and client generator options. For example:
23+
24+
```yaml
25+
options:
26+
"@azure-tools/typespec-python":
27+
```
28+
29+
## 1. Naming Changes with Numbers
30+
31+
**Changelog Pattern**:
32+
33+
Paired removal and addition entries showing naming changes from words to numbers:
34+
35+
```md
36+
- Enum `Minute` deleted or renamed its member `ZERO`
37+
- Enum `Minute` deleted or renamed its member `THIRTY`
38+
- Enum `Minute` added member `ENUM_0`
39+
- Enum `Minute` added member `ENUM_30`
40+
```
41+
42+
**Reason**: Swagger automatically converts numeric names to words during code generation, while TypeSpec preserves the original naming. This affects all type names, including enums, models, and operations.
43+
44+
**Spec Pattern**:
45+
46+
Find the type definition by examining the names from the addition entries in the changelog (pattern: `Enum '<type name>' added member xxx`):
47+
48+
```tsp
49+
union Minute {
50+
int32,
51+
`0`: 0,
52+
`30`: 30,
53+
}
54+
```
55+
56+
**Resolution**:
57+
58+
Use client customization to restore the original names from the removal entries:
59+
60+
```tsp
61+
@@clientName(Minute.`0`, "ZERO", "python");
62+
@@clientName(Minute.`30`, "THIRTY", "python");
63+
```
64+
65+
## 2. Operation Naming Changes
66+
67+
**Changelog Pattern**:
68+
69+
Removal of an operation and addition of a similarly named operation for the same operation group:
70+
71+
```md
72+
- Added operation StorageTaskAssignmentOperations.storage_task_assignment_list
73+
- Removed operation StorageTaskAssignmentOperations.list
74+
```
75+
76+
**Reason**: TypeSpec may generate different operation names than Swagger to avoid naming collisions.
77+
78+
**Spec Pattern**:
79+
80+
Locate the interface and operation using the name from the addition entries.
81+
82+
```tsp
83+
interface StorageTaskAssignment {
84+
op storageTaskAssignmentList(xxx): xxx;
85+
}
86+
```
87+
88+
**Resolution**:
89+
90+
Use client naming to restore the original operation name from the removal entries:
91+
92+
```tsp
93+
@@clientName(StorageTaskAssignment.storageTaskAssignmentList, "list", "python");
94+
```
95+
96+
## 3. Naming Changes from Directive
97+
98+
**Changelog Pattern**:
99+
100+
Paired removal and addition entries showing naming changes for structs:
101+
102+
```md
103+
- Added model `RedisResource`
104+
- Deleted or renamed model `ResourceInfo`
105+
```
106+
107+
Also, in the legacy config for swagger under the spec folder: `specification/<service>/resource-manager/readme.python.md`, the renaming directives could be found:
108+
109+
```md
110+
directive:
111+
112+
- rename-model:
113+
from: 'RedisResource'
114+
to: 'ResourceInfo'
115+
```
116+
117+
**Reason**: Swagger has directive ways to change the naming.
118+
119+
**Spec Pattern**:
120+
121+
Find the type definition by examining the names from the addition entries in the changelog (pattern: `Added model '<type name>'`):
122+
123+
```tsp
124+
model RedisResource {
125+
...
126+
}
127+
```
128+
129+
**Resolution**:
130+
131+
Use client customization to do the same renaming as the directives in the legacy config:
132+
133+
```tsp
134+
@@clientName(RedisResource, "ResourceInfo", "python");
135+
```
136+
137+
## 4. Client Naming Changes
138+
139+
**Changelog Pattern**:
140+
141+
Removal entry showing naming change of the client:
142+
143+
```md
144+
- Deleted or renamed client `IotDpsClient`
145+
```
146+
147+
**Reason**: TypeSpec generates client names based on the `namespace` name rather than the title annotation in the `@service` decorator.
148+
149+
**Spec Pattern**:
150+
151+
Find the name from namespace:
152+
153+
```tsp
154+
@service(#{ title: "iotDpsClient" })
155+
namespace Microsoft.Devices;
156+
```
157+
158+
**Resolution**:
159+
160+
Update it to the correct client name using `@@clientName`:
161+
162+
```tsp
163+
@@clientName(Microsoft.Devices, "IotDpsClient", "python");
164+
```
165+
166+
## 5. Reorder of Parameters
167+
168+
Entry showing the parameters get re-ordered for an operation:
169+
170+
```md
171+
- Method `IotDpsResourceOperations.get` re-ordered its parameters from `['self', 'provisioning_service_name', 'resource_group_name', 'kwargs']` to `['self', 'resource_group_name', 'provisioning_service_name', 'kwargs']`
172+
```
173+
174+
**Reason**: TypeSpec generally uses generic to generate operations. An unified parameters' order will be widely shared in one operation group, and may make difference comparing to what defined in swagger.
175+
176+
**Spec Pattern**:
177+
178+
Operation extends parameters from type `ProvisioningServiceDescription`:
179+
180+
```tsp
181+
@armResourceOperations
182+
interface ProvisioningServiceDescriptions {
183+
get is ArmResourceRead<ProvisioningServiceDescription, Error = ErrorDetails>;
184+
}
185+
```
186+
187+
**Resolution**:
188+
189+
Override the operation by a customized one with a manually designed order of parameters:
190+
191+
```tsp
192+
op IotDpsResourceGetCustomized(
193+
@path
194+
provider: "Microsoft.ThisWillBeReplaced",
195+
196+
@path
197+
provisioningServiceName: string,
198+
199+
...Azure.ResourceManager.CommonTypes.ResourceGroupNameParameter,
200+
): ProvisioningServiceDescription;
201+
202+
@@override(ProvisioningServiceDescriptions.get,
203+
IotDpsResourceGetCustomized,
204+
"python"
205+
);
206+
```
207+
208+
## 6. Removal of Unreferenced Models
209+
210+
**Changelog Pattern**:
211+
212+
Multiple removals of unreferenced models that are typically not used in the SDK:
213+
214+
```md
215+
- Deleted or renamed model `ReplicationUsageList`
216+
- Deleted or renamed model `VaultList`
217+
- Deleted or renamed model `VaultUsageList`
218+
```
219+
220+
**Reason**: Unreferenced models are removed during TypeSpec migration.
221+
222+
**Impact**: Low impact since these models are typically not used directly by users.
223+
224+
**Resolution**: Accept these breaking changes.
225+
226+
## 7. Parameters Changed to Keyword-only
227+
228+
**Changelog Pattern**:
229+
230+
Entries showing the usage of passing parameters positionally is disabled:
231+
232+
```md
233+
- Method `DpsCertificateOperations.delete` changed its parameter `certificate_name1` from `positional_or_keyword` to `keyword_only`
234+
```
235+
236+
**Reason**: Query and header parameters in operation methods have been changed from positional to keyword-only by the new operation design.
237+
238+
**Impact**: Users should convert all positional parameters to keyword arguments
239+
240+
**Resolution**: Accept these breaking changes.
241+
242+
## 8. Removal of Parameter `if_match`
243+
244+
**Changelog Pattern**:
245+
246+
Removal of parameter `if_match` and addition of `etag/match_condition` for the same operation:
247+
248+
```md
249+
- Model `DpsCertificateOperations` added parameter `etag` in method `create_or_update`
250+
- Model `DpsCertificateOperations` added parameter `match_condition` in method `create_or_update`
251+
- Method `DpsCertificateOperations.create_or_update` deleted or renamed its parameter `if_match` of kind `positional_or_keyword`
252+
```
253+
254+
**Reason**: Header signatures `if_match/if_none_match` is replaced by `etag/match_condition` by the new operation design.
255+
256+
**Impact**: Replace `if_match="<specific etag>"` with `etag="<specific etag>", match_condition=MatchConditions.IfNotModified`.
257+
258+
**Resolution**: Accept these breaking changes.
259+
260+
## 9. Removal of multi-level flattened properties
261+
262+
**Changelog Pattern**:
263+
264+
Removal of multiple parameters and addition of parameters `properties` entries for the same model:
265+
266+
```md
267+
- Model `VaultExtendedInfoResource` added property `properties`
268+
- Model `VaultExtendedInfoResource` deleted or renamed its instance variable `integrity_key`
269+
- Model `VaultExtendedInfoResource` deleted or renamed its instance variable `encryption_key`
270+
- Model `VaultExtendedInfoResource` deleted or renamed its instance variable `encryption_key_thumbprint`
271+
- Model `VaultExtendedInfoResource` deleted or renamed its instance variable `algorithm`
272+
```
273+
274+
**Reason**: Typespec no longer supports multi-level flattening and will always preserve the actual REST API hierarchy. For more detailed information about model hierarchy, please refer to https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt/hybrid_model_migration.md#model-hierarchy-reflects-rest-api-structure
275+
276+
**Impact**: Users can only get the property following the actual model structure which matches the REST API documentation.
277+
278+
**Resolution**: Accept these breaking changes.
-53.1 KB
Binary file not shown.
-98.9 KB
Binary file not shown.
-72.7 KB
Binary file not shown.

doc/dev/private_package/get_private_package.md

Lines changed: 0 additions & 39 deletions
This file was deleted.
-77.8 KB
Binary file not shown.
-107 KB
Binary file not shown.

0 commit comments

Comments
 (0)