| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
(#118449)
|
|
|
|
|
| |
Increases the default minimum iOS version to 13.0.
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
pasted (GH-121757)
console.compile with the "single" param throws an exception when
there are multiple statements, never allowing to adding newlines
to a pasted code block (gh-121610)
This add a few extra checks to allow extending when in an indented
block, and tests for a few examples
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
| |
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
|
|
|
|
| |
The fallback repl does not support "exit" without parentheses, so the
test would hang until the timeout expired.
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should maintain the invariant that a zero `ob_tid` implies the
refcount fields are merged.
* Move the assignment in `_Py_MergeZeroLocalRefcount` to immediately
before the refcount merge.
* Update `_PyTrash_thread_destroy_chain` to set `ob_ref_shared` to
`_Py_REF_MERGED` when setting `ob_tid` to zero.
Also check this invariant with assertions in the GC in debug builds.
That uncovered a bug when running out of memory during GC.
|
|
|
|
|
|
| |
This avoids messages like:
ThreadSanitizer: starting new threads after multi-threaded fork is not
supported. Dying (set die_after_fork=0 to override)
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
| |
(gh-121805)
See 6b98b274b6 for an explanation of the problem and solution. Here I've applied the solution to channels.
|
|
|
|
|
| |
(GH-121672)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-116431)
Any cross-interpreter mechanism for passing objects between interpreters must be very careful to respect isolation, even when the object is effectively immutable (e.g. int, str). Here this especially relates to when an interpreter sends one of its objects, and then is destroyed while the inter-interpreter machinery (e.g. queue) still holds a reference to the object.
When I added interpreters.Queue, I dealt with that case (using an atexit hook) by silently removing all items from the queue that were added by the finalizing interpreter.
Later, while working on concurrent.futures.InterpreterPoolExecutor (gh-116430), I noticed it was somewhat surprising when items were silently removed from the queue when the originating interpreter was destroyed. (See my comment on that PR.)
It took me a little while to realize what was going on. I expect that users, which much less context than I have, would experience the same pain.
My approach, here, to improving the situation is to give users three options:
1. return a singleton (interpreters.queues.UNBOUND) from Queue.get() in place of each removed item
2. raise an exception (interpreters.queues.ItemInterpreterDestroyed) from Queue.get() in place of each removed item
3. existing behavior: silently remove each item (i.e. Queue.get() skips each one)
The default will now be (1), but users can still explicitly opt in any of them, including to the silent removal behavior.
The behavior for each item may be set with the corresponding Queue.put() call. and a queue-wide default may be set when the queue is created. (This is the same as I did for "synconly".)
|
|
|
|
| |
(gh-118298)
|
| |
|
|
|
|
|
| |
It was only needed for non-Unicode Python builds,
which aren't supported anymore.
|
|
|
|
|
|
| |
They are alternate constructors which only accept numbers
(including objects with special methods __float__, __complex__
and __index__), but not strings.
|
| |
|
| |
|
|
|
|
|
|
| |
It is our general practice to make new optional parameters keyword-only,
even if the existing parameters are all positional-or-keyword. Passing
this parameter as positional would look confusing and could be error-prone
if additional parameters are added in the future.
|
| |
|
| |
|
|
|
| |
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
| |
|
| |
|
| |
|
|
|
|
| |
(GH-121699)
|
| |
|
|
|
|
|
| |
Performance improvement to `float.fromhex`: use a lookup table
for computing the hexadecimal value of a character, in place of the
previous switch-case construct. Patch by Bruno Lima.
|
| |
|
| |
|
|
|
|
| |
Move _PyCode_CODE() and _PyCode_NBYTES() macros to the internal C API
since they use _Py_CODEUNIT which is only part of the internal C API.
|
|
|
|
|
| |
pickled. (GH-121686)
Added explicit comments about that objects are pickled when transmitted via multiprocessing queues and pipes.
|
| |
|
|
|
|
| |
The `allocate_weakref` may return NULL when out of memory. We need to
handle that case and propagate the error.
|
|
|
| |
Set return_code to 1 for ENOTTY
|
|
|
|
|
|
| |
function (GH-121680)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
| |
Co-authored-by: Mirela Andreea GRIGORAS <magrigoras@bitdefender.com>
|
|
|
|
| |
We also need to close the `slave_fd` earlier so that reading from
`master_fd` won't block forever when the subprocess finishes.
|
|
|
| |
Increase test coverage for `ast.get_docstring`
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
| |
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
|
| |
(#121667)
|
|
|
|
|
|
| |
* The result has type Py_ssize_t, not intptr_t.
* Type cast between unsigned and signdet integer types should be explicit.
* Downcasting should be explicit.
* Fix integer overflow check in sum().
|
|
|
|
|
| |
conditions. (GH-121663)
Co-Authored-By: Kevin Diem <kg.diem@gmail.com>
|
|
|
|
| |
(#121498)
|