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

bpo-10716: Migrating pydoc to html5. #28651

Merged
merged 5 commits into from
Oct 9, 2021
Merged

Conversation

JulienPalard
Copy link
Member

@JulienPalard JulienPalard commented Sep 30, 2021

I tried myself at porting pydoc to html5.

I though (hoped?) the commit would be smaller, I tried to keep it as small as possible. I did not tried to enhance the graphical result, I just focused on HTML modernisation as a fist step.

https://bugs.python.org/issue10716

@JulienPalard
Copy link
Member Author

Ohhh, interesting, cgitb depends on pydoc, so if I use css in pydoc... oh wow.

@JulienPalard
Copy link
Member Author

So I modified cgitb a bit to not depend on html rendered by pydoc.

I also had to modify pydoc test which were extremely strict in the output expected, I tried to still check that every bit of important info are given, while not being strict on the HTML used.

@JulienPalard
Copy link
Member Author

TIL about ServerHTMLDoc...

Lib/cgitb.py Outdated Show resolved Hide resolved
Lib/pydoc.py Outdated Show resolved Hide resolved
Lib/pydoc.py Show resolved Hide resolved
@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Oct 1, 2021
@JulienPalard
Copy link
Member Author

I'd like to merge this, does someone still want to proof-read first?

@merwok
Copy link
Member

merwok commented Oct 7, 2021

I haven’t had a chance to run it locally to see the results yet.
Maybe you have screenshots?

@merwok
Copy link
Member

merwok commented Oct 7, 2021

This could get a note in the release notes (for pydoc and xmlrpc — cgitb is unchanged)

@JulienPalard
Copy link
Member Author

Here come the screenshots, side by side:

multiprocessing
index

There's a few differences, in the height of the title bar for example.

@JulienPalard
Copy link
Member Author

This could get a note in the release notes (for pydoc and xmlrpc — cgitb is unchanged)

True, done.

Lib/test/test_pydoc.py Outdated Show resolved Hide resolved
Lib/test/test_pydoc.py Outdated Show resolved Hide resolved
@merwok
Copy link
Member

merwok commented Oct 8, 2021

Thank you for your efforts in tackling this! It was needed and is the basis for future improvements.

I have added some final questions on some details. (If you make changes, please avoid force-pushing to make reviewing easier.)

@JulienPalard JulienPalard merged commit c91b6f5 into python:main Oct 9, 2021
@JulienPalard JulienPalard deleted the mdk/pydoc branch October 9, 2021 07:36
@JulienPalard
Copy link
Member Author

Thanks @merwok and @rhettinger for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants