You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDLE.app on macOS stops when selection Help -> IDLE Help #113729
Opening IDLE using python3 -m idlelib shows the following traceback when doing this:
$ python3.12 -m idlelib
2024-01-05 11:41:38.672 Python[2197:15344359] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/d3/rc5nx4v12y96knh2px3bpqsc0000gn/T/org.python.python.savedState
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/idlelib/__main__.py", line 7, in <module>
idlelib.pyshell.main()
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/idlelib/pyshell.py", line 1693, in main
root.mainloop()
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tkinter/__init__.py", line 1499, in mainloop
self.tk.mainloop(n)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/idlelib/macosx.py", line 213, in help_dialog
help.show_idlehelp(root)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'idlelib.help' has no attribute 'show_idlehelp'
A solution is to rename _helpwindow to show_idlehelp in idlelib.help, or to add show_idlehelp that calls _helpwindow. I tested with the latter and that fixes the problem for me.
Thanks for the fix. I introduced this regression on Dec 3, 2023 in #112683 while modifying 'htests' in several places. Unfortunately, there was no unittest and this was just before the 3.11.7 release on Dec 4 and the 3.12.1 release on Dec 7. As part of the reversion, I will add a new unittest that fails without the fix, along with a news item. Then merge and backport.
#95873 changed the Help menu entry IDLE Help to IDLE Doc but left the internal names alone. The change back to IDLE Help (or even Python Help) is macOS specific, but is also completely separate from this issue. I was confused because I became aware of both at the same time, and because 3.13.2, released on Nov 22, works fine.
Activity
ronaldoussoren commentedon Jan 5, 2024
See also: https://discuss.python.org/t/idle-minor-preliminary-difficulties/42477/3
ronaldoussoren commentedon Jan 5, 2024
A solution is to rename
_helpwindowtoshow_idlehelpinidlelib.help, or to addshow_idlehelpthat calls_helpwindow. I tested with the latter and that fixes the problem for me.pythongh-113729: Fix the Help -> "IDLE Help" menu in IDLE
ronaldoussoren commentedon Jan 5, 2024
Note that this is not a macOS-specific issue, the same error should happen on other platforms,
idlelib.editoralso uses.help.show_idlehelp.terryjreedy commentedon Jan 5, 2024
Thanks for the fix. I introduced this regression on Dec 3, 2023 in #112683 while modifying 'htests' in several places. Unfortunately, there was no unittest and this was just before the 3.11.7 release on Dec 4 and the 3.12.1 release on Dec 7. As part of the reversion, I will add a new unittest that fails without the fix, along with a news item. Then merge and backport.
gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 and 3.11…
pythongh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 an…
pythongh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 an…
[3.11] gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 a…
terryjreedy commentedon Jan 6, 2024
#95873 changed the Help menu entry
IDLE HelptoIDLE Docbut left the internal names alone. The change back toIDLE Help(or evenPython Help) is macOS specific, but is also completely separate from this issue. I was confused because I became aware of both at the same time, and because 3.13.2, released on Nov 22, works fine.[3.12] gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 a…
pythongh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 an…
pythongh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 an…
pythongh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 an…