azure-functions-runtime 1.0.0a3__tar.gz → 1.0.0.dev0__tar.gz
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.
- {azure_functions_runtime-1.0.0a3/azure_functions_runtime.egg-info → azure_functions_runtime-1.0.0.dev0}/PKG-INFO +9 -48
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/README.md +0 -2
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0/azure_functions_runtime.egg-info}/PKG-INFO +9 -48
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_runtime.egg-info/SOURCES.txt +2 -23
- azure_functions_runtime-1.0.0.dev0/azure_functions_runtime.egg-info/requires.txt +30 -0
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_runtime.egg-info/top_level.txt +0 -3
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/__init__.py +0 -1
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/bindings/context.py +2 -3
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/bindings/generic.py +1 -0
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/bindings/meta.py +24 -20
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/bindings/nullable_converters.py +9 -10
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/bindings/out.py +0 -1
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/bindings/retrycontext.py +1 -2
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/bindings/tracecontext.py +0 -1
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/functions.py +12 -9
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/handle_event.py +110 -106
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/http_v2.py +11 -10
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/loader.py +7 -13
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/otel.py +18 -15
- azure_functions_runtime-1.0.0a3/azure_functions_worker_v2/utils/env_state.py → azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2/utils/app_setting_manager.py +27 -0
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/utils/constants.py +31 -60
- azure_functions_runtime-1.0.0a3/azure_functions_worker_v2/utils/current.py → azure_functions_runtime-1.0.0.dev0/azure_functions_worker_v2/utils/executor.py +0 -1
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/utils/helpers.py +13 -1
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/utils/tracing.py +16 -0
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/utils/validators.py +0 -1
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/utils/wrappers.py +7 -5
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/version.py +1 -1
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/pyproject.toml +9 -22
- azure_functions_runtime-1.0.0.dev0/setup.cfg +4 -0
- azure_functions_runtime-1.0.0a3/LICENSE +0 -21
- azure_functions_runtime-1.0.0a3/MANIFEST.in +0 -3
- azure_functions_runtime-1.0.0a3/azure_functions_runtime.egg-info/requires.txt +0 -49
- azure_functions_runtime-1.0.0a3/azure_functions_worker_v2/utils/app_setting_manager.py +0 -29
- azure_functions_runtime-1.0.0a3/setup.cfg +0 -25
- azure_functions_runtime-1.0.0a3/tests/protos/FunctionRpc_pb2.py +0 -215
- azure_functions_runtime-1.0.0a3/tests/protos/FunctionRpc_pb2_grpc.py +0 -69
- azure_functions_runtime-1.0.0a3/tests/protos/__init__.py +0 -43
- azure_functions_runtime-1.0.0a3/tests/protos/identity/ClaimsIdentityRpc_pb2.py +0 -29
- azure_functions_runtime-1.0.0a3/tests/protos/identity/ClaimsIdentityRpc_pb2_grpc.py +0 -4
- azure_functions_runtime-1.0.0a3/tests/protos/identity/__init__.py +0 -0
- azure_functions_runtime-1.0.0a3/tests/protos/shared/NullableTypes_pb2.py +0 -33
- azure_functions_runtime-1.0.0a3/tests/protos/shared/NullableTypes_pb2_grpc.py +0 -4
- azure_functions_runtime-1.0.0a3/tests/protos/shared/__init__.py +0 -0
- azure_functions_runtime-1.0.0a3/tests/unittests/basic_function/function_app.py +0 -44
- azure_functions_runtime-1.0.0a3/tests/unittests/indexing_exception_function/function_app.py +0 -35
- azure_functions_runtime-1.0.0a3/tests/unittests/streaming_function/function_app.py +0 -100
- azure_functions_runtime-1.0.0a3/tests/unittests/test_code_quality.py +0 -54
- azure_functions_runtime-1.0.0a3/tests/unittests/test_handle_event.py +0 -233
- azure_functions_runtime-1.0.0a3/tests/utils/__init__.py +0 -2
- azure_functions_runtime-1.0.0a3/tests/utils/constants.py +0 -7
- azure_functions_runtime-1.0.0a3/tests/utils/testutils.py +0 -34
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_runtime.egg-info/dependency_links.txt +0 -0
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/bindings/datumdef.py +0 -0
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/logging.py +0 -0
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/utils/__init__.py +0 -0
- {azure_functions_runtime-1.0.0a3 → azure_functions_runtime-1.0.0.dev0}/azure_functions_worker_v2/utils/typing_inspect.py +0 -0
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: azure-functions-runtime
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0.dev0
|
|
4
4
|
Summary: Python Language Worker for Azure Functions Runtime
|
|
5
5
|
Author-email: "Azure Functions team at Microsoft Corp." <azurefunctions@microsoft.com>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
SOFTWARE
|
|
27
|
-
|
|
28
|
-
Project-URL: Documentation, https://github.com/Azure/azure-functions-python-worker/blob/hallvictoria/library-worker/README.md
|
|
6
|
+
Project-URL: Documentation, https://github.com/Azure/azure-functions-python-worker/blob/dev/azure_functions_worker_v2/README.md
|
|
29
7
|
Project-URL: Repository, https://github.com/Azure/azure-functions-python-worker
|
|
30
8
|
Keywords: azure,functions,azurefunctions,python,serverless
|
|
31
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -40,19 +18,11 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
40
18
|
Classifier: Intended Audience :: Developers
|
|
41
19
|
Requires-Python: >=3.13
|
|
42
20
|
Description-Content-Type: text/markdown
|
|
43
|
-
|
|
44
|
-
Requires-Dist: azurefunctions-extensions-base; python_version >= "3.8"
|
|
21
|
+
Requires-Dist: azurefunctions-extensions-base
|
|
45
22
|
Requires-Dist: azure-functions
|
|
46
23
|
Provides-Extra: dev
|
|
47
|
-
Requires-Dist: azure-
|
|
48
|
-
Requires-Dist:
|
|
49
|
-
Requires-Dist: azure-monitor-opentelemetry; python_version >= "3.8" and extra == "dev"
|
|
50
|
-
Requires-Dist: flask; extra == "dev"
|
|
51
|
-
Requires-Dist: fastapi~=0.103.2; extra == "dev"
|
|
52
|
-
Requires-Dist: pydantic; extra == "dev"
|
|
53
|
-
Requires-Dist: pycryptodome==3.*; extra == "dev"
|
|
54
|
-
Requires-Dist: flake8==5.*; python_version == "3.7" and extra == "dev"
|
|
55
|
-
Requires-Dist: flake8==6.*; python_version >= "3.8" and extra == "dev"
|
|
24
|
+
Requires-Dist: azure-monitor-opentelemetry; extra == "dev"
|
|
25
|
+
Requires-Dist: flake8==6.*; extra == "dev"
|
|
56
26
|
Requires-Dist: mypy; extra == "dev"
|
|
57
27
|
Requires-Dist: pytest; extra == "dev"
|
|
58
28
|
Requires-Dist: requests==2.*; extra == "dev"
|
|
@@ -60,28 +30,21 @@ Requires-Dist: coverage; extra == "dev"
|
|
|
60
30
|
Requires-Dist: grpcio~=1.70.0; extra == "dev"
|
|
61
31
|
Requires-Dist: grpcio-tools~=1.70.0; extra == "dev"
|
|
62
32
|
Requires-Dist: pytest-sugar; extra == "dev"
|
|
63
|
-
Requires-Dist: opentelemetry-api; python_version >= "3.8" and extra == "dev"
|
|
64
33
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
65
34
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
66
35
|
Requires-Dist: pytest-randomly; extra == "dev"
|
|
67
36
|
Requires-Dist: pytest-instafail; extra == "dev"
|
|
68
37
|
Requires-Dist: pytest-rerunfailures; extra == "dev"
|
|
69
|
-
Requires-Dist:
|
|
70
|
-
Requires-Dist: python-dotenv; extra == "dev"
|
|
71
|
-
Requires-Dist: plotly; extra == "dev"
|
|
72
|
-
Requires-Dist: scikit-learn; extra == "dev"
|
|
73
|
-
Requires-Dist: opencv-python; extra == "dev"
|
|
74
|
-
Requires-Dist: pandas; extra == "dev"
|
|
75
|
-
Requires-Dist: numpy; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
76
39
|
Requires-Dist: pre-commit; extra == "dev"
|
|
77
40
|
Requires-Dist: invoke; extra == "dev"
|
|
78
41
|
Provides-Extra: test-http-v2
|
|
79
|
-
Requires-Dist: azurefunctions-extensions-http-fastapi==1.0.
|
|
42
|
+
Requires-Dist: azurefunctions-extensions-http-fastapi==1.0.0; extra == "test-http-v2"
|
|
80
43
|
Requires-Dist: ujson; extra == "test-http-v2"
|
|
81
44
|
Requires-Dist: orjson; extra == "test-http-v2"
|
|
82
45
|
Provides-Extra: test-deferred-bindings
|
|
83
|
-
Requires-Dist: azurefunctions-extensions-bindings-blob==1.0.
|
|
84
|
-
|
|
46
|
+
Requires-Dist: azurefunctions-extensions-bindings-blob==1.0.0; extra == "test-deferred-bindings"
|
|
47
|
+
Requires-Dist: azurefunctions-extensions-bindings-eventhub==1.0.0b1; extra == "test-deferred-bindings"
|
|
85
48
|
|
|
86
49
|
# <img src="https://raw.githubusercontent.com/Azure/azure-functions-python-worker/dev/docs/Azure.Functions.svg" width = "30" alt="Functions Header Image - Lightning Logo"> Azure Functions Python Worker
|
|
87
50
|
|
|
@@ -129,11 +92,9 @@ Issues and feature requests are tracked in a variety of places. To report this f
|
|
|
129
92
|
| Item | Description | Link |
|
|
130
93
|
|---------------|----------------------------------------------|--------------------------------------------------------------------------------|
|
|
131
94
|
| Python Worker | Programming Model, Triggers & Bindings | [File an Issue](https://github.com/Azure/azure-functions-python-worker/issues) |
|
|
132
|
-
| Linux | Base Docker Images | [File an Issue](https://github.com/Azure/azure-functions-docker/issues) |
|
|
133
95
|
| Runtime | Script Host & Language Extensibility | [File an Issue](https://github.com/Azure/azure-functions-host/issues) |
|
|
134
96
|
| VSCode | VSCode Extension for Azure Functions | [File an Issue](https://github.com/microsoft/vscode-azurefunctions/issues) |
|
|
135
97
|
| Core Tools | Command Line Interface for Local Development | [File an Issue](https://github.com/Azure/azure-functions-core-tools/issues) |
|
|
136
|
-
| Portal | User Interface or Experience Issue | [File an Issue](https://github.com/azure/azure-functions-ux/issues) |
|
|
137
98
|
| Templates | Code Issues with Creation Template | [File an Issue](https://github.com/Azure/azure-functions-templates/issues) |
|
|
138
99
|
|
|
139
100
|
# Contribute
|
|
@@ -44,11 +44,9 @@ Issues and feature requests are tracked in a variety of places. To report this f
|
|
|
44
44
|
| Item | Description | Link |
|
|
45
45
|
|---------------|----------------------------------------------|--------------------------------------------------------------------------------|
|
|
46
46
|
| Python Worker | Programming Model, Triggers & Bindings | [File an Issue](https://github.com/Azure/azure-functions-python-worker/issues) |
|
|
47
|
-
| Linux | Base Docker Images | [File an Issue](https://github.com/Azure/azure-functions-docker/issues) |
|
|
48
47
|
| Runtime | Script Host & Language Extensibility | [File an Issue](https://github.com/Azure/azure-functions-host/issues) |
|
|
49
48
|
| VSCode | VSCode Extension for Azure Functions | [File an Issue](https://github.com/microsoft/vscode-azurefunctions/issues) |
|
|
50
49
|
| Core Tools | Command Line Interface for Local Development | [File an Issue](https://github.com/Azure/azure-functions-core-tools/issues) |
|
|
51
|
-
| Portal | User Interface or Experience Issue | [File an Issue](https://github.com/azure/azure-functions-ux/issues) |
|
|
52
50
|
| Templates | Code Issues with Creation Template | [File an Issue](https://github.com/Azure/azure-functions-templates/issues) |
|
|
53
51
|
|
|
54
52
|
# Contribute
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: azure-functions-runtime
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0.dev0
|
|
4
4
|
Summary: Python Language Worker for Azure Functions Runtime
|
|
5
5
|
Author-email: "Azure Functions team at Microsoft Corp." <azurefunctions@microsoft.com>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
SOFTWARE
|
|
27
|
-
|
|
28
|
-
Project-URL: Documentation, https://github.com/Azure/azure-functions-python-worker/blob/hallvictoria/library-worker/README.md
|
|
6
|
+
Project-URL: Documentation, https://github.com/Azure/azure-functions-python-worker/blob/dev/azure_functions_worker_v2/README.md
|
|
29
7
|
Project-URL: Repository, https://github.com/Azure/azure-functions-python-worker
|
|
30
8
|
Keywords: azure,functions,azurefunctions,python,serverless
|
|
31
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -40,19 +18,11 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
40
18
|
Classifier: Intended Audience :: Developers
|
|
41
19
|
Requires-Python: >=3.13
|
|
42
20
|
Description-Content-Type: text/markdown
|
|
43
|
-
|
|
44
|
-
Requires-Dist: azurefunctions-extensions-base; python_version >= "3.8"
|
|
21
|
+
Requires-Dist: azurefunctions-extensions-base
|
|
45
22
|
Requires-Dist: azure-functions
|
|
46
23
|
Provides-Extra: dev
|
|
47
|
-
Requires-Dist: azure-
|
|
48
|
-
Requires-Dist:
|
|
49
|
-
Requires-Dist: azure-monitor-opentelemetry; python_version >= "3.8" and extra == "dev"
|
|
50
|
-
Requires-Dist: flask; extra == "dev"
|
|
51
|
-
Requires-Dist: fastapi~=0.103.2; extra == "dev"
|
|
52
|
-
Requires-Dist: pydantic; extra == "dev"
|
|
53
|
-
Requires-Dist: pycryptodome==3.*; extra == "dev"
|
|
54
|
-
Requires-Dist: flake8==5.*; python_version == "3.7" and extra == "dev"
|
|
55
|
-
Requires-Dist: flake8==6.*; python_version >= "3.8" and extra == "dev"
|
|
24
|
+
Requires-Dist: azure-monitor-opentelemetry; extra == "dev"
|
|
25
|
+
Requires-Dist: flake8==6.*; extra == "dev"
|
|
56
26
|
Requires-Dist: mypy; extra == "dev"
|
|
57
27
|
Requires-Dist: pytest; extra == "dev"
|
|
58
28
|
Requires-Dist: requests==2.*; extra == "dev"
|
|
@@ -60,28 +30,21 @@ Requires-Dist: coverage; extra == "dev"
|
|
|
60
30
|
Requires-Dist: grpcio~=1.70.0; extra == "dev"
|
|
61
31
|
Requires-Dist: grpcio-tools~=1.70.0; extra == "dev"
|
|
62
32
|
Requires-Dist: pytest-sugar; extra == "dev"
|
|
63
|
-
Requires-Dist: opentelemetry-api; python_version >= "3.8" and extra == "dev"
|
|
64
33
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
65
34
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
66
35
|
Requires-Dist: pytest-randomly; extra == "dev"
|
|
67
36
|
Requires-Dist: pytest-instafail; extra == "dev"
|
|
68
37
|
Requires-Dist: pytest-rerunfailures; extra == "dev"
|
|
69
|
-
Requires-Dist:
|
|
70
|
-
Requires-Dist: python-dotenv; extra == "dev"
|
|
71
|
-
Requires-Dist: plotly; extra == "dev"
|
|
72
|
-
Requires-Dist: scikit-learn; extra == "dev"
|
|
73
|
-
Requires-Dist: opencv-python; extra == "dev"
|
|
74
|
-
Requires-Dist: pandas; extra == "dev"
|
|
75
|
-
Requires-Dist: numpy; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
76
39
|
Requires-Dist: pre-commit; extra == "dev"
|
|
77
40
|
Requires-Dist: invoke; extra == "dev"
|
|
78
41
|
Provides-Extra: test-http-v2
|
|
79
|
-
Requires-Dist: azurefunctions-extensions-http-fastapi==1.0.
|
|
42
|
+
Requires-Dist: azurefunctions-extensions-http-fastapi==1.0.0; extra == "test-http-v2"
|
|
80
43
|
Requires-Dist: ujson; extra == "test-http-v2"
|
|
81
44
|
Requires-Dist: orjson; extra == "test-http-v2"
|
|
82
45
|
Provides-Extra: test-deferred-bindings
|
|
83
|
-
Requires-Dist: azurefunctions-extensions-bindings-blob==1.0.
|
|
84
|
-
|
|
46
|
+
Requires-Dist: azurefunctions-extensions-bindings-blob==1.0.0; extra == "test-deferred-bindings"
|
|
47
|
+
Requires-Dist: azurefunctions-extensions-bindings-eventhub==1.0.0b1; extra == "test-deferred-bindings"
|
|
85
48
|
|
|
86
49
|
# <img src="https://raw.githubusercontent.com/Azure/azure-functions-python-worker/dev/docs/Azure.Functions.svg" width = "30" alt="Functions Header Image - Lightning Logo"> Azure Functions Python Worker
|
|
87
50
|
|
|
@@ -129,11 +92,9 @@ Issues and feature requests are tracked in a variety of places. To report this f
|
|
|
129
92
|
| Item | Description | Link |
|
|
130
93
|
|---------------|----------------------------------------------|--------------------------------------------------------------------------------|
|
|
131
94
|
| Python Worker | Programming Model, Triggers & Bindings | [File an Issue](https://github.com/Azure/azure-functions-python-worker/issues) |
|
|
132
|
-
| Linux | Base Docker Images | [File an Issue](https://github.com/Azure/azure-functions-docker/issues) |
|
|
133
95
|
| Runtime | Script Host & Language Extensibility | [File an Issue](https://github.com/Azure/azure-functions-host/issues) |
|
|
134
96
|
| VSCode | VSCode Extension for Azure Functions | [File an Issue](https://github.com/microsoft/vscode-azurefunctions/issues) |
|
|
135
97
|
| Core Tools | Command Line Interface for Local Development | [File an Issue](https://github.com/Azure/azure-functions-core-tools/issues) |
|
|
136
|
-
| Portal | User Interface or Experience Issue | [File an Issue](https://github.com/azure/azure-functions-ux/issues) |
|
|
137
98
|
| Templates | Code Issues with Creation Template | [File an Issue](https://github.com/Azure/azure-functions-templates/issues) |
|
|
138
99
|
|
|
139
100
|
# Contribute
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
MANIFEST.in
|
|
3
1
|
README.md
|
|
4
2
|
pyproject.toml
|
|
5
|
-
setup.cfg
|
|
6
3
|
azure_functions_runtime.egg-info/PKG-INFO
|
|
7
4
|
azure_functions_runtime.egg-info/SOURCES.txt
|
|
8
5
|
azure_functions_runtime.egg-info/dependency_links.txt
|
|
@@ -27,27 +24,9 @@ azure_functions_worker_v2/bindings/tracecontext.py
|
|
|
27
24
|
azure_functions_worker_v2/utils/__init__.py
|
|
28
25
|
azure_functions_worker_v2/utils/app_setting_manager.py
|
|
29
26
|
azure_functions_worker_v2/utils/constants.py
|
|
30
|
-
azure_functions_worker_v2/utils/
|
|
31
|
-
azure_functions_worker_v2/utils/env_state.py
|
|
27
|
+
azure_functions_worker_v2/utils/executor.py
|
|
32
28
|
azure_functions_worker_v2/utils/helpers.py
|
|
33
29
|
azure_functions_worker_v2/utils/tracing.py
|
|
34
30
|
azure_functions_worker_v2/utils/typing_inspect.py
|
|
35
31
|
azure_functions_worker_v2/utils/validators.py
|
|
36
|
-
azure_functions_worker_v2/utils/wrappers.py
|
|
37
|
-
tests/protos/FunctionRpc_pb2.py
|
|
38
|
-
tests/protos/FunctionRpc_pb2_grpc.py
|
|
39
|
-
tests/protos/__init__.py
|
|
40
|
-
tests/protos/identity/ClaimsIdentityRpc_pb2.py
|
|
41
|
-
tests/protos/identity/ClaimsIdentityRpc_pb2_grpc.py
|
|
42
|
-
tests/protos/identity/__init__.py
|
|
43
|
-
tests/protos/shared/NullableTypes_pb2.py
|
|
44
|
-
tests/protos/shared/NullableTypes_pb2_grpc.py
|
|
45
|
-
tests/protos/shared/__init__.py
|
|
46
|
-
tests/unittests/test_code_quality.py
|
|
47
|
-
tests/unittests/test_handle_event.py
|
|
48
|
-
tests/unittests/basic_function/function_app.py
|
|
49
|
-
tests/unittests/indexing_exception_function/function_app.py
|
|
50
|
-
tests/unittests/streaming_function/function_app.py
|
|
51
|
-
tests/utils/__init__.py
|
|
52
|
-
tests/utils/constants.py
|
|
53
|
-
tests/utils/testutils.py
|
|
32
|
+
azure_functions_worker_v2/utils/wrappers.py
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
azurefunctions-extensions-base
|
|
2
|
+
azure-functions
|
|
3
|
+
|
|
4
|
+
[dev]
|
|
5
|
+
azure-monitor-opentelemetry
|
|
6
|
+
flake8==6.*
|
|
7
|
+
mypy
|
|
8
|
+
pytest
|
|
9
|
+
requests==2.*
|
|
10
|
+
coverage
|
|
11
|
+
grpcio~=1.70.0
|
|
12
|
+
grpcio-tools~=1.70.0
|
|
13
|
+
pytest-sugar
|
|
14
|
+
pytest-cov
|
|
15
|
+
pytest-xdist
|
|
16
|
+
pytest-randomly
|
|
17
|
+
pytest-instafail
|
|
18
|
+
pytest-rerunfailures
|
|
19
|
+
pytest-asyncio
|
|
20
|
+
pre-commit
|
|
21
|
+
invoke
|
|
22
|
+
|
|
23
|
+
[test-deferred-bindings]
|
|
24
|
+
azurefunctions-extensions-bindings-blob==1.0.0
|
|
25
|
+
azurefunctions-extensions-bindings-eventhub==1.0.0b1
|
|
26
|
+
|
|
27
|
+
[test-http-v2]
|
|
28
|
+
azurefunctions-extensions-http-fastapi==1.0.0
|
|
29
|
+
ujson
|
|
30
|
+
orjson
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
# Licensed under the MIT License.
|
|
3
3
|
import threading
|
|
4
|
-
from typing import Type
|
|
5
4
|
|
|
6
5
|
from .retrycontext import RetryContext
|
|
7
6
|
from .tracecontext import TraceContext
|
|
@@ -12,7 +11,7 @@ class Context:
|
|
|
12
11
|
func_name: str,
|
|
13
12
|
func_dir: str,
|
|
14
13
|
invocation_id: str,
|
|
15
|
-
thread_local_storage:
|
|
14
|
+
thread_local_storage: threading.local,
|
|
16
15
|
trace_context: TraceContext,
|
|
17
16
|
retry_context: RetryContext) -> None:
|
|
18
17
|
self.__func_name = func_name
|
|
@@ -27,7 +26,7 @@ class Context:
|
|
|
27
26
|
return self.__invocation_id
|
|
28
27
|
|
|
29
28
|
@property
|
|
30
|
-
def thread_local_storage(self) ->
|
|
29
|
+
def thread_local_storage(self) -> threading.local:
|
|
31
30
|
return self.__thread_local_storage
|
|
32
31
|
|
|
33
32
|
@property
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
# Licensed under the MIT License.
|
|
3
3
|
# mypy: disable-error-code="attr-defined"
|
|
4
|
+
import importlib.util
|
|
4
5
|
import os
|
|
5
6
|
import sys
|
|
6
7
|
|
|
@@ -12,11 +13,12 @@ from .generic import GenericBinding
|
|
|
12
13
|
from ..http_v2 import HttpV2Registry
|
|
13
14
|
from ..logging import logger
|
|
14
15
|
from ..utils.constants import (
|
|
15
|
-
BASE_EXT_SUPPORTED_PY_MINOR_VERSION,
|
|
16
16
|
CUSTOMER_PACKAGES_PATH,
|
|
17
17
|
HTTP,
|
|
18
18
|
HTTP_TRIGGER,
|
|
19
19
|
)
|
|
20
|
+
from ..utils.helpers import set_sdk_version
|
|
21
|
+
from ..utils.tracing import serialize_exception_as_str
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
PB_TYPE = 'rpc_data'
|
|
@@ -60,7 +62,7 @@ def load_binding_registry() -> None:
|
|
|
60
62
|
not found, it loads the builtin. If the BINDING_REGISTRY is None,
|
|
61
63
|
azure-functions hasn't been loaded in properly.
|
|
62
64
|
|
|
63
|
-
Tries to load the base extension
|
|
65
|
+
Tries to load the base extension.
|
|
64
66
|
"""
|
|
65
67
|
|
|
66
68
|
func = sys.modules.get('azure.functions')
|
|
@@ -68,6 +70,8 @@ def load_binding_registry() -> None:
|
|
|
68
70
|
if func is None:
|
|
69
71
|
import azure.functions as func
|
|
70
72
|
|
|
73
|
+
set_sdk_version(func.__version__) # type: ignore
|
|
74
|
+
|
|
71
75
|
global BINDING_REGISTRY
|
|
72
76
|
BINDING_REGISTRY = func.get_binding_registry() # type: ignore
|
|
73
77
|
|
|
@@ -79,17 +83,20 @@ def load_binding_registry() -> None:
|
|
|
79
83
|
sys.path, sys.modules,
|
|
80
84
|
os.path.exists(CUSTOMER_PACKAGES_PATH))
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
try:
|
|
87
|
+
import azurefunctions.extensions.base as clients
|
|
88
|
+
global DEFERRED_BINDING_REGISTRY
|
|
89
|
+
DEFERRED_BINDING_REGISTRY = clients.get_binding_registry()
|
|
90
|
+
except Exception as e:
|
|
91
|
+
func_spec = importlib.util.find_spec('azure.functions')
|
|
92
|
+
logger.info('Base extension not found. Exception: %s. '
|
|
93
|
+
'Azure Functions library spec: %s, '
|
|
94
|
+
'Python version: 3.%s, Sys path: %s, '
|
|
95
|
+
'Sys Module: %s, python-packages Path exists: %s.',
|
|
96
|
+
serialize_exception_as_str(e), func_spec,
|
|
97
|
+
sys.version_info.minor,
|
|
98
|
+
sys.path, sys.modules,
|
|
99
|
+
os.path.exists(CUSTOMER_PACKAGES_PATH))
|
|
93
100
|
|
|
94
101
|
|
|
95
102
|
def get_binding(bind_name: str,
|
|
@@ -173,7 +180,7 @@ def from_incoming_proto(
|
|
|
173
180
|
val = pb.data
|
|
174
181
|
datum = Datum.from_typed_data(val)
|
|
175
182
|
else:
|
|
176
|
-
raise TypeError('Unknown ParameterBindingType: %s'
|
|
183
|
+
raise TypeError('Unknown ParameterBindingType: %s' % pb_type)
|
|
177
184
|
|
|
178
185
|
try:
|
|
179
186
|
# if the binding is an sdk type binding
|
|
@@ -191,7 +198,7 @@ def from_incoming_proto(
|
|
|
191
198
|
raise TypeError(
|
|
192
199
|
'unable to decode incoming TypedData: '
|
|
193
200
|
'unsupported combination of TypedData field %s '
|
|
194
|
-
'and expected binding type %s'
|
|
201
|
+
'and expected binding type %s' % (repr(dt), binding_obj))
|
|
195
202
|
|
|
196
203
|
|
|
197
204
|
def get_datum(binding: str, obj: Any,
|
|
@@ -207,7 +214,7 @@ def get_datum(binding: str, obj: Any,
|
|
|
207
214
|
raise TypeError(
|
|
208
215
|
'unable to encode outgoing TypedData: '
|
|
209
216
|
'unsupported type "%s" for '
|
|
210
|
-
'Python type "%s"'
|
|
217
|
+
'Python type "%s"' % (binding, type(obj).__name__))
|
|
211
218
|
return datum
|
|
212
219
|
|
|
213
220
|
|
|
@@ -245,15 +252,12 @@ def deferred_bindings_decode(binding: Any,
|
|
|
245
252
|
"""
|
|
246
253
|
The extension manages a cache for clients (ie. BlobClient, ContainerClient)
|
|
247
254
|
That have already been created, so that the worker can reuse the
|
|
248
|
-
|
|
255
|
+
previously created type without creating a new one.
|
|
249
256
|
|
|
250
257
|
For async types, the function_name is needed as a key to differentiate.
|
|
251
258
|
This prevents a known SDK issue where reusing a client across functions
|
|
252
259
|
can lose the session context and cause an error.
|
|
253
260
|
|
|
254
|
-
The cache key is based on: param name, type, resource, function_name
|
|
255
|
-
|
|
256
|
-
If cache is empty or key doesn't exist, deferred_binding_type is None
|
|
257
261
|
"""
|
|
258
262
|
|
|
259
263
|
deferred_binding_type = binding.decode(datum,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
# Licensed under the MIT License.
|
|
3
|
-
|
|
4
3
|
from datetime import datetime
|
|
5
4
|
from typing import Optional, Union
|
|
6
5
|
|
|
@@ -22,8 +21,8 @@ def to_nullable_string(nullable: Optional[str], property_name: str, protos):
|
|
|
22
21
|
if nullable is not None:
|
|
23
22
|
raise TypeError(
|
|
24
23
|
"A 'str' type was expected instead of a '%s' "
|
|
25
|
-
"type. Cannot parse value %s of '%s'."
|
|
26
|
-
type(nullable), nullable, property_name)
|
|
24
|
+
"type. Cannot parse value %s of '%s'."
|
|
25
|
+
% (type(nullable), nullable, property_name))
|
|
27
26
|
|
|
28
27
|
return None
|
|
29
28
|
|
|
@@ -45,8 +44,8 @@ def to_nullable_bool(nullable: Optional[bool], property_name: str, protos):
|
|
|
45
44
|
if nullable is not None:
|
|
46
45
|
raise TypeError(
|
|
47
46
|
"A 'bool' type was expected instead of a '%s' "
|
|
48
|
-
"type. Cannot parse value %s of '%s'."
|
|
49
|
-
type(nullable), nullable, property_name)
|
|
47
|
+
"type. Cannot parse value %s of '%s'."
|
|
48
|
+
% (type(nullable), nullable, property_name))
|
|
50
49
|
|
|
51
50
|
return None
|
|
52
51
|
|
|
@@ -74,14 +73,14 @@ def to_nullable_double(nullable: Optional[Union[str, int, float]],
|
|
|
74
73
|
except Exception:
|
|
75
74
|
raise TypeError(
|
|
76
75
|
"Cannot parse value %s of '%s' to "
|
|
77
|
-
"float."
|
|
76
|
+
"float." % (nullable, property_name))
|
|
78
77
|
|
|
79
78
|
if nullable is not None:
|
|
80
79
|
raise TypeError(
|
|
81
80
|
"A 'int' or 'float'"
|
|
82
81
|
" type was expected instead of a '%s' "
|
|
83
|
-
"type. Cannot parse value %s of '%s'."
|
|
84
|
-
type(nullable), nullable, property_name)
|
|
82
|
+
"type. Cannot parse value %s of '%s'."
|
|
83
|
+
% (type(nullable), nullable, property_name))
|
|
85
84
|
|
|
86
85
|
return None
|
|
87
86
|
|
|
@@ -110,6 +109,6 @@ def to_nullable_timestamp(date_time: Optional[Union[datetime, int]],
|
|
|
110
109
|
raise TypeError(
|
|
111
110
|
"A 'datetime' or 'int'"
|
|
112
111
|
" type was expected instead of a '%s' "
|
|
113
|
-
"type. Cannot parse value %s of '%s'."
|
|
114
|
-
type(date_time), date_time, property_name)
|
|
112
|
+
"type. Cannot parse value %s of '%s'."
|
|
113
|
+
% (type(date_time), date_time, property_name))
|
|
115
114
|
return None
|
|
@@ -5,6 +5,7 @@ import operator
|
|
|
5
5
|
import pathlib
|
|
6
6
|
import typing
|
|
7
7
|
import uuid
|
|
8
|
+
|
|
8
9
|
from .logging import logger
|
|
9
10
|
|
|
10
11
|
from .bindings.meta import (has_implicit_output,
|
|
@@ -140,14 +141,16 @@ class Registry:
|
|
|
140
141
|
if set(params) - set(bound_params):
|
|
141
142
|
raise FunctionLoadError(
|
|
142
143
|
func_name,
|
|
143
|
-
'
|
|
144
|
-
'
|
|
144
|
+
'Function parameter mismatch — the following trigger/input bindings '
|
|
145
|
+
'are declared in the function decorators but missing from the '
|
|
146
|
+
'Python function signature: ' + repr(set(params) - set(bound_params)))
|
|
145
147
|
|
|
146
148
|
if set(bound_params) - set(params):
|
|
147
149
|
raise FunctionLoadError(
|
|
148
150
|
func_name,
|
|
149
|
-
'
|
|
150
|
-
'
|
|
151
|
+
'Extra parameters in function signature — the following parameters '
|
|
152
|
+
'are present in the Python function definition but are not declared '
|
|
153
|
+
'as bindings: ' + repr(set(params) - set(bound_params)))
|
|
151
154
|
|
|
152
155
|
input_types: typing.Dict[str, ParamTypeInfo] = {}
|
|
153
156
|
output_types: typing.Dict[str, ParamTypeInfo] = {}
|
|
@@ -230,7 +233,7 @@ class Registry:
|
|
|
230
233
|
raise FunctionLoadError(
|
|
231
234
|
func_name,
|
|
232
235
|
'binding ' + param.name + ' is declared to have the "in" '
|
|
233
|
-
'direction in
|
|
236
|
+
'direction in the binding decorator, but its annotation '
|
|
234
237
|
'is azure.functions.Out in Python')
|
|
235
238
|
|
|
236
239
|
if param_has_anno and param_py_type in (str, bytes) and (
|
|
@@ -258,15 +261,15 @@ class Registry:
|
|
|
258
261
|
func_name,
|
|
259
262
|
'binding type "' + repr(param.name)
|
|
260
263
|
+ '" and dataType "' + binding.type + '" in '
|
|
261
|
-
'
|
|
264
|
+
'the binding decorator do not match the corresponding '
|
|
262
265
|
'function parameter\'s Python type '
|
|
263
266
|
'annotation ' + param_py_type.__name__)
|
|
264
267
|
else:
|
|
265
268
|
raise FunctionLoadError(
|
|
266
269
|
func_name,
|
|
267
|
-
'type of ' + param.name + ' binding in
|
|
268
|
-
+ binding.type + '" does not match its
|
|
269
|
-
'annotation "' + param_py_type.__name__ + '"')
|
|
270
|
+
'type of ' + param.name + ' binding in the binding '
|
|
271
|
+
'decorator "' + binding.type + '" does not match its '
|
|
272
|
+
'Python annotation "' + param_py_type.__name__ + '"')
|
|
270
273
|
|
|
271
274
|
param_type_info = ParamTypeInfo(param_bind_type,
|
|
272
275
|
param_py_type,
|