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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions .chronus/changes/python-fix-nightly-2026-1-3-9-2-18.md

This file was deleted.

8 changes: 0 additions & 8 deletions .chronus/changes/python-fix-nightly-2026-1-4-6-52-8.md

This file was deleted.

52 changes: 47 additions & 5 deletions .github/skills/bump-and-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ Bump the "@typespec/http-client-python" dependency and create a release PR for t
- **BASE_BRANCH**: The branch to base changes on (default: "main")
- **CURRENT_DATE**: Current date in YYYY-MM-DD format (e.g., "2025-01-01")

## Prerequisites

Before starting, verify that `npm-check-updates` is available:
```bash
npx npm-check-updates --version
```

If the command fails or prompts for installation, install it globally:
```bash
npm install -g npm-check-updates
```

## Workflow

### Step 1: Prepare Branch
Expand Down Expand Up @@ -39,7 +51,37 @@ git reset HEAD && git checkout . && git fetch origin {{BASE_BRANCH}} && git chec
- `packages/autorest.python/package.json`
- `packages/typespec-python/package.json`

### Step 3: Run Version Tool
### Steps 3–5: Update Dependencies (only if BASE_BRANCH is "main")

> **Skip Steps 3, 4, and 5 if BASE_BRANCH is not "main".**

### Step 3: Update Dependencies

Run npm-check-updates for `packages/typespec-python/package.json`:
```bash
npx npm-check-updates -u --filter @typespec/*,@azure-tools/* --packageFile packages/typespec-python/package.json
```

### Step 4: Update peerDependencies

Update `peerDependencies` in `packages/typespec-python/package.json`:
- If format is `">=0.a.b <1.0.0"`: Update only the `0.a.b` portion, keep the range format unchanged
- If format is `"^1.a.b"`: Update to the latest version

### Step 5: Verify devDependencies Versions for Specs

Verify `devDependencies` versions for specs in `packages/typespec-python/package.json`:
- Check `@typespec/http-specs` and `@azure-tools/azure-http-specs`
- If the original version in `package.json` is newer than the updated value, keep the original version
- Dev versions are typically in the form `x.y.z-alpha.N-dev.M` (e.g., `0.1.0-alpha.37-dev.3`).

Example:
- Original: `@typespec/http-specs: 0.1.0-alpha.12-dev.5`, updated by step 3 to `0.1.0-alpha.11` → keep `0.1.0-alpha.12-dev.5`.
- Original: `@typespec/http-specs: 0.1.0-alpha.12-dev.5`, updated by step 3 to `0.1.0-alpha.12` → keep `0.1.0-alpha.12` (step 3 works as expected).
- Original: `@azure-tools/azure-http-specs: 0.1.0-alpha.12-dev.2`, updated to `0.1.0-alpha.11` → keep `0.1.0-alpha.12-dev.2`.
- Original: `@azure-tools/azure-http-specs: 0.1.0-alpha.12-dev.2`, updated to `0.1.0-alpha.12` → keep `0.1.0-alpha.12` (step 3 works as expected).

### Step 6: Run Version Tool

