[Python-Dev] Python 2.4 extensions require VC 7.1?

Kristján V. Jónsson kristjan at ccpgames.com
Mon Jun 19 12:43:55 CEST 2006


The signal() doc is rather vague on the point, since it doesn´t define the availible set
of signals.  It doesn´t even say that a signal identifier is an integer.  But it says that it should return EINVAL if it "cannot satisfy the request".  It doesn´t say "if the request is invalid", but I don't want to go into hairsplitting here.  So I could agree with you there.

But I completely disagree when you insist that microsoft has broken the C library.  What
they have done is added parameter validation, and thus simply added code in the "undefined"
domain.
I would also like to point out that, again apart from signal(), you are relying on undefined behaviour of fopen and others.  It may well cause a crash on one of your other platforms one day, you have no way of knowing.  VS2005 just pointed that out to you.

So, it is my suggestion that in stead of going all defensive, and shouting "breakage", why not simply fix those very dubious CRT usage patterns?  Think of it as lint.

Also, consider this:  in the case of file() and strftime() we are passing in dynamic strings.  The strings are not within control of python.  Normally these are static strings, within the control of the developer which has the function reference on hand, knows what he wants and so on.  Yet, here we are passing in any old strings.  There is a huge undefined domain there, and we should be very concerned about that.  It is a wonder we haven´t seen these functions crash before.

I would like to see the question about whether or not to use VS2005 be made purely on the merit of what is most practical (and useful) for people, rather than some emotional arguments about with loaded terms like "breakage", and personal feelings towards Microsoft.

(And by the way, why does pythoncore.dll mess with signal() anyway?  shouldn´t that be python.exe?  I don´t want a dll that I embed to mess with my signal handling) 

Cheers,

Kristján

-----Original Message-----
From: "Martin v. Löwis" [mailto:martin at v.loewis.de] 
Sent: 17. júní 2006 13:28
To: Scott Dial
Cc: Python Dev; Kristján V. Jónsson
Subject: Re: [Python-Dev] Python 2.4 extensions require VC 7.1?


Sure, I can *make* the library conform to C 99. I could also write my own C library entirely to achieve that effect. The fact remains that VS 2005 violates standard C where VS 2003 and earlier did not:
A conforming program will abort, instead of completing successfully.


More information about the Python-Dev mailing list