From 7741a3d74ba1bfd55bf638a25a786978fd9166c9 Mon Sep 17 00:00:00 2001 From: esadomer <54475303+esadomer@users.noreply.github.com> Date: Tue, 13 Oct 2026 19:53:20 +0300 Subject: [PATCH 1/3] Capture warnings from incomplete-input compilation in test_codeop --- Lib/test/test_codeop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_codeop.py b/Lib/test/test_codeop.py index c75c0f8627bf084..a95b02e14ab0610 100644 --- a/Lib/test/test_codeop.py +++ b/Lib/test/test_codeop.py @@ -355,7 +355,7 @@ def test_warning(self, compiler): def test_incomplete_warning(self, compiler): with warnings.catch_warnings(record=True) as w: warnings.simplefilter('always') - compiler("'\\e' + (") + compiler("'\\e' + (") self.assertEqual(w, []) @subTests('compiler', RAW_COMPILERS) From a79546051f3246e36830afdf9547deb532d8d764 Mon Sep 17 00:00:00 2001 From: esadomer <54475303+esadomer@users.noreply.github.com> Date: Tue, 13 Oct 2026 20:09:52 +0300 Subject: [PATCH 2/3] gh-159362: Add NEWS entry for codeop-warning-capture-test --- .../next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst diff --git a/Misc/NEWS.d/next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst b/Misc/NEWS.d/next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst new file mode 100644 index 000000000000000..0edde4183822fa4 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst @@ -0,0 +1,2 @@ +Fix the incomplete-input warning test in ``test_codeop`` to capture +warnings emitted by the compiler call. From b5d0d47cfea6d05e3d51c0a6056ad9b578d71ce1 Mon Sep 17 00:00:00 2001 From: esadomer <54475303+esadomer@users.noreply.github.com> Date: Tue, 13 Oct 2026 21:07:16 +0300 Subject: [PATCH 3/3] gh-159362: Omit NEWS for test-only changes --- .../next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 Misc/NEWS.d/next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst diff --git a/Misc/NEWS.d/next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst b/Misc/NEWS.d/next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst deleted file mode 100644 index 0edde4183822fa4..000000000000000 --- a/Misc/NEWS.d/next/Tests/2026-10-13-20-09-52.gh-issue-159362.cOpWrn.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix the incomplete-input warning test in ``test_codeop`` to capture -warnings emitted by the compiler call.