Skip to content

Commit a2476de

Browse files
authored
Deprecate functions not supported in SymPyCore (#531)
1 parent 2ecef7c commit a2476de

File tree

11 files changed

+315
-81
lines changed

11 files changed

+315
-81
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "SymPy"
22
uuid = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6"
3-
version = "1.1.14"
3+
version = "1.2.0"
44

55
[deps]
66
CommonEq = "3709ef60-1bee-4518-9f2f-acd86f176c50"

src/SymPy.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ include("permutations.jl")
8181
include("plot_recipes.jl")
8282
include("latexify_recipe.jl")
8383

84+
include("deprecated.jl")
8485
##################################################
8586

8687
pynull() = PyCall.PyNULL()

src/constructors.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Examples:
3030
@vars a b real=true
3131
```
3232
!!! Note:
33-
The `@syms` macro is recommended as it has a more flexible syntax
33+
The `@vars` macro is deprecated and will be removed. Use `@syms`.
3434
"""
3535
macro vars(x...)
3636
q = Expr(:block)

src/deprecated.jl

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
# in SymPy, not SymPyCall
2+
3+
#Base.@deprecate_binding False FALSE
4+
#Base.@deprecate_binding True TRUE
5+
#Base.@deprecate_binding sympy_core sympy.core
6+
#Base.@deprecate_binding sympy_matrices sympy.matrices
7+
8+
9+
Base.@deprecate conjugate(x::Sym, args...; kwargs...) conj(x, args...; kwargs...) true
10+
11+
Base.@deprecate cse(ex::SymbolicObject, args...; kwargs...) sympy.cse(ex, args...; kwargs...) true
12+
Base.@deprecate denom(ex::SymbolicObject, args...; kwargs...) sympy.denom(ex, args...; kwargs...) true
13+
Base.@deprecate flatten(ex::SymbolicObject, args...; kwargs...) sympy.flatten(ex, args...; kwargs...) true
14+
Base.@deprecate unflatten(ex::SymbolicObject, args...; kwargs...) sympy.unflatten(ex, args...; kwargs...) true
15+
Base.@deprecate interpolate(ex::SymbolicObject, args...; kwargs...) sympy.interpolate(ex, args...; kwargs...) true
16+
Base.@deprecate intervals(ex::SymbolicObject, args...; kwargs...) sympy.intervals(ex, args...; kwargs...) true
17+
Base.@deprecate isolate(ex::SymbolicObject, args...; kwargs...) sympy.isolate(ex, args...; kwargs...) true
18+
Base.@deprecate isprime(ex::SymbolicObject, args...; kwargs...) sympy.isprime(ex, args...; kwargs...) true
19+
Base.@deprecate line_integrate(ex::SymbolicObject, args...; kwargs...) sympy.line_integrate(ex, args...; kwargs...) true
20+
Base.@deprecate ln(ex::SymbolicObject, args...; kwargs...) sympy.ln(ex, args...; kwargs...) true
21+
Base.@deprecate prime(ex::SymbolicObject, args...; kwargs...) sympy.prime(ex, args...; kwargs...) true
22+
Base.@deprecate real_root(ex::SymbolicObject, args...; kwargs...) sympy.real_root(ex, args...; kwargs...) true
23+
Base.@deprecate root(ex::SymbolicObject, args...; kwargs...) sympy.root(ex, args...; kwargs...) true
24+
Base.@deprecate rootof(ex::SymbolicObject, args...; kwargs...) sympy.rootof(ex, args...; kwargs...) true
25+
Base.@deprecate rsolve(ex::SymbolicObject, args...; kwargs...) sympy.rsolve(ex, args...; kwargs...) true
26+
Base.@deprecate srepr(ex::SymbolicObject, args...; kwargs...) sympy.srepr(ex, args...; kwargs...) true
27+
Base.@deprecate multiplicity(ex::SymbolicObject, args...; kwargs...) sympy.multiplicity(ex, args...; kwargs...) true
28+
Base.@deprecate nsimplify(ex::SymbolicObject, args...; kwargs...) sympy.nsimplify(ex, args...; kwargs...) true
29+
Base.@deprecate numer(ex::SymbolicObject, args...; kwargs...) sympy.numer(ex, args...; kwargs...) true
30+
Base.@deprecate ode_order(ex::SymbolicObject, args...; kwargs...) sympy.ode_order(ex, args...; kwargs...) true
31+
Base.@deprecate pdsolve(ex::SymbolicObject, args...; kwargs...) sympy.pdsolve(ex, args...; kwargs...) true
32+
Base.@deprecate Abs(ex::SymbolicObject, args...; kwargs...) sympy.Abs(ex, args...; kwargs...) true
33+
Base.@deprecate And(ex::SymbolicObject, args...; kwargs...) sympy.And(ex, args...; kwargs...) true
34+
Base.@deprecate DiracDelta(ex::SymbolicObject, args...; kwargs...) sympy.DiracDelta(ex, args...; kwargs...) true
35+
Base.@deprecate Equality(ex::SymbolicObject, args...; kwargs...) sympy.Equality(ex, args...; kwargs...) true
36+
Base.@deprecate GreaterThan(ex::SymbolicObject, args...; kwargs...) sympy.GreaterThan(ex, args...; kwargs...) true
37+
Base.@deprecate LessThan(ex::SymbolicObject, args...; kwargs...) sympy.LessThan(ex, args...; kwargs...) true
38+
Base.@deprecate Max(ex::SymbolicObject, args...; kwargs...) sympy.Max(ex, args...; kwargs...) true
39+
Base.@deprecate Min(ex::SymbolicObject, args...; kwargs...) sympy.Min(ex, args...; kwargs...) true
40+
Base.@deprecate Not(ex::SymbolicObject, args...; kwargs...) sympy.Not(ex, args...; kwargs...) true
41+
Base.@deprecate Or(ex::SymbolicObject, args...; kwargs...) sympy.Or(ex, args...; kwargs...) true
42+
Base.@deprecate StrictGreaterThan(ex::SymbolicObject, args...; kwargs...) sympy.StrictGreaterThan(ex, args...; kwargs...) true
43+
Base.@deprecate StrictLessThan(ex::SymbolicObject, args...; kwargs...) sympy.StrictLessThan(ex, args...; kwargs...) true
44+
Base.@deprecate Unequality(ex::SymbolicObject, args...; kwargs...) sympy.Unequality(ex, args...; kwargs...) true
45+
Base.@deprecate Xor(ex::SymbolicObject, args...; kwargs...) sympy.Xor(ex, args...; kwargs...) true
46+
47+
Base.@deprecate plot_parametric_surface(exs, args...; kwargs...) sympy.plotting.plot3d_parametric_surface(exs..., args...; kwargs...) true
48+
Base.@deprecate plot_implicit(ex, args...; kwargs...) sympy.plotting.plot_implicit(ex, args...; kwargs...) true
49+
50+
51+
# mpmath @deprecate
52+
function expj(ex::SymbolicObject, args...; kwargs...)
53+
Base.depwarn("The expj function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.expj(...)`.", :expj)
54+
mpmath.expj(ex, args...; kwargs...)
55+
end
56+
export expj
57+
58+
function expjpi(ex::SymbolicObject, args...; kwargs...)
59+
Base.depwarn("The expjpi function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.expjpi(...)`.", :expjpi)
60+
mpmath.expjpi(ex, args...; kwargs...)
61+
end
62+
export expjpi
63+
64+
function fac(ex::SymbolicObject, args...; kwargs...)
65+
Base.depwarn("The fac function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.fac(...)`.", :fac)
66+
mpmath.fac(ex, args...; kwargs...)
67+
end
68+
export fac
69+
70+
function nint(ex::SymbolicObject, args...; kwargs...)
71+
Base.depwarn("The nint function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.nint(...)`.", :nint)
72+
mpmath.nint(ex, args...; kwargs...)
73+
end
74+
export nint
75+
76+
function fib(ex::SymbolicObject, args...; kwargs...)
77+
Base.depwarn("The fib function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.fib(...)`.", :fib)
78+
mpmath.fib(ex, args...; kwargs...)
79+
end
80+
export fib
81+
82+
function monitor(ex::SymbolicObject, args...; kwargs...)
83+
Base.depwarn("The monitor function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.monitor(...)`.", :monitor)
84+
mpmath.monitor(ex, args...; kwargs...)
85+
end
86+
export monitor
87+
88+
function bernfrac(ex::SymbolicObject, args...; kwargs...)
89+
Base.depwarn("The bernfrac function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.bernfrac(...)`.", :bernfrac)
90+
mpmath.bernfrac(ex, args...; kwargs...)
91+
end
92+
export bernfrac
93+
94+
function doctests(ex::SymbolicObject, args...; kwargs...)
95+
Base.depwarn("The doctests function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.doctests(...)`.", :doctests)
96+
mpmath.doctests(ex, args...; kwargs...)
97+
end
98+
export doctests
99+
100+
function ei(ex::SymbolicObject, args...; kwargs...)
101+
Base.depwarn("The ei function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.ei(...)`.", :ei)
102+
mpmath.ei(ex, args...; kwargs...)
103+
end
104+
export ei
105+
106+
function timing(ex::SymbolicObject, args...; kwargs...)
107+
Base.depwarn("The timing function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.timing(...)`.", :timing)
108+
mpmath.timing(ex, args...; kwargs...)
109+
end
110+
export timing
111+
112+
function rgamma(ex::SymbolicObject, args...; kwargs...)
113+
Base.depwarn("The rgamma function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.rgamma(...)`.", :rgamma)
114+
mpmath.rgamma(ex, args...; kwargs...)
115+
end
116+
export rgamma
117+
118+
function e1(ex::SymbolicObject, args...; kwargs...)
119+
Base.depwarn("The e1 function is deprecated. To use this feature, you would need to import the python library `mpmath` and then call as `mpmath.e1(...)`.", :e1)
120+
mpmath.e1(ex, args...; kwargs...)
121+
end
122+
export e1
123+
124+
125+
126+
# mull over
127+
#XXX intersection -> intersect
128+
#XXX cse
129+
#XXX flatten, unflatten
130+
#XXX interpolate
131+
#XXX intervals
132+
# (:isolate
133+
# ,:isprime
134+
# ,:line_integrate
135+
# ,:ln
136+
# ,:monitor
137+
# ,:prime)
138+
139+
## Done
140+
# # in mpmath
141+
# #XXX expj
142+
# (:expjpi
143+
# ,:fac
144+
# ,:nint
145+
# ,:fib
146+
# ,:monitor
147+
# ,:bernfrac
148+
# ,:doctests
149+
# ,:ei
150+
# ,:timing
151+
# ,:rgamma
152+
# ,:expjpi
153+
# ,:e1)
154+
155+
# add depwarns
156+
# SymMatrix
157+
# Base.@deprecate_binding Removed
158+
#Base.@deprecate_binding SymPermutation nothing
159+
#Base.@deprecate_binding SymPermutationGroup nothing
160+
# transpositions
161+
# sympy_plotting
162+
# plot_implicit
163+
# plot_parametric_surface
164+
# import_from
165+
# VectorField
166+
# elements
167+
# :Lambda
168+
169+
# # # use sympy.XXX
170+
# (:Abs
171+
# ,:And
172+
# ,:DiracDelta
173+
# ,:Equality
174+
# ,:GreaterThan
175+
# ,:LessThan
176+
# ,:Max
177+
# ,:Min
178+
# ,:Not
179+
# ,:Or
180+
# ,:StrictGreaterThan
181+
# ,:StrictLessThan
182+
# ,:Unequality
183+
# ,:Xor)
184+
185+
# (:real_root
186+
# ,:root
187+
# ,:rootof
188+
# ,:rsolve
189+
# ,:srepr
190+
# ,:multiplicity
191+
# ,:nsimplify
192+
# ,:numer
193+
# ,:denom
194+
# ,:ode_order
195+
# ,:pdsolve)
196+
197+
# document
198+
# @symfuns
199+
# @vars

0 commit comments

Comments
 (0)