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

Py_DEBUG and WITH_PYMALLOC warnings [Windows] #1314

Closed
tkhyn opened this issue Apr 2, 2018 · 4 comments · Fixed by #1332
Closed

Py_DEBUG and WITH_PYMALLOC warnings [Windows] #1314

tkhyn opened this issue Apr 2, 2018 · 4 comments · Fixed by #1332

Comments

@tkhyn
Copy link
Contributor

tkhyn commented Apr 2, 2018

Hi,

I'm on Windows 7 x64, running the latest Python 3.6.5 (64-bit), with setuptools 39.0.1. Each time a setuptools internal function is invoked (for example by running zc.buildout's bootstrap.py) and somehow calls pep425tags.get_abi_tag, 2 warnings relative to PyDEBUG and WITH_PYMALLOC are raised. I don't remember seeing these warnings with previous versions of setuptools (I had 36.x if I recall correctly)

I've tried to search issues relative to these warnings but the only I could find are from 2016 and do not seem to be relevant.

Here is a minimal command that triggers the warnings:

$ python -c "from setuptools.pep425tags import get_abi_tag; get_abi_tag()"
C:\Python\3.6\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
  warn=(impl == 'cp')):
C:\Python\3.6\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
  warn=(impl == 'cp')):

I am not sure I fully understand what is going on though, so it may have something to do with my setup. Hopefully this can be reproduced somehow.

@benoit-pierre
Copy link
Member

I'm assuming you get the same warnings when building a wheel? That code comes from the wheel package via pip (for manylinux support).

@benoit-pierre
Copy link
Member

Note: the level has been changed in pip (the code uses logger.debug), so I guess we could suppress it too.

@tkhyn
Copy link
Contributor Author

tkhyn commented Apr 3, 2018

Bonjour Benoit,

No, the warnings do not show up when I build a wheel from any of my (pure python) packages using python setup.py bdist_wheel.

From your 2nd comment I understand you would want setuptools to log this message (and any other warning raised in get_abi_tag) through logger.debug instead of raising a warning. If so I'll be happy to submit a PR, but you may prefer doing the edits yourself.

@benoit-pierre
Copy link
Member

Yes, this should use the logging facility from distutils: from distutils import log, as done in other parts of the code.

Relevant discussion on pip's tracker about the same issue: pypa/pip#3383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants