]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add "new in 3.15" comments to idlelib (#153052)
authorTerry Jan Reedy <tjreedy@udel.edu>
Sun, 5 Jul 2026 01:56:20 +0000 (21:56 -0400)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 01:56:20 +0000 (01:56 +0000)
Lazy keyword added to colorizer and test in PR-#142351.
Tested NameError hint expanded in PR-#144299.

Lib/idlelib/colorizer.py
Lib/idlelib/idle_test/test_colorizer.py
Lib/idlelib/idle_test/test_run.py

index 6db38de3aa6cb9cd922f24af731f43886648d53c..ac12d8ace3575f351eda8f66e7fe39a39ab34eff 100644 (file)
@@ -42,7 +42,7 @@ def make_pat():
         ]) +
         r"))"
     )
-    lazy_softkw = (
+    lazy_softkw = (  # lazy new in 3.15 (+ 2 lines below).
         r"^[ \t]*" +  # at beginning of line + possible indentation
         r"(?P<LAZY_SOFTKW>lazy)" +
         r"(?=[ \t]+(?:import|from)\b)"  # followed by 'import' or 'from'
index 4d9e6bd887c5b874546033358516b97d0cd8324b..8a6ab527f9387f4e5478ecff276c6ef264ae9300 100644 (file)
@@ -542,7 +542,7 @@ class ColorDelegatorTest(unittest.TestCase):
         self._assert_highlighting('case _:', {'KEYWORD': [('1.0', '1.4'),
                                                           ('1.5', '1.6')]})
 
-    def test_lazy_soft_keyword(self):
+    def test_lazy_soft_keyword(self):  # lazy new in 3.15.
         # lazy followed by import
         self._assert_highlighting('lazy import foo',
                                   {'KEYWORD': [('1.0', '1.4'),
index 57bf5559c0fa88ab449e7e2338206a3822b87209..f35c3168a446fefabc84063bd5efbb72da3275b7 100644 (file)
@@ -44,7 +44,7 @@ class ExceptionTest(unittest.TestCase):
                                "Or did you forget to import 'abc'?\n"),
             ('int.reel', AttributeError,
                  "type object 'int' has no attribute 'reel'. "
-                 "Did you mean '.real' instead of '.reel'?\n"),
+                 "Did you mean '.real' instead of '.reel'?\n"),  # More in 3.15.
             )
 
     @force_not_colorized