gh-140729: Fix the cProfile module when the executed script contains calls to multiprocessing.Process#144715
Open
YvesDup wants to merge 12 commits into
Open
gh-140729: Fix the cProfile module when the executed script contains calls to multiprocessing.Process#144715YvesDup wants to merge 12 commits into
YvesDup wants to merge 12 commits into
Conversation
aisk
reviewed
Feb 12, 2026
aisk
reviewed
Feb 12, 2026
…uTPQp.rst Co-authored-by: AN Long <aisk@users.noreply.github.com>
|
This PR is stale because it has been open for 30 days with no activity. |
aisk
reviewed
Jun 17, 2026
| @@ -0,0 +1 @@ | |||
| Fix pickling error in the ``cProfile`` module when using :class:`multiprocessing.Process` in script, which can not be properly pickled and executed. | |||
Member
There was a problem hiding this comment.
Looks like there is a missing newline, which caused the CI to fail.
aisk
reviewed
Jun 17, 2026
| @requires_remote_subprocess_debugging() | ||
| class TestProcessRunSupport(unittest.TestCase): | ||
| """ | ||
| Test that Process works correctly with cProfile. |
Member
There was a problem hiding this comment.
The test case for cProfile should be located in test_tracing_profiler.py rather than under test_sampling_profiler/. And the @requires_remote_subprocess_debugging() is also not required for cProfile cases.
Contributor
Author
There was a problem hiding this comment.
I will move the test quickly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When profilng the ttt.py script via
cProfilemodule ,an error occurs:
This fix does not apply to the
profilemodule, which is deprecated and will be removed in python 3.17.