summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* Bump test deps: `ruff` and `mypy` (#111288)Artyom Romanov2023-10-251-1/+1
|
* gh-110019: Refactor summarize_stats (GH-110398)Michael Droettboom2023-10-241-791/+1041
|
* gh-110572: Remove `test_*` from `_testcapi/getargs.c` (GH-111214)Nikita Sobolev2023-10-241-1/+1
|
* gh-67565: Remove redundant C-contiguity checks (GH-105521)Furkan Onder2023-10-231-12/+1
| | | | Co-authored-by: Stefan Krah <skrah@bytereef.org>
* gh-110964: clinic: refactor output_templates() (#110982)Victor Stinner2023-10-201-56/+53
|
* gh-110964: Remove private _PyArg functions (#110966)Victor Stinner2023-10-171-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the following private functions and structures to pycore_modsupport.h internal C API: * _PyArg_BadArgument() * _PyArg_CheckPositional() * _PyArg_NoKeywords() * _PyArg_NoPositional() * _PyArg_ParseStack() * _PyArg_ParseStackAndKeywords() * _PyArg_Parser structure * _PyArg_UnpackKeywords() * _PyArg_UnpackKeywordsWithVararg() * _PyArg_UnpackStack() * _Py_ANY_VARARGS() Changes: * Python/getargs.h now includes pycore_modsupport.h to export functions. * clinic.py now adds pycore_modsupport.h when one of these functions is used. * Add pycore_modsupport.h includes when a C extension uses one of these functions. * Define Py_BUILD_CORE_MODULE in C extensions which now include directly or indirectly (via code generated by Argument Clinic) pycore_modsupport.h: * _csv * _curses_panel * _dbm * _gdbm * _multiprocessing.posixshmem * _sqlite.row * _statistics * grp * resource * syslog * _testcapi: bad_get() no longer uses METH_FASTCALL calling convention but METH_VARARGS. Replace _PyArg_UnpackStack() with PyArg_ParseTuple(). * _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined by _testcapi sub-modules which need the internal C API (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c, watchers.c. * Remove Include/cpython/modsupport.h header file. Include/modsupport.h no longer includes the removed header file. * Fix mypy clinic.py
* gh-85283: Fix Argument Clinic for md5 extension (#110976)Victor Stinner2023-10-171-3/+2
| | | Limited C API supports the defining class under some conditions.
* gh-85283: Build md5 extension with limited C API (#110967)Victor Stinner2023-10-171-0/+1
| | | | | * Replace _Py_strhex() with few lines of code. * Replace _PyType_GetModuleState() with PyType_GetModuleState(). * Fix make check-c-globals.
* Bump test deps: `ruff` and `pre-commit-hooks` (#110972)Nikita Sobolev2023-10-171-2/+2
|
* gh-110907: AC: Disallow using `*` with vararg (#110908)Nikita Sobolev2023-10-161-0/+9
|
* gh-110805: Fix test_peg_generator after the change in the parser for REPL ↵Pablo Galindo Salgado2023-10-131-1/+1
| | | | | tracebacks (#110814) Fix test_peg_generator after the change in the parser for REPL tracebacks
* gh-106212: Raise when using c-analyzer with clang on darwin (#110757)Lysandros Nikolaou2023-10-131-0/+3
|
* GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. ↵Mark Shannon2023-10-121-3/+3
| | | | (GH-110755)
* gh-71587: Establish global state in `_datetime` (#110475)Erlend E. Aasland2023-10-121-9/+1
| | | | | | | | * Use explicit initialiser for m_base * Add module state stub; establish global state on stack * Put conversion factors in state struct * Move PyDateTime_TimeZone_UTC to state * Move PyDateTime_Epoch to state struct * Fix ref leaks in and clean up initialisation
* gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727)Lysandros Nikolaou2023-10-122-3/+12
| | | | * Fix test_peg_generator after tokenizer refactoring * Remove references to tokenizer.c in comments etc.
* gh-109408: Revert pre-commit whitespace checks pending portable solution ↵Hugo van Kemenade2023-10-111-10/+110
| | | | (#110726)
* gh-104169: Refactor tokenizer into lexer and wrappers (#110684)Lysandros Nikolaou2023-10-111-1/+1
| | | | | | | | | | | * The lexer, which include the actual lexeme producing logic, goes into the `lexer` directory. * The wrappers, one wrapper per input mode (file, string, utf-8, and readline), go into the `tokenizer` directory and include logic for creating a lexer instance and managing the buffer for different modes. --------- Co-authored-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* GH-109408: Move the C file whitespace check from patchcheck to pre-commit ↵Adam Turner2023-10-102-90/+8
| | | | | | (#109890) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-110558: Enable ruff's pyupgrade rules when running on Argument Clinic ↵Alex Waygood2023-10-102-1/+16
| | | | (#110603)
* GH-109408: Move the Python file whitespace check from patchcheck to ↵Adam Turner2023-10-101-25/+7
| | | | | | pre-commit (#109891) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-109408: Add the docs whitespace check from patchcheck to pre-commit (#109854)Hugo van Kemenade2023-10-101-32/+12
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-110558: Run ruff on Argument Clinic in CI (#110559)Alex Waygood2023-10-102-3/+14
|
* gh-106765: Updates Windows installer build instructions to clarify system ↵Ashish Shirodkar2023-10-091-0/+7
| | | | requirements (GH-110566)
* gh-106078: Suppress the warning caused by multi-phase initialization of ↵Charlie Zhao2023-10-061-0/+3
| | | | `decimal` (#107524)
* gh-103053: Fix test_tools.test_freeze on FreeBSD (#110451)Victor Stinner2023-10-061-14/+19
| | | | | | | | | | | Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter.
* gh-109287: fix overrides in cases generator (#110419)Carl Meyer2023-10-053-31/+2
|
* gh-109329: Add stat for "trace too short" (GH-110402)Michael Droettboom2023-10-051-0/+2
|
* gh-88402: Add new sysconfig variables on Windows (GH-110049)Sam Gross2023-10-041-1/+1
| | | | Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
* GH-109329: Add tier 2 stats (GH-109913)Michael Droettboom2023-10-041-114/+356
|
* gh-104909: Split more LOAD_ATTR specializations (GH-110317)Guido van Rossum2023-10-041-0/+2
| | | | | | | | | | | | | | | | | | | * Split LOAD_ATTR_MODULE * Split LOAD_ATTR_WITH_HINT * Split _GUARD_TYPE_VERSION out of the latter * Split LOAD_ATTR_CLASS * Split LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES * Fix indent of DEOPT_IF in macros * Split LOAD_ATTR_METHOD_LAZY_DICT * Split LOAD_ATTR_NONDESCRIPTOR_NO_DICT * Fix omission of _CHECK_ATTR_METHOD_LAZY_DICT
* gh-109979: Auto-generate the target for DEOPT_IF() (#110193)Guido van Rossum2023-10-034-18/+44
| | | | | | | | | | | | | | | | In Python/bytecodes.c, you now write ``` DEOPT_IF(condition); ``` The code generator expands this to ``` DEOPT_IF(condition, opcode); ``` where `opcode` is the name of the unspecialized instruction. This works inside macro expansions too. **CAVEAT:** The entire `DEOPT_IF(condition)` statement must be on a single line. If it isn't, the substitution will fail; an error will be printed by the code generator and the C compiler will report some errors.
* gh-108494: Document how to add a project in PCbuild/readme.txt (#110077)Victor Stinner2023-10-021-9/+9
| | | Add _testclinic_limited to Tools/msi/test/test_files.wxs.
* build(deps): bump hypothesis from 6.84.0 to 6.87.1 in /Tools (#110174)dependabot[bot]2023-10-011-1/+1
| | | | | | | | | | | | | | | Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.84.0 to 6.87.1. - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.84.0...hypothesis-python-6.87.1) --- updated-dependencies: - dependency-name: hypothesis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* PEG generator: bump types-setuptools from 68.1.0.1 to 68.2.0.0 (#110175)dependabot[bot]2023-10-011-1/+1
| | | | | | | | | | | | | | | | build(deps-dev): bump types-setuptools in /Tools Bumps [types-setuptools](https://github.com/python/typeshed) from 68.1.0.1 to 68.2.0.0. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-109649: Use os.process_cpu_count() (#110165)Victor Stinner2023-10-013-3/+10
| | | | | | | | | | | | | | | | | | | | 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-110152: regrtest handles cross compilation and HOSTRUNNER (#110156)Victor Stinner2023-09-301-78/+0
| | | | | | | | * _add_python_opts() now handles cross compilation and HOSTRUNNER. * display_header() now tells if Python is cross-compiled, display HOSTRUNNER, and get the host platform. * Remove Tools/scripts/run_tests.py script. * Remove "make hostrunnertest": use "make buildbottest" or "make test" instead.
* gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139)Victor Stinner2023-09-301-1/+6
| | | | | | | | | | | | | | | | * pycore_pythread.h is now the central place to make sure that _POSIX_THREADS and _POSIX_SEMAPHORES macros are defined if available. * Make sure that pycore_pythread.h is included when _POSIX_THREADS and _POSIX_SEMAPHORES macros are tested. * PY_TIMEOUT_MAX is now defined as a constant, since its value depends on _POSIX_THREADS, instead of being defined as a macro. * Prevent integer overflow in the preprocessor when computing PY_TIMEOUT_MAX_VALUE on Windows: replace "0xFFFFFFFELL * 1000 < LLONG_MAX" with "0xFFFFFFFELL < LLONG_MAX / 1000". * Document the change and give hints how to fix affected code. * Add an exception for PY_TIMEOUT_MAX name to smelly.py * Add PY_TIMEOUT_MAX to the stable ABI
* gh-107954: Refactor initconfig.c: add CONFIG_SPEC (#110146)Victor Stinner2023-09-301-0/+4
| | | Add a specification of the PyConfig structure to factorize the code.
* gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and ↵Ned Deily2023-09-281-3/+3
| | | | multissltests to use 1.1.1w, 3.0.11, and 3.1.3. (gh-110002)
* gh-104909: Split some more insts into ops (#109943)Guido van Rossum2023-09-272-0/+69
| | | | | | | | | | | | | | | | | | | | These are the most popular specializations of `LOAD_ATTR` and `STORE_ATTR` that weren't already viable uops: * Split LOAD_ATTR_METHOD_WITH_VALUES * Split LOAD_ATTR_METHOD_NO_DICT * Split LOAD_ATTR_SLOT * Split STORE_ATTR_SLOT * Split STORE_ATTR_INSTANCE_VALUE Also: * Add `-v` flag to code generator which prints a list of non-viable uops (easter-egg: it can print execution counts -- see source) * Double _Py_UOP_MAX_TRACE_LENGTH to 128 I had dropped one of the DEOPT_IF() calls! :-(
* gh-109615: Fix support test_copy_python_src_ignore() (#109958)Victor Stinner2023-09-272-2/+16
| | | | | | | | | | 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-109615: Fix test_tools.test_freeze SRCDIR (#109935)Victor Stinner2023-09-271-47/+7
| | | | | | | | | Fix copy_source_tree() function of test_tools.test_freeze: * Don't copy SRC_DIR/build/ anymore. This directory is modified by other tests running in parallel. * Add test.support.copy_python_src_ignore(). * Use sysconfig to get the source directory. * Use sysconfig.get_config_var() to get CONFIG_ARGS variable.
* gh-109098: Fuzz re module instead of internal sre (#109911)Ammar Askar2023-09-261-3/+3
| | | | | * gh-109098: Fuzz re module instead of internal sre * Fix c-analyzer globals test failure * Put globals exception in ignored.tsv
* Fix argument ordering of embuilder command documented in ↵OmniTroid2023-09-261-1/+1
| | | | `Tools/wasm/README.md` (GH-109863)
* gh-109566: regrtest reexecutes the process (#109909)Victor Stinner2023-09-261-7/+3
| | | | | | | | | | | | | When --fast-ci or --slow-ci option is used, regrtest now replaces the current process with a new process to add "-u -W default -bb -E" options to Python. Changes: * PCbuild/rt.bat and Tools/scripts/run_tests.py no longer need to add "-u -W default -bb -E" options to Python: it's now done by regrtest. * Fix Tools/scripts/run_tests.py: flush stdout before replacing the process. Previously, buffered messages were lost.
* gh-109566, regrtest: Add --fast-ci and --slow-ci options (#109570)Victor Stinner2023-09-262-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add --fast-ci and --slow-ci options to libregrtest: * --fast-ci uses a default timeout of 10 minutes and "-u all,-cpu" (skip slowest tests). * --slow-ci uses a default timeout of 20 minues and "-u all" (run all tests). * regrtest header now lists test resources. * Makefile changes: * "make test", "make hostrunnertest" and "make coverage-report" now use --fast-ci option and TESTTIMEOUT variable. * "make buildbottest" now uses "--slow-ci". Remove options which became redundant with "--slow-ci". * "make testall" and "make testuniversal" now use --slow-ci option and TESTTIMEOUT variable. * "make testall" now uses "find -exec rm ..." instead of "find ... -print|xargs rm ...", same as "make clean". * GitHub Actions workflow: * Ubuntu and Address Sanitizer jobs now use "make test". Remove options which became redundant with "--fast-ci". * Windows jobs now use --fast-ci option. * Use -j0 to detect the number of CPUs. * Set Makefile TESTTIMEOUT default to an empty string, since --slow-ci and --fast-ci use different default timeout. It's now accepted to pass "--timeout=" to regrtest: treated as not timeout. * Tools/scripts/run_tests.py now uses --fast-ci option. * Tools/buildbot/test.bat now uses --slow-ci option. Remove --timeout=1200 option, redundant with --slow-ci.
* Code: Update Donghee Na's name (#109744)Hugo van Kemenade2023-09-254-4/+4
|
* gh-109596: Ensure repeated rules in the grammar are not allowed and fix ↵Pablo Galindo Salgado2023-09-221-1/+7
| | | | incorrect soft keywords (#109606)
* gh-109723: Disable Py_BUILD_CORE in _testcapi (#109727)Victor Stinner2023-09-221-6/+11
| | | | | | | | | | | | | | | | | | Make sure that the internal C API is not tested by mistake by _testcapi. Undefine Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros in Modules/_testcapi/parts.h: move code from _testcapimodule.c. heaptype_relative.c and vectorcall_limited.c are using the limited C API which is incompatible with the internal C API. Move test_long_numbits() from _testcapi to _testinternalcapi since it uses the internal C API "pycore_long.h". Fix Modules/_testcapi/pyatomic.c: don't include Python.h directly, just include _testcapi/parts.h. Ajust "make check-c-globals" for these changes.
* gh-104469: Disallow using Py_LIMITED_API with Py_BUILD_CORE (#109690)Victor Stinner2023-09-211-2/+7
| | | | Fix make check-c-globals: complete USE_LIMITED_C_API list of the c-analyzer.