Version v0.2.1 broke equality with SymPy.jl
ranocha opened this issue · comments
Hendrik Ranocha commented
I got the following CI failure using SymPy in a downstream package:
MethodError: Eq(::SymPy.Sym, ::SymPy.Sym) is ambiguous.
Candidates:
Eq(a::T, b::T) where T
@ CommonEq ~/.julia/packages/CommonEq/DtDkN/src/CommonEq.jl:18
Eq(ex::Number, args...; kwargs...)
@ SymPy ~/.julia/packages/SymPy/S5qKW/src/importexport.jl:145
Possible fix, define
Eq(::T, ::T) where T<:Number
See https://github.com/ranocha/BSeries.jl/actions/runs/6846040525/job/18612114757?pr=178#step:7:369
As far as I understand, this is caused by the changes in the latest release of CommonEq.jl.
tomaklutfu commented
This two definitions are conflicting
Line 18 in be31533
https://github.com/JuliaPy/SymPy.jl/blob/d7610a585771523287daf345ad0e71722801dc61/src/importexport.jl#L145
And the same ambiguity is for all other definitions too.
If we wanna keep one in here SymPy package should add
Eq(ex1::Number, ex2::Number; kwargs...)
.john verzani commented
Yes, sorry about this. I was developing for a change to SymPy to use the common SymPyCore backend and failed to test this. I think the best bet is to upper bound the requirement. Thanks for letting me know.
Hendrik Ranocha commented
Thanks!