|
| 1 | +# This file contains numerous deprecations for `SymPy` |
| 2 | +# |
| 3 | +# `SymPy` took a pretty lenient approach to what it wrapped -- it if was a member |
| 4 | +# of the `sympy` object, essentially it got wrapped. (cf. `importexport.jl`) |
| 5 | +# The `SymPyCore` backend takes a much more selective approach, consequently not |
| 6 | +# adding `Julia` methods for many `sympy` functions. |
| 7 | +# |
| 8 | +# This file contains many deprecations. There are a few others utilizing `Base.depwarn` |
| 9 | +# elswhere. |
| 10 | +# |
| 11 | +# The following are to be deprecated, but didn't easily fit with `Julia`'s deprecations: |
| 12 | +# |
| 13 | +# * `True` and `False` are deprecated in favor of `Sym(true)` and `Sym(false)`. (`SymPy` didn't properly wrap `BooleanTrue` or `BooleanFalse`. |
| 14 | +# |
| 15 | +# * The python object `sympy_core` can just be `sympy.core`. Similarly `sympy_matrices` is sjust `sympy.matrices`. |
| 16 | +# |
| 17 | +# * The macro `@vars` is deprecated in favor of `@syms`; `@symfuns` is deprecated, as `@syms` can be used. |
| 18 | +# |
| 19 | +# * the `import_from` method to import all functions and wrap them from some module is deprecated. |
| 20 | +# |
| 21 | +# That should be it, but if not. Apologies. |
| 22 | + |
| 23 | +Base.@deprecate conjugate(x::Sym, args...; kwargs...) conj(x, args...; kwargs...) true |
| 24 | + |
| 25 | +Base.@deprecate cse(ex::SymbolicObject, args...; kwargs...) sympy.cse(ex, args...; kwargs...) true |
| 26 | +Base.@deprecate denom(ex::SymbolicObject, args...; kwargs...) sympy.denom(ex, args...; kwargs...) true |
| 27 | +Base.@deprecate flatten(ex::SymbolicObject, args...; kwargs...) sympy.flatten(ex, args...; kwargs...) true |
| 28 | +Base.@deprecate unflatten(ex::SymbolicObject, args...; kwargs...) sympy.unflatten(ex, args...; kwargs...) true |
| 29 | +Base.@deprecate interpolate(ex::SymbolicObject, args...; kwargs...) sympy.interpolate(ex, args...; kwargs...) true |
| 30 | +Base.@deprecate intervals(ex::SymbolicObject, args...; kwargs...) sympy.intervals(ex, args...; kwargs...) true |
| 31 | +Base.@deprecate isolate(ex::SymbolicObject, args...; kwargs...) sympy.isolate(ex, args...; kwargs...) true |
| 32 | +Base.@deprecate isprime(ex::SymbolicObject, args...; kwargs...) sympy.isprime(ex, args...; kwargs...) true |
| 33 | +Base.@deprecate line_integrate(ex::SymbolicObject, args...; kwargs...) sympy.line_integrate(ex, args...; kwargs...) true |
| 34 | +Base.@deprecate ln(ex::SymbolicObject, args...; kwargs...) sympy.ln(ex, args...; kwargs...) true |
| 35 | +Base.@deprecate prime(ex::SymbolicObject, args...; kwargs...) sympy.prime(ex, args...; kwargs...) true |
| 36 | +Base.@deprecate real_root(ex::SymbolicObject, args...; kwargs...) sympy.real_root(ex, args...; kwargs...) true |
| 37 | +Base.@deprecate root(ex::SymbolicObject, args...; kwargs...) sympy.root(ex, args...; kwargs...) true |
| 38 | +Base.@deprecate rootof(ex::SymbolicObject, args...; kwargs...) sympy.rootof(ex, args...; kwargs...) true |
| 39 | +Base.@deprecate rsolve(ex::SymbolicObject, args...; kwargs...) sympy.rsolve(ex, args...; kwargs...) true |
| 40 | +Base.@deprecate srepr(ex::SymbolicObject, args...; kwargs...) sympy.srepr(ex, args...; kwargs...) true |
| 41 | +Base.@deprecate multiplicity(ex::SymbolicObject, args...; kwargs...) sympy.multiplicity(ex, args...; kwargs...) true |
| 42 | +Base.@deprecate nsimplify(ex::SymbolicObject, args...; kwargs...) sympy.nsimplify(ex, args...; kwargs...) true |
| 43 | +Base.@deprecate numer(ex::SymbolicObject, args...; kwargs...) sympy.numer(ex, args...; kwargs...) true |
| 44 | +Base.@deprecate ode_order(ex::SymbolicObject, args...; kwargs...) sympy.ode_order(ex, args...; kwargs...) true |
| 45 | +Base.@deprecate pdsolve(ex::SymbolicObject, args...; kwargs...) sympy.pdsolve(ex, args...; kwargs...) true |
| 46 | +Base.@deprecate Abs(ex::SymbolicObject, args...; kwargs...) sympy.Abs(ex, args...; kwargs...) true |
| 47 | +Base.@deprecate And(ex::SymbolicObject, args...; kwargs...) sympy.And(ex, args...; kwargs...) true |
| 48 | +Base.@deprecate DiracDelta(ex::SymbolicObject, args...; kwargs...) sympy.DiracDelta(ex, args...; kwargs...) true |
| 49 | +Base.@deprecate Equality(ex::SymbolicObject, args...; kwargs...) sympy.Equality(ex, args...; kwargs...) true |
| 50 | +Base.@deprecate GreaterThan(ex::SymbolicObject, args...; kwargs...) sympy.GreaterThan(ex, args...; kwargs...) true |
| 51 | +Base.@deprecate LessThan(ex::SymbolicObject, args...; kwargs...) sympy.LessThan(ex, args...; kwargs...) true |
| 52 | +Base.@deprecate Max(ex::SymbolicObject, args...; kwargs...) sympy.Max(ex, args...; kwargs...) true |
| 53 | +Base.@deprecate Min(ex::SymbolicObject, args...; kwargs...) sympy.Min(ex, args...; kwargs...) true |
| 54 | +Base.@deprecate Not(ex::SymbolicObject, args...; kwargs...) sympy.Not(ex, args...; kwargs...) true |
| 55 | +Base.@deprecate Or(ex::SymbolicObject, args...; kwargs...) sympy.Or(ex, args...; kwargs...) true |
| 56 | +Base.@deprecate StrictGreaterThan(ex::SymbolicObject, args...; kwargs...) sympy.StrictGreaterThan(ex, args...; kwargs...) true |
| 57 | +Base.@deprecate StrictLessThan(ex::SymbolicObject, args...; kwargs...) sympy.StrictLessThan(ex, args...; kwargs...) true |
| 58 | +Base.@deprecate Unequality(ex::SymbolicObject, args...; kwargs...) sympy.Unequality(ex, args...; kwargs...) true |
| 59 | +Base.@deprecate Xor(ex::SymbolicObject, args...; kwargs...) sympy.Xor(ex, args...; kwargs...) true |
| 60 | + |
| 61 | +Base.@deprecate plot_parametric_surface(exs, args...; kwargs...) sympy.plotting.plot3d_parametric_surface(exs..., args...; kwargs...) true |
| 62 | +Base.@deprecate plot_implicit(ex, args...; kwargs...) sympy.plotting.plot_implicit(ex, args...; kwargs...) true |
| 63 | + |
| 64 | + |
| 65 | +# mpmath @deprecate |
| 66 | +function expj(ex::SymbolicObject, args...; kwargs...) |
| 67 | + 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) |
| 68 | + mpmath.expj(ex, args...; kwargs...) |
| 69 | +end |
| 70 | +export expj |
| 71 | + |
| 72 | +function expjpi(ex::SymbolicObject, args...; kwargs...) |
| 73 | + 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) |
| 74 | + mpmath.expjpi(ex, args...; kwargs...) |
| 75 | +end |
| 76 | +export expjpi |
| 77 | + |
| 78 | +function fac(ex::SymbolicObject, args...; kwargs...) |
| 79 | + 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) |
| 80 | + mpmath.fac(ex, args...; kwargs...) |
| 81 | +end |
| 82 | +export fac |
| 83 | + |
| 84 | +function nint(ex::SymbolicObject, args...; kwargs...) |
| 85 | + 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) |
| 86 | + mpmath.nint(ex, args...; kwargs...) |
| 87 | +end |
| 88 | +export nint |
| 89 | + |
| 90 | +function fib(ex::SymbolicObject, args...; kwargs...) |
| 91 | + 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) |
| 92 | + mpmath.fib(ex, args...; kwargs...) |
| 93 | +end |
| 94 | +export fib |
| 95 | + |
| 96 | +function monitor(ex::SymbolicObject, args...; kwargs...) |
| 97 | + 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) |
| 98 | + mpmath.monitor(ex, args...; kwargs...) |
| 99 | +end |
| 100 | +export monitor |
| 101 | + |
| 102 | +function bernfrac(ex::SymbolicObject, args...; kwargs...) |
| 103 | + 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) |
| 104 | + mpmath.bernfrac(ex, args...; kwargs...) |
| 105 | +end |
| 106 | +export bernfrac |
| 107 | + |
| 108 | +function doctests(ex::SymbolicObject, args...; kwargs...) |
| 109 | + 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) |
| 110 | + mpmath.doctests(ex, args...; kwargs...) |
| 111 | +end |
| 112 | +export doctests |
| 113 | + |
| 114 | +function ei(ex::SymbolicObject, args...; kwargs...) |
| 115 | + 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) |
| 116 | + mpmath.ei(ex, args...; kwargs...) |
| 117 | +end |
| 118 | +export ei |
| 119 | + |
| 120 | +function timing(ex::SymbolicObject, args...; kwargs...) |
| 121 | + 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) |
| 122 | + mpmath.timing(ex, args...; kwargs...) |
| 123 | +end |
| 124 | +export timing |
| 125 | + |
| 126 | +function rgamma(ex::SymbolicObject, args...; kwargs...) |
| 127 | + 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) |
| 128 | + mpmath.rgamma(ex, args...; kwargs...) |
| 129 | +end |
| 130 | +export rgamma |
| 131 | + |
| 132 | +function e1(ex::SymbolicObject, args...; kwargs...) |
| 133 | + 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) |
| 134 | + mpmath.e1(ex, args...; kwargs...) |
| 135 | +end |
| 136 | +export e1 |
0 commit comments