Skip to content

Commit 7d21ac9

Browse files
authored
Add backwards compatibility layer to SettingsApi change (#464)
1 parent 8ca9004 commit 7d21ac9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

azure/durable_functions/decorators/durable_app.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@
77
from azure.durable_functions.orchestrator import Orchestrator
88
from azure.durable_functions import DurableOrchestrationClient
99
from typing import Union
10-
from azure.functions import FunctionRegister, TriggerApi, BindingApi, AuthLevel, SettingsApi
10+
from azure.functions import FunctionRegister, TriggerApi, BindingApi, AuthLevel
1111
from functools import wraps
1212

13+
try:
14+
from azure.functions import SettingsApi
15+
except ImportError: # backwards compatibility path
16+
class SettingsApi:
17+
"""Backwards compatibility mock of SettingsApi."""
18+
19+
pass
20+
1321

1422
class Blueprint(TriggerApi, BindingApi, SettingsApi):
1523
"""Durable Functions (DF) Blueprint container.

0 commit comments

Comments
 (0)