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

📝 Replace GH/PyPI extlinks w/ sphinx-issues #12522

Merged
merged 4 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/12522.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The ``:pull:`` RST role has been replaced with a shorter
``:pr:`` due to starting to use the implementation from
the third-party :pypi:`sphinx-issues` Sphinx extension
-- by :user:`webknjaz`.
2 changes: 1 addition & 1 deletion doc/en/announce/release-2.9.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The py.test Development Team
**New Features**

* New ``pytest.mark.skip`` mark, which unconditionally skips marked tests.
Thanks :user:`MichaelAquilina` for the complete PR (:pull:`1040`).
Thanks :user:`MichaelAquilina` for the complete PR (:pr:`1040`).

* ``--doctest-glob`` may now be passed multiple times in the command-line.
Thanks :user:`jab` and :user:`nicoddemus` for the PR.
Expand Down
2 changes: 1 addition & 1 deletion doc/en/announce/release-2.9.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The py.test Development Team
Thanks :user:`nicoddemus` for the PR.

* Fix (:issue:`469`): junit parses report.nodeid incorrectly, when params IDs
contain ``::``. Thanks :user:`tomviner` for the PR (:pull:`1431`).
contain ``::``. Thanks :user:`tomviner` for the PR (:pr:`1431`).

* Fix (:issue:`578`): SyntaxErrors
containing non-ascii lines at the point of failure generated an internal
Expand Down
4 changes: 2 additions & 2 deletions doc/en/announce/release-2.9.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ The py.test Development Team

* Fix Xfail does not work with condition keyword argument.
Thanks :user:`astraw38` for reporting the issue (:issue:`1496`) and :user:`tomviner`
for PR the (:pull:`1524`).
for PR the (:pr:`1524`).

* Fix win32 path issue when putting custom config file with absolute path
in ``pytest.main("-c your_absolute_path")``.

* Fix maximum recursion depth detection when raised error class is not aware
of unicode/encoded bytes.
Thanks :user:`prusse-martin` for the PR (:pull:`1506`).
Thanks :user:`prusse-martin` for the PR (:pr:`1506`).

* Fix ``pytest.mark.skip`` mark when used in strict mode.
Thanks :user:`pquentin` for the PR and :user:`RonnyPfannschmidt` for
Expand Down
98 changes: 49 additions & 49 deletions doc/en/changelog.rst

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions doc/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"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
Expand Down Expand Up @@ -170,13 +171,8 @@
linkcheck_workers = 5


_repo = "https://github.com/pytest-dev/pytest"
extlinks = {
"bpo": ("https://bugs.python.org/issue%s", "bpo-%s"),
Copy link
Member

Choose a reason for hiding this comment

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

Since BPO is shut down, we might want to switch it to point to cpython github now (not necessary for this PR though).

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair, I wasn't sure. But yeah, could be separate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in #12533.

"pypi": ("https://pypi.org/project/%s/", "%s"),
"issue": (f"{_repo}/issues/%s", "issue #%s"),
"pull": (f"{_repo}/pull/%s", "pull request #%s"),
"user": ("https://github.com/%s", "@%s"),
}


Expand Down Expand Up @@ -451,6 +447,11 @@
towncrier_draft_config_path = "pyproject.toml" # relative to cwd


# -- Options for sphinx_issues extension -----------------------------------

issues_github_path = "pytest-dev/pytest"


intersphinx_mapping = {
"pluggy": ("https://pluggy.readthedocs.io/en/stable", None),
"python": ("https://docs.python.org/3", None),
Expand Down
2 changes: 1 addition & 1 deletion doc/en/historical-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Here is a non-exhaustive list of issues fixed by the new implementation:

* Marker transfer incompatible with inheritance (:issue:`535`).

More details can be found in the :pull:`original PR <3317>`.
More details can be found in the :pr:`original PR <3317>`.

.. note::

Expand Down
1 change: 1 addition & 0 deletions doc/en/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ sphinxcontrib-svg2pdfconverter
packaging
furo
sphinxcontrib-towncrier
sphinx-issues
Loading