Run the change version command:
```bash
Expand All @@ -52,7 +94,7 @@ Verify at least 4 files are changed:
- `packages/typespec-python/package.json`
- `packages/typespec-python/CHANGELOG.md`

### Step 4: Check for Minor Version Bump
### Step 7: Check for Minor Version Bump

The version tool calculates the next version but may choose patch instead of minor incorrectly.

Expand All @@ -64,19 +106,19 @@ The version tool calculates the next version but may choose patch instead of min
- `packages/typespec-python/package.json`
- `packages/typespec-python/CHANGELOG.md`

### Step 5: Build and Stage
### Step 8: Build and Stage

```bash
pnpm install && pnpm build && git add -u
```

### Step 6: Commit and Push
### Step 9: Commit and Push

```bash
git commit -m "bump version"
git push origin HEAD
```

### Step 7: Create PR
### Step 10: Create PR

If no existing PR exists for the current branch, create a new pull request targeting the BASE_BRANCH.
8 changes: 8 additions & 0 deletions packages/autorest.python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release

## 6.49.1

### Bug Fixes

- [#3337](https://github.com/Azure/autorest.python/pull/3337) Fall back to wire type for unknown or unsupported encode
- [#3330](https://github.com/Azure/autorest.python/pull/3330) Fix import for xml paging


## 6.49.0

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

## 0.60.1

### Bug Fixes

- [#3337](https://github.com/Azure/autorest.python/pull/3337) Fall back to wire type for unknown or unsupported encode
- [#3330](https://github.com/Azure/autorest.python/pull/3330) Fix import for xml paging


## 0.60.0

### Features
Expand Down
68 changes: 34 additions & 34 deletions packages/typespec-python/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-python",
"version": "0.60.0",
"version": "0.60.1",
"author": "Microsoft Corporation",
"description": "TypeSpec emitter for Python SDKs",
"homepage": "https://github.com/Azure/autorest.python",
Expand Down Expand Up @@ -48,47 +48,47 @@
"generator/**"
],
"peerDependencies": {
"@typespec/compiler": "^1.8.0",
"@typespec/http": "^1.8.0",
"@typespec/rest": ">=0.78.0 <1.0.0",
"@typespec/versioning": ">=0.78.0 <1.0.0",
"@typespec/openapi": "^1.8.0",
"@typespec/events": ">=0.78.0 <1.0.0",
"@typespec/sse": ">=0.78.0 <1.0.0",
"@typespec/streams": ">=0.78.0 <1.0.0",
"@typespec/xml": ">=0.78.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.64.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.64.1 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.64.1 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.64.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.64.6 <1.0.0"
"@typespec/compiler": "^1.9.0",
"@typespec/http": "^1.9.0",
"@typespec/rest": ">=0.79.0 <1.0.0",
"@typespec/versioning": ">=0.79.0 <1.0.0",
"@typespec/openapi": "^1.9.0",
"@typespec/events": ">=0.79.0 <1.0.0",
"@typespec/sse": ">=0.79.0 <1.0.0",
"@typespec/streams": ">=0.79.0 <1.0.0",
"@typespec/xml": ">=0.79.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.65.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.65.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.65.0 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.65.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.65.0 <1.0.0"
},
"dependencies": {
"js-yaml": "~4.1.0",
"semver": "~7.6.2",
"tsx": "~4.19.1",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg1ODA3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.0.tgz",
"@typespec/http-client-python": "~0.27.1",
"fs-extra": "~11.2.0"
},
"devDependencies": {
"@typespec/compiler": "^1.8.0",
"@typespec/http": "^1.8.0",
"@typespec/rest": "~0.78.0",
"@typespec/versioning": "~0.78.0",
"@typespec/openapi": "^1.8.0",
"@typespec/events": "~0.78.0",
"@typespec/sse": "~0.78.0",
"@typespec/streams": "~0.78.0",
"@typespec/compiler": "^1.9.0",
"@typespec/http": "^1.9.0",
"@typespec/rest": "~0.79.0",
"@typespec/versioning": "~0.79.0",
"@typespec/openapi": "^1.9.0",
"@typespec/events": "~0.79.0",
"@typespec/sse": "~0.79.0",
"@typespec/streams": "~0.79.0",
"@typespec/tspd": "~0.70.0",
"@typespec/xml": "~0.78.0",
"@azure-tools/typespec-azure-resource-manager": "~0.64.1",
"@azure-tools/typespec-azure-core": "~0.64.0",
"@azure-tools/typespec-azure-rulesets": "~0.64.0",
"@azure-tools/typespec-autorest": "~0.64.1",
"@azure-tools/typespec-client-generator-core": "~0.64.6",
"@azure-tools/azure-http-specs": "0.1.0-alpha.37-dev.3",
"@typespec/http-specs": "0.1.0-alpha.32-dev.6",
"@typespec/spector": "0.1.0-alpha.22",
"@typespec/xml": "~0.79.0",
"@azure-tools/typespec-azure-resource-manager": "~0.65.0",
"@azure-tools/typespec-azure-core": "~0.65.0",
"@azure-tools/typespec-azure-rulesets": "~0.65.0",
"@azure-tools/typespec-autorest": "~0.65.0",
"@azure-tools/typespec-client-generator-core": "~0.65.0",
"@azure-tools/azure-http-specs": "0.1.0-alpha.37",
"@typespec/http-specs": "0.1.0-alpha.32",
"@typespec/spector": "0.1.0-alpha.23",
"@typespec/spec-api": "0.1.0-alpha.12",
"@types/js-yaml": "~4.0.5",
"@types/node": "~24.1.0",
Expand All @@ -103,4 +103,4 @@
"chalk": "5.3.0",
"@types/fs-extra": "11.0.4"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiVersions": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiVersions": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiVersions": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiVersions": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiVersions": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiVersions": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiVersions": {}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"apiVersion": "2025-01-01"
"apiVersion": "2025-01-01",
"apiVersions": {
"Client.AlternateApiVersion.Service.Header": "2025-01-01"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class HeaderClient(_HeaderClientOperationsMixin): # pylint: disable=client-acce

:keyword endpoint: Service host. Default value is "http://localhost:3000".
:paramtype endpoint: str
:keyword version: Default value is "2025-01-01". Note that overriding this default value may
result in unsupported behavior.
:keyword version: Known values are "2025-01-01" and None. Default value is "2025-01-01". Note
that overriding this default value may result in unsupported behavior.
:paramtype version: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class HeaderClientConfiguration: # pylint: disable=too-many-instance-attributes

:param endpoint: Service host. Default value is "http://localhost:3000".
:type endpoint: str
:keyword version: Default value is "2025-01-01". Note that overriding this default value may
result in unsupported behavior.
:keyword version: Known values are "2025-01-01" and None. Default value is "2025-01-01". Note
that overriding this default value may result in unsupported behavior.
:paramtype version: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class HeaderClient(_HeaderClientOperationsMixin): # pylint: disable=client-acce

:keyword endpoint: Service host. Default value is "http://localhost:3000".
:paramtype endpoint: str
:keyword version: Default value is "2025-01-01". Note that overriding this default value may
result in unsupported behavior.
:keyword version: Known values are "2025-01-01" and None. Default value is "2025-01-01". Note
that overriding this default value may result in unsupported behavior.
:paramtype version: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class HeaderClientConfiguration: # pylint: disable=too-many-instance-attributes

:param endpoint: Service host. Default value is "http://localhost:3000".
:type endpoint: str
:keyword version: Default value is "2025-01-01". Note that overriding this default value may
result in unsupported behavior.
:keyword version: Known values are "2025-01-01" and None. Default value is "2025-01-01". Note
that overriding this default value may result in unsupported behavior.
:paramtype version: str
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"apiVersion": "2025-01-01"
"apiVersion": "2025-01-01",
"apiVersions": {
"Client.AlternateApiVersion.Service.Path": "2025-01-01"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class PathClient(_PathClientOperationsMixin): # pylint: disable=client-accepts-

:keyword endpoint: Service host. Default value is "http://localhost:3000".
:paramtype endpoint: str
:keyword version: Default value is "2025-01-01". Note that overriding this default value may
result in unsupported behavior.
:keyword version: Known values are "2025-01-01" and None. Default value is "2025-01-01". Note
that overriding this default value may result in unsupported behavior.
:paramtype version: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class PathClientConfiguration: # pylint: disable=too-many-instance-attributes

:param endpoint: Service host. Default value is "http://localhost:3000".
:type endpoint: str
:keyword version: Default value is "2025-01-01". Note that overriding this default value may
result in unsupported behavior.
:keyword version: Known values are "2025-01-01" and None. Default value is "2025-01-01". Note
that overriding this default value may result in unsupported behavior.
:paramtype version: str
"""

Expand Down
Loading
Loading