Skip to content

[python] upgrade latest dev version of azure-http-specs#10057

Queued
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-4054
Queued

[python] upgrade latest dev version of azure-http-specs#10057
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-4054

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

Adds missing Python mock API test coverage for the azure/client-generator-core/client-initialization specs, following the fix in Azure/typespec-azure#4054 which added the required service: parameter to @client decorators.

Changes

  • Bump @azure-tools/azure-http-specs to 0.1.0-alpha.39-dev.3 (includes the service: fix)
  • default scenario — add test_query_param_client (sync + async); previously the only untested client in this spec
  • individually scenario — new test files covering all 6 IndividuallyNested* clients (sync + async):
    • IndividuallyNestedWithPathClientblobName elevated as path param
    • IndividuallyNestedWithQueryClientblobName elevated as query param
    • IndividuallyNestedWithHeaderClientname elevated as header param
    • IndividuallyNestedWithMultipleClientname + region both elevated
    • IndividuallyNestedWithMixedClientname elevated, region stays at method level
    • IndividuallyNestedWithParamAliasClientblobName with @paramAlias("blob")
# Example: individually-initialized client — no blobName needed on operations
with IndividuallyNestedWithPathClient("test-blob") as client:
    client.with_query(format="text")
    client.get_standalone()
    client.delete_standalone()

# Mixed: name at client level, region still required per-call
with IndividuallyNestedWithMixedClient("test-name-value") as client:
    client.with_query(region="us-west", format="text")
    client.get_standalone(region="us-west")
Original prompt

This section details on the original issue you should resolve

<issue_title>[python] add test case for Azure/typespec-azure#4054
</issue_title>
<issue_description>follow skill https://github.com/microsoft/typespec/blob/main/.github/skills/python-sdk-spector-mock-api-tests/SKILL.md to write test case for Azure/typespec-azure#4054
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Mar 17, 2026
Copilot AI changed the title [WIP] [python] Add test case for pull request 4054 [python] Add mock API test cases for client-initialization individually scenarios and QueryParamClient Mar 17, 2026
Copilot AI requested a review from msyyc March 17, 2026 09:14
@msyyc msyyc changed the title [python] Add mock API test cases for client-initialization individually scenarios and QueryParamClient [python] upgrade latest dev version of azure-http-specs Mar 17, 2026
@msyyc msyyc force-pushed the copilot/add-test-case-for-pull-4054 branch from 425dfcc to 1d25a98 Compare March 17, 2026 09:29
@msyyc msyyc marked this pull request as ready for review March 17, 2026 09:29
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 17, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@10057

commit: 1d25a98

@github-actions
Copy link
Contributor

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - internal ✏️

upgrade latest dev version of @azure-tools/azure-http-specs

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@msyyc msyyc enabled auto-merge March 17, 2026 10:31
@msyyc msyyc added this pull request to the merge queue Mar 18, 2026
Any commits made after this event will not be merged.
github-merge-queue bot pushed a commit that referenced this pull request Mar 18, 2026
Adds missing Python mock API test coverage for the
`azure/client-generator-core/client-initialization` specs, following the
fix in Azure/typespec-azure#4054 which added the required `service:`
parameter to `@client` decorators.

## Changes

- **Bump `@azure-tools/azure-http-specs`** to `0.1.0-alpha.39-dev.3`
(includes the `service:` fix)
- **`default` scenario** — add `test_query_param_client` (sync + async);
previously the only untested client in this spec
- **`individually` scenario** — new test files covering all 6
`IndividuallyNested*` clients (sync + async):
- `IndividuallyNestedWithPathClient` — `blobName` elevated as path param
- `IndividuallyNestedWithQueryClient` — `blobName` elevated as query
param
- `IndividuallyNestedWithHeaderClient` — `name` elevated as header param
- `IndividuallyNestedWithMultipleClient` — `name` + `region` both
elevated
- `IndividuallyNestedWithMixedClient` — `name` elevated, `region` stays
at method level
- `IndividuallyNestedWithParamAliasClient` — `blobName` with
`@paramAlias("blob")`

```python
# Example: individually-initialized client — no blobName needed on operations
with IndividuallyNestedWithPathClient("test-blob") as client:
    client.with_query(format="text")
    client.get_standalone()
    client.delete_standalone()

# Mixed: name at client level, region still required per-call
with IndividuallyNestedWithMixedClient("test-name-value") as client:
    client.with_query(region="us-west", format="text")
    client.get_standalone(region="us-west")
```

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>[python] add test case for
Azure/typespec-azure#4054
> </issue_title>
> <issue_description>follow skill
https://github.com/microsoft/typespec/blob/main/.github/skills/python-sdk-spector-mock-api-tests/SKILL.md
to write test case for Azure/typespec-azure#4054
> </issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #10056

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Send tasks to Copilot coding agent from
[Slack](https://gh.io/cca-slack-docs) and
[Teams](https://gh.io/cca-teams-docs) to turn conversations into code.
Copilot posts an update in your thread when it's finished.

---------

Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python] add test case for https://github.com/Azure/typespec-azure/pull/4054

4 participants