From b91316a715dcd3218a01c4637c6d9e3403a82922 Mon Sep 17 00:00:00 2001 From: raman118 Date: Sat, 7 Nov 2026 01:46:50 +0530 Subject: [PATCH 1/2] gh-160334: Accept special frames in collapsed profiling test --- .../test_sampling_profiler/test_integration.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_integration.py b/Lib/test/test_profiling/test_sampling_profiler/test_integration.py index 3487647b76683e..385607c328bfc4 100644 --- a/Lib/test/test_profiling/test_sampling_profiler/test_integration.py +++ b/Lib/test/test_profiling/test_sampling_profiler/test_integration.py @@ -508,7 +508,10 @@ def test_sampling_with_collapsed_export(self): if ";" in stack_trace: stack_parts = stack_trace.split(";") for part in stack_parts: - # Each part should be file:function:line + # Special frames, such as and unreadable frames, + # do not have file and line information. + if part.startswith("<") and part.endswith(">"): + continue self.assertIn(":", part) def test_sampling_all_threads(self): From b5f7aaff0b8c267a4f9a89871b7ee92ce637d38c Mon Sep 17 00:00:00 2001 From: raman118 Date: Sat, 7 Nov 2026 01:48:56 +0530 Subject: [PATCH 2/2] gh-160334: Add NEWS entry --- .../next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst diff --git a/Misc/NEWS.d/next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst b/Misc/NEWS.d/next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst new file mode 100644 index 00000000000000..458f192ce0be77 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst @@ -0,0 +1,2 @@ +Fix the sampling profiler integration test for special frames without file and +line information.