summaryrefslogtreecommitdiffstats
path: root/Lib/test/pythoninfo.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43880: Show DeprecationWarnings for deprecated ssl module features ↵Christian Heimes2021-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-25455) * ssl.OP_NO_SSLv2 * ssl.OP_NO_SSLv3 * ssl.OP_NO_TLSv1 * ssl.OP_NO_TLSv1_1 * ssl.OP_NO_TLSv1_2 * ssl.OP_NO_TLSv1_3 * ssl.PROTOCOL_SSLv2 * ssl.PROTOCOL_SSLv3 * ssl.PROTOCOL_SSLv23 (alias for PROTOCOL_TLS) * ssl.PROTOCOL_TLS * ssl.PROTOCOL_TLSv1 * ssl.PROTOCOL_TLSv1_1 * ssl.PROTOCOL_TLSv1_2 * ssl.TLSVersion.SSLv3 * ssl.TLSVersion.TLSv1 * ssl.TLSVersion.TLSv1_1 * ssl.wrap_socket() * ssl.RAND_pseudo_bytes() * ssl.RAND_egd() (already removed since it's not supported by OpenSSL 1.1.1) * ssl.SSLContext() without a protocol argument * ssl.match_hostname() * hashlib.pbkdf2_hmac() (pure Python implementation, fast OpenSSL function will stay) Signed-off-by: Christian Heimes <christian@python.org>
* bpo-9216: Expose OpenSSL FIPS_mode() as _hashlib.get_fips_mode() (GH-19703)Victor Stinner2020-04-291-0/+20
| | | | | | test.pythoninfo logs OpenSSL FIPS_mode() and Linux /proc/sys/crypto/fips_enabled in a new "fips" section. Co-Authored-By: Petr Viktorin <encukou@gmail.com>
* bpo-40436: Fix code parsing gdb version (GH-19792)Victor Stinner2020-04-291-0/+3
| | | test_gdb and test.pythoninfo now check gdb command exit code.
* bpo-39459: test.pythoninfo logs effective uid/gid (GH-18203)Victor Stinner2020-01-271-9/+14
| | | Fix also umask formatting: use octal prefix.
* Remove binding of captured exceptions when not used to reduce the chances of ↵Pablo Galindo2019-11-191-1/+1
| | | | | | | creating cycles (GH-17246) Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles. See for example GH-13135
* bpo-38338, test.pythoninfo: add more ssl infos (GH-16539)Victor Stinner2019-10-021-0/+31
| | | | | test.pythoninfo now logs environment variables used by OpenSSL and Python ssl modules, and logs attributes of 3 SSL contexts (SSLContext, default HTTPS context, stdlib context).
* bpo-38234: Cleanup getpath.c (GH-16367)Victor Stinner2019-09-251-0/+7
| | | | | | | | | * search_for_prefix() directly calls reduce() if found is greater than 0. * Add calculate_pybuilddir() subfunction. * search_for_prefix(): add path string buffer for readability. * Fix some error handling code paths: release resources on error. * calculate_read_pyenv(): rename tmpbuffer to filename. * test.pythoninfo now also logs windows.dll_path
* bpo-37412: pythoninfo: add Windows long paths (GH-14434)Victor Stinner2019-06-281-0/+24
| | | | | | On Windows, test.pythoninfo now checks if support for long paths is enabled using ntdll.RtlAreLongPathsEnabled() function. Co-Authored-By: Eryk Sun <eryksun@gmail.com>
* bpo-37400: pythoninfo logs getpwuid and getgrouplist (GH-14373)Victor Stinner2019-06-251-30/+65
| | | | test.pythoninfo now also logs pwd.getpwuid(os.getuid()) and os.getgrouplist(). Extract also os.getrandom() test to run it first.
* bpo-36763: Add _PyCoreConfig_SetArgv() (GH-13030)Victor Stinner2019-05-011-2/+1
| | | | | | | | | * Add 2 new config methods: * _PyCoreConfig_SetArgv() * _PyCoreConfig_SetWideArgv() * Add also an internal _PyCoreConfig_SetPyArgv() method. * Remove 'args' parameter from _PyCoreConfig_Read().
* bpo-35952: Fix test.pythoninfo when the compiler is missing (GH-13007)xdegaye2019-04-291-4/+11
|
* bpo-36635: Add _testinternalcapi module (GH-12841)Victor Stinner2019-04-181-1/+1
| | | | | | Add a new _testinternalcapi module to test the internal C API. Move _Py_GetConfigsAsDict() function to the internal C API: _testembed now uses _testinternalcapi to access the function.
* bpo-36301: Add _Py_GetConfigsAsDict() function (GH-12540)Victor Stinner2019-03-251-8/+5
| | | | | | | * Add _Py_GetConfigsAsDict() function to get all configurations as a dict. * dump_config() of _testembed.c now dumps preconfig as a separated key: call _Py_GetConfigsAsDict(). * Make _PyMainInterpreterConfig_AsDict() private.
* bpo-35772: Fix test_tarfile on ppc64 (GH-11606)Victor Stinner2019-01-211-0/+2
| | | | | | | | | | | | | | | Fix sparse file tests of test_tarfile on ppc64le with the tmpfs filesystem. Fix the function testing if the filesystem supports sparse files: create a file which contains data and "holes", instead of creating a file which contains no data. tmpfs effective block size is a page size (tmpfs lives in the page cache). RHEL uses 64 KiB pages on aarch64, ppc64 and ppc64le, only s390x and x86_64 use 4 KiB pages, whereas the test punch holes of 4 KiB. test.pythoninfo: Add resource.getpagesize().
* Revert "bpo-35537: subprocess can now use os.posix_spawnp (GH-11579)" (GH-11582)Victor Stinner2019-01-161-2/+1
| | | This reverts commit 07858894689047c77f9c12ddc061d30681368d19.
* bpo-35537: subprocess can now use os.posix_spawnp (GH-11579)Victor Stinner2019-01-161-1/+2
| | | | The subprocess module can now use the os.posix_spawnp() function, if it is available, to locate the program in the PATH.
* bpo-35537: subprocess uses os.posix_spawn in some cases (GH-11452)Victor Stinner2019-01-151-0/+6
| | | | | | | | | | | | The subprocess module can now use the os.posix_spawn() function in some cases for better performance. Currently, it is only used on macOS and Linux (using glibc 2.24 or newer) if all these conditions are met: * executable path contains a directory * close_fds=False * preexec_fn, pass_fds, cwd, stdin, stdout, stderr and start_new_session parameters are not set Co-authored-by: Joannah Nanjekye <nanjekyejoannah@gmail.com>
* bpo-33717: pythoninfo logs information of all clocks (GH-11460)Victor Stinner2019-01-081-3/+12
| | | | test.pythoninfo now logs information of all clocks, not only time.time() and time.perf_counter().
* bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900)stratakis2018-12-191-0/+3
| | | | | | When compiling 3rd party C extensions, the linker flags used by the compiler for the interpreter and the stdlib modules, will get leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS and PY_LDFLAGS_NODIST are introduced to keep those flags separated.
* bpo-35389: test.pythoninfo logs platform.libc_ver (GH-10951)Victor Stinner2018-12-051-0/+4
|
* bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907)Victor Stinner2018-12-051-0/+1
| | | | | | On Travis CI, FTP tests of test_urllib2net randomly fail with "425 Security: Bad IP connecting". test.pythoninfo now also logs TRAVIS environment variable.
* pythoninfo: log more environment variable (GH-10719)Victor Stinner2018-11-261-4/+45
| | | Log TZ to debug a timezone issue... and a few more :-)
* bpo-35233: Rewrite test_embed.InitConfigTests (GH-10524)Victor Stinner2018-11-131-14/+11
| | | | | | | | | | | | * Fix _PyCoreConfig_SetGlobalConfig(): set also Py_FrozenFlag * Fix _PyCoreConfig_AsDict(): export also xoptions * Add _Py_GetGlobalVariablesAsDict() and _testcapi.get_global_config() * test.pythoninfo: dump also global configuration variables * _testembed now serializes global, core and main configurations using JSON to reuse _Py_GetGlobalVariablesAsDict(), _PyCoreConfig_AsDict() and _PyMainInterpreterConfig_AsDict(), rather than duplicating code. * test_embed.InitConfigTests now test much more configuration variables
* bpo-35233: Fix _PyMainInterpreterConfig_Copy() (GH-10519)Victor Stinner2018-11-131-6/+16
| | | | | | | | * Fix _PyMainInterpreterConfig_Copy(): copy 'install_signal_handlers' attribute * Add _PyMainInterpreterConfig_AsDict() * Add unit tests on the main interpreter configuration to test_embed.InitConfigTests * test.pythoninfo: log also main_config
* bpo-34567: pythoninfo gets coreconfig (GH-9043)Victor Stinner2018-09-031-0/+12
| | | | | | * Add _testcapi.get_coreconfig() to get the _PyCoreConfig of the interpreter * test.pythoninfo now gets the core configuration using _testcapi.get_coreconfig()
* Fix compiling error when missing gdbm version macros (GH-7823)Xiang Zhang2018-06-201-2/+2
|
* bpo-33901: Add _gdbm._GDBM_VERSION (GH-7794)Victor Stinner2018-06-191-0/+10
| | | | | | | * Fix also PyInit__gdbm() to catch errors. * test.pythoninfo: add gdbm.version * test_dbm_gnu now logs GDBM_VERSION when run in verbose mode. * pythoninfo: rename function to collect_gdbm()
* bpo-33692: pythoninfo detect libedit on Python 3.6 (GH-7293)Victor Stinner2018-06-011-0/+8
| | | | Check which readline implementation is used based on the readline docstring.
* bpo-33717: pythoninfo: add CC --version (#7290)Victor Stinner2018-05-311-0/+29
| | | Get the version of the C compiler.
* pythoninfo: add time.time and datetime.datetime.now (#5214)Victor Stinner2018-01-171-1/+13
|
* pythoninfo: Add builtins, test.support, ... (#4840)Victor Stinner2017-12-131-1/+50
| | | | | | Collect more info from builtins, resource, test.test_socket and test.support modules. Co-Authored-By: Christian Heimes <christian@python.org>
* bpo-32030: Rework memory allocators (#4625)Victor Stinner2017-11-291-18/+32
| | | | | | | | | | | | | | | | | | | | * Fix _PyMem_SetupAllocators("debug"): always restore allocators to the defaults, rather than only caling _PyMem_SetupDebugHooks(). * Add _PyMem_SetDefaultAllocator() helper to set the "default" allocator. * Add _PyMem_GetAllocatorsName(): get the name of the allocators * main() now uses debug hooks on memory allocators if Py_DEBUG is defined, rather than calling directly malloc() * Document default memory allocators in C API documentation * _Py_InitializeCore() now fails with a fatal user error if PYTHONMALLOC value is an unknown memory allocator, instead of failing with a fatal internal error. * Add new tests on the PYTHONMALLOC environment variable * Add support.with_pymalloc() * Add the _testcapi.WITH_PYMALLOC constant and expose it as support.with_pymalloc(). * sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so replace it with support.with_pymalloc(). * pythoninfo: add _testcapi collector for pymem
* Fix miscellaneous typos (#4275)luzpaz2017-11-051-2/+2
|
* pythoninfo: add Py_DEBUG (#4198)Victor Stinner2017-10-311-0/+8
|
* pythoninfo: ignore OSError(ENOSYS) on getrandom() (#3655)Victor Stinner2017-09-191-5/+12
|
* bpo-30871: pythoninfo: more sys, os, time data (#3130)Victor Stinner2017-08-181-40/+82
| | | | | | | | * bpo-30871: pythoninfo: more sys, os, time data PythonInfo now converts types other than intger to string by default. * fix typo
* bpo-30871: pythoninfo: add expat and _decimal (#3121)Victor Stinner2017-08-171-0/+22
| | | | | | | | * bpo-30871: pythoninfo: add expat and _decimal * Remove _decimal.__version__ The string is hardcoded, not really interesting.
* bpo-30871: Add test.pythoninfo (#3075)Victor Stinner2017-08-171-0/+407
* Add Lib/test/pythoninfo.py: script collecting various informations about Python to help debugging test failures. * regrtest: remove sys.hash_info and sys.flags from header. * Travis CI, Appveyor: run pythoninfo before tests