[Python-3000] Windows: debug mode

Phillip J. Eby pje at telecommunity.com
Sun Feb 17 16:15:22 CET 2008


At 03:23 PM 2/17/2008 +0100, Christian Heimes wrote:
>Giovanni Bajo wrote:
> > Python's debug mode under Windows mandates an ABI change: the debug
> > version of dynamic libraries (_d) are linked against the CRT debug
> > runtime, which is not ABI-compatible to the release runtime. So you
> > either have the _d version of all the extensions you need or you can't
> > even start your program in debug mode. I believe this started back in the
> > days where Python programs were small, had only a couple of dependencies,
> > and most developers were also core developers (core developers are
> > probably the only ones that can succesfully use the current debug mode).
>
>[snip]
>
>Python's Py_DEBUG mode adds lots of extra checks which require an ABI
>change. For example in debug mode memory allocation and and reference
>counting do extra checks etc. In release mode those extra checks are
>either disabled or they are replaced by much simpler and faster macros.
>
>It *may* be possible to add the extra functions to the Python library so
>that a debug build can also load release libraries.

Actually, I think Giovanni simply wants to be able to build extension 
modules with debugging information, *without* needing to use a Py_DEBUG build.

That is, this is about using debug extensions with a release Python, 
not the other way 'round.  And if I understand correctly, this could 
be done by additions to the distutils.



More information about the Python-3000 mailing list