This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2017-07-07.14:48:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za>
In-reply-to
Content
While discussing how to dump the readline version in regrtest or test_readline in bpo-29854, I proposed to add a new buildbot step to dump any kinds of debug information. It would avoid to pollute test output with useless information. For example, while the hash implementation is useful for unit tests on the hash function, I dislike always dumping it in the regrtest header.

The idea would be to get a phpinfo-like report:
http://php.net/phpinfo

We can start with an hardcoded list using "try: import xxx except ImportError: pass else: ...", but later we may it more "pluggable" somehow?

Maybe define a protocol (function with a specific name, maybe a private function?) for each module, add a command which can dump info on a single module, or all modules.

Maybe start with an hardcoded list of modules, but later discover automatically all stdlib modules?

I don't expect a regular list of information, but more like a long key-value list.

Attached pythoninfo.py is an example of such script. It works on Python 2.7-3.7. Example of Python 3.7 output on my Linux PC:
---
cpu_count: 4
cwd: /home/haypo/prog/GIT/misc/python
filesystem_encoding: utf-8
filesystem_errors: surrogateescape
gdb_version: GNU gdb (GDB) Fedora 7.12.1-48.fc25
hash algorithm: ('siphash24', '64bit')
locale_encoding: UTF-8
platform: Linux-4.11.6-201.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five
python_implementation: CPython
readline_library_version: 6.3
readline_runtime_version: 0x603
readline_version: 0x603
sys.byteorder: little
sys.flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
sys.maxsize: 9223372036854775807
sys.version: 3.7.0a0 (heads/testcapi_stack_pointer_master:81dd3fb, Jul  6 2017, 13:10:36)  [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]
tcl_version: 8.6
---

Later, we may add a JSON output format, to allow to collect informations of all buildbots. For example, check all tested readline versions.
History
Date User Action Args
2017-07-07 14:48:35vstinnersetrecipients: + vstinner
2017-07-07 14:48:35vstinnersetmessageid: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za>
2017-07-07 14:48:35vstinnerlinkissue30871 messages
2017-07-07 14:48:35vstinnercreate