On Fri, Feb 8, 2013 at 9:02 PM, Aaron Meurer <notifications@github.com>wrote:

> In sympy/core/compatibility.py:
>
> > +# Minimum version of gmpy changed to 1.13 to allow a single code base to also
> > +# work with gmpy2.
> > +
> > +HAS_GMPY = 0
> > +
> > +try:
> > +    import gmpy2 as gmpy
> > +    if gmpy.version() >= '2.0.0b4':
> > +            HAS_GMPY = 2
> > +except ImportError:
> > +    pass
> > +
> > +try:
> > +    import gmpy
> > +    if gmpy.version() >= '1.13':
> > +        HAS_GMPY = 1
>
> Great, except use import_module.
>
I mimicked the code in mpmath.

Should the import logic in mpmath also use import_module?

Should mpmath also respect the GROUND_TYPE setting? If not, mpmath could be
using gmpy2, sympy could be using gmpy, and it will be difficult to
distinguish between the types when debugging.

>  —
> Reply to this email directly or view it on GitHub<https://github.com/sympy/sympy/pull/1762/files#r2952629>..
>
>