Skip to content

gh-129699: Add description to IDLE doc title #129727

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

Merged
merged 6 commits into from
Feb 8, 2025

Conversation

StanFromIreland
Copy link
Contributor

@StanFromIreland StanFromIreland commented Feb 6, 2025

Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)


📚 Documentation preview 📚: https://cpython-previews--129727.org.readthedocs.build/

@StanFromIreland
Copy link
Contributor Author

StanFromIreland commented Feb 7, 2025

Updating the test to the new title. This test over all should be improved as this is not very sustainable.

Found error in help.py, and updated it.

@StanFromIreland
Copy link
Contributor Author

Fix works (Ubuntu fails are a bug in GitHubs containers see #129664 )

@terryjreedy
Copy link
Member

terryjreedy commented Feb 8, 2025

@StanFromIreland Thank you for fixing the bug. I found it but was too sleepy to try a fix. Rerunning the Ubuntu test(s) worked.

@encukou Could you do a quick 2nd coredev review? The main thing to look at would be the 2 new descriptions. idle.html is generated. The test fix is to add the new description to the expected first line of the tkinter text widget filled by parsing help.html (modified from idle.html).

The test worked to not only detect the change, but show that the new 'actual' was not what it should have been: 'IDLE' was deleted. This was due to a bug in the tag content extraction logic in help.HelpParser.handle_data. I manually checked Stan's fix on my system, and there is only the one <h1> header in the file.

Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDLE's docs window looks as it should on Linux, Mac, Windows.

I don't claim to understand the details of what help.py does, but I don't see anything wrong with it.
(If it was new code I'd recommend removeprefix.)

@terryjreedy
Copy link
Member

terryjreedy commented Feb 8, 2025

Thank you for the comment. I did not write the decade-old HelpParser methods and I don't remember why the <h1>, <h2>, and <h3> tags are not handled uniformly, but their special casing occurs in two methods and presumably must be coordinated between them. I would rather do any review, modernization, and minor refactoring in a separate issue or PR just for that.

@terryjreedy terryjreedy merged commit 33a7094 into python:main Feb 8, 2025
45 checks passed
@miss-islington-app
Copy link

Thanks @StanFromIreland for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 8, 2025
Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

(cherry picked from commit 33a7094)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-app
Copy link

bedevere-app bot commented Feb 8, 2025

GH-129864 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Feb 8, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 8, 2025
Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

(cherry picked from commit 33a7094)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-app
Copy link

bedevere-app bot commented Feb 8, 2025

GH-129865 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Feb 8, 2025
terryjreedy added a commit that referenced this pull request Feb 8, 2025
)

gh-129699: Add description to IDLE doc title (GH-129727)

Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

(cherry picked from commit 33a7094)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
terryjreedy added a commit that referenced this pull request Feb 8, 2025
)

gh-129699: Add description to IDLE doc title (GH-129727)

Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

(cherry picked from commit 33a7094)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@StanFromIreland StanFromIreland deleted the idle-docs branch February 8, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news topic-IDLE
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants