diff --git a/python/taichi/lang/ast/ast_transformer.py b/python/taichi/lang/ast/ast_transformer.py index d211f9e410ecf..6046a03c3f462 100644 --- a/python/taichi/lang/ast/ast_transformer.py +++ b/python/taichi/lang/ast/ast_transformer.py @@ -434,17 +434,6 @@ def build_call_if_is_builtin(ctx, node, args, keywords): if id(func) in replace_func: node.ptr = replace_func[id(func)](*args, **keywords) - if func is min or func is max: - name = "min" if func is min else "max" - warnings.warn_explicit( - f'Calling builtin function "{name}" in Taichi scope is deprecated, ' - f"and it will be removed in Taichi v1.6.0." - f'Please use "ti.{name}" instead.', - DeprecationWarning, - ctx.file, - node.lineno + ctx.lineno_offset, - module="taichi", - ) return True return False diff --git a/tests/python/test_deprecation.py b/tests/python/test_deprecation.py index 83b8d8b9a507f..addb5dc494bf8 100644 --- a/tests/python/test_deprecation.py +++ b/tests/python/test_deprecation.py @@ -83,21 +83,6 @@ def test_deprecate_rwtexture_ndim(): ti.graph.Arg(ti.graph.ArgKind.RWTEXTURE, "x", shape=(128, 128), fmt=ti.Format.r32f) -@test_utils.test() -def test_deprecate_builtin_min_max(): - with pytest.warns( - DeprecationWarning, - match='Calling builtin function "max" in Taichi scope is deprecated, ' - "and it will be removed in Taichi v1.6.0.", - ): - - @ti.kernel - def func(): - max(1, 2) - - func() - - @test_utils.test() def test_deprecate_is_is_not(): with pytest.warns( diff --git a/tests/python/test_native_functions.py b/tests/python/test_native_functions.py index 2176f19aecb9b..fa60291bfdb09 100644 --- a/tests/python/test_native_functions.py +++ b/tests/python/test_native_functions.py @@ -72,9 +72,7 @@ def func(): y[i] = N - i z[i] = i - 2 if i % 2 else i + 2 - with pytest.warns(DeprecationWarning, match="Calling builtin function") as records: - func() - assert len(records) > 0 + func() assert np.allclose( minimum.to_numpy(),