Skip to content

Commit

Permalink
Fix misleading URLs in the documentation (#573)
Browse files Browse the repository at this point in the history
Due to an issue with the configuration, links in the documentation
currently point to yarl's repo instead of frozenslist's repo.
To fix that, yarl substrings must be replaced with frozenlist.
  • Loading branch information
Jamim authored Jan 6, 2024
1 parent b6aa707 commit 6376fcd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES/573.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Rendered issue, PR, and commit links now lead to
``frozenslist``'s repo instead of ``yarl``'s repo.
2 changes: 2 additions & 0 deletions CHANGES/573.packaging.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A name of a temporary building directory now reflects
that it's related to ``frozenslist``, not ``yarl``.
1 change: 0 additions & 1 deletion docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,3 @@ WSMsgType
wss
www
xxx
yarl
2 changes: 1 addition & 1 deletion packaging/pep517_backend/_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _get_sanitized_long_description(self):

@contextmanager
def _in_temporary_directory(src_dir: Path) -> t.Iterator[None]:
with TemporaryDirectory(prefix='.tmp-yarl-pep517-') as tmp_dir:
with TemporaryDirectory(prefix='.tmp-frozenlist-pep517-') as tmp_dir:
with chdir_cm(tmp_dir):
tmp_src_dir = Path(tmp_dir) / 'src'
copytree(src_dir, tmp_src_dir, symlinks=True)
Expand Down
6 changes: 3 additions & 3 deletions packaging/pep517_backend/_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ def sanitize_rst_roles(rst_source_text: str) -> str:
"""
issue_substitution_pattern = (
r"`#\g<issue_number> "
r"<https://github.com/aio-libs/yarl/issues/\g<issue_number>>`__"
r"<https://github.com/aio-libs/frozenlist/issues/\g<issue_number>>`__"
)

pr_role_regex = r"""(?x)
:pr:`(?P<pr_number>[^`]+)(?:\s+(.*))?`
"""
pr_substitution_pattern = (
r"`PR #\g<pr_number> "
r"<https://github.com/aio-libs/yarl/pull/\g<pr_number>>`__"
r"<https://github.com/aio-libs/frozenlist/pull/\g<pr_number>>`__"
)

commit_role_regex = r"""(?x)
:commit:`(?P<commit_sha>[^`]+)(?:\s+(.*))?`
"""
commit_substitution_pattern = (
r"`\g<commit_sha> "
r"<https://github.com/aio-libs/yarl/commit/\g<commit_sha>>`__"
r"<https://github.com/aio-libs/frozenlist/commit/\g<commit_sha>>`__"
)

gh_role_regex = r"""(?x)
Expand Down

0 comments on commit 6376fcd

Please sign in to comment.