Skip to content

Conversation

@StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Oct 12, 2025

@StanFromIreland
Copy link
Member Author

Requesting Serhiy per experts list.

@StanFromIreland
Copy link
Member Author

UBSan failure is unrelated.

@StanFromIreland
Copy link
Member Author

@picnixz Thanks for the helpful reviews on the (other) pydoc PR, I also happen to have this one if you are interested, I'd appreciate your thoughts.

@StanFromIreland StanFromIreland changed the title gh-139971: Fix pydoc docs.python.org link generation gh-84232: Fix pydoc docs.python.org link generation Oct 13, 2025
Comment on lines 139 to 141
self.module_docs[module_name] = (
doc_file + f"#module-{module_name}"
)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
self.module_docs[module_name] = (
doc_file + f"#module-{module_name}"
)
self.module_docs[module_name] = f"{doc_file}#module-{module_name}"

Copy link
Member Author

Choose a reason for hiding this comment

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

I have to revert this I'm afraid, ruff complains and I don't think it's worth adding the ignore.

Copy link
Member

Choose a reason for hiding this comment

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

What is the complaint?

Don’t you find it unpleasant to mix string addition and f-string?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately pre-commit does not give much information:

 Run Ruff (format) on Doc/................................................Failed
- hook id: ruff-format
- exit code: 1

Would reformat: Doc/tools/extensions/pydoc_topics.py
1 file would be reformatted, 13 files already formatted

If you feel strongly than I can apply the change and mark it as ignored?

Copy link
Member

Choose a reason for hiding this comment

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

Let's remove --check from the Ruff formats in .pre-commit-config.yaml so it actually makes the change. It's not much help for it say it would make a change but keep it a secret :)

Copy link
Member Author

Choose a reason for hiding this comment

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

To clarify, what is currently on this branch is what ruff formatted the line to.

Copy link
Member

Choose a reason for hiding this comment

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

It's now like this, which looks good to me:

                self.module_docs[module_name] = (
                    f"{doc_file}#module-{module_name}"
                )

@merwok
Copy link
Member

merwok commented Dec 15, 2025

I’m ready to review after conflicts are fixed to get this merged!

@merwok
Copy link
Member

merwok commented Dec 15, 2025

I’m not adding the backport labels as the list of modules has differences between versions, and there is a manual step to generate the pydoc data file.

@StanFromIreland
Copy link
Member Author

StanFromIreland commented Dec 15, 2025

a manual step

Yes and no, the script is run during the release process anyway, there is no additional work for RMs:-)

@hugovk hugovk merged commit f9704f1 into python:main Dec 23, 2025
87 of 89 checks passed
@StanFromIreland StanFromIreland deleted the pydoc-link branch December 23, 2025 09:20
@hugovk hugovk added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Dec 23, 2025
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 23, 2025
…-139995)

(cherry picked from commit f9704f1)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
@miss-islington-app
Copy link

Sorry, @StanFromIreland and @hugovk, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f9704f1d84044e46b94f2e4854dae43c1adaa7f1 3.13

@bedevere-app
Copy link

bedevere-app bot commented Dec 23, 2025

GH-143098 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Dec 23, 2025
@bedevere-app
Copy link

bedevere-app bot commented Dec 23, 2025

GH-143099 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 Dec 23, 2025
hugovk pushed a commit to hugovk/cpython that referenced this pull request Dec 23, 2025
…ythonGH-139995)

(cherry picked from commit f9704f1)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
hugovk pushed a commit that referenced this pull request Dec 23, 2025
…) (#143098)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
hugovk added a commit that referenced this pull request Dec 23, 2025
…) (#143099)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants