Skip to content

Conversation

zeff-ir
Copy link

@zeff-ir zeff-ir commented Sep 12, 2025

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

@python-cla-bot
Copy link

python-cla-bot bot commented Sep 12, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Sep 12, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core change looks good to me, but please add a test case to test_multiprocessing.

@gpshead gpshead self-assigned this Sep 12, 2025
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>
@zeff-ir zeff-ir force-pushed the gh-138813-fix-dummyprocess-kwargs branch from d83c952 to 913e868 Compare September 13, 2025 15:28
@bedevere-app
Copy link

bedevere-app bot commented Sep 13, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@zeff-ir
Copy link
Author

zeff-ir commented Sep 13, 2025

@ZeroIntensity, I’ve addressed your comment, please take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants