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

"Martin v. Löwis" martin at v.loewis.de
Tue Jun 20 23:43:56 CEST 2006

Kristján V. Jónsson wrote:
>> However, the usual, natural, straight-forward way of processing the
>> mode string (in a loop with a > switch statement) can't possible
>> cause crashes.
> Making assumptions about how someone implements the CRT is not good
> practice.

I'm not arguing about that, and I think Python should be changed.

Notice, however, that this would be a behavioural change: currently,
Python passes through the mode argument for open(), exposing
the platform-specific behaviour. If Python would reject mode
arguments that are not supported in standard C, programs that
currently work may break.

> I wonder.  Setting process wide handlers like that seems to be odd if
> you are embedding python to do scripting for you.  The main app is
> usually the one that decides on signal handling for various things.
> Seems like a python.exe thing to me.  But never mind.  At the very
> least one should then only set those handlers that are valid for each
> implementation.

There is no portable way to find out what those are.

> So, if I agree with you that signal() is broken (by default, but
> mended by our fix) is there any any other technical reason why VC8
> should not be taken into the fold?  After all, it has already pointed
> out to us that we are dangerously allowing user format strings to
> propagate.

I can't say for sure - there should be some testing first.
One issue I can think of is the packaging: Microsoft wants
us to install msvcr80.dll using their SxS technology, with
manifests and everything. That needs to be considered in the
build process, and dealt with in the MSI production.

I have no experience with side-by-side installation of
"native assemblies" yet, so I would have to learn this first,
or wait for somebody to provide patches. This probably
also impacts exe builders, which have to pick up the
DLL from SxS.

Another technical issue is the absence of support for
msvcr80.dll in MinGW - one currently couldn't build
Python extensions that link with the right CRT.

Not purely technical, but somebody would also need to find
out what the licensing conditions on msvcr80.dll are:
what are the conditions for redistribution if I have
a licensed copy of VS 2005? What if I have VS Express?
What if I have neither, and just want to package it
as a side effect of using, say, py2exe?


More information about the Python-Dev mailing list