Add a PID to names of POSIX shared memory objects to allow
running multiprocessing tests (test_multiprocessing_fork,
test_multiprocessing_spawn, etc) in parallel.
(cherry picked from commit eb4495e8e2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Work correctly if an additional fresh module imports other
additional fresh module which imports a blocked module.
* Raises ImportError if the specified module cannot be imported
while all additional fresh modules are successfully imported.
* Support blocking packages.
* Always restore the import state of fresh and blocked modules
and their submodules.
* Fix test_decimal and test_xml_etree which depended on an undesired
side effect of import_fresh_module().
(cherry picked from commit ec4d917a6a)
Removed extra comma in comment that indicates state of a `Barrier` as it was confusing and breaking the flow while reading.
Co-authored-by: Priyank <5903604+cpriyank@users.noreply.github.com>
(cherry picked from commit f1ca5d7f61)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* during tarfile parsing, a zlib error indicates invalid data
* tarfile.open now raises a descriptive exception from the zlib error
* this makes it clear to the user that they may be trying to open a
corrupted tar file
(cherry picked from commit b6fe857250)
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
IDLE recognizes Ctrl-D, as on other systems, instead of Ctrl-Z.
(cherry picked from commit e649e0658f)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Fix the threading._shutdown() function when the threading module was
imported first from a thread different than the main thread: no
longer log an error at Python exit.
(cherry picked from commit 95d3137082)
Co-authored-by: Victor Stinner <vstinner@python.org>
Fix a race condition in the Thread.join() method of the threading
module. If the function is interrupted by a signal and the signal
handler raises an exception, make sure that the thread remains in a
consistent state to prevent a deadlock.
(cherry picked from commit a22be4943c)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 71f8ff45c6)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
The URL listed in the `logging` docs for the original `logging` module leads to a 404. I managed to find the new location for the page and updated the URL.
Automerge-Triggered-By: GH:vsajip
(cherry picked from commit 8492b729ae)
Co-authored-by: Sean Leavey <SeanDS@users.noreply.github.com>
Replace old names when they refer to actual versions of macOS.
Keep historical names in references to older versions.
Co-authored-by: Patrick Reader <_@pxeger.com>
(cherry picked from commit 36122e1814)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
It runs now asynchronous methods and callbacks.
If it fails, doCleanups() can be called for cleaning up.
(cherry picked from commit ecb6922ff2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
_global_shutdown_lock should be reinitialized in forked children
(cherry picked from commit 0bfa1106ac)
Co-authored-by: nullptr <3621629+0x0L@users.noreply.github.com>
Automerge-Triggered-By: GH:gpshead
Calling Py_InitializeFromConfig()+Py_RunMain() multiple times must
not crash.
Cleanup also test_get_argc_argv().
(cherry picked from commit 5e2c32e08e)
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit fcbf9b176b)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.
load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.
(cherry picked from commit 40348acc18)
unittest.TestCase.debug() raises now a SkipTest if the class or
the test method are decorated with the skipping decorator.
Previously it only raised a SkipTest if the test method was decorated
with other decorator in addition to the skipping decorator, or
if SkipTest was explicitly raised in the test or setup methods.
(cherry picked from commit dea59cf88a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>