| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
| |
PyErr_Display as well (GH-102849)
|
| | |
|
| | |
|
| |
|
| |
Micro-optimize spaces!
|
| |
|
|
|
|
|
|
|
|
|
| |
(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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Py_CompileString() is now always declared as a function by
Include/pythonrun.h. It is overriden with a macro in
Include/cpython/pythonrun.h.
|
| |
|
|
|
|
| |
Rename PyPegen* functions to PyParser*, so that we can remove the
old set of PyParser* functions that were using the old parser.
|
| |
|
|
|
| |
Many PyRun_XXX() functions like PyRun_String() were no longer
exported in libpython38.dll by mistake. Export them again to fix the
ABI compatibiliy.
|
| |
|
|
|
|
|
| |
* Makes symtable.symtable have parity for accepted datatypes
for source code as compile()
* Add NEWS blurb
|
| | |
|
| |
|
| |
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.
|
| |
|
|
|
| |
available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of
the minimum Python version supporting this API.
|
| |\ |
|
| | | |
|
| |/
|
|
| |
private functions.
|
| |
|
|
| |
Closes issue #22906.
|
| |
|
|
|
|
|
| |
- interpreter startup and shutdown code moved to a new
pylifecycle.c module
- Py_OptimizeFlag moved into the new module with the other
global flags
|
| | |
|
| |
|
|
|
| |
Only decode the filename once. PyRun_InteractiveOneObject() uses an identifier
for "<string>" string, so the byte string is only decoded once.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- 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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
| |
descriptor, so as to avoid using many file descriptors when run in parallel from multiple threads.
|
| |
|
|
| |
filenames anymore on Windows.
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
garbage-collected at shutdown.
|
| |
|
|
| |
the interpreter is shutdown and then started again.
|
| |
|
|
| |
(Modules/_freeze_importlib) to build Python/importlib.h.
|
| | |
|
| |
|
|
|
|
|
| |
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__().
|
| |\
| |
| |
| | |
earliest point.
|
| | |
| |
| |
| | |
earliest point.
|
| |\ \
| |/ |
|
| | |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | | |
Patch by Stefan Behnel.
|
| |\ \ \
| |/ /
| | |
| | |
| | | |
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
|
| | | |
| | |
| | |
| | |
| | | |
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
|
| |/ / |
|
| |\ \
| |/ |
|
| | | |
|