Skip to content

Commit

Permalink
remove depwarns
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi committed May 14, 2024
1 parent edb1689 commit 3a6f036
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/SymbolicUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ using TermInterface
import TermInterface: iscall, isexpr, issym, symtype, head, children,
operation, arguments, metadata, maketerm

Base.@deprecate_binding istree iscall
const istree = iscall
export istree, operation, arguments, unsorted_arguments, similarterm
# Sym, Term,
# Add, Mul and Pow
Expand Down
12 changes: 6 additions & 6 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -644,18 +644,18 @@ end
"""
function similarterm(x, op, args, symtype=nothing; metadata=nothing)
Base.depwarn("""`similarterm` is deprecated, use `maketerm` instead.
See https://github.com/JuliaSymbolics/TermInterface.jl for details.
The present call can be replaced by
`maketerm(typeof(x), $(head(x)), [op, args...], symtype, metadata)`""", :similarterm)
#Base.depwarn("""`similarterm` is deprecated, use `maketerm` instead.
# See https://github.com/JuliaSymbolics/TermInterface.jl for details.
# The present call can be replaced by
# `maketerm(typeof(x), $(head(x)), [op, args...], symtype, metadata)`""", :similarterm)

TermInterface.maketerm(typeof(x), callhead(x), [op, args...], symtype, metadata)
end

# Old fallback
function similarterm(T::Type, op, args, symtype=nothing; metadata=nothing)
Base.depwarn("`similarterm` is deprecated, use `maketerm` instead." *
"See https://github.com/JuliaSymbolics/TermInterface.jl for details.", :similarterm)
#Base.depwarn("`similarterm` is deprecated, use `maketerm` instead." *
# "See https://github.com/JuliaSymbolics/TermInterface.jl for details.", :similarterm)
op(args...)
end

Expand Down

0 comments on commit 3a6f036

Please sign in to comment.