cpython/Lib/multiprocessing
Denis Sergeev 5a15e73789
gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814)
* gh-138813: Default `BaseProcess` `kwargs` to `None` (#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.

Co-authored-by: Dmitrii Chuprov <cheese@altlinux.org>

* DummyProcess kwargs=None (which threading.Thread accepts properly)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-09-17 14:45:52 -07:00
..
dummy gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814) 2025-09-17 14:45:52 -07:00
__init__.py
connection.py gh-132124: improve safety nets for creating AF_UNIX socket files (GH-134085) 2025-05-21 10:10:31 -07:00
context.py gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462) 2025-05-24 03:50:19 +00:00
forkserver.py gh-126631: gh-137996: fix pre-loading of __main__ (GH-135295) 2025-09-07 07:49:54 +00:00
heap.py
managers.py gh-115942: Add locked to several multiprocessing locks (#115944) 2025-04-08 11:14:12 +03:00
pool.py
popen_fork.py gh-131913: multiprocessing: add interrupt for POSIX (GH-132453) 2025-04-22 23:55:24 -07:00
popen_forkserver.py
popen_spawn_posix.py gh-118981: multiprocessing.popen_spawn_posix, fix potential hang (gh-118982) 2025-09-07 07:18:28 +00:00
popen_spawn_win32.py
process.py gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814) 2025-09-17 14:45:52 -07:00
queues.py
reduction.py
resource_sharer.py
resource_tracker.py gh-131788: make resource_tracker re-entrant safe (GH-131787) 2025-08-13 20:00:23 +00:00
shared_memory.py
sharedctypes.py gh-133017: Improve error message for invalid typecodes in multiprocessing.{Array,Value} (GH-133252) 2025-05-09 11:46:45 +03:00
spawn.py
synchronize.py gh-132561: Fix the public multiprocessing.SemLock.locked method (#132586) 2025-04-17 11:41:30 +02:00
util.py gh-132124: improve safety nets for creating AF_UNIX socket files (GH-134085) 2025-05-21 10:10:31 -07:00