Skip to content

Commit 8f3785b

Browse files
committed
add deprecation warning to module_from_template
1 parent 97c0f42 commit 8f3785b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/idom/web/module.py

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from string import Template
1010
from typing import Any, List, NewType, Optional, Set, Tuple, Union, overload
1111
from urllib.parse import urlparse
12+
from warnings import warn
1213

1314
from idom.config import IDOM_DEBUG_MODE, IDOM_WEB_MODULES_DIR
1415
from idom.core.types import ImportSourceDict, VdomDictConstructor
@@ -119,6 +120,11 @@ def module_from_template(
119120
Using this option has negative performance consequences since all DOM
120121
elements must be changed on each render. See :issue:`461` for more info.
121122
"""
123+
warn(
124+
"module_from_template() is deprecated due to instability - use the Javascript "
125+
"Components API instead. This function will be removed in a future release.",
126+
DeprecationWarning,
127+
)
122128
template_name, _, template_version = template.partition("@")
123129
template_version = "@" + template_version if template_version else ""
124130

0 commit comments

Comments
 (0)