gmpy 1.0 for python 2.4 alpha 2 Windows-packaged
Alex Martelli
aleaxit at yahoo.com
Sun Sep 5 16:36:29 EDT 2004
Tim Peters <tim.peters at gmail.com> wrote:
> [Tim Peters, on the demise of doctest.master]
> >> Under a hopeful belief that nobody was using that anyway, I didn't
> >> gripe when Edward refactored it out of existence. This is the first
> >> time we've heard that anyone *was* using it!
>
> [Alex Martelli]
> > I guess gmpy just wasn't on your radar...! If you have no need for its
> > multi-precision and special-functions support, that's unsurprising.
>
> Since I live on Windows most of the time, I use Marc-Andre Lemburg's
> mxNumber. That comes with a pre-built GMP, so is that much less for
So does gmpy in the prebuilt-for-Windows version, btw. I may even have
snagged that from Marc Andre's package at some time in the past...
> me to screw up. I generally don't run package test suites on Windows
> anyway (the odds that something is uniquely broken on my particular
> WIndows box are too low).
Hmmm -- what you mean by Windows and what I mean by Windows must be very
different OS's. Has DLL Hell disappeared since I finally stopped
working as a Windows guru and turned to Linux, Mac OS X, OpenBSD and
other OS's...?-)
> >> I suppose we could hack one back in, but I'd rather volunteer to
> >> rewrite the gmpy tests to use the stronger 2.4 gimmicks ...
>
> > Thanks, your offer is welcome and gladly accepted -- as long as all the
> > tests keep running under 2.3 just as well, of course. There will be a
> > lot of 2.3 around for a long time -- for example, Apple isn't going to
> > change the Python version they use in Panther, which is 2.3, at least
> > until they come out with Tiger, say in May next year, and since, as
> > usual, they'll change $150 or so for the OS upgrade, many people will
> > just keep running Panther (and therefore Python 2.3). Etc, etc.
>
> Nothing against 2.3 here, it's simply a surprise that anyone was using
> doctest.master. SourceForge is down at the moment, so I still don't
> know whether gmpy's use was essential or shallow. If it was
> essential, we'll have to hack a master workalike back in.
Probably shallow. Anyway, I'll be glad to mail you a gmpy package if SF
keeps giving problems, let me know!
> It could be too that many projects stumbled into using doctest.master,
> but none yet bothered to try the 2.4 prereleases.
I hadn't, for example -- even though I've been current on 2.4 for a long
time, I hadn't thought of building gmpy for it (shame on me!).
> > I do assume that it's easy to keep the hundreds of tests almost
> > unchanged, to avoid having to maintain them separately in two
> > versions, and support 2.3 and 2.4 with localized changes to the
> > small spots where the tests are run...?
>
> It should be easy indeed. Edward Loper and Jim Fulton (by way of
> Zope3) had thousands of doctests between them, and Python's test suite
> has more than a few too. None of those doctests had to be changed in
> any way. But none of them used doctest.master.
Ah... well, let's hope my use was indeed shallow!
> This next *may* be relevant to gmpy. I'm aware of it but haven't seen
> an instance of it:
>
> """
> >>> 1/0
> Traceback (most recent call last):
> abc
> ZeroDivisionError: integer division or modulo by zero
> """
>
> That doctest passes before 2.4, but no longer. I don't want to "fix"
> that, either, if someone has code like this.
...
> Bottom line is that such tests (if any exist) need to be rewritten.
> Starting the "abc" lines with one or more blanks is sufficient so that
> the test passes under all versions of doctest.
OK, inserting blanks if needed doesn't seem too difficult a fix, I
agree!
Alex
More information about the Python-list
mailing list