Skip to content

GH-121970: Extract issue_role into a new extension #130615

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 5 commits into from
Feb 27, 2025

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Feb 26, 2025

@AA-Turner AA-Turner added docs Documentation in the Doc dir skip news needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Feb 26, 2025
@AA-Turner AA-Turner requested a review from hugovk as a code owner February 26, 2025 22:51
@AA-Turner AA-Turner changed the title GH-121970: Extract issue_role into a new extension GH-121970: Extract issue_role into a new extension Feb 26, 2025
return [prb], [msg]

issue_url = self.ISSUE_URI.format(issue)
refnode = nodes.reference(issue, f"bpo-{issue}", refuri=issue_url)
Copy link
Member

Choose a reason for hiding this comment

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

Here we're passing something like 12345 and bpo-12345 as the first two arguments.

Before we were passing something like bpo-12345 and bpo-12345 for both.

I see the second one is used in the refnode:

<reference refuri="https://bugs.python.org/issue?@action=redirect&bpo=13936">bpo-13936</reference>

How is the first one used?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's the docutils rawsource, it should reflect what was actually written in the document.

Sphinx uses this for translation, I don't think these nodes are translatable but I'll double check.

A

Copy link
Member Author

Choose a reason for hiding this comment

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

See e.g. https://github.com/python/python-docs-fr/blob/3.13/whatsnew/3.13.po#L394-L399, the whole role is included in the translation string.

Copy link
Member

Choose a reason for hiding this comment

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

So should it match 12345 or bpo-12345?

Copy link
Member

Choose a reason for hiding this comment

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

(Unresolving so the question isn't hidden :)

Copy link
Member Author

Choose a reason for hiding this comment

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

The text of what is actually written in the document, so "14159".

AA-Turner and others added 2 commits February 27, 2025 14:21
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thanks!

@AA-Turner AA-Turner merged commit 043ab3a into python:main Feb 27, 2025
28 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Feb 27, 2025
@miss-islington-app
Copy link

Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@AA-Turner AA-Turner deleted the docs/issue-role branch February 27, 2025 19:06
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 27, 2025
…H-130615)

(cherry picked from commit 043ab3a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 27, 2025

GH-130651 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 27, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 27, 2025
…H-130615)

(cherry picked from commit 043ab3a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 27, 2025

GH-130652 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 27, 2025
AA-Turner added a commit that referenced this pull request Feb 27, 2025
) (#130651)

(cherry picked from commit 043ab3a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
AA-Turner added a commit that referenced this pull request Feb 27, 2025
) (#130652)

(cherry picked from commit 043ab3a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
…130615)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
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
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants