python/dist/src/Objects complexobject.c,2.42,2.43
What's the plan for removing this stuff again when UnixWare fixes their bugs?
There is no plan for that at the moment. Please have a look at http://sourceforge.net/tracker/?group_id=5470&atid=305470&func=detail&aid=450710 for prior discussion on the matter; the submitter has considered coming up with an autoconf bug test for the problem, but hasn't followed up with that - testing for the system apparently turned out to be the easier route. One possible approach is that UnixWare releases are regularly tested for the presence of the bug. That would be simplified if the nature of the problem was documented somewhere, that also hasn't happened. To retest, it might be easiest to disable the SCO_ macros, and re-run the test suite; test_math will fail if the bug is still present. Once the version of UnixWare is identified that first fixed the bugs, it hopefully is possible to check the value of __SCO_VERSION__ to tell apart the good, the bad, and the ugly. Regards, Martin
[Tim]
What's the plan for removing this stuff again when UnixWare fixes their bugs?
[Martin v. Loewis]
There is no plan for that at the moment. Please have a look at
http://sf.net/tracker/?group_id=5470&atid=305470&func=detail&aid=450710
for prior discussion on the matter;
Ya, I knew about that -- it was a rhetorical question <wink>.
[wishful thinking deleted]
For platforms that Python developers build on every day (Linux and Windows, possibly Macs), and tens or hundreds of thousands of people run on, such #ifdef crud probably will go away someday, but I suspect these temporary UnixWare hacks will infect the code base forever. So I'd rather let tests fail there, and simply note in the README that such failures are due to UnixWare bugs and will go away when UnixWare fixes them. That's what we do with, e.g., SGI -O bugs. As is, the code is obfuscated forever, and may well just be swapping one set of bugs for another. For example, the replacement for atan2 isn't correct, as it ignores the sign of the zero, and atan2 on a 754 box should pay attention to that.
from math import atan2 z = 0.0 atan2(z, -1) 3.1415926535897931 atan2(-z, -1) -3.1415926535897931
So now we've got a different UnixWare bug, which will persist even after UnixWare fixes *their* errors because we're #ifdef'ing their implementation away. I don't view that as a problem unique to this patch set, but as a predictable (in outline) consequence of trying to worm around minority-platform bugs via #ifdef.
participants (2)
-
Martin v. Loewis -
Tim Peters