]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-139436: Remove PDF and CHM from IDLE HelpSource (#140418)
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>
Tue, 9 Dec 2025 12:32:53 +0000 (12:32 +0000)
committerGitHub <noreply@github.com>
Tue, 9 Dec 2025 12:32:53 +0000 (12:32 +0000)
Lib/idlelib/config-main.def
Lib/idlelib/editor.py
Lib/idlelib/query.py

index 28ae94161d5c035c0c2db3864308c42f9928ce1f..54bdce34af31e082bbe88781a394d780b22d26a5 100644 (file)
@@ -34,9 +34,8 @@
 # relevant settings from the default file.
 #
 # Additional help sources are listed in the [HelpFiles] section below
-# and should be viewable by a web browser (or the Windows Help viewer in
-# the case of .chm files). These sources will be listed on the Help
-# menu.  The pattern, and two examples, are:
+# and should be viewable by a web browser. These sources will be listed
+# on the Help menu.  The pattern, and two examples, are:
 #
 # <sequence_number = menu item;/path/to/help/source>
 # 1 = IDLE;C:/Programs/Python36/Lib/idlelib/help.html
index 83112d85575e478d538802221f02def952b78102..3128934763a1c0806f7922ffc867bd8603a5c1a6 100644 (file)
@@ -35,19 +35,6 @@ from idlelib.help import _get_dochome
 TK_TABWIDTH_DEFAULT = 8
 darwin = sys.platform == 'darwin'
 
-def _sphinx_version():
-    "Format sys.version_info to produce the Sphinx version string used to install the chm docs"
-    major, minor, micro, level, serial = sys.version_info
-    # TODO remove unneeded function since .chm no longer installed
-    release = f'{major}{minor}'
-    release += f'{micro}'
-    if level == 'candidate':
-        release += f'rc{serial}'
-    elif level != 'final':
-        release += f'{level[0]}{serial}'
-    return release
-
-
 class EditorWindow:
     from idlelib.percolator import Percolator
     from idlelib.colorizer import ColorDelegator, color_config
index 57230e2aaca66da89da98d4512a47851795800cf..5f9bdc031e544b7393a5a6b2ad888b25bcf49591 100644 (file)
@@ -289,8 +289,6 @@ class HelpSource(Query):
     def browse_file(self):
         filetypes = [
             ("HTML Files", "*.htm *.html", "TEXT"),
-            ("PDF Files", "*.pdf", "TEXT"),
-            ("Windows Help Files", "*.chm"),
             ("Text Files", "*.txt", "TEXT"),
             ("All Files", "*")]
         path = self.pathvar.get()