
See SF bug #493631: http://sourceforge.net/tracker/index.php?func=detail&aid=493631&group_id=5470&atid=105470 The mpz modules doesn't work with GMP 4.0 (which is brand new -- http://www.swox.com/gmp/ lists Dec 1, 2001 as the release date). It looks like the mpz module is a mess. The setup.py file contains a reference to pympz.sourceforge.net, but that doesn't exist. There is, however, a SF project gmpy, which seems to be a Python wrapper for GMP 3.0 (does it work with GMP 4.0?). I'm cc'ing the project admins, maybe they can shed light on this. Does anybody know how to fix mpzmodule.c? Or should we just get rid of it? Should we at least fix the reference in setup.py to point to gmpy? --Guido van Rossum (home page: http://www.python.org/~guido/)

On Saturday 15 December 2001 17:23, Guido van Rossum wrote:
Thanks for the indication -- I was not aware of the new GMP 4.0. A rapid test shows the current gmpy.c, release 0.8, breaks in exactly one place (structure gmpstate_t used to have a member named seed, now renamed to _mp_seed). Once that single line is fixed, gmpy 0.8 builds fine (on a Linux box) with the new GMP 4.0 and passes all of its 973 unit-tests (with Python 2.2b1). I think we should rapidly release a 0.8.1 with the one-line fix (arranged so it keeps building with GMP 3.1 while also building with 4.0, of course), and plan the modest gmpy extensions needed to exploit 4.0's novelties later (it's likely that little or no work is needed for that, since 4.0 seems to have mostly relaxed previous argument constraints, and gmpy generally doesn't duplicate GMP's own argument validity tests). Having gmpy fully exploit Python 2.2 is a longer-term objective (expose all types and make them inheritable). Alex

Alex, do you have a suggestion for what to do with mpzmodule.c in the 2.2 distribution? --Guido van Rossum (home page: http://www.python.org/~guido/)

On Saturday 15 December 2001 19:31, Guido van Rossum wrote:
Alex, do you have a suggestion for what to do with mpzmodule.c in the 2.2 distribution?
Remove it? It appears to me that there's no maintenance of it, and either Lemburg's module, or gmpy, would be a better bet for Pythonistas needing GMP access, anyway. Alex

Remove it?
I think this is unacceptable for 2.2, now that 2.2c1 carries the module. It seems that it still works fine as before with older versions of GMP, and it also seems that there are a few users out there of the module. If users care enough, somebody will contribute a patch. If they don't care, we can deprecate it for 2.3, and remove it in 2.4 (following the guidelines for language evolution). Regards, Martin

Let's mark it as deprecated in 2.2, and remove it in 2.3. --Guido van Rossum (home page: http://www.python.org/~guido/)

Alex Martelli writes:
Thanks for the indication -- I was not aware of the new GMP 4.0. A rapid test shows the current gmpy.c, release 0.8, breaks in exactly one place
I'm adding a link to the gmpy website from the mpz module documentation. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation

Fred L. Drake, Jr. wrote:
You might also want to add a link to mxNumber which is another wrapper for GMP. Haven't tried it with GMP 4.0 yet, but it works great with 3.1.1 -- even on Windows. http://www.egenix.com/files/python/mxNumber.html -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/

Have you commited to the CVS? It'd be nice to have it compiling with both, the new and the old gmp.
Ohh.. that's it! Nice.. :-) I'll commit the multiprecision pi code, so the next version already includes it. Thanks!! -- Gustavo Niemeyer [ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]

On Saturday 15 December 2001 17:23, Guido van Rossum wrote:
Thanks for the indication -- I was not aware of the new GMP 4.0. A rapid test shows the current gmpy.c, release 0.8, breaks in exactly one place (structure gmpstate_t used to have a member named seed, now renamed to _mp_seed). Once that single line is fixed, gmpy 0.8 builds fine (on a Linux box) with the new GMP 4.0 and passes all of its 973 unit-tests (with Python 2.2b1). I think we should rapidly release a 0.8.1 with the one-line fix (arranged so it keeps building with GMP 3.1 while also building with 4.0, of course), and plan the modest gmpy extensions needed to exploit 4.0's novelties later (it's likely that little or no work is needed for that, since 4.0 seems to have mostly relaxed previous argument constraints, and gmpy generally doesn't duplicate GMP's own argument validity tests). Having gmpy fully exploit Python 2.2 is a longer-term objective (expose all types and make them inheritable). Alex

Alex, do you have a suggestion for what to do with mpzmodule.c in the 2.2 distribution? --Guido van Rossum (home page: http://www.python.org/~guido/)

On Saturday 15 December 2001 19:31, Guido van Rossum wrote:
Alex, do you have a suggestion for what to do with mpzmodule.c in the 2.2 distribution?
Remove it? It appears to me that there's no maintenance of it, and either Lemburg's module, or gmpy, would be a better bet for Pythonistas needing GMP access, anyway. Alex

Remove it?
I think this is unacceptable for 2.2, now that 2.2c1 carries the module. It seems that it still works fine as before with older versions of GMP, and it also seems that there are a few users out there of the module. If users care enough, somebody will contribute a patch. If they don't care, we can deprecate it for 2.3, and remove it in 2.4 (following the guidelines for language evolution). Regards, Martin

Let's mark it as deprecated in 2.2, and remove it in 2.3. --Guido van Rossum (home page: http://www.python.org/~guido/)

Alex Martelli writes:
Thanks for the indication -- I was not aware of the new GMP 4.0. A rapid test shows the current gmpy.c, release 0.8, breaks in exactly one place
I'm adding a link to the gmpy website from the mpz module documentation. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation

Fred L. Drake, Jr. wrote:
You might also want to add a link to mxNumber which is another wrapper for GMP. Haven't tried it with GMP 4.0 yet, but it works great with 3.1.1 -- even on Windows. http://www.egenix.com/files/python/mxNumber.html -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/

Have you commited to the CVS? It'd be nice to have it compiling with both, the new and the old gmp.
Ohh.. that's it! Nice.. :-) I'll commit the multiprecision pi code, so the next version already includes it. Thanks!! -- Gustavo Niemeyer [ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]
participants (6)
-
Alex Martelli
-
Fred L. Drake, Jr.
-
Guido van Rossum
-
Gustavo Niemeyer
-
M.-A. Lemburg
-
Martin v. Loewis