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.

7 changes: 0 additions & 7 deletions .chronus/changes/http-client-python-sse-pylint-2026-10-14.md

This file was deleted.

7 changes: 0 additions & 7 deletions .chronus/changes/python-3-15-support-2026-10-12.md

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions .chronus/changes/python-discriminator-vartype-2026-10-7.md

This file was deleted.

7 changes: 0 additions & 7 deletions .chronus/changes/python-fixCasingEnum-2026-3-9-16-6-39.md

This file was deleted.

36 changes: 27 additions & 9 deletions .github/skills/http-client-python-bump-and-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Create a PR to bump dependencies and release a new version of the http-client-py
Before starting, verify that `npm-check-updates` is available:

```bash
npx npm-check-updates --version
npx --no-install npm-check-updates --version
```

If the command fails or prompts for installation, install it globally:
Expand All @@ -23,6 +23,10 @@ If the command fails or prompts for installation, install it globally:
npm install -g npm-check-updates
```

The version script also requires pnpm and the repository's workspace dependencies, even though the emitter uses npm. Verify that `pnpm --version` and `pnpm exec chronus --version` work from `{REPO}`. If pnpm is missing, install the version declared in the root `package.json`'s `packageManager` field. If Chronus is missing, run `pnpm install --frozen-lockfile` from `{REPO}` before continuing.

Use the CFS feed `https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/` for dependency queries and installation. From the package directory, verify that `npm config get registry` reports this feed; it is configured in the package's `.npmrc`. Do not silently fall back to npmjs.org if the feed is unavailable.
Comment thread
msyyc marked this conversation as resolved.
Resolved

## Workflow

1. Navigate to the package directory:
Expand All @@ -31,25 +35,29 @@ npm install -g npm-check-updates
cd {REPO}/packages/http-client-python
```

2. Reset and sync with main:
2. Inspect the worktree and fetch main without discarding local changes:

```bash
git reset HEAD && git checkout . && git checkout origin/main && git pull origin main
git status --short
git fetch origin main
```

Preserve unrelated local work. Do not run `git reset` or `git checkout .` as release preparation.

3. Create release branch (use current date in MM-DD format):

```bash
git checkout -b publish/python-release-{MM-DD}
git switch -c publish/python-release-{MM-DD} origin/main
```

4. Update dependencies:

```bash
npx npm-check-updates -u --filter @typespec/*,@azure-tools/* --packageFile package.json
npx npm-check-updates -u --filter '@typespec/*,@azure-tools/*' --packageFile package.json --registry https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/
```

5. Update `peerDependencies` in package.json:
- Do not assume step 4 updated peer dependencies: in the release run it updated development dependencies but left peer lower bounds unchanged. Use the latest versions reported in step 4 for the corresponding peers.
- 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

Expand Down Expand Up @@ -82,14 +90,22 @@ npm install -g npm-check-updates
- Bump dependencies of `@typespec/*` and `@azure-tools/*` to latest versions
```

- Verify that the version in `package.json` matches the new `CHANGELOG.md` heading.
Verify that the version in `package.json` matches the new `CHANGELOG.md` heading. Consumed Python change files under `.chronus/changes/` are expected deletions; include them in the release commit.

8. Build and commit:
8. Install, build, validate, and commit:

```bash
npm install && npm run build && git add -u && git commit -m "bump version"
npm install --registry=https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/ && npm run build
npm run lint
npm run test:emitter
```

Run formatting from `{REPO}` using the `pnpm-format` skill. If `packages/prettier-plugin-typespec/dist/index.js` is missing, build the formatter first with `pnpm -r --filter '@typespec/prettier-plugin-typespec...' build`, then run `pnpm format`. Do not repeat dependency installation or build the entire monorepo for this missing-plugin error.

Verify that `package-lock.json` and its root package entry match the manifest version, peer dependencies, and development dependencies. Review `git diff --check` and the changed-file list; stage only the release manifest, lockfile, changelog, and consumed Python change files. Commit using a conventional message such as `chore(python): bump version to <version>` and the required co-author trailer.

Check the lockfile diff for registry changes: preserve existing CFS URLs and resolve new or updated packages through CFS, without migrating unrelated pre-existing npmjs.org entries. Changing the registry and rerunning `npm install --package-lock-only` did not repair existing npmjs.org URLs in the release run. If correcting such a lockfile, obtain the exact CFS tarball URLs from feed metadata and verify their contents against the lockfile integrity hashes before replacing URLs; do not blindly rewrite hosts or change package versions.

9. Push and create PR:

```bash
Expand All @@ -99,6 +115,8 @@ npm install -g npm-check-updates

