Commit 913e868
committed
Fix mutable default argument in multiprocessing.dummy.DummyProcess
Change the default value of the 'kwargs' parameter in
DummyProcess.__init__() from {} to None to avoid mutable default
argument issues. This makes DummyProcess consistent with
threading.Thread and threading.Timer which already use this pattern.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Reported by: Dmitrii Chuprov <cheese@altlinux.org>
Signed-off-by: Denis Sergeev <zeff@altlinux.org>1 parent 4afa985 commit 913e868
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7347 | 7347 | | |
7348 | 7348 | | |
7349 | 7349 | | |
| 7350 | + | |
| 7351 | + | |
| 7352 | + | |
| 7353 | + | |
| 7354 | + | |
| 7355 | + | |
| 7356 | + | |
| 7357 | + | |
| 7358 | + | |
| 7359 | + | |
| 7360 | + | |
| 7361 | + | |
0 commit comments