summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45952: Get the C analyzer tool working again. (gh-29882)Eric Snow2021-12-016-99/+111
| | | | | There wasn't much that needed to be done. Mostly it was just a few new files that got added. https://bugs.python.org/issue45952
* Fix EncodingWarning in Tools/freeze/test/freeze.py (GH-29742)Inada Naoki2021-11-301-2/+2
|
* bpo-45019: Cleanup module freezing and deepfreeze (#29772)Kumar Aditya2021-11-261-40/+28
|
* bpo-45866: pegen strips directory of "generated from" header (GH-29777)Victor Stinner2021-11-263-3/+7
| | | | | "make regen-all" now produces the same output when run from a directory other than the source tree: when building Python out of the source tree.
* Fix typo in freeze_modules (#29744)Kumar Aditya2021-11-241-1/+1
|
* bpo-45020: Fix strict-prototypes warning (GH-29755)Christian Heimes2021-11-241-1/+1
|
* bpo-45886: Allow overriding freeze command for cross compiling (GH-29735)Christian Heimes2021-11-241-2/+2
|
* bpo-45873: Restore Python 3.6 compatibility (GH-29730)Christian Heimes2021-11-231-1/+7
| | | Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
* bpo-45873: Get rid of bootstrap_python (#29717)Guido van Rossum2021-11-233-264/+170
| | | | | | | | | | | | | Instead we use $(PYTHON_FOR_REGEN) .../deepfreeze.py with the frozen .h file as input, as we did for Windows in bpo-45850. We also get rid of the code that generates the .h files when make regen-frozen is run (i.e., .../make_frozen.py), and the MANIFEST file. Restore Python 3.8 and 3.9 as Windows host Python again Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* bpo-45783: Preserve file moves and deletions in the tests for the freeze ↵Eric Snow2021-11-231-31/+11
| | | | | | tool. (GH-29527) Use shutil.copytree rather than Git, which might be missing (or configured differently) when testing Python built from a source release.
* bpo-45561: Run smelly.py tool from $(srcdir) (GH-29138)Neil Schemenauer2021-11-231-3/+6
|
* bpo-45850: Implement deep-freeze on Windows (#29648)Guido van Rossum2021-11-224-13/+416
| | | | | | Implement changes to build with deep-frozen modules on Windows. Note that we now require Python 3.10 as the "bootstrap" or "host" Python. This causes a modest startup speed (around 7%) on Windows.
* Fix out-of-tree build support for multissltest (GH-29694)Christian Heimes2021-11-221-4/+10
|
* Reactivate primary mechanism to retrieve frames in the gdb helpers (GH-29682)Pablo Galindo Salgado2021-11-211-4/+6
|
* Refactor parser compilation units into specific components (GH-29676)Pablo Galindo Salgado2021-11-212-1/+3
|
* bpo-45636: Merge all numeric operators (GH-29482)Brandt Bucher2021-11-111-7/+12
|
* bpo-45696: Deep-freeze selected modules (GH-29118)Guido van Rossum2021-11-113-17/+491
| | | | | | | This gains 10% or more in startup time for `python -c pass` on UNIX-ish systems. The Makefile.pre.in generating code builds on Eric's work for bpo-45020, but the .c file generator is new. Windows version TBD.
* bpo-45637: Fix cframe-based fallback in the gdb helpers (GH-29515)Pablo Galindo Salgado2021-11-101-5/+5
|
* bpo-45637: Remove broken fallback in gdb helpers to obtain frame variable ↵Pablo Galindo Salgado2021-11-091-11/+7
| | | | (GH-29257)
* bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove ↵wim glenn2021-11-031-2/+0
| | | | | | unused imports (GH-29393) Co-authored-by: Wim Glenn <wglenn@jumptrading.com>
* bpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358)Christian Heimes2021-11-021-1/+5
|
* bpo-45395: Make custom frozen modules additions instead of replacements. ↵Eric Snow2021-10-282-25/+44
| | | | | | | | | (gh-28778) Currently custom modules (the array set on PyImport_FrozenModules) replace all the frozen stdlib modules. That can be problematic and is unlikely to be what the user wants. This change treats the custom frozen modules as additions instead. They take precedence over all other frozen modules except for those needed to bootstrap the import system. If the "code" field of an entry in the custom array is NULL then that frozen module is treated as disabled, which allows a custom entry to disable a frozen stdlib module. This change allows us to get rid of is_essential_frozen_module() and simplifies the logic for which frozen modules should be ignored. https://bugs.python.org/issue45395
* bpo-45629: Add a test for the "freeze" tool. (gh-29222)Eric Snow2021-10-281-0/+194
| | | | | | | The "freeze" tool has been part of the repo for a long time. However, it hasn't had any tests in the test suite to guard against regressions. We add such a test here. This is especially important as there has been a lot of change recently related to frozen modules, with more to come. Note that as part of the test we build Python out-of-tree and install it in a temp dir. https://bugs.python.org/issue45629
* bpo-43795: Add a test for Stable ABI symbol availability using ctypes (GH-26354)Petr Viktorin2021-10-221-0/+38
| | | | | | | | | This is a cross-platform check that the symbols are actually exported in the ABI, not e.g. hidden in a macro. Caveat: PyModule_Create2 & PyModule_FromDefAndSpec2 are skipped. These aren't exported on some of our buildbots. This is a bug (bpo-44133). This test now makes sure all the others don't regress.
* bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)Zachary Ware2021-10-221-8/+3
|
* bpo-45494: Fix parser crash when reporting errors involving invalid ↵Pablo Galindo Salgado2021-10-191-1/+1
| | | | | | | | | | | | continuation characters (GH-28993) There are two errors that this commit fixes: * The parser was not correctly computing the offset and the string source for E_LINECONT errors due to the incorrect usage of strtok(). * The parser was not correctly unwinding the call stack when a tokenizer exception happened in rules involving optionals ('?', [...]) as we always make them return valid results by using the comma operator. We need to check first if we don't have an error before continuing.
* bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)Victor Stinner2021-10-151-1/+0
| | | | Move the interpreteridobject.h header file from Include/ to Include/internal/. It only provides private functions.
* po-35134: Move Include/funcobject.h to Include/cpython/ (GH-28958)Victor Stinner2021-10-141-1/+0
| | | Remove redundant "#ifndef Py_LIMITED_API" in funcobject.h.
* bpo-45340: Don't create object dictionaries unless actually needed (GH-28802)Mark Shannon2021-10-131-11/+64
| | | | | | | | | | | | | | * Never change types' cached keys. It could invalidate inline attribute objects. * Lazily create object dictionaries. * Update specialization of LOAD/STORE_ATTR. * Don't update shared keys version for deletion of value. * Update gdb support to handle instance values. * Rename SPLIT_KEYS opcodes to INSTANCE_VALUE.
* Fix EncodingWarning in test_tools. (GH-28846)Inada Naoki2021-10-101-2/+2
|
* bpo-45256: Remove the usage of the C stack in Python to Python calls (GH-28488)Pablo Galindo Salgado2021-10-091-29/+55
| | | | Ths commit inlines calls to Python functions in the eval loop and steals all the arguments in the call from the caller for performance.
* bpo-45402: Fix test_tools.test_sundry() (GH-28786)Victor Stinner2021-10-071-3/+4
| | | | Fix test_tools.test_sundry() when Python is built out of tree: fix how the freeze_modules.py tool locates the _freeze_module program.
* Fix typos in the Tools directory (GH-28769)Christian Clauss2021-10-0615-24/+24
| | | | | | | Like #28744 but for the Tools directory. [skip issue] Opening a related issue is pending python/psf-infra-meta#130 Automerge-Triggered-By: GH:pablogsal
* bpo-40116: Add insertion order bit-vector to dict values to allow dicts to ↵Mark Shannon2021-10-061-1/+4
| | | | share keys more freely. (GH-28520)
* [Tools/peg_generator/pegen/parser.py] Fix typo: s/wether/whether/ (GH-28739)Ikko Ashimine2021-10-051-1/+1
|
* bpo-45020: Identify which frozen modules are actually aliases. (gh-28655)Eric Snow2021-10-051-1/+38
| | | | | | | In the list of generated frozen modules at the top of Tools/scripts/freeze_modules.py, you will find that some of the modules have a different name than the module (or .py file) that is actually frozen. Let's call each case an "alias". Aliases do not come into play until we get to the (generated) list of modules in Python/frozen.c. (The tool for freezing modules, Programs/_freeze_module, is only concerned with the source file, not the module it will be used for.) Knowledge of which frozen modules are aliases (and the identity of the original module) normally isn't important. However, this information is valuable when we go to set __file__ on frozen stdlib modules. This change updates Tools/scripts/freeze_modules.py to map aliases to the original module name (or None if not a stdlib module) in Python/frozen.c. We also add a helper function in Python/import.c to look up a frozen module's alias and add the result of that function to the frozen info returned from find_frozen(). https://bugs.python.org/issue45020
* bpo-43760: Check for tracing using 'bitwise or' instead of branch in ↵Mark Shannon2021-10-051-1/+1
| | | | dispatch. (GH-28723)
* bpo-45020: Add more test cases for frozen modules. (gh-28664)Eric Snow2021-10-012-6/+12
| | | | | I've added a number of test-only modules. Some of those cases are covered by the recently frozen stdlib modules (and some will be once we add encodings back in). However, I figured we'd play it safe by having a set of modules guaranteed to be there during tests. https://bugs.python.org/issue45020
* Fix EncodingWarning in freeze_modules. (GH-28591)Inada Naoki2021-09-301-4/+4
|
* bpo-45020: Do not freeze <pkg>/__init__.py twice. (gh-28635)Eric Snow2021-09-291-0/+7
| | | | | Currently we're freezing the __init__.py twice, duplicating the built data unnecessarily With this change we do it once. There is no change in runtime behavior. https://bugs.python.org/issue45020
* Select correct tool platform when building on Windows ARM64 natively (GH-28491)Niyas Sait2021-09-271-1/+5
|
* bpo-45020: Fix some corner cases for frozen module generation. (gh-28538)Eric Snow2021-09-242-32/+76
| | | | | This also includes some cleanup in preparation for a PR to make the "make all" output less noisy. https://bugs.python.org/issue45020
* [codemod] Fix non-matching bracket pairs (GH-28473)Mohamad Mansour2021-09-211-1/+1
| | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45020: Freeze os, site, and codecs. (gh-28398)Eric Snow2021-09-171-11/+11
| | | https://bugs.python.org/issue45020
* bpo-45020: Fix build out of source tree (GH-28410)Victor Stinner2021-09-171-4/+10
| | | | | | * Makefile.pre.in: Add $(srcdir) when needed, remove it when it was used by mistake. * freeze_modules.py tool uses ./Programs/_freeze_module if the executable doesn't exist in the source tree.
* bpo-45231: update_file.py preserves end of line (GH-28411)Victor Stinner2021-09-171-1/+13
| | | | | | The update_file.py tool now preserves the end of line of the updated file. Fix the "make regen-frozen" command: it no longer changes the end of line of PCbuild/ files on Unix. Git changes the end of line depending on the platform.
* bpo-45020: Drop the frozen .h files from the repo. (gh-28392)Eric Snow2021-09-161-7/+4
| | | | | The main advantage is that the files will no longer show up in diffs and PRs. That means, for a PR, the number of files / lines changed will more clearly reflect the actual change. (This is essentially an un-revert of gh-28375.) https://bugs.python.org/issue45020
* bpo-45020: Revert "Drop the frozen .h files from the repo." (gh-28380)Eric Snow2021-09-161-3/+6
| | | | | gh-28375 broke one of the buildbots. Until I figure out why, I'm rolling the change back. https://bugs.python.org/issue45020
* bpo-45020: Drop the frozen .h files from the repo. (gh-28375)Eric Snow2021-09-161-6/+3
| | | | | The main advantage is that the files will no longer show up in diffs and PRs. That means, for a PR, the number of files / lines changed will more clearly reflect the actual change. https://bugs.python.org/issue45020
* bpo-45019: Clean up the frozen __hello__ module. (gh-28374)Eric Snow2021-09-151-4/+4
| | | | | Here's one more small cleanup that should have been in PR gh-28319. We eliminate stdout side-effects from importing the frozen __hello__ module, and update tests accordingly. We also move the module's source file into Lib/ from Toos/freeze/flag.py. https://bugs.python.org/issue45019