Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ronaldoussoren opened this issue Jan 5, 2024 · 5 comments
Closed

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

ronaldoussoren opened this issue Jan 5, 2024 · 5 comments
Labels
OS-mac topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@ronaldoussoren
Copy link
Contributor

ronaldoussoren commented Jan 5, 2024

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

@ronaldoussoren ronaldoussoren added the type-bug An unexpected behavior, bug, or error label Jan 5, 2024
@ronaldoussoren
Copy link
Contributor Author

@ronaldoussoren
Copy link
Contributor Author

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.

@ronaldoussoren
Copy link
Contributor Author

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

@terryjreedy
Copy link
Member

terryjreedy commented 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.

terryjreedy added a commit that referenced this issue Jan 6, 2024
….7 (#113731)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 6, 2024
…d 3.11.7 (pythonGH-113731)

(cherry picked from commit 66f3964)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 6, 2024
…d 3.11.7 (pythonGH-113731)

(cherry picked from commit 66f3964)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
terryjreedy added a commit that referenced this issue Jan 6, 2024
…nd 3.11.7 (GH-113731) (#113766)

(cherry picked from commit 66f3964)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@terryjreedy
Copy link
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.

terryjreedy added a commit that referenced this issue Jan 6, 2024
…nd 3.11.7 (GH-113731) (#113765)

(cherry picked from commit 66f3964)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-mac topic-IDLE type-bug An unexpected behavior, bug, or error
Projects
Status: No status
Development

No branches or pull requests

2 participants