10. Create PR with title `[python] release new version` and no description.

Verify the created PR's title, description, base/head branches, and draft state rather than relying on the creation tool's output. The release run's PR tool inserted a placeholder despite receiving an empty body; if this happens, clear it with `gh api --method PATCH repos/microsoft/typespec/pulls/<number> -f body=''` and verify again. If the tool creates a draft, mark it ready with `gh pr ready <number>` unless the user requested a draft.

## Post-Process Review

1. After the pull request is created, review the complete release run: commands executed, command output, manual interventions, validation results, changed files, commit, push, cleanup, and PR creation.
Expand All @@ -110,4 +128,4 @@ npm install -g npm-check-updates
3. Do not change the skill based on preference, speculation, or an unobserved edge case. For every update, record the observed evidence and explain why the edit improves future releases.
4. Keep any skill update minimal, validate its formatting and frontmatter, and keep it separate from the completed release PR unless the user explicitly asks to include it there.
5. If the review finds no evidence-backed improvement, leave the skill unchanged and state that no update was warranted.
6. Return the branch name, released package version, `@typespec/http-client-python` version, commit hash, pull request URL, review findings, and any skill update to the user.
6. Return the branch name, prepared `@typespec/http-client-python` version, commit hash, pull request URL, review findings, and any skill update to the user. Creating a release PR does not mean the package has been published.
15 changes: 15 additions & 0 deletions packages/http-client-python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Change Log - @typespec/http-client-python

## 0.40.0

### Features

- [#12161](https://github.com/microsoft/typespec/pull/12161) Add Python 3.15 to generated package classifiers.

### Bug Fixes

- [#12326](https://github.com/microsoft/typespec/pull/12326) Preserve raw byte streaming for XML responses using the legacy bytes encoding instead of deserializing them as XML string scalars.
- [#12281](https://github.com/microsoft/typespec/pull/12281) Prevent Pylint `too-many-statements` errors in generated synchronous and asynchronous structured-stream operations with SSE event dispatch. Scope the suppression to operation implementations, leaving overload declarations and non-structured-stream operations unchanged.
- [#12342](https://github.com/microsoft/typespec/pull/12342) Escape string literals and wire names in generated Python declarations, discriminator initializers, field metadata, and templates to preserve specification values as data.
- [#12127](https://github.com/microsoft/typespec/pull/12127) Fix the `:vartype` docstring of constant enum values (such as discriminator properties on polymorphic subclasses) to reference the enum class instead of a non-existent module-level symbol named after the enum member.
- [#10329](https://github.com/microsoft/typespec/pull/10329) Preserve underscores before numeric enum segments and acronyms such as `A2A` without changing numeric identifiers such as `int32`.


## 0.39.0

### Features
Expand Down
67 changes: 47 additions & 20 deletions packages/http-client-python/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions packages/http-client-python/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typespec/http-client-python",
"version": "0.39.0",
"version": "0.40.0",
"author": "Microsoft Corporation",
"description": "TypeSpec emitter for Python SDKs",
"homepage": "https://typespec.io",
Expand Down Expand Up @@ -66,11 +66,11 @@
"emitter"
],
"peerDependencies": {
"@azure-tools/typespec-autorest": ">=0.73.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.73.2 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.73.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.73.0 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.73.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.73.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.73.1 <1.0.0",
"@typespec/compiler": "^1.17.0",
"@typespec/http": "^1.17.0",
"@typespec/openapi": "^1.17.0",
Expand Down Expand Up @@ -104,11 +104,11 @@
"tsx": "^4.23.13"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "~0.73.0",
"@azure-tools/typespec-autorest": "~0.73.2",
"@azure-tools/typespec-azure-core": "~0.73.0",
"@azure-tools/typespec-azure-resource-manager": "~0.73.0",
"@azure-tools/typespec-azure-rulesets": "~0.73.0",
"@azure-tools/typespec-client-generator-core": "~0.73.0",
"@azure-tools/typespec-client-generator-core": "~0.73.1",
"@azure-tools/azure-http-specs": "0.1.0-alpha.46",
"@typespec/compiler": "^1.17.0",
"@typespec/http": "^1.17.0",
Expand Down
Loading