Skip to content

IDLE.app on macOS stops when selection Help -> IDLE Help #113729

Closed

Description

@ronaldoussoren

Bug report

Bug description:

To reproduce:

  • open IDLE.app
  • open the help menu
  • select "IDLE help"

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'

CPython versions tested on:

3.10, 3.12

Operating systems tested on:

macOS

Linked PRs

Activity

  1. ronaldoussoren commented on Jan 5, 2024

    @ronaldoussoren
    ContributorAuthor
  2. ronaldoussoren commented on Jan 5, 2024

    @ronaldoussoren
    ContributorAuthor

    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.

  3. added a commit that references this issue on Jan 5, 2024
  4. ronaldoussoren commented on Jan 5, 2024

    @ronaldoussoren
    ContributorAuthor

    Note that this is not a macOS-specific issue, the same error should happen on other platforms, idlelib.editor also uses .help.show_idlehelp.

  5. terryjreedy commented on Jan 5, 2024

    @terryjreedy
    Member

    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.

  6. added a commit that references this issue on Jan 6, 2024
  7. added 2 commits that reference this issue on Jan 6, 2024
  8. added a commit that references this issue on Jan 6, 2024
  9. terryjreedy commented on Jan 6, 2024

    @terryjreedy
    Member

    #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.

  10. added a commit that references this issue on Jan 6, 2024
  11. added a commit that references this issue on Jan 22, 2024
  12. added a commit that references this issue on Feb 11, 2024
  13. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions