Skip to content

Integrate sphinx-issues; convert inline PyPI URLs to :pypi:#2076

Open
sadiqkhzn wants to merge 1 commit into
pypa:mainfrom
sadiqkhzn:extlinks-pypi
Open

Integrate sphinx-issues; convert inline PyPI URLs to :pypi:#2076
sadiqkhzn wants to merge 1 commit into
pypa:mainfrom
sadiqkhzn:extlinks-pypi

Conversation

@sadiqkhzn

@sadiqkhzn sadiqkhzn commented Jun 17, 2026

Copy link
Copy Markdown

Closes #1370.

Integrates sphinx-issues so the :pypi: role is available, per @webknjaz's feedback. The existing issue/pr/commit/user extlinks are moved over to sphinx-issues as well; gh stays in extlinks since sphinx-issues doesn't provide it.

Also converts ten inline pypi.org/project URLs in three files to use :pypi:, only in places where the visible link text already matched the project name.

One side effect to flag: :pr: usages in news.rst now render as (#N) instead of (PR #N). sphinx-issues 5.0.1 restricts issues_pr_prefix to #, @, or !, so the previous prefix can't be configured. Same end state as pypa/pip#12616. Happy to convert the 109 :pr: lines to inline links if you'd rather preserve the prose.

@sadiqkhzn

Copy link
Copy Markdown
Author

Heads-up for reviewers: I noticed #2041 by @Herrtian also closes #1370 and adds the same one-line extlink alias. I missed it when picking this issue up — apologies. This PR additionally does the inline-link conversions (10 sites across 3 files), with rationale in the description for what was deliberately not converted.

I'm happy whichever path the maintainers prefer:

  1. Merge Add PyPI extlink alias #2041 first and I'll rebase this to just the conversion sweep on top, or
  2. Merge this and close Add PyPI extlink alias #2041 as superseded, or
  3. Close this in favor of Add PyPI extlink alias #2041 and I'll open a separate PR for the conversions later.

Let me know which works best.

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sphinx-issues does not register a pypi role, so it cannot fully cover this case. The pip project went the same route in pypa/pip#12616, keeping pypi as a plain extlink alongside sphinx-issues. This PR follows the same pattern.

That's not true. The plugin defines that role. Integrate it instead, as discussed in the issue.

Additionally, to keep this reviewable, could you delete most of the llm noise in the PR description?

@sadiqkhzn

Copy link
Copy Markdown
Author

You're right, sorry — I was relying on outdated info from an earlier issue comment. sphinx-issues has had the :pypi: role since 4.0.0.

Pushed an update that integrates it: sphinx_issues is now in extensions, the pypi/issue/pr/commit/user extlinks are removed (only gh stays since sphinx-issues doesn't have it), and issues_user_uri is set to preserve the Sponsors URL. Trimmed the description too.

One thing to flag: sphinx-issues 5.0.1 (latest compatible with the pinned Sphinx 7.2.6) hardcodes issues_pr_prefix to one of #/@/!, so the 109 :pr: lines in news.rst now render as (#N) instead of (PR #N). Same outcome pip ended up with. If you'd rather keep the PR #N prose, I can convert those 109 lines to inline links in a follow-up commit — let me know.

@sadiqkhzn sadiqkhzn changed the title Add :pypi: extlinks alias and convert inline PyPI URLs Integrate sphinx-issues; convert inline PyPI URLs to :pypi: Jun 17, 2026
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.

Add extlinks alias for PyPI

2 participants