| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
macOS (GH-113352) (#113361)
gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352)
* gh-65701: document that freeze doesn't work with framework builds on macOS
The framework install is inherently incompatible with freeze. Document
that that freeze doesn't work with framework builds and bail out
early when trying to run freeze anyway.
(cherry picked from commit df1eec3dae3b1eddff819fd70f58b03b3fbd0eda)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451)
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.
(cherry picked from commit a4baa9e8ac62cac3ea6363b15ea585b1998ea1f9)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-109615: Fix support test_copy_python_src_ignore() (#109958)
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".
(cherry picked from commit b89ed9df39851348fbb1552294644f99f6b17d2c)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gh-109615: Fix test_tools.test_freeze SRCDIR (#109935)
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.
(cherry picked from commit 1512d6c6ee2a770afb339bbb74c1b990116f7f89)
|
|
|
|
|
|
|
| |
(GH-102152)
(cherry picked from commit c3a178398c199038f3a0891d09f0363ec73f3b38)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
|
| |
of cores (GH-101841)
unhardcode freeze test build parallelism. base it on the number of cpus, don't use more than max(2, os.cpu_count()/3).
(cherry picked from commit dfc2e065a2e71011017077e549cd2f9bf4944c54)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-101837)
Prevent test_tools from copying 1000M of "source"
It doesn't need a git repo, just the checkout. We skip .git metadata, Doc/build, Doc/venv, and `__pycache__` subdirs, that developers often have in their clients to reduce the size of the source tree copy ten-fold.
This should significantly reduce IO and presumably time on buildbots during this long test.
(cherry picked from commit 1d194235e4d5981b5fea25c75318d61189103a58)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
| |
Fix tests failing with the PYTHONSAFEPATH=1 env var.
Enhance also -P help in Python usage (python --help).
|
|
|
|
|
|
|
| |
<stdbool.h> is the standard/modern way to define embedd/extends Python free to define bool, true and false, but there are existing applications that use slightly different redefinitions, which fail if the header is included.
It's OK to use stdbool outside the public headers, though.
https://bugs.python.org/issue46748
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
space (GH-31074)
This reduces the size of the data segment by **300 KB** of the executable because if the modules are deep-frozen then the marshalled frozen data just wastes space. This was inspired by comment by @gvanrossum in https://github.com/python/cpython/pull/29118#issuecomment-958521863. Note: There is a new option `--deepfreeze-only` in `freeze_modules.py` to change this behavior, it is on be default to save disk space.
```console
# du -s ./python before
27892 ./python
# du -s ./python after
27524 ./python
```
Automerge-Triggered-By: GH:ericsnowcurrently
|
| |
|
|
|
|
|
|
| |
tool. (GH-29527)
Use shutil.copytree rather than Git, which might be missing (or configured
differently) when testing Python built from a source release.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add test_frozenmain to test_embed
* Add Programs/test_frozenmain.py
* Add Programs/freeze_test_frozenmain.py
* Add Programs/test_frozenmain.h
* Add make regen-test-frozenmain
* Add test_frozenmain command to Programs/_testembed
* _testembed.c: add error(msg) function
|
|
|
|
|
| |
Add the "regen-frozen" makefile target that regenerates the code for the
frozen __hello__ module.
|
|
|
| |
Fix freeze.py tool to use the prope config and library directories.
|
| |
|
|
|
|
| |
Check for sys.abiflags before using since not all platforms have it defined.
|
|
|
|
| |
Python 2.4 dropped MacOS 9 support. The macpath module was deprecated
in Python 3.7. This change removes it.
|
| |
|
| |
|
|
|
| |
This hides unwanted implementation details from tracebacks.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
And most of the tools.
Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
|
| |
| |
| |
| | |
and Windows CE is no longer a relevant platform for Python.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Based on patch by Ville Skyttä.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| | |
configure script related to compiler flags.
Thanks to Daniel Shaulov for the bug report and patch.
|
|/
|
|
| |
to format short Python version.
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
compatible with regular files (in particular it now supports the context
management protocol).
|
|
|
|
| |
imp.reload(). Patch by Thomas Kluyver.
|
| |
|
|
|
|
| |
Patch by Meador Inge.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
Patch by Serhiy Storchaka.
|
|/ |
|
|\
| |
| |
| | |
by Andreas Stührk.
|
| |
| |
| |
| | |
Stührk.
|