summaryrefslogtreecommitdiffstats
path: root/Lib/test/pythoninfo.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-123990: Good bye WITH_FREELISTS macro (gh-124358)Donghee Na2024-09-241-1/+0
|
* gh-119132: Log sys._is_gil_enabled() in test.pythoninfo (#119140)Victor Stinner2024-05-181-3/+7
|
* gh-117889: Fix PGO test in test_peg_generator (#117893)Victor Stinner2024-04-151-0/+1
| | | | | | Reuse support.check_cflags_pgo() in test_peg_generator to check for PGO build. Log PGO_PROF_USE_FLAG in test.pythoninfo.
* gh-116303: Handle disabled test modules in test.support helpers (#116482)Erlend E. Aasland2024-03-281-0/+1
| | | | Make sure test.support helpers skip iso. failing if test extension modules are disabled. Also log TEST_MODULES in test.pythoninfo.
* gh-114099: Additions to standard library to support iOS (GH-117052)Russell Keith-Magee2024-03-281-0/+1
| | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Ned Deily <nad@python.org>
* gh-71042: Add `platform.android_ver` (#116674)Malcolm Smith2024-03-271-0/+3
|
* gh-114107: test.pythoninfo logs Windows Developer Mode (#114121)Victor Stinner2024-01-161-16/+44
| | | | | Also, don't skip the whole collect_windows() if ctypes is missing. Log also ctypes.windll.shell32.IsUserAnAdmin().
* gh-113440: Ignore the "ver" command failure with exit code 0xc0000142 ↵Serhiy Storchaka2023-12-241-0/+2
| | | | (GH-113435)
* gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864)Hugo van Kemenade2023-11-201-1/+1
| | | Rename Py_NOGIL to Py_GIL_DISABLED
* gh-90815: Add mimalloc memory allocator (#109914)Dino Viehland2023-10-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: https://github.com/python/cpython/pull/31164/ Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* Add support.MS_WINDOWS constant (#110446)Victor Stinner2023-10-061-0/+1
|
* gh-109649: Use os.process_cpu_count() (#110165)Victor Stinner2023-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | Replace os.cpu_count() with os.process_cpu_count() in modules: * compileall * concurrent.futures * multiprocessing Replace os.cpu_count() with os.process_cpu_count() in programs: * _decimal deccheck.py test * freeze.py * multissltests.py * python -m test (regrtest) * wasm_build.py Other changes: * test.pythoninfo logs os.process_cpu_count(). * regrtest gets os.process_cpu_count() / os.cpu_count() in headers.
* gh-109615: Fix support test_copy_python_src_ignore() (#109958)Victor Stinner2023-09-271-0/+1
| | | | | | | | | | Fix the test when run on an installed Python: use "abs_srcdir" of sysconfig, and skip the test if the Python source code cannot be found. * Tools/patchcheck/patchcheck.py, Tools/freeze/test/freeze.py and Lib/test/libregrtest/utils.py now first try to get "abs_srcdir" from sysconfig, before getting "srcdir" from sysconfig. * test.pythoninfo logs sysconfig "abs_srcdir".
* gh-103053: Skip test_freeze_simple_script() on PGO build (#109591)Victor Stinner2023-09-201-0/+11
| | | | | | | | | | Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with "./configure --enable-optimizations", which means with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
* gh-109276: libregrtest: WASM use stdout for JSON (#109355)Victor Stinner2023-09-131-1/+5
| | | | | | | | | | On Emscripten and WASI, or if --python command line is used, libregrtest now writes JSON into stdout, instead of using a name file. * Add JsonFileType.STDOUT. * Remove JsonFileType.FILENAME. * test.pythoninfo logs environment variables related to cross-compilation and running Python on Emscripten/WASI.
* gh-109276: test.pythoninfo gets more test.support data (#109337)Victor Stinner2023-09-121-9/+68
| | | | | | | | Collect data from: * test.support * test.support.os_helper * test.support.socket_helper * test.support.threading_helper
* gh-109276: Complete test.pythoninfo (#109312)Victor Stinner2023-09-121-10/+11
| | | | | | | * Enable collect_sysconfig() on Windows. * Add sysconfig 'abs_builddir' and 'srcdir' * Add sysconfig.is_python_build() * Add tempfile.gettempdir() * Remove compatiblity with Python 2.7 (print_function).
* GH-91079: Rename C_RECURSION_LIMIT to Py_C_RECURSION_LIMIT (#108507)Victor Stinner2023-09-081-0/+23
| | | | | | | Symbols of the C API should be prefixed by "Py_" to avoid conflict with existing names in 3rd party C extensions on "#include <Python.h>". test.pythoninfo now logs Py_C_RECURSION_LIMIT constant and other _testcapi and _testinternalcapi constants.
* test.pythoninfo logs freedesktop_os_release() (#109057)Victor Stinner2023-09-071-1/+21
|
* gh-108851: Fix tomllib recursion tests (#108853)Victor Stinner2023-09-061-0/+1
| | | | | | | | | | | * Add get_recursion_available() and get_recursion_depth() functions to the test.support module. * Change infinite_recursion() default max_depth from 75 to 100. * Fix test_tomllib recursion tests for WASI buildbots: reduce the recursion limit and compute the maximum nested array/dict depending on the current available recursion limit. * test.pythoninfo logs sys.getrecursionlimit(). * Enhance test_sys tests on sys.getrecursionlimit() and sys.setrecursionlimit().
* gh-90791: test.pythoninfo logs ASAN_OPTIONS env var (#108289)Victor Stinner2023-08-221-0/+7
| | | | * Cleanup libregrtest code logging ASAN_OPTIONS. * Fix a typo on "ASAN_OPTIONS" vs "MSAN_OPTIONS".
* gh-108223: test.pythoninfo and libregrtest log Py_NOGIL (#108238)Victor Stinner2023-08-211-0/+1
| | | | | | | | | | | Enable with --disable-gil --without-pydebug: $ make pythoninfo|grep NOGIL sysconfig[Py_NOGIL]: 1 $ ./python -m test ... == Python build: nogil debug ...
* gh-106320: Remove private _PyMem API (#107187)Victor Stinner2023-07-241-2/+2
| | | | | | | | | | | | | Move private _PyMem functions to the internal C API (pycore_pymem.h): * _PyMem_GetCurrentAllocatorName() * _PyMem_RawStrdup() * _PyMem_RawWcsdup() * _PyMem_Strdup() No longer export these functions. Move pymem_getallocatorsname() function from _testcapi to _testinternalcapi, since the API moved to the internal C API.
* gh-75552: Remove deprecated tkinter.tix module (GH-104902)Zachary Ware2023-05-271-1/+0
|
* gh-95174: Add pthread stubs for WASI (GH-95234)Christian Heimes2022-07-271-2/+2
| | | Co-authored-by: Brett Cannon <brett@python.org>
* gh-93370: Drop deprecated sqlite3.version from pythoninfo.py (#94277)Erlend Egeberg Aasland2022-06-261-1/+1
|
* test.pythoninfo: Fix typo, Py_REF_DEBUG => Py_TRACE_REFS (#93467)Victor Stinner2022-06-031-1/+1
|
* test.pythoninfo logs more build info (#93225)Victor Stinner2022-05-261-3/+47
| | | Log also test.support.check_sanitizer() values.
* test.pythoninfo no longer requires socket (#93191)Victor Stinner2022-05-251-1/+4
| | | | test.pythoninfo no longer fails if "import socket" fails: the socket module is now optional.
* gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)Christian Heimes2022-05-191-2/+8
|
* gh-84461: Include _emscripten_info in pythoninfo output (GH-91907)Christian Heimes2022-04-251-0/+1
|
* gh-91156: Use `locale.getencoding()` instead of getpreferredencoding (GH-91732)Inada Naoki2022-04-221-1/+1
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)Christian Heimes2022-03-221-1/+2
| | | | | | | | | | | - Add requires_fork and requires_subprocess to more tests - Skip extension import tests if dlopen is not available - Don't assume that _testcapi is a shared extension - Skip a lot of socket tests that don't work on Emscripten - Skip mmap tests, mmap emulation is incomplete - venv does not work yet - Cannot get libc from executable The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
* bpo-45382: test.pythoninfo: set wmic.exe encoding to OEM (GH-30890)Victor Stinner2022-01-251-0/+3
|
* bpo-45382: test.pythoninfo logs more Windows versions (GH-30817)Victor Stinner2022-01-231-0/+39
| | | | | | | Add the following info to test.pythoninfo: * windows.ver: output of the shell "ver" command * windows.version and windows.version_caption: output of the "wmic os get Caption,Version /value" command.
* bpo-46417: _curses uses PyStructSequence_NewType() (GH-30736)Victor Stinner2022-01-211-0/+10
| | | | | | | | The _curses module now creates its ncurses_version type as a heap type using PyStructSequence_NewType(), rather than using a static type. * Move _PyStructSequence_FiniType() definition to pycore_structseq.h. * test.pythoninfo: log curses.ncurses_version.
* bpo-44860: Update test_sysconfig for posix_user platlib (GH-28235)Victor Stinner2021-09-091-0/+1
| | | | Update test_sysconfig.test_user_similar() for the posix_user scheme: "platlib" doesn't use sys.platlibdir.
* 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.