Tuples passed in parameters are not accessible by name
@wenhzha 已經在處理了。
開始於 2020年11月10日。
評估
這個 Issue 還沒有評估資料。
描述
Please note that I may be doing things wrong but it seems like it should work. I had to use deconstruction to make it work.
Please see the commented code in the activity section.
To reproduce
Azure Functions Core Tools (3.0.2630 Commit hash: beec61496e1c5de8aa4ba38d1884f7b48233a7ab)
Function Runtime Version: 3.0.13901.0
Python 3.7.7
Orchestrator
from collections import namedtuple
import azure.functions as func
import azure.durable_functions as df
def orchestrator_function(context: df.DurableOrchestrationContext):
Location = namedtuple('Location', ['city', 'state'])
location = Location(city='Seattle', state= 'WA')
weather = yield context.call_activity("GetWeather", location)
# ...
Activity
import logging
from collections import namedtuple
Location = namedtuple('Location', ['city', 'state'])
def main(location: Location) -> str:
city, state = location
# THIS DOESN'T WORK 👇
# return f"Hello {location.city}, {location.state}!"
return f"Hello {city}, {state}!"
- 主要語言
- Python
- 星號
- 157
- 分支
- 70
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Azure/azure-functions-durable-python 的其他 Issue
-
Enhancement fixed-in-v2 P3
難度 2/5 1-3 小時 新手友好度 72/100
Azure/azure-functions-durable-python#617 · 1 則留言 ·
-
bug Debuggability fixed-in-v2 P2
難度 2/5 1-3 小時 新手友好度 72/100
Azure/azure-functions-durable-python#587 · 2 則留言 · 1 個 reaction ·
-
Custom object serialization broken for orchestrator return values可能已有人在做 @andystaples 於 69 天前認領。 未關閉bug fixed-in-v2 P2
難度 2/5 1-3 小時 新手友好度 75/100
Azure/azure-functions-durable-python#568 · 1 則留言 ·
-
bug fixed-in-v2 P3
難度 2/5 1-3 小時 新手友好度 72/100
Azure/azure-functions-durable-python#475 · 1 則留言 ·
-
Enhancement fixed-in-v2 P3
難度 4/5 3-5 天 新手友好度 62/100
Azure/azure-functions-durable-python#618 · 1 則留言 ·
查看 Azure/azure-functions-durable-python 的全部 Issue
相似的 Issue
-
bug ready for review
難度 2/5 1-3 小時 新手友好度 86/100
odysseus-dev/odysseus#6641 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
happypawspillaro/happypaws#78 ·
維護者通常 4 天內回覆
-
pydanty:is-working
難度 2/5 1-3 小時 新手友好度 82/100
pydantic/pydantic-ai#10020 ·
維護者通常 1 天內回覆
-
Bug
難度 2/5 1-3 小時 新手友好度 78/100
ansible-collections/ibm_zos_core#2650 ·
-
hw: pvc tests: vllm vllm
難度 2/5 1-3 小時 新手友好度 68/100
intel/intel-xpu-backend-for-triton#8362 ·
維護者通常 1 天內回覆