summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45020: Freeze some of the modules imported during startup. (gh-28335)Eric Snow2021-09-151-12/+36
| | | | | | | Doing this provides significant performance gains for runtime startup (~15% with all the imported modules frozen). We don't yet freeze all the imported modules because there are a few hiccups in the build systems we need to sort out first. (See bpo-45186 and bpo-45188.) Note that in PR GH-28320 we added a command-line flag (-X frozen_modules=[on|off]) that allows users to opt out of (or into) using frozen modules. The default is still "off" but we will change it to "on" as soon as we can do it in a way that does not cause contributors pain. https://bugs.python.org/issue45020
* bpo-45019: Do some cleanup related to frozen modules. (gh-28319)Eric Snow2021-09-131-4/+4
| | | | | There are a few things I missed in gh-27980. This is a follow-up that will make subsequent PRs cleaner. It includes fixes to tests and tools that reference the frozen modules. https://bugs.python.org/issue45019
* bpo-45019: Add a tool to generate list of modules to include for frozen ↵Eric Snow2021-08-301-40/+53
| | | | | | | 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
* Add tests for the C tokenizer and expose it as a private module (GH-27924)Pablo Galindo Salgado2021-08-241-0/+1
|
* bpo-44771: Sync with importlib_resources 5.2.2, fixing refleak. (#27497)Jason R. Coombs2021-07-311-0/+1
| | | | | * bpo-44771: Sync with importlib_resources 5.2.2, fixing refleak. * Include new 'resources' dir in the Makefile.
* bpo-44590: Lazily allocate frame objects (GH-27077)Mark Shannon2021-07-261-0/+1
| | | | | | | | | | | | | | * Convert "specials" array to InterpreterFrame struct, adding f_lasti, f_state and other non-debug FrameObject fields to it. * Refactor, calls pushing the call to the interpreter upward toward _PyEval_Vector. * Compute f_back when on thread stack, only filling in value when frame object outlives stack invocation. * Move ownership of InterpreterFrame in generator from frame object to generator object. * Do not create frame objects for Python calls. * Do not create frame objects for generators.
* bpo-44717: improve AttributeError on circular imports of submodules (GH-27338)Filipe Laíns2021-07-241-0/+2
|
* bpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)Mark Shannon2021-06-101-2/+2
| | | | | | | | | | | | | | * Specialize LOAD_ATTR with LOAD_ATTR_SLOT and LOAD_ATTR_SPLIT_KEYS * Move dict-common.h to internal/pycore_dict.h * Add LOAD_ATTR_WITH_HINT specialized opcode. * Quicken in function if loopy * Specialize LOAD_ATTR for module attributes. * Add specialization stats
* bpo-44187: Quickening infrastructure (GH-26264)Mark Shannon2021-06-071-0/+1
| | | | | | | | | | | | | | * Add co_firstinstr field to code object. * Implement barebones quickening. * Use non-quickened bytecode when tracing. * Add NEWS item * Add new file to Windows build. * Don't specialize instructions with EXTENDED_ARG.
* bpo-44131: Fix Makefile for test_frozenmain (GH-26203)Victor Stinner2021-05-181-3/+1
| | | | Remove Programs/test_frozenmain.h Makefile target: it ran make in parallel which caused build errors on LTO+PGO builds.
* bpo-44131: Test Py_FrozenMain() (GH-26126)Victor Stinner2021-05-171-2/+10
| | | | | | | | | * 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
* Fix make libainstall. (GH-25980)Senthil Kumaran2021-05-081-1/+1
| | | Initial patch by Benno Leslie.
* bpo-43916: Move the _PyStructSequence_InitType function to the internal API ↵Pablo Galindo2021-05-031-0/+1
| | | | (GH-25854)
* bpo-44009: Provide "python3.x-intel64" for Apple Silicon Macs (GH-25804)Ned Deily2021-05-021-0/+13
| | | | | | This allows reliably forcing macOS universal2 framework builds to run under Rosetta 2 Intel-64 emulation on Apple Silicon Macs if needed for testing or when universal2 wheels are not yet available.
* bpo-43795: Generate python3dll.c and doc data from manifest (PEP 652) (GH-25315)Petr Viktorin2021-04-291-5/+2
|
* bpo-40137: Add pycore_moduleobject.h internal header (GH-25507)Victor Stinner2021-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pycore_moduleobject.h internal header file with static inline functions to access module members: * _PyModule_GetDict() * _PyModule_GetDef() * _PyModule_GetState() These functions don't check at runtime if their argument has a valid type and can be inlined even if Python is not built with LTO. _PyType_GetModuleByDef() uses _PyModule_GetDef(). Replace PyModule_GetState() with _PyModule_GetState() in the extension modules, considered as performance sensitive: * _abc * _functools * _operator * _pickle * _queue * _random * _sre * _struct * _thread * _winapi * array * posix The following extensions are now built with the Py_BUILD_CORE_MODULE macro defined, to be able to use the internal pycore_moduleobject.h header: _abc, array, _operator, _queue, _sre, _struct.
* bpo-38530: Offer suggestions on AttributeError (#16856)Pablo Galindo2021-04-141-0/+1
| | | | | | | | | When printing AttributeError, PyErr_Display will offer suggestions of similar attribute names in the object that the exception was raised from: >>> collections.namedtoplo Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'collections' has no attribute 'namedtoplo'. Did you mean: namedtuple?
* bpo-43244: Remove the pyarena.h header (GH-25007)Victor Stinner2021-03-241-1/+1
| | | | | | | | | | | | | | | | | | Remove the pyarena.h header file with functions: * PyArena_New() * PyArena_Free() * PyArena_Malloc() * PyArena_AddPyObject() These functions were undocumented, excluded from the limited C API, and were only used internally by the compiler. Add pycore_pyarena.h header. Rename functions: * PyArena_New() => _PyArena_New() * PyArena_Free() => _PyArena_Free() * PyArena_Malloc() => _PyArena_Malloc() * PyArena_AddPyObject() => _PyArena_AddPyObject()
* bpo-43244: Remove parser_interface.h header file (GH-25001)Victor Stinner2021-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Remove parser functions using the "struct _mod" type, because the AST C API was removed: * PyParser_ASTFromFile() * PyParser_ASTFromFileObject() * PyParser_ASTFromFilename() * PyParser_ASTFromString() * PyParser_ASTFromStringObject() These functions were undocumented and excluded from the limited C API. Add pycore_parser.h internal header file. Rename functions: * PyParser_ASTFromFileObject() => _PyParser_ASTFromFile() * PyParser_ASTFromStringObject() => _PyParser_ASTFromString() These functions are no longer exported (replace PyAPI_FUNC() with extern). Remove also _PyPegen_run_parser_from_file() function. Update test_peg_generator to use _PyPegen_run_parser_from_file_pointer() instead.
* bpo-43244: Add pycore_compile.h header file (GH-25000)Victor Stinner2021-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the compiler functions using "struct _mod" type, because the public AST C API was removed: * PyAST_Compile() * PyAST_CompileEx() * PyAST_CompileObject() * PyFuture_FromAST() * PyFuture_FromASTObject() These functions were undocumented and excluded from the limited C API. Rename functions: * PyAST_CompileObject() => _PyAST_Compile() * PyFuture_FromASTObject() => _PyFuture_FromAST() Moreover, _PyFuture_FromAST() is no longer exported (replace PyAPI_FUNC() with extern). _PyAST_Compile() remains exported for test_peg_generator. Remove also compatibility functions: * PyAST_Compile() * PyAST_CompileEx() * PyFuture_FromAST()
* bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)Victor Stinner2021-03-231-7/+8
| | | | | | | | | | | | | | | | These functions were undocumented and excluded from the limited C API. Most names defined by these header files were not prefixed by "Py" and so could create names conflicts. For example, Python-ast.h defined a "Yield" macro which was conflict with the "Yield" name used by the Windows <winbase.h> header. Use the Python ast module instead. * Move Include/asdl.h to Include/internal/pycore_asdl.h. * Move Include/Python-ast.h to Include/internal/pycore_ast.h. * Remove ast.h header file. * pycore_symtable.h no longer includes Python-ast.h.
* bpo-35134: Add include/cpython/compile.h (GH-24922)Hai Shi2021-03-221-0/+1
| | | | Move C API excluded from the limited C API from Include/compile.h to a new Include/cpython/compile.h header file.
* bpo-43569: Add test/test_importlib/namespacedata01 to TESTSUBDIRS (GH-24952)Jason R. Coombs2021-03-211-0/+1
|
* bpo-43517 (followup): Install additional test directory (GH-24950)Antoine Pitrou2021-03-201-0/+1
| | | | | Should fix some CI failures on buildbots that test an installed version of Python. Automerge-Triggered-By: GH:pitrou
* bpo-43244: Remove symtable.h header file (GH-24910)Victor Stinner2021-03-191-1/+1
| | | | | | | | | | | | | | | | | | Rename Include/symtable.h to to Include/internal/pycore_symtable.h, don't export symbols anymore (replace PyAPI_FUNC and PyAPI_DATA with extern) and rename functions: * PyST_GetScope() to _PyST_GetScope() * PySymtable_BuildObject() to _PySymtable_Build() * PySymtable_Free() to _PySymtable_Free() Remove PySymtable_Build(), Py_SymtableString() and Py_SymtableStringObject() functions. The Py_SymtableString() function was part the stable ABI by mistake but it could not be used, since the symtable.h header file was excluded from the limited C API. The Python symtable module remains available and is unchanged.
* bpo-43466: Add --with-openssl-rpath configure option (GH-24820)Christian Heimes2021-03-191-0/+1
|
* bpo-43244: Add pycore_ast.h header file (GH-24908)Victor Stinner2021-03-171-0/+1
| | | | | | | | Move _PyAST_GetDocString() and _PyAST_ExprAsUnicode() functions the internal C API: from Include/ast.h to a new Include/internal/pycore_ast.h header file. Don't export these functions anymore: replace PyAPI_FUNC() with extern. Remove also unused includes.
* bpo-43244: Rename pycore_ast.h to pycore_ast_state.h (GH-24907)Victor Stinner2021-03-171-2/+3
|
* bpo-43445: Add frozen modules to sys.stdlib_module_names (GH-24798)Victor Stinner2021-03-101-1/+1
| | | | | | Add frozen modules to sys.stdlib_module_names. For example, add "_frozen_importlib" and "_frozen_importlib_external" names. Add "list_frozen" command to Programs/_testembed.
* bpo-43372: Use _freeze_importlib for regen-frozen. (GH-24759)Neil Schemenauer2021-03-061-2/+6
| | | | | | | This approach ensures the code matches the interpreter version. Previously, PYTHON_FOR_REGEN was used to generate the code, which might be wrong. The marshal format for code objects has changed with bpo-42246, commit 877df851. Update the code and the expected code sizes in ctypes test_frozentable.
* bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561)Nicholas Sim2021-02-191-5/+5
| | | | | | Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h} into Include/cpython/. Parser: peg_api: include Python.h instead of parser_interface.h.
* bpo-39448: Add regen-frozen makefile target. (GH-18174)Neil Schemenauer2021-02-191-2/+7
| | | | | Add the "regen-frozen" makefile target that regenerates the code for the frozen __hello__ module.
* bpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550)Nicholas Sim2021-02-171-2/+2
| | | | Move non-limited C API headers pyarena.h and pyctype.h into Include/cpython/ directory.
* bpo-43103: Add configure --without-static-libpython (GH-24418)Victor Stinner2021-02-171-22/+29
| | | | | | | | Add a new configure --without-static-libpython option to not build the libpythonMAJOR.MINOR.a static library and not install the python.o object file. Fix smelly.py and stable_abi.py tools when libpython3.10.a is missing.
* bpo-35134, Include: Move pytime.h to cpython/pytime.h (GH-23988)Nicholas Sim2021-02-161-1/+1
| | | | This change is backward compatible since C extension modules must not include "pytime.h" directly, but only include "Python.h".
* bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332)Victor Stinner2021-01-251-9/+9
| | | | * Rename _Py_module_names to _Py_stdlib_module_names. * Rename Python/module_names.h to Python/stdlib_module_names.h.
* bpo-42856: Add --with-wheel-pkg-dir=PATH configure option (GH-24210)Victor Stinner2021-01-201-0/+2
| | | | | | | | | | | | | Add --with-wheel-pkg-dir=PATH option to the ./configure script. If specified, the ensurepip module looks for setuptools and pip wheel packages in this directory: if both are present, these wheel packages are used instead of ensurepip bundled wheel packages. Some Linux distribution packaging policies recommend against bundling dependencies. For example, Fedora installs wheel packages in the /usr/share/python-wheels/ directory and don't install the ensurepip._bundled package. ensurepip: Remove unused runpy import.
* bpo-42955: Add Python/module_names.h (GH-24258)Victor Stinner2021-01-191-2/+15
| | | | | | | | | | Add a private list of all stdlib modules: _Py_module_names. * Add Tools/scripts/generate_module_names.py script. * Makefile: Add "make regen-module-names" command. * setup.py: Add --list-module-names option. * GitHub Action and Travis CI also runs "make regen-module-names", not ony "make regen-all", to ensure that the module names remains up to date.
* bpo-36143: make regen-all now also runs regen-keyword (GH-24245)Victor Stinner2021-01-181-1/+1
|
* bpo-42802: Remove distutils bdist_wininst command (GH-24043)Victor Stinner2021-01-081-1/+0
| | | | | | | | | | The distutils bdist_wininst command deprecated in Python 3.8 has been removed. The distutils bidst_wheel command is now recommended to distribute binary packages on Windows. * Remove Lib/distutils/command/bdist_wininst.py * Remove PC/bdist_wininst/ project * Remove Lib/distutils/command/wininst-*.exe programs * Remove all references to bdist_wininst
* bpo-27640: Add --disable-test-modules configure option (GH-23886)pxinwr2020-12-301-38/+71
| | | | | | | | | Added --disable-test-modules option to the configure script: don't build nor install test modules. Patch by Xavier de Gaye, Thomas Petazzoni and Peixing Xin. Co-Authored-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
* bpo-39465: Add pycore_atomic_funcs.h header (GH-20766)Victor Stinner2020-12-231-0/+1
| | | | | | Add pycore_atomic_funcs.h internal header file: similar to pycore_atomic.h but don't require to declare variables as atomic. Add _Py_atomic_size_get() and _Py_atomic_size_set() functions.
* bpo-35134: Add Include/cpython/pythonrun.h file (GH-23701)Victor Stinner2020-12-081-0/+1
| | | | | Py_CompileString() is now always declared as a function by Include/pythonrun.h. It is overriden with a macro in Include/cpython/pythonrun.h.
* bpo-42545: Check that all symbols in the limited ABI are exported (GH-23616)Pablo Galindo2020-12-041-0/+10
|
* bpo-42431: Fix outdated bytes comments (GH-23458)Serhiy Storchaka2020-12-031-0/+1
| | | | Also move definitions of internal macros F_LJUST etc to private header.
* bpo-42087: Remove support for AIX 5.3 and below (GH-22830)Kevin Adler2020-11-161-1/+1
| | | | | | As AIX 5.3 and below do not support thread_cputime, it was decided in https://bugs.python.org/issue40680 to require AIX 6.1 and above. This commit removes workarounds for — and references to — older, unsupported AIX versions.
* bpo-41796: Make _ast module state per interpreter (GH-23024)Victor Stinner2020-11-021-0/+2
| | | | | | | | | | | The ast module internal state is now per interpreter. * Rename "astmodulestate" to "struct ast_state" * Add pycore_ast.h internal header: the ast_state structure is now declared in pycore_ast.h. * Add PyInterpreterState.ast (struct ast_state) * Remove get_ast_state() * Rename get_global_ast_state() to get_ast_state() * PyAST_obj2mod() now handles get_ast_state() failures
* bpo-41474, Makefile: Add dependency on cpython/frameobject.h (GH-22999)Victor Stinner2020-10-271-0/+1
| | | Co-Authored-By: Skip Montanaro <skip.montanaro@gmail.com>
* bpo-42161: Add _PyLong_GetZero() and _PyLong_GetOne() (GH-22993)Victor Stinner2020-10-261-0/+1
| | | | | | Add _PyLong_GetZero() and _PyLong_GetOne() functions and a new internal pycore_long.h header file. Python cannot be built without small integer singletons anymore.
* bpo-1635741: _PyUnicode_Name_CAPI moves to internal C API (GH-22713)Victor Stinner2020-10-261-1/+1
| | | | | | | | | | The private _PyUnicode_Name_CAPI structure of the PyCapsule API unicodedata.ucnhash_CAPI moves to the internal C API. Moreover, the structure gets a new state member which must be passed to the getcode() and getname() functions. * Move Include/ucnhash.h to Include/internal/pycore_ucnhash.h * unicodedata module is now built with Py_BUILD_CORE_MODULE. * unicodedata: move hashAPI variable into unicodedata_module_state.