On Mon, Jan 28, 2013 at 8:45 PM, Aaron Meurer <[email protected]> wrote:
> On Jan 28, 2013, at 8:54 PM, casevh <[email protected]> wrote:
>
> Hello,
>
> I maintain GMPY and GMPY2 and I'd like to provide a patch to resolve
> compatibility issues with GMPY2.
>
> The most significant difference is that support for mpq.numerator and
> mpq.denominator was added in GMPY 1.13 and is available in GMPY2 (and in
> Python's standard Fraction type). The code in polys uses the old mpq.numer()
> and mpq.denom() functions that were removed in GMPY2. Would it be acceptable
> to change the minimum version of GMPY to 1.13 from 1.03? Then the
> mpq.numer() calls could be changed to mpq.numerator, etc.
>
>
> Absolutely. Gmpy is an optional dependency, so supporting only the latest
> version is fine. And unlike supporting old versions of Python or IPython,
> old versions of gmpy are likely to lead to wrong result errors (assumedly).

GMPY 1.13 was released in 2010 and was one of the first versions that
supported Python 3.x well. There have only been a few bug fixes since
then to the 1.x series.

>
> What is the difference between numerator and numer?

numer() is a function that lives in both the "gmpy" namespace and is
also available as a method of an mpq instance. numerator was
introduced as an attribute of Python's Fraction and integer types in
2.5 (IIRC) as part of the abc numerical tower. I added
numerator/denominater as mpq attributes in 1.13. In the 2.x series, I
removed numer() and denom() as methods on an mpq instance and made
sure the attribute lookups were present. The numer() and denom()
functions are still present. The attribute lookups are slightly
faster, too.

>
> By the way, I was planning in applying your patch fixing the version check,
> but I haven't gotten around to it. So if you want to do that as well, go
> ahead.

The patch is correct for mpmath, but it breaks code in the polys
module. I'll work on a complete patch.

>
> Aaron Meurer
>
>
> I've resolved most of the other remaining issues but there are a couple that
> I'm still tracking down. I just want to verify that upgrading the minimum
> version to 1.13 is acceptable.
>
> Regards,
> casevh
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to