]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-38546: Backport multiprocessing tests fixes from master (GH-19689)
authorVictor Stinner <vstinner@python.org>
Thu, 23 Apr 2020 22:44:08 +0000 (00:44 +0200)
committerGitHub <noreply@github.com>
Thu, 23 Apr 2020 22:44:08 +0000 (00:44 +0200)
commitfd32a0e2ee445dd7156323d216627112e66b0a69
tree8c3273b93ec66f77efadbf0bfb0ca4c7e7b97999
parent857d573257ab150d6bea666354312a5fd284b171
[3.7] bpo-38546: Backport multiprocessing tests fixes from master (GH-19689)

* bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)

multiprocessing tests now call explicitly _run_finalizers() to remove
immediately temporary directories created by
multiprocessing.util.get_temp_dir().
(cherry picked from commit 039fb49c185570ab7b02f13fbdc51c859cfd831e)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
(cherry picked from commit 632cb36084dc9d13f1cdb31a0e7e3ba80745a51a)

* bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)

multiprocessing tests now stop the ForkServer instance if it's
running: close the "alive" file descriptor to ask the server to stop
and then remove its UNIX address.
(cherry picked from commit 8fbeb14312b4c1320d31ad86e69749515879d1c3)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
(cherry picked from commit 229f6e85f8b4d57a2e742e0d3fc361c5bd15f1cb)

* bpo-38546: multiprocessing tests stop the resource tracker (GH-17641) (GH-17647)

Multiprocessing and concurrent.futures tests now stop the resource
tracker process when tests complete.

Add ResourceTracker._stop() method to
multiprocessing.resource_tracker.

Add _cleanup_tests() helper function to multiprocessing.util: share
code between multiprocessing and concurrent.futures tests.

(cherry picked from commit 9707e8e22d80ca97bf7a9812816701cecde6d226)
(cherry picked from commit 35acb3597208e10a101140474adec86859d57f61)

* Remove NEWS about resource tracker

Python 3.7 multiprocessing does not have resource tracker.

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Lib/multiprocessing/forkserver.py
Lib/multiprocessing/util.py
Lib/test/_test_multiprocessing.py
Lib/test/test_concurrent_futures.py
Misc/NEWS.d/next/Tests/2019-07-01-19-57-26.bpo-37421.NFH1f0.rst [new file with mode: 0644]
Misc/NEWS.d/next/Tests/2019-07-05-14-47-55.bpo-37421.n8o2to.rst [new file with mode: 0644]