[Python-Dev] Supporting Visual Studio 2010

Glyph Lefkowitz glyph at twistedmatrix.com
Tue Apr 5 21:34:10 CEST 2011


On Apr 5, 2011, at 8:52 AM, exarkun at twistedmatrix.com wrote:

> On 09:58 am, martin at v.loewis.de wrote:
>>> Won't that still be an issue despite the stable ABI? Extensions on
>>> Windows should be linked to the same version of MSVCRT used to compile
>>> Python
>> 
>> Not if they use the stable ABI. There still might be issues if you
>> mix CRTs, but none related to the Python ABI - in particular, none
>> of those crashing conditions can arise from the stable ABI.
> 
> Does this mean new versions of distutils let you build_ext with any C compiler, instead of enforcing the same compiler as it has done previously?  That would be great.

That *would* be great.  But is it possible?

<http://www.python.org/dev/peps/pep-0384/> says "functions expecting FILE* are not part of the ABI, to avoid depending on a specific version of the Microsoft C runtime DLL on Windows".  Can extension modules that need to read and write files practically avoid all of those functions?  (If your extension module links a library with a different CRT, but doesn't pass functions back and forth to Python, is that OK?)

The PEP also says that it will allow users to "check whether their modules conform to the ABI", but it doesn't say how that will be done.  How can we build extension modules so that we're sure we're ABI-conformant?


More information about the Python-Dev mailing list