diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-11-27 09:44:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-27 09:44:53 (GMT) |
commit | d5c71b0c9862c4474d2700a14490dc98b67da88e (patch) | |
tree | 0dac7bea0471acbe4a9fe95221e98e2c494d35df /Lib | |
parent | 8a957534f5182022ee8ac2dbaac4b4900dc98159 (diff) | |
download | cpython-d5c71b0c9862c4474d2700a14490dc98b67da88e.zip cpython-d5c71b0c9862c4474d2700a14490dc98b67da88e.tar.gz cpython-d5c71b0c9862c4474d2700a14490dc98b67da88e.tar.bz2 |
pythoninfo: add Py_DEBUG (#4198) (#4580)
(cherry picked from commit afd055a59fe0291881fc2459215ce106e424da51)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/pythoninfo.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 5447ab8..c238ef7 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -115,6 +115,14 @@ def collect_sys(info_add): encoding = '%s/%s' % (encoding, errors) info_add('sys.%s.encoding' % name, encoding) + # Were we compiled --with-pydebug or with #define Py_DEBUG? + Py_DEBUG = hasattr(sys, 'gettotalrefcount') + if Py_DEBUG: + text = 'Yes (sys.gettotalrefcount() present)' + else: + text = 'No (sys.gettotalrefcount() missing)' + info_add('Py_DEBUG', text) + def collect_platform(info_add): import platform |