📝 Replace GH/PyPI `extlinks` w/ `sphinx_issues`

This extension implements more generic roles that can also be used
more flexibly. Relying on an external extension allows to stop
maintaining an in-repo copy of the commonly used behavior.
This commit is contained in:
Sviatoslav Sydorenko 2024-06-22 22:02:59 +02:00
parent 66dbab697b
commit b919a711a4
No known key found for this signature in database
GPG Key ID: 9345E8FEA89CA455
2 changed files with 9 additions and 5 deletions

View File

@ -89,6 +89,7 @@ extensions = [
"sphinx_removed_in",
"sphinxcontrib_trio",
"sphinxcontrib.towncrier.ext", # provides `towncrier-draft-entries` directive
"sphinx_issues", # implements `:issue:`, `:pr:` and other GH-related roles
]
# Building PDF docs on readthedocs requires inkscape for svg to pdf
@ -170,13 +171,8 @@ linkcheck_ignore = [
linkcheck_workers = 5
_repo = "https://github.com/pytest-dev/pytest"
extlinks = {
"bpo": ("https://bugs.python.org/issue%s", "bpo-%s"),
"pypi": ("https://pypi.org/project/%s/", "%s"),
"issue": (f"{_repo}/issues/%s", "issue #%s"),
"pr": (f"{_repo}/pull/%s", "pull request #%s"),
"user": ("https://github.com/%s", "@%s"),
}
@ -451,6 +447,13 @@ towncrier_draft_working_directory = PROJECT_ROOT_DIR
towncrier_draft_config_path = "pyproject.toml" # relative to cwd
# -- Options for sphinx_issues extension -----------------------------------
issues_github_path = "pytest-dev/pytest"
issues_prefix = "issue #"
issues_pr_prefix = "pull request #"
intersphinx_mapping = {
"pluggy": ("https://pluggy.readthedocs.io/en/stable", None),
"python": ("https://docs.python.org/3", None),

View File

@ -10,3 +10,4 @@ sphinxcontrib-svg2pdfconverter
packaging
furo
sphinxcontrib-towncrier
sphinx-issues