[Python-checkins] bpo-46591: Make About IDLE doc link label clickable (GH-30251)

terryjreedy webhook-mailer at python.org
Tue Feb 1 20:20:33 EST 2022


https://github.com/python/cpython/commit/53c78080573b3bae4c4e782b9f47dce48aac9688
commit: 53c78080573b3bae4c4e782b9f47dce48aac9688
branch: main
author: Wes <5124946+wesinator at users.noreply.github.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2022-02-01T20:20:23-05:00
summary:

bpo-46591: Make About IDLE doc link label clickable (GH-30251)

Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>

files:
A Misc/NEWS.d/next/Library/2022-01-31-15-40-38.bpo-46591.prBD1M.rst
M Lib/idlelib/NEWS.txt
M Lib/idlelib/help_about.py
M Lib/idlelib/idle_test/htest.py

diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index ed2b05ed662e8..34b2c08a92256 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -4,6 +4,8 @@ Released on 2022-10-03
 =========================
 
 
+bpo-46591: Make the IDLE doc URL on the About IDLE dialog clickable.
+
 bpo-45296: Clarify close, quit, and exit in IDLE.  In the File menu,
 'Close' and 'Exit' are now 'Close Window' (the current one) and 'Exit'
 is now 'Exit IDLE' (by closing all windows).  In Shell, 'quit()' and
diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py
index 019aacbd0faa2..c59f494599806 100644
--- a/Lib/idlelib/help_about.py
+++ b/Lib/idlelib/help_about.py
@@ -3,6 +3,7 @@
 """
 import os
 import sys
+import webbrowser
 from platform import python_version, architecture
 
 from tkinter import Toplevel, Frame, Label, Button, PhotoImage
@@ -94,6 +95,7 @@ def create_widgets(self):
                      f"{version[:version.rindex('.')]}/library/idle.html",
                      justify=LEFT, fg=self.fg, bg=self.bg)
         docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
+        docs.bind("<Button-1>", lambda event: webbrowser.open(docs['text']))
 
         Frame(frame_background, borderwidth=1, relief=SUNKEN,
               height=2, bg=self.bg).grid(row=8, column=0, sticky=EW,
diff --git a/Lib/idlelib/idle_test/htest.py b/Lib/idlelib/idle_test/htest.py
index 666ff4cb84851..d297f8aa0094e 100644
--- a/Lib/idlelib/idle_test/htest.py
+++ b/Lib/idlelib/idle_test/htest.py
@@ -77,8 +77,8 @@ def _wrapper(parent):  # htest #
     'kwds': {'title': 'help_about test',
              '_htest': True,
              },
-    'msg': "Test every button. Ensure Python, TK and IDLE versions "
-           "are correctly displayed.\n [Close] to exit.",
+    'msg': "Click on URL to open in default browser.\n"
+           "Verify x.y.z versions and test each button, including Close.\n "
     }
 
 # TODO implement ^\; adding '<Control-Key-\\>' to function does not work.
diff --git a/Misc/NEWS.d/next/Library/2022-01-31-15-40-38.bpo-46591.prBD1M.rst b/Misc/NEWS.d/next/Library/2022-01-31-15-40-38.bpo-46591.prBD1M.rst
new file mode 100644
index 0000000000000..7785faa1c4cbf
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-01-31-15-40-38.bpo-46591.prBD1M.rst
@@ -0,0 +1 @@
+Make the IDLE doc URL on the About IDLE dialog clickable.
\ No newline at end of file



More information about the Python-checkins mailing list