summaryrefslogtreecommitdiffstats
path: root/Programs/_freeze_module.c
Commit message (Collapse)AuthorAgeFilesLines
* GH-108716: Turn off deep-freezing of code objects. (GH-108722)Mark Shannon2023-09-081-2/+0
|
* gh-108765: Python.h no longer includes <unistd.h> (#108783)Victor Stinner2023-09-021-1/+1
|
* gh-103326: Remove `Python/importlib.h` (GH-103331)Nikita Sobolev2023-04-121-2/+1
| | | | Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-98522: Add version number to code objects. (GH-98525)Mark Shannon2022-12-091-0/+3
| | | | | | * Add version number to code object for better versioning of functions. * Improves specialization for closures and list comprehensions.
* gh-98872: Fix a possible resource leak in Python 3.11.0 (GH-99047)SQLPATCH2022-11-241-0/+1
| | | | | Issue: #98872 Automerge-Triggered-By: GH:kumaraditya303
* gh-97669: Create Tools/build/ directory (#97963)Victor Stinner2022-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Create Tools/build/ directory. Move the following scripts from Tools/scripts/ to Tools/build/: * check_extension_modules.py * deepfreeze.py * freeze_modules.py * generate_global_objects.py * generate_levenshtein_examples.py * generate_opcode_h.py * generate_re_casefix.py * generate_sre_constants.py * generate_stdlib_module_names.py * generate_token.py * parse_html5_entities.py * smelly.py * stable_abi.py * umarshal.py * update_file.py * verify_ensurepip_wheels.py Update references to these scripts.
* Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)Kumar Aditya2022-02-261-1/+2
|
* bpo-46430: Fix memory leak in interned strings of deep-frozen modules (GH-31549)Kumar Aditya2022-02-241-0/+4
|
* bpo-46476: Fix memory leak in code objects generated by deepfreeze (GH-30853)Kumar Aditya2022-01-271-0/+7
| | | Add _Py_Deepfreeze_Fini() and _PyStaticCode_Dealloc() functions.
* bpo-46303: Move fileutils.h private functions to internal C API (GH-30484)Victor Stinner2022-01-111-0/+1
| | | | | | | | | | Move almost all private functions of Include/cpython/fileutils.h to the internal C API Include/internal/pycore_fileutils.h. Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's used by _testcapi which must not use the internal C API. Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi to _testinternalcapi, since the C API moved to the internal C API.
* bpo-45949: Pure Python freeze module for cross builds (GH-29899)Christian Heimes2021-12-131-0/+2
|
* bpo-45395: Make custom frozen modules additions instead of replacements. ↵Eric Snow2021-10-281-2/+8
| | | | | | | | | (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-45434: pyport.h no longer includes <stdlib.h> (GH-28914)Victor Stinner2021-10-131-0/+1
| | | | | Include <stdlib.h> explicitly in C files. Python.h includes <wchar.h>.
* bpo-45020: Identify which frozen modules are actually aliases. (gh-28655)Eric Snow2021-10-051-0/+6
| | | | | | | 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-45188: Windows now regenerates frozen modules at the start of build ↵Steve Dower2021-09-151-5/+0
| | | | | | | instead of late (GH-28322) This will enable us to drop the frozen module header files from the repository. It does currently cause many source files to be built twice, which just takes more time. For whoever comes to fix this in the future, the files shared between freeze_module and pythoncore should be put into a static library that is consumed by both.
* bpo-45019: Add a tool to generate list of modules to include for frozen ↵Eric Snow2021-08-301-0/+226
modules (gh-27980) Frozen modules must be added to several files in order to work properly. Before this change this had to be done manually. Here we add a tool to generate the relevant lines in those files instead. This helps us avoid mistakes and omissions. https://bugs.python.org/issue45019