Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: fix
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Support custom wire names for etags defined with `Azure.Core.eTag` (e.g. `x-ms-blob-if-match`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: internal
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Consolidate regenerate-common.ts into regenerate.ts and fix azure spec detection using azure-http-specs path check
8 changes: 8 additions & 0 deletions .chronus/changes/python-module-loading-2026-3-29-14-53-8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: fix
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Update Python emitter browser behavior to only load Pyodide once instead of on every emit
2 changes: 1 addition & 1 deletion packages/autorest.python/package.json
Original file line number Diff line number Diff line change
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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjIyNTU3My9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjIzNTE1OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
"@autorest/system-requirements": "~1.0.2",
"fs-extra": "~11.2.0",
"tsx": "^4.21.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@typespec/xml": ">=0.81.0 <1.0.0"
},
"dependencies": {
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjIyNTU3My9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjIzNTE1OC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
"fs-extra": "~11.2.0",
"js-yaml": "~4.1.0",
"semver": "~7.6.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def build_conditional_request_post_if_match_request( # pylint: disable=name-too
_headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str")
if_none_match = prep_if_none_match(etag, match_condition)
if if_none_match is not None:
_headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str")
_headers["if-none-match"] = _SERIALIZER.header("if_none_match", if_none_match, "str")

return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)

Expand All @@ -65,7 +65,7 @@ def build_conditional_request_post_if_none_match_request( # pylint: disable=nam
# Construct headers
if_match = prep_if_match(etag, match_condition)
if if_match is not None:
_headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str")
_headers["if-match"] = _SERIALIZER.header("if_match", if_match, "str")
if_none_match = prep_if_none_match(etag, match_condition)
if if_none_match is not None:
_headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def build_conditional_request_post_if_match_request( # pylint: disable=name-too
_headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str")
if_none_match = prep_if_none_match(etag, match_condition)
if if_none_match is not None:
_headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str")
_headers["if-none-match"] = _SERIALIZER.header("if_none_match", if_none_match, "str")

return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)

Expand All @@ -59,7 +59,7 @@ def build_conditional_request_post_if_none_match_request( # pylint: disable=nam
# Construct headers
if_match = prep_if_match(etag, match_condition)
if if_match is not None:
_headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str")
_headers["if-match"] = _SERIALIZER.header("if_match", if_match, "str")
if_none_match = prep_if_none_match(etag, match_condition)
if if_none_match is not None:
_headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ async def client():
yield client


# will reopen after bug fixed
# @pytest.mark.asyncio
# async def test_put_model_property(client: ClientDefaultValueClient):
# """Test case 1: @clientDefaultValue for model property."""
# body = ModelWithDefaultValues(name="test")
# result = await client.put_model_property(body=body)
# assert result.name == "test"
# assert result.timeout == 30
# assert result.tier == "standard"
# assert result.retry is True
@pytest.mark.asyncio
async def test_put_model_property(client: ClientDefaultValueClient):
"""Test case 1: @clientDefaultValue for model property."""
body = ModelWithDefaultValues(name="test")
result = await client.put_model_property(body=body)
assert result.name == "test"
assert result.timeout == 30
assert result.tier == "standard"
assert result.retry is True


@pytest.mark.asyncio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ def client():
with ClientDefaultValueClient() as client:
yield client

# will reopen after bug fixed
# def test_put_model_property(client: ClientDefaultValueClient):
# """Test case 1: @clientDefaultValue for model property."""
# body = ModelWithDefaultValues(name="test")
# result = client.put_model_property(body=body)
# assert result.name == "test"
# assert result.timeout == 30
# assert result.tier == "standard"
# assert result.retry is True

def test_put_model_property(client: ClientDefaultValueClient):
"""Test case 1: @clientDefaultValue for model property."""
body = ModelWithDefaultValues(name="test")
result = client.put_model_property(body=body)
assert result.name == "test"
assert result.timeout == 30
assert result.tier == "standard"
assert result.retry is True


def test_get_operation_parameter(client: ClientDefaultValueClient):
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

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

Loading