Skip to content

Commit 64c7fae

Browse files
committed
Fix review comments for GH-144715
1 parent 437dcd9 commit 64c7fae

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/profiling/tracing/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,8 @@ def main():
197197
# in the module's namespace.
198198
globs = module.__dict__
199199
globs.update({
200-
# See gh-140729, set None to __spec__ according
201-
# to the documentation,
202-
# https://docs.python.org/3/reference/import.html#module-specs
200+
# Set __spec__ to None so the profiled program behaves like a
201+
# script run directly (gh-140729).
203202
'__spec__': None,
204203
'__file__': spec.origin,
205204
'__name__': spec.name,
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Fix pickling error in the ``cProfile`` module when using :class:`multiprocessing.Process` in script, which can not be properly pickled and executed.
1+
Fix a pickling error in the ``cProfile`` module when profiling a script that
2+
uses :class:`multiprocessing.Process` with the ``spawn`` start method.

0 commit comments

Comments
 (0)