cpython/Lib/multiprocessing/dummy
Miss Islington (bot) 6b26e62f37
[3.14] gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814) (#139084)
gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814)

* gh-138813: Default `BaseProcess` `kwargs` to `None` (GH-138814)

Set `BaseProcess.__init__(..., kwargs=None)` and initialize `kwargs` with
`dict(kwargs) if kwargs else {}`. This avoids a shared mutable default and
matches threading.Thread behavior.



* DummyProcess kwargs=None (which threading.Thread accepts properly)
(cherry picked from commit 5a15e73789)

Co-authored-by: Denis Sergeev <newjimbatler00@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-10-08 00:37:30 +00:00
..
__init__.py [3.14] gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814) (#139084) 2025-10-08 00:37:30 +00:00
connection.py bpo-29776: Use decorator syntax for properties. (#585) 2017-03-19 08:40:32 +02:00