summaryrefslogtreecommitdiffstats
path: root/Include/pythonrun.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-130396: Move PYOS_LOG2_STACK_MARGIN to internal headers (#135928)Victor Stinner2025-07-011-23/+2
| | | | | | Move PYOS_LOG2_STACK_MARGIN, PYOS_STACK_MARGIN, PYOS_STACK_MARGIN_BYTES and PYOS_STACK_MARGIN_SHIFT macros to pycore_pythonrun.h internal header. Add underscore (_) prefix to the names to make them private. Rename _PYOS to _PyOS.
* GH-130397: remove special-casing of C stack depth for WASI (#134469)Brett Cannon2025-05-221-3/+0
| | | | | Removed special-casing for WASI when setting C stack depth limits. Since WASI has its own C stack checking this isn't a security risk. Also disabled some tests that stopped passing. They all happened to have already been disabled under Emscripten.
* GH-124715: Move trashcan mechanism into `Py_Dealloc` (GH-132280)Mark Shannon2025-04-301-4/+12
|
* GH-130396: Include stack margin for debug windows builds (GH-130554)Mark Shannon2025-02-251-1/+1
|
* GH-130396: Use computed stack limits on linux (GH-130398)Mark Shannon2025-02-251-8/+17
| | | | | | | | | | | * Implement C recursion protection with limit pointers for Linux, MacOS and Windows * Remove calls to PyOS_CheckStack * Add stack protection to parser * Make tests more robust to low stacks * Improve error messages for stack overflow
* GH-91079: Revert "GH-91079: Implement C stack limits using addresses, not ↵Petr Viktorin2025-02-241-12/+8
| | | | | | | | | counters. (GH-130007)" for now (GH130413) Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now Unfortunatlely, the change broke some buildbots. This reverts commit 2498c22fa0a2b560491bc503fa676585c1a603d0.
* GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)Mark Shannon2025-02-191-8/+12
| | | | | | | | | | | | * Implement C recursion protection with limit pointers * Remove calls to PyOS_CheckStack * Add stack protection to parser * Make tests more robust to low stacks * Improve error messages for stack overflow
* gh-102755: PyErr_DisplayException only in ABI >= 3.12. Tests cover ↵Irit Katriel2023-03-211-0/+3
| | | | PyErr_Display as well (GH-102849)
* gh-102755: Add PyErr_DisplayException(exc) (#102756)Irit Katriel2023-03-161-0/+1
|
* Docs: Clarify availability of PyOS_CheckStack (GH-91816)Petr Viktorin2022-04-221-0/+1
|
* bpo-45434: Remove useless space in includes (GH-28963)Victor Stinner2021-10-141-1/+1
| | | Micro-optimize spaces!
* bpo-43868: Remove PyOS_ReadlineFunctionPointer from the stable ABI list ↵Petr Viktorin2021-04-231-1/+0
| | | | | | | | | | | (GH-25442) The inclusion of PyOS_ReadlineFunctionPointer in python3dll.c was a mistake. According to PEP 384: > functions expecting FILE* are not part of the ABI, to avoid depending > on a specific version of the Microsoft C runtime DLL on Windows. https://bugs.python.org/issue43868
* bpo-43244: Remove symtable.h header file (GH-24910)Victor Stinner2021-03-191-5/+0
| | | | | | | | | | | | | | | | | | 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-35134: Add Include/cpython/pythonrun.h file (GH-23701)Victor Stinner2020-12-081-117/+7
| | | | | 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-40939: Rename PyPegen* functions to PyParser* (GH-21016)Lysandros Nikolaou2020-06-211-50/+0
| | | | | | Rename PyPegen* functions to PyParser*, so that we can remove the old set of PyParser* functions that were using the old parser.
* bpo-37189: Export old PyRun_XXX() functions (#14142)Victor Stinner2019-06-171-2/+18
| | | | | Many PyRun_XXX() functions like PyRun_String() were no longer exported in libpython38.dll by mistake. Export them again to fix the ABI compatibiliy.
* bpo-37001: Makes symtable.symtable have parity with compile for input (#13483)Dino Viehland2019-05-281-0/+13
| | | | | | | * Makes symtable.symtable have parity for accepted datatypes for source code as compile() * Add NEWS blurb
* bpo-36071 Add support for Windows ARM32 in ctypes/libffi (GH-12059)Paul Monson2019-04-181-1/+1
|
* bpo-22257: Small changes for PEP 432. (#1728)Eric Snow2017-05-231-16/+0
| | | PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
* Issue #29058: All stable API extensions added after Python 3.2 are nowSerhiy Storchaka2016-12-271-0/+2
| | | | | available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of the minimum Python version supporting this API.
* Merge typo fixes from 3.5Martin Panter2016-05-081-1/+1
|\
| * Corrections for a/an in code comments and documentationMartin Panter2016-05-081-1/+1
| |
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-4/+4
|/ | | | private functions.
* PEP 479: Change StopIteration handling inside generators.Yury Selivanov2015-05-091-1/+2
| | | | Closes issue #22906.
* Issue #22869: Split pythonrun into two modulesNick Coghlan2014-11-201-110/+0
| | | | | | | - interpreter startup and shutdown code moved to a new pylifecycle.c module - Py_OptimizeFlag moved into the new module with the other global flags
* Issue #19526: Exclude all new API from the stable ABI.Martin v. Löwis2014-01-031-0/+2
|
* Issue #19512: Add PyRun_InteractiveOneObject() functionVictor Stinner2013-11-061-0/+4
| | | | | Only decode the filename once. PyRun_InteractiveOneObject() uses an identifier for "<string>" string, so the byte string is only decoded once.
* Issue #1772673: The type of `char*` arguments now changed to `const char*`.Serhiy Storchaka2013-10-191-2/+2
|
* Issue #16129: Py_SetStandardStreamEncoding cleanupsNick Coghlan2013-10-181-0/+5
| | | | | | | | | - don't call PyErr_NoMemory with interpreter is not initialised - note that it's OK to call _PyMem_RawStrDup here - don't include this in the limited API - capitalise "IO" - be explicit that a non-zero return indicates an error - include versionadded marker in docs
* Issue #16129: Move Py_SetStandardStreamEncoding declarationNick Coghlan2013-10-171-2/+3
|
* Issue #16129: Add `Py_SetStandardStreamEncoding`Nick Coghlan2013-10-171-0/+2
| | | | | | | | | | | This new pre-initialization API allows embedding applications like Blender to force a particular encoding and error handler for the standard IO streams. Also refactors Modules/_testembed.c to let us start testing multiple embedding scenarios. (Initial patch by Bastien Montagne)
* Issue #18756: os.urandom() now uses a lazily-opened persistent file ↵Antoine Pitrou2013-08-301-0/+1
| | | | descriptor, so as to avoid using many file descriptors when run in parallel from multiple threads.
* Close #11619: The parser and the import machinery do not encode UnicodeVictor Stinner2013-08-261-0/+25
| | | | filenames anymore on Windows.
* Issue #18520: Add a new PyStructSequence_InitType2() function, same thanVictor Stinner2013-07-221-1/+1
| | | | | | | | PyStructSequence_InitType() except that it has a return value (0 on success, -1 on error). * PyStructSequence_InitType2() now raises MemoryError on memory allocation failure * Fix also some calls to PyDict_SetItemString(): handle error
* Issue #1545463: Global variables caught in reference cycles are now ↵Antoine Pitrou2013-05-061-0/+1
| | | | garbage-collected at shutdown.
* Issue #17408: Avoid using an obsolete instance of the copyreg module when ↵Antoine Pitrou2013-05-041-0/+1
| | | | the interpreter is shutdown and then started again.
* Issue #14928: Fix importlib bootstrap issues by using a custom executable ↵Antoine Pitrou2012-06-191-0/+3
| | | | (Modules/_freeze_importlib) to build Python/importlib.h.
* Issue #14090: fix some minor C API problems in default branch (3.3)Eli Bendersky2012-06-031-2/+5
|
* Issue #2377: Make importlib the implementation of __import__().Brett Cannon2012-04-141-1/+1
| | | | | | | importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().
* Fix test failure in test_cmd_line by initializing the hash secret at the ↵Antoine Pitrou2012-02-211-0/+1
|\ | | | | | | earliest point.
| * Fix test failure in test_cmd_line by initializing the hash secret at the ↵Antoine Pitrou2012-02-211-0/+1
| | | | | | | | earliest point.
* | Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-201-0/+2
|\ \ | |/
| * Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵Georg Brandl2012-02-201-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | basic types (str, bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
| | * Issue #13703: add a way to randomize the hash values of basic types (str, ↵Georg Brandl2012-02-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
* | | Issue #10227: Add an allocation cache for a single slice object.Antoine Pitrou2011-11-181-0/+1
| | | | | | | | | | | | Patch by Stefan Behnel.
* | | Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou2011-05-041-0/+2
|\ \ \ | |/ / | | | | | | | | | interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
| * | Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou2011-05-041-0/+2
| | | | | | | | | | | | | | | interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
* | | Remove sys.subversion and svn build identification leftovers.Georg Brandl2011-03-061-3/+0
|/ /
* | Merge build identification to 3.2 branch.Georg Brandl2011-03-061-0/+2
|\ \ | |/
| * Commit the hg build identification patch from the pymigr repo.Georg Brandl2011-03-051-0/+2
| |