| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
The object's inline values may be marked invalid if the materialized
dict was already initialized and then deleted.
|
| |
|
| |
|
|
|
|
|
| |
This adds tests for the documented behaviour of `pkgutil.extend_path`
regarding different argument types as well as for `*.pkg` files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in other API (#121364)
* Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs
* Document immortality in some functions that take `const char *`
This is PyUnicode_InternFromString;
PyDict_SetItemString, PyObject_SetAttrString;
PyObject_DelAttrString; PyUnicode_InternFromString;
and the PyModule_Add convenience functions.
Always point out a non-immortalizing alternative.
* Don't immortalize user-provided attr names in _ctypes
|
| |
|
|
|
|
|
|
| |
(GH-121358)
Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`).
|
| |
|
|
|
|
|
|
| |
patch out problematic code" (gh-120984) (#121844)
This reverts commit 48cd104b0cf05dad8958efa9cb9666c029ef9201 prior
to the release of 3.13.0b4 to allow for additional review time.
|
|
|
| |
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
| |
|
|
|
|
| |
(#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
|