@typespec/http-client-python 0.14.2 → 0.14.3-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/emitter/emitter.js +1 -3
- package/dist/emitter/emitter.js.map +1 -1
- package/dist/emitter/lib.d.ts +1 -0
- package/dist/emitter/lib.d.ts.map +1 -1
- package/dist/emitter/lib.js +10 -0
- package/dist/emitter/lib.js.map +1 -1
- package/emitter/src/emitter.ts +1 -3
- package/emitter/src/lib.ts +13 -0
- package/emitter/temp/tsconfig.tsbuildinfo +1 -1
- package/eng/scripts/ci/regenerate.ts +11 -4
- package/eng/scripts/setup/__pycache__/package_manager.cpython-39.pyc +0 -0
- package/eng/scripts/setup/__pycache__/venvtools.cpython-39.pyc +0 -0
- package/generator/build/lib/pygen/__init__.py +19 -1
- package/generator/build/lib/pygen/codegen/models/code_model.py +32 -0
- package/generator/build/lib/pygen/codegen/models/operation.py +3 -4
- package/generator/build/lib/pygen/codegen/models/paging_operation.py +1 -1
- package/generator/build/lib/pygen/codegen/serializers/__init__.py +77 -73
- package/generator/build/lib/pygen/codegen/serializers/builder_serializer.py +4 -3
- package/generator/build/lib/pygen/codegen/serializers/general_serializer.py +86 -13
- package/generator/build/lib/pygen/codegen/templates/packaging_templates/pyproject.toml.jinja2 +109 -0
- package/generator/dist/pygen-0.1.0-py3-none-any.whl +0 -0
- package/generator/pygen/__init__.py +19 -1
- package/generator/pygen/codegen/models/code_model.py +32 -0
- package/generator/pygen/codegen/models/operation.py +3 -4
- package/generator/pygen/codegen/models/paging_operation.py +1 -1
- package/generator/pygen/codegen/serializers/__init__.py +77 -73
- package/generator/pygen/codegen/serializers/builder_serializer.py +4 -3
- package/generator/pygen/codegen/serializers/general_serializer.py +86 -13
- package/generator/pygen/codegen/templates/packaging_templates/pyproject.toml.jinja2 +109 -0
- package/generator/pygen.egg-info/SOURCES.txt +1 -0
- package/generator/test/azure/requirements.txt +1 -0
- package/generator/test/azure/tox.ini +2 -2
- package/generator/test/generic_mock_api_tests/asynctests/test_authentication_async.py +7 -4
- package/generator/test/generic_mock_api_tests/test_authentication.py +7 -4
- package/generator/test/unbranded/mock_api_tests/test_unbranded.py +3 -1
- package/generator/test/unbranded/requirements.txt +1 -0
- package/generator/test/unbranded/tox.ini +2 -2
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ commands =
|
|
|
20
20
|
python ../../../eng/scripts/ci/run_pyright.py -t azure -s "generated" {posargs}
|
|
21
21
|
|
|
22
22
|
# apiview
|
|
23
|
-
pip install apiview-stub-generator==0.3.
|
|
23
|
+
pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
|
|
24
24
|
python ../../../eng/scripts/ci/run_apiview.py -t azure -s "generated" {posargs}
|
|
25
25
|
|
|
26
26
|
[testenv:test]
|
|
@@ -52,5 +52,5 @@ commands =
|
|
|
52
52
|
deps=
|
|
53
53
|
-r requirements.txt
|
|
54
54
|
commands =
|
|
55
|
-
pip install apiview-stub-generator==0.3.
|
|
55
|
+
pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
|
|
56
56
|
python ../../../eng/scripts/ci/run_apiview.py -t azure -s "generated" {posargs}
|
|
@@ -8,6 +8,7 @@ from authentication.apikey.aio import ApiKeyClient
|
|
|
8
8
|
from authentication.http.custom.aio import CustomClient
|
|
9
9
|
from authentication.oauth2.aio import OAuth2Client
|
|
10
10
|
from authentication.union.aio import UnionClient
|
|
11
|
+
from setuppy.authentication.union.aio import UnionClient as SetuppyUnionClient
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
# Utilities functions
|
|
@@ -99,14 +100,16 @@ async def test_oauth2_invalid(oauth2_client, core_library):
|
|
|
99
100
|
|
|
100
101
|
|
|
101
102
|
@pytest.mark.asyncio
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
@pytest.mark.parametrize("union_client_type", [UnionClient, SetuppyUnionClient])
|
|
104
|
+
async def test_union_keyvalid(api_key_client, union_client_type):
|
|
105
|
+
client = api_key_client(union_client_type)
|
|
104
106
|
await client.valid_key()
|
|
105
107
|
|
|
106
108
|
|
|
107
109
|
@pytest.mark.asyncio
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
@pytest.mark.parametrize("union_client_type", [UnionClient, SetuppyUnionClient])
|
|
111
|
+
async def test_union_tokenvalid(oauth2_client, union_client_type):
|
|
112
|
+
client = oauth2_client(union_client_type)
|
|
110
113
|
await client.valid_token(enforce_https=False)
|
|
111
114
|
|
|
112
115
|
|
|
@@ -7,6 +7,7 @@ import pytest
|
|
|
7
7
|
from authentication.apikey import ApiKeyClient
|
|
8
8
|
from authentication.oauth2 import OAuth2Client
|
|
9
9
|
from authentication.union import UnionClient
|
|
10
|
+
from setuppy.authentication.union import UnionClient as SetuppyUnionClient
|
|
10
11
|
from authentication.http.custom import CustomClient
|
|
11
12
|
|
|
12
13
|
|
|
@@ -94,13 +95,15 @@ def test_oauth2_invalid(oauth2_client, core_library):
|
|
|
94
95
|
assert ex.value.status_code == 403
|
|
95
96
|
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
@pytest.mark.parametrize("union_client_type", [UnionClient, SetuppyUnionClient])
|
|
99
|
+
def test_union_keyvalid(api_key_client, union_client_type):
|
|
100
|
+
client = api_key_client(union_client_type)
|
|
99
101
|
client.valid_key()
|
|
100
102
|
|
|
101
103
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
@pytest.mark.parametrize("union_client_type", [UnionClient, SetuppyUnionClient])
|
|
105
|
+
def test_union_tokenvalid(oauth2_client, union_client_type):
|
|
106
|
+
client = oauth2_client(union_client_type)
|
|
104
107
|
client.valid_token(enforce_https=False)
|
|
105
108
|
|
|
106
109
|
|
|
@@ -54,4 +54,6 @@ def test_sensitive_word():
|
|
|
54
54
|
check_folder = (Path(os.path.dirname(__file__)) / "../generated").resolve()
|
|
55
55
|
assert [] == check_sensitive_word(check_folder, "azure")
|
|
56
56
|
# after update spector, it shall also equal to []
|
|
57
|
-
assert ["authentication-oauth2", "authentication-union"] == check_sensitive_word(
|
|
57
|
+
assert ["authentication-oauth2", "authentication-union", "setuppy-authentication-union"] == check_sensitive_word(
|
|
58
|
+
check_folder, "microsoft"
|
|
59
|
+
)
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
-e ./generated/authentication-http-custom
|
|
7
7
|
-e ./generated/authentication-oauth2
|
|
8
8
|
-e ./generated/authentication-union
|
|
9
|
+
-e ./generated/setuppy-authentication-union
|
|
9
10
|
-e ./generated/encode-duration
|
|
10
11
|
-e ./generated/encode-numeric
|
|
11
12
|
-e ./generated/parameters-basic
|
|
@@ -20,7 +20,7 @@ commands =
|
|
|
20
20
|
python ../../../eng/scripts/ci/run_pyright.py -t unbranded -s "generated" {posargs}
|
|
21
21
|
|
|
22
22
|
# apiview
|
|
23
|
-
pip install apiview-stub-generator==0.3.
|
|
23
|
+
pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
|
|
24
24
|
python ../../../eng/scripts/ci/run_apiview.py -t unbranded -s "generated" {posargs}
|
|
25
25
|
|
|
26
26
|
[testenv:test]
|
|
@@ -52,5 +52,5 @@ commands =
|
|
|
52
52
|
deps=
|
|
53
53
|
-r requirements.txt
|
|
54
54
|
commands =
|
|
55
|
-
pip install apiview-stub-generator==0.3.
|
|
55
|
+
pip install apiview-stub-generator==0.3.19 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
|
|
56
56
|
python ../../../eng/scripts/ci/run_apiview.py -t unbranded -s "generated" {posargs}
|