https://github.com/python/cpython/commit/0621639e8fc0084af15550651198c9e221b6619d
commit: 0621639e8fc0084af15550651198c9e221b6619d
branch: main
author: Terry Jan Reedy <[email protected]>
committer: terryjreedy <[email protected]>
date: 2026-07-05T01:56:20Z
summary:

Add "new in 3.15" comments to idlelib (#153052)

Lazy keyword added to colorizer and test in PR-#142351.
Tested NameError hint expanded in PR-#144299.

files:
M Lib/idlelib/colorizer.py
M Lib/idlelib/idle_test/test_colorizer.py
M Lib/idlelib/idle_test/test_run.py

diff --git a/Lib/idlelib/colorizer.py b/Lib/idlelib/colorizer.py
index 6db38de3aa6cb9c..ac12d8ace3575f3 100644
--- a/Lib/idlelib/colorizer.py
+++ b/Lib/idlelib/colorizer.py
@@ -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'
diff --git a/Lib/idlelib/idle_test/test_colorizer.py 
b/Lib/idlelib/idle_test/test_colorizer.py
index 4d9e6bd887c5b87..8a6ab527f9387f4 100644
--- a/Lib/idlelib/idle_test/test_colorizer.py
+++ b/Lib/idlelib/idle_test/test_colorizer.py
@@ -542,7 +542,7 @@ def test_case_soft_keyword(self):
         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'),
diff --git a/Lib/idlelib/idle_test/test_run.py 
b/Lib/idlelib/idle_test/test_run.py
index 57bf5559c0fa88a..f35c3168a446fef 100644
--- a/Lib/idlelib/idle_test/test_run.py
+++ b/Lib/idlelib/idle_test/test_run.py
@@ -44,7 +44,7 @@ def __eq__(self, other):
                                "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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to