| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Always run GitHub action jobs, even on documentation-only pull
requests. So it will be possible to make a GitHub action job, like
the Windows (64-bit) job, mandatory.
|
| |
|
|
|
|
|
|
|
|
|
| |
(Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.)
If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, __cause__, __context__, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately).
This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to __cause__ on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original __cause__, __context__, and __traceback__ (since "pickle" does not preserve those).
https://bugs.python.org/issue32604
|
|
|
|
|
|
|
| |
Declare _PyErr_GetTopmostException() with PyAPI_FUNC() to properly
export the function in the C API. The function remains private
("_Py") prefix.
Co-Authored-By: Julien Danjou <julien@danjou.info>
|
|
|
|
|
|
|
|
|
| |
(GH-19936)
Module C state is now accessible from C-defined heap type methods (PEP 573).
Patch by Marcel Plch and Petr Viktorin.
Co-authored-by: Marcel Plch <mplch@redhat.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
When parsing something like `f(g()=2)`, where the name of a default arg
is not a NAME, but an arbitrary expression, a specialised error message
is emitted.
|
|
|
|
|
|
|
| |
When parsing a string with an invalid escape, the old parser used to
point to the beginning of the invalid string. This commit changes the new
parser to match that behaviour, since it's currently pointing to the
end of the string (or to be more precise, to the beginning of the next
token).
|
| |
|
|
|
|
|
|
| |
Make the design more object-oriented.
Split _GenericAlias on two almost independent classes: for special
generic aliases like List and for parametrized generic aliases like List[int].
Add specialized subclasses for Callable, Callable[...], Tuple and Union[...].
|
| |
|
| |
|
|
|
| |
*first* is repeated twice.
|
| |
|
|
|
|
|
|
| |
When Python is built with experimental isolated interpreters, disable
the list free list.
Temporary workaround until this cache is made per-interpreter.
|
|
|
|
|
|
|
| |
When Python is built with experimental isolated interpreters, a
garbage collection now does nothing in an isolated interpreter.
Temporary workaround until subinterpreters stop sharing Python
objects.
|
|
|
|
|
|
| |
When Python is built with experimental isolated interpreters, disable
the type method cache.
Temporary workaround until the cache is made per-interpreter.
|
|
|
|
| |
the AST (GH-19952)
|
| |
|
|
|
|
|
| |
(#19950)
This reverts commit d60040ba226bd2e3b6f58d074015aa2499dc1cb8.
|
| |
|
|
|
|
|
| |
bpo-40480: create different regexps in the presence of multiple `*`
patterns to prevent fnmatch() from taking exponential time.
|
|
|
|
| |
objects (GH-19946)
|
| |
|
|
|
|
|
| |
nodes (GH-19868)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
| |
In the experimental isolated subinterpreters build mode,
_xxsubinterpreters.run_string() now releases the GIL.
|
|
|
|
|
|
|
|
| |
In the experimental isolated subinterpreters build mode, the GIL is
now per-interpreter.
Move gil from _PyRuntimeState.ceval to PyInterpreterState.ceval.
new_interpreter() always get the config from the main interpreter.
|
|
|
| |
Fix also code to handle init_interp_main() failure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the experimental isolated subinterpreters build mode,
_PyThreadState_GET() gets the autoTSSkey variable and
_PyThreadState_Swap() sets the autoTSSkey variable.
* Add _PyThreadState_GetTSS()
* _PyRuntimeState_GetThreadState() and _PyThreadState_GET()
return _PyThreadState_GetTSS()
* PyEval_SaveThread() sets the autoTSSkey variable to current Python
thread state rather than NULL.
* eval_frame_handle_pending() doesn't check that
_PyThreadState_Swap() result is NULL.
* _PyThreadState_Swap() gets the current Python thread state with
_PyThreadState_GetTSS() rather than
_PyRuntimeGILState_GetThreadState().
* PyGILState_Ensure() no longer checks _PyEval_ThreadsInitialized()
since it cannot access the current interpreter.
|
|
|
|
|
|
|
|
|
| |
When Python is built with experimental isolated interpreters, disable
tuple, dict and free free lists.
Temporary workaround until these caches are made per-interpreter.
Add frame_alloc() and frame_get_builtins() subfunctions to simplify
_PyFrame_New_NoTrack().
|
|
|
|
| |
Windows (GH-19845)
|
|
|
|
|
|
|
| |
When Python is built in the experimental isolated subinterpreters
mode, disable Unicode singletons and Unicode interned strings since
they are shared by all interpreters.
Temporary workaround until these caches are made per-interpreter.
|
|
|
| |
This reverts commit 4e01946cafca0cf49f796c3118e0d65237bcad69.
|
|
|
| |
Automerge-Triggered-By: @corona10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_PyErr_ChainExceptions() now ensures that the first parameter is an
exception type, as done by _PyErr_SetObject().
* The following function now check PyExceptionInstance_Check() in an
assertion using a new _PyBaseExceptionObject_cast() helper
function:
* PyException_GetTraceback(), PyException_SetTraceback()
* PyException_GetCause(), PyException_SetCause()
* PyException_GetContext(), PyException_SetContext()
* PyExceptionClass_Name() now checks PyExceptionClass_Check() with an
assertion.
* Remove XXX comment and add gi_exc_state variable to _gen_throw().
* Remove comment from test_generators
|
|
|
|
|
|
|
|
|
|
|
| |
Move recursion_limit member from _PyRuntimeState.ceval to
PyInterpreterState.ceval.
* Py_SetRecursionLimit() now only sets _Py_CheckRecursionLimit
of ceval.c if the current Python thread is part of the main
interpreter.
* Inline _Py_MakeEndRecCheck() into _Py_LeaveRecursiveCall().
* Convert _Py_RecursionLimitLowerWaterMark() macro into a static
inline function.
|
|
|
|
|
| |
`sally` is not a Simpsons character
Automerge-Triggered-By: @gvanrossum
|
|
|
|
|
|
|
| |
Add --with-experimental-isolated-subinterpreters build option to
configure: better isolate subinterpreters, experimental build mode.
When used, force the usage of the libc malloc() memory allocator,
since pymalloc relies on the unique global interpreter lock (GIL).
|
|
|
|
| |
Move gil_drop_request member from _PyRuntimeState.ceval to
PyInterpreterState.ceval.
|
|
|
|
| |
Move signals_pending from _PyRuntime.ceval to
PyInterpreterState.ceval.
|
|
|
|
| |
secrets for session tokens. (GH-19870)
|
| |
|
| |
|
|
|
|
|
| |
A similar formulation was added in bpo-21596
(db74d982d43d98040e38665d843cbc8de4a082b1) but was lost in bpo-33649
(3faaa8857a42a36383bb18425444e597fc876797).
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-18216)
* Indicate os.makedirs is equivalent to Path.mkdir
* 📜🤖 Added by blurb_it.
* ignore news feed
Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
Don't define shared memory block's name in test_shared_memory_across_processes():
use SharedMemory(create=True) instead.
|
|
|
|
|
|
|
| |
* bpo-40455: Remove gcc10 warning about x_digits
* bpo-40455: nit
* bpo-40455: fix logic error
|