The problem was that mpmath 0.16 does not work in Python 2.4 if gmpy
is installed, because several places in the code use mpz's as list
indices, and __index__ was not implemented until Python 2.5. We
worked around it in the SymPy 0.7.0 release by disabling the gmpy
backend in mpmath under Python 2.4.
Aaron Meurer
>
>
> Setting up a way to test multiple Python versions was a part of my
> project, and Tox is by far the easiest/best choice for this. You can
> read my blog post on the topic if you want[0], but the short version
> is that you need to put a tox.ini file in the same directory as
> setup.py. For mpmath, you'll want to define it something like:
>
> [tox]
> envlist = py25, py26, py27, py31, py32
>
> [testenv]
> commands = python mpmath/tests/runtests.py -local []
>
> and that's it! You'll want to run it with "tox" to test all the
> versions listed; you can also define custom test environments to check
> with/without gmpy and such, details are in my blog post. The mpmath
> test suite is quite short (about a minute, compared to SymPy's 10) so
> it shouldn't be a problem for this.
>
> Well, I hope that helps! If you've got any problems, feel free to
> contact me (mail, or on #sympy).
>
> [0] http://vperic.blogspot.com/2011/06/setting-up-and-using-tox-in-sympy.html
>
> --
> You received this message because you are subscribed to the Google Groups "mpmath" group.
> To post to this group, send email to mpm...@googlegroups.com.
> To unsubscribe from this group, send email to mpmath+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mpmath?hl=en.
>
>
Thanks, I've (hopefully) fixed this.
> I assume the left-hand hash was supposed to hash the whole expression,
> not just mpf(1). The code was introduced in r1220: Changes to support
> the new hashing algorithm in Python 3.2. This is basically a trivial
> error, just took me some time to pinpoint among all the other changes
> in SymPy under py3. :) Aaron told me something similuar occured under
> Python 2.5 with or without gmpy, not sure now. Have you considered
> using Tox to help with your testing?
So far I've just manually run the tests with each Python version
before release. I don't think I had 3.2 installed though.
Fredrik
No, I checked, and in all fairness, mpmath 0.17 was released before
Python 3.2.0-final.
Can you give a link to the revision that fixes this, so we can apply
it in SymPy's mpmath?
Aaron Meurer