| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>.
(cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be)
Co-authored-by: Christian Clauss <cclauss@me.com>
|
|
|
|
|
|
|
| |
multiprocess. (GH-27240) (GH-27452)
(cherry picked from commit 9101b39e67c2437e88c0ad6b57aafd48ab08d431)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test__xxsubinterpreters
* test_builtin
* test_doctest
* test_exceptions
* test_opcodes
* test_support
* test_argparse
* test_baseexception
* test_bdb
* test_bool
* test_asdl_parser
|
| |
|
|
|
| |
Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com>
|
|
|
|
|
| |
There were some minor adjustments needed and a few tests were missing.
https://bugs.python.org/issue32604
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20089)
* Revert "bpo-40613: Remove compiler warning from _xxsubinterpretersmodule (GH-20069)"
This reverts commit fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6.
* Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)"
This reverts commit a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57.
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
| |
An isolated subinterpreter cannot spawn threads, spawn a child
process or call os.fork().
* Add private _Py_NewInterpreter(isolated_subinterpreter) function.
* Add isolated=True keyword-only parameter to
_xxsubinterpreters.create().
* Allow again os.fork() in "non-isolated" subinterpreters.
|
| |
|
|
|
|
|
| |
This PR adds the functionality requested by https://github.com/ericsnowcurrently/multi-core-python/issues/52.
Automerge-Triggered-By: @ericsnowcurrently
|
|
|
|
|
| |
This allows the caller to avoid creation of an exception when the channel is empty (just like `dict.get()` works). `ChannelEmptyError` is still raised if no default is provided.
Automerge-Triggered-By: @ericsnowcurrently
|
|
|
|
|
|
| |
Adds an additional assertion check based on a race condition for `test__xxsubinterpreters.DestroyTests.test_still_running` discovered in the bpo issue.
https://bugs.python.org/issue37224
|
|
|
| |
Make negative interpreter id to raise ValueError instead of RuntimeError.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-15652)
* Fix a crash in comparing with float (and maybe other crashes).
* They are now never equal to strings and non-integer numbers.
* Comparison with a large number no longer raises OverflowError.
* Arbitrary exceptions no longer silenced in constructors and comparisons.
* TypeError raised in the constructor contains now the name of the type.
* Accept only ChannelID and int-like objects in channel functions.
* Accept only InterpreterId, int-like objects and str in the InterpreterId constructor.
* Accept int-like objects, not just int in interpreter related functions.
|
| |
|
|
|
|
| |
channel_send() (gh-11822)
|
|
|
|
|
| |
When os.fork() is called (on platforms that support it) all threads but the current one are destroyed in the child process. Consequently we must ensure that all but the associated interpreter are likewise destroyed. The main interpreter is critical for runtime operation, so we must ensure that fork only happens in the main interpreter.
https://bugs.python.org/issue34651
|
|
|
| |
All the subinterpreter tests were disabled in gh-7513. This commit re-enables them, but leaves one bad test disabled. The test is partly causing problems because it makes assumptions about the availability of a high-level interpreters module (see PEP 554). So I'm disabling the test until such a high-level module is available.
|
|
|
|
|
| |
The test does crash on multiple CIs causing many troubles. For
example, the test prevents to get results of the two Refleak 3.x
buildbots.
|
|
|
| |
For bpo-32604 I added extra subinterpreter-related tests (see #6914), which caused a few buildbots to crash. This patch fixes the crash by ensuring that refcounts in channels are handled properly.
|
|
|
|
|
| |
buildbots. (gh-7288)
For bpo-32604 I added some subinterpreter-related tests (see #6914) that are causing crashes on a few buildbots. I'm working on fixing the crashes (see #7251). This change temporarily disables the triggering test.
|
|
|
| |
This will make it easier to clean up channels (e.g. when used in tests).
|
|
|
| |
Add more tests for subinterpreters. This patch also fixes a few small defects in the channel implementation.
|
| |
|
|
|
| |
The CPython runtime assumes that there is a one-to-one relationship (for a given interpreter) between PyThreadState and OS threads. Sending and receiving on a channel in the same interpreter was causing crashes because of this (specifically due to a check in PyThreadState_Swap()). The solution is to not switch threads if the interpreter is the same.
|
|
|
|
|
|
| |
(gh-5709)
|
| |
|
|
(gh-1748)
The module is primarily intended for internal use in the test suite. Building the module under Windows will come in a follow-up PR.
|