From 03f8d3b0db829dc710869d2fa58a6b75f7b3089b Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 28 Aug 2025 10:31:44 +0300 Subject: [PATCH 1/2] gh-126524: Revert "gh-126524: Run `regen-unicodedata` as a part of our CI #126682" (#138197) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ff89fc90d367a..83a668fc720a90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,7 +130,7 @@ jobs: - name: Build CPython run: | make -j4 regen-all - make regen-stdlib-module-names regen-sbom regen-unicodedata + make regen-stdlib-module-names regen-sbom - name: Check for changes run: | git add -u From f914e0ab09adc56abbe4bc20a195d7dc332971e1 Mon Sep 17 00:00:00 2001 From: Semyon Moroz Date: Thu, 28 Aug 2025 09:30:15 +0000 Subject: [PATCH 2/2] gh-136438: Make sure `test_compile` pass with all optimization levels (GH-136478) --- Lib/test/test_compile.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 8a66be9b331262..e4483c26cfd41b 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -823,8 +823,10 @@ def f(): else: return "unused" - self.assertEqual(f.__code__.co_consts, - (f.__doc__, "used")) + if f.__doc__ is None: + self.assertEqual(f.__code__.co_consts, (True, "used")) + else: + self.assertEqual(f.__code__.co_consts, (f.__doc__, "used")) @support.cpython_only def test_remove_unused_consts_no_docstring(self): @@ -869,7 +871,11 @@ def test_strip_unused_None(self): def f1(): "docstring" return 42 - self.assertEqual(f1.__code__.co_consts, (f1.__doc__,)) + + if f1.__doc__ is None: + self.assertEqual(f1.__code__.co_consts, (42,)) + else: + self.assertEqual(f1.__code__.co_consts, (f1.__doc__,)) # This is a regression test for a CPython specific peephole optimizer # implementation bug present in a few releases. It's assertion verifies