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

Fix linkcheck issues #1437

Merged
merged 7 commits into from
Oct 10, 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
17 changes: 11 additions & 6 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
# Login page
r"https://github.com/python/buildmaster-config/issues/new.*": r"https://github.com/login.*", # noqa: E501
r"https://github.com/python/core-workflow/issues/new.*": r"https://github.com/login.*", # noqa: E501
r"https://github.com/orgs/python/teams.*": r"https://github.com/login.*", # noqa: E501
# Archive redirect
r"https://github.com/python/cpython/archive/main.zip": r"https://codeload.github.com/python/cpython/zip/refs/heads/main", # noqa: E501
# Blob to tree
Expand All @@ -89,6 +90,13 @@
r'\/.*',
]

# Check the link itself, but ignore anchors that are added by JS
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_anchors_ignore_for_url
linkcheck_anchors_ignore_for_url = [
# GitHub
r'https://github.com/.*',
]

linkcheck_ignore = [
# The voters repo is private and appears as a 404
'https://github.com/python/voters',
Expand All @@ -98,17 +106,14 @@
'https://discuss.python.org/groups/staff',
'https://discuss.python.org/groups/moderators',
'https://discuss.python.org/groups/admins',
# The crawler gets "Anchor not found" for GitHub anchors
r'https://github.com.+?#L\d+',
r'https://github.com/cli/cli#installation',
r'https://github.com/github/renaming#renaming-existing-branches',
r'https://github.com/python/bedevere/#pr-state-machine',
# "Anchor not found":
r'https://packaging.python.org/.*#',
# "-rate limited-", causing a timeout
r'https://stackoverflow.com/.*',
# Discord doesn't allow robot crawlers: "403 Client Error: Forbidden"
'https://support.discord.com/hc/en-us/articles/219070107-Server-Nicknames',
r'https://support.discord.com/hc/en-us/articles/219070107-Server-Nicknames',
# Patreon also gives 403 to the GHA linkcheck runner
r'https://www.patreon.com/.*',
]

rediraffe_redirects = {
Expand Down
2 changes: 1 addition & 1 deletion core-developers/motivations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ participating in the CPython core development process:

.. topic:: Carol Willing (United States)

* Noteable: `<https://noteable.io/about-us/>`__ (VP Engineering)
* Noteable (VP Engineering)
* Personal site: `Willing Consulting <https://www.willingconsulting.com/>`_
* `Extended bio <https://www.willingconsulting.com/about/>`__
* Project Jupyter (Software Council, Core Team for JupyterHub/Binder)
Expand Down
4 changes: 2 additions & 2 deletions developer-workflow/communication-channels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Other core workflow tools are:
* `blurb_it`_
* `miss-islington`_
* `cla-bot`_
* `cpython-emailer-webhook`_
* `webhook-mailer`_

Python `Performance Benchmark`_ project is intended to be an authoritative
source of benchmarks for all Python implementations.
Expand All @@ -274,5 +274,5 @@ source of benchmarks for all Python implementations.
.. _blurb_it: https://github.com/python/blurb_it
.. _miss-islington: https://github.com/python/miss-islington
.. _cla-bot: https://github.com/ambv/cla-bot
.. _cpython-emailer-webhook: https://github.com/berkerpeksag/cpython-emailer-webhook
.. _webhook-mailer: https://github.com/python/webhook-mailer
.. _Performance Benchmark: https://github.com/python/pyperformance
2 changes: 1 addition & 1 deletion developer-workflow/extension-modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ with the following :func:`!foo.greet` function:

Instead of using the Python implementation of :func:`!foo.greet`, we want to
use its corresponding C extension implementation exposed in the :mod:`!_foo`
module. Ideally, we want to modify :cpy-file:`!Lib/foo.py` as follows:
module. Ideally, we want to modify ``Lib/foo.py`` as follows:

.. code-block:: python
:caption: Lib/foo.py
Expand Down
2 changes: 1 addition & 1 deletion developer-workflow/lang-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The `Ideas Discourse category`_
is specifically intended for discussion of new features and language changes.
Please don't be disappointed if your idea isn't met with universal approval:
as the :pep:`long list of Withdrawn and Rejected PEPs
<0#abandoned-withdrawn-and-rejected-peps>`
<0#rejected-superseded-and-withdrawn-peps>`
in the :pep:`PEP Index <0>` attests,
and as befits a reasonably mature programming language,
getting significant changes into Python isn't a simple task.
Expand Down
2 changes: 1 addition & 1 deletion getting-started/git-boot-camp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ example, backports to other branches), so this features is only useful if
you know for sure that a single PR is enough to address and close the issue.

.. _bedevere: https://github.com/python/bedevere
.. _special keywords: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
.. _special keywords: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

Updating your CPython fork
--------------------------
Expand Down
2 changes: 1 addition & 1 deletion getting-started/setup-building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ itself. Git is easily available for all common operating systems.
or the `Git project instructions <https://git-scm.com>`_ for step-by-step
installation directions. You may also want to consider a graphical client
such as `TortoiseGit <https://tortoisegit.org/>`_ or
`GitHub Desktop <https://desktop.github.com/>`_.
`GitHub Desktop <https://github.com/apps/desktop>`_.

- **Configure**

Expand Down
2 changes: 1 addition & 1 deletion triage/issue-tracker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ reason either as ``complete`` or ``not planned``.
.. _Python Discourse: https://discuss.python.org/
.. _autolinks: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls
.. _checklists: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists
.. _duplicates: https://docs.github.com/en/issues/tracking-your-work-with-issues/marking-issues-or-pull-requests-as-a-duplicate
.. _duplicates: https://docs.github.com/en/issues/tracking-your-work-with-issues/administering-issues/marking-issues-or-pull-requests-as-a-duplicate
.. _Core Development Discourse category: https://discuss.python.org/c/core-dev/23
.. _old bug tracker: https://bugs.python.org/
5 changes: 3 additions & 2 deletions triage/labels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ to trigger specific bot behaviors.
by these labels.
See also :ref:`the status of the Python branches <branchstatus>` for a list
of branches and the type of PRs that can be backported to them.
* :gh-label:`skip issue`: for trivial changes (such as typo fixes, comment
* :gh-label:`skip issue <skip%20issue>`: for trivial changes (such as
typo fixes, comment
changes, and section rephrases) that don't require a corresponding issue.
* :gh-label:`skip news`: for PRs that don't need a NEWS entry.
* :gh-label:`skip news <skip%20news>`: for PRs that don't need a NEWS entry.
The :ref:`news-entry` section covers in details in which cases the NEWS entry
can be skipped.
* :gh-label:`test-with-buildbots`: used to test the latest commit with
Expand Down
Loading