Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Better Detection of Debug Builds on Windows #3535

Closed
dstufft opened this issue Mar 3, 2016 · 2 comments
Closed

Add Better Detection of Debug Builds on Windows #3535

dstufft opened this issue Mar 3, 2016 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation OS: windows Windows specific type: enhancement Improvements to functionality

Comments

@dstufft
Copy link
Member

dstufft commented Mar 3, 2016

From #3383 it'd be nice to have better detection of debug builds on Windows.

@zooba said on #3383 (comment)

Py_DEBUG is never going to be in pyconfig.h on Windows as the header is static (no autoconf) and debug/no-debug is determined using the preprocessor at build.

sys.gettotalrefcount is protected by Py_REF_DEBUG, which is not guaranteed to always be set when Py_DEBUG is set. That said, distutils.command.build tests for it, so it's probably safe enough (or at least, there'll be twice as many bugs when it breaks...).

The most reliable check is probably going to be:

any(x[0] == '_d.pyd' for x in imp.get_suffixes())

The only issue with this is that the imp module is deprecated - Python 3.3 and later should really use:

'_d.pyd' in importlib.machinery.EXTENSION_SUFFIXES
@natefoo
Copy link
Member

natefoo commented Mar 4, 2016

We'll want to do the same in wheel.

@dstufft dstufft added the OS: windows Windows specific label Mar 24, 2017
@pradyunsg pradyunsg added the type: enhancement Improvements to functionality label Oct 17, 2017
@pradyunsg pradyunsg self-assigned this Oct 17, 2017
@pradyunsg pradyunsg removed their assignment Jun 5, 2018
@chrahunt
Copy link
Member

chrahunt commented Sep 3, 2019

Since we're planning to replace pep425tags with packaging.tags (#6908), I reported this over on pypa/packaging.

@chrahunt chrahunt closed this as completed Sep 3, 2019
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Oct 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation OS: windows Windows specific type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

4 participants