| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* Remove ceval parameter of take_gil(): get it from tstate.
* Move exit_thread_if_finalizing() call inside take_gil(). Replace
exit_thread_if_finalizing() with tstate_must_exit(): the caller is
now responsible to call PyThread_exit_thread().
* Move is_tstate_valid() assertion inside take_gil(). Remove
is_tstate_valid(): inline code into take_gil().
* Move gil_created() assertion inside take_gil().
|
|
|
|
| |
Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog.
The new box checks for positivity before returning.
|
| |
|
| |
|
|
|
|
| |
Py_Initialize() calls PyEval_InitThreads() since Python 3.7. It's no
longer needed to call it explicitly.
|
|
|
|
|
| |
mode. (GH-16329)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
| |
python-gdb.py now checks for "take_gil" function name to check if a
frame tries to acquire the GIL, instead of checking for
"pthread_cond_timedwait" which is specific to Linux and can be a
different condition than the GIL.
|
|
|
|
| |
called with invalid base. (GH-18863)
|
|
|
|
| |
to type.__call__(). (GH-18852)
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The importlib module now ignores the PYTHONCASEOK
environment variable when the -E or -I command line
options are being used.
|
|
|
|
| |
Move required blanking of error text to non-overridden entry_ok().
(Omit news item.)
|
| |
|
| |
|
|
|
|
|
| |
Since clicking to get an IDLE context menu moves the cursor,
any text selection should be and now is cleared.
|
|
|
|
|
|
| |
It appears standard that moving the text insert cursor away from a selection clears the
selection. Clearing prevents accidental deletion of a possibly off-screen bit of text.
The update is for Ln and Col on the status bar.
|
|
|
|
| |
Fix typo in cmdline.rst
Add space between the `-m` option and the module name (`timeit`).
|
| |
|
|
|
|
| |
(GH-18499)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* exit_thread_if_finalizing() does now access directly _PyRuntime
variable, rather than using tstate->interp->runtime since tstate
can be a dangling pointer after Py_Finalize() has been called.
* exit_thread_if_finalizing() is now called *before* calling
take_gil(). _PyRuntime.finalizing is an atomic variable,
we don't need to hold the GIL to access it.
* Add ensure_tstate_not_null() function to check that tstate is not
NULL at runtime. Check tstate earlier. take_gil() does not longer
check if tstate is NULL.
Cleanup:
* PyEval_RestoreThread() no longer saves/restores errno: it's already
done inside take_gil().
* PyEval_AcquireLock(), PyEval_AcquireThread(),
PyEval_RestoreThread() and _PyEval_EvalFrameDefault() now check if
tstate is valid with the new is_tstate_valid() function which uses
_PyMem_IsPtrFreed().
|
| |
|
|
|
| |
We make `|=` raise TypeError, since it would be surprising if `C.__dict__ |= {'x': 0}` silently did nothing, while `C.__dict__.update({'x': 0})` is an error.
|
| |
|
|
|
| |
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
insufficient permissions (GH-18815)
Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
|
| |
|
|
|
|
|
| |
calc_number_widths -> PyObject *number
fill_number -> Py_ssize_t d_end
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Py_FatalError() function is replaced with a macro which logs
automatically the name of the current function, unless the
Py_LIMITED_API macro is defined.
Changes:
* Add _Py_FatalErrorFunc() function.
* Remove the function name from the message of Py_FatalError() calls
which included the function name.
* Update tests.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert _PyRuntimeState.finalizing field to an atomic variable:
* Rename it to _finalizing
* Change its type to _Py_atomic_address
* Add _PyRuntimeState_GetFinalizing() and _PyRuntimeState_SetFinalizing()
functions
* Remove _Py_CURRENTLY_FINALIZING() function: replace it with testing
directly _PyRuntimeState_GetFinalizing() value
Convert _PyRuntimeState_GetThreadState() to static inline function.
|
|
|
| |
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
| |
Remove redundant check on Py_TYPE() value: it's already checked
inside _PyType_CheckConsistency().
|
|
|
| |
For PEP 585 (this isn't in the PEP but is an obvious follow-up).
|
|
|
|
| |
symtable_visit_annotations. (GH-18800)
|
|
|
|
|
|
| |
Avoid duplicated code:
* PyObject_Init() uses PyObject_INIT()
* PyObject_InitVar() uses PyObject_INIT_VAR()
|
| |
|
|
|
| |
Add _PyObject_CAST_CONST() macro: cast a pointer to (const PyObject *).
|
| |
|
|
|
|
|
| |
set_herror builds a string by calling hstrerror but downcasts its return value to char *. It should be const char *.
Automerge-Triggered-By: @benjaminp
|
|
|
| |
Also move int err to its innermost scope.
|
|
|
|
|
|
| |
Eliminate repeat of 'Options', reported by Jules Lasne, and improve wording elsewhere.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
| |
subprocess _posix_spawn() should stay in sync with _Py_RestoreSignals().
|
|
|
|
|
| |
test_subprocess.test_user() now skips the test on an user name if the
user name doesn't exist. For example, skip the test if the user
"nobody" doesn't exist on Linux.
|
|
|
|
|
|
|
|
| |
(GH-18786)
`list(sys.modules.items())` was apparently not immune to "dictionary
changed size during iteration" errors.
Tested internally using an integration test that has run into this a couple of times in the past two years. With this patch applied, the test is no longer flaky.
|
|
|
|
| |
(GH-18784)
|
| |
|