Skip to content
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
53 changes: 42 additions & 11 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,55 @@
# Set to '' to prevent appending "documentation" to the site title
html_title = ""

linkcheck_allowed_redirects = {
# Edit page
r"https://docs.google.com/document/d/.*/": r"https://docs.google.com/document/d/.*/edit",
# Canonical
r"https://docs.python.org/": r"https://docs.python.org/3/",
# Translations with country codes
r"https://docs.python.org/[a-z-]+/": r"https://docs.python.org/[a-z-]+/3/",
# Personal /my/ links redirect to login page
r"https://discuss.python.org/my/.*": r"https://discuss.python.org/login-preferences",
# Login page
r"https://github.com/python/core-workflow/issues/new.*": r"https://github.com/login.*",
# Archive redirect
r"https://github.com/python/cpython/archive/main.zip": r"https://codeload.github.com/python/cpython/zip/refs/heads/main",
# Blob to tree
r"https://github.com/python/cpython/blob/.*": r"https://github.com/python/cpython/tree/.*",
# HackMD shortcuts
r"https://hackmd.io/s/.*": r"https://hackmd.io/@.*",
# Read the Docs
r"https://virtualenv.pypa.io/": r"https://virtualenv.pypa.io/en/latest/",
r"https://www.sphinx-doc.org/": r"https://www.sphinx-doc.org/en/master/",
# Cookie consent
r"https://www.youtube.com/playlist.*": r"https://consent.youtube.com/ml.*",
}

# ignore linkcheck anchors for /#/$ANCHOR since it is used for
# dynamic pages such as http://buildbot.python.org/all/#/console
# http://www.sphinx-doc.org/en/stable/config.html?highlight=linkcheck#confval-linkcheck_anchors_ignore
linkcheck_anchors_ignore = [
# match any anchor that starts with a '/' since this is an invalid HTML anchor
r'\/.*',
]

linkcheck_ignore = [
# The voters repo is private and appears as a 404
'https://github.com/python/voters/',
# The python-core team link is private, redirects to login
'https://github.com/orgs/python/teams/python-core',
# The Discourse groups are private unless you are logged in
'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',
# Discord doesn't allow robot crawlers: "403 Client Error: Forbidden"
r'https://support.discord.com/hc/en-us/articles/219070107-Server-Nicknames',
]

rediraffe_redirects = {
"clang.rst": "advanced-tools/clang.rst",
"coverity.rst": "advanced-tools/coverity.rst",
Expand Down Expand Up @@ -90,17 +132,6 @@
"triaging.rst": "triage/triaging.rst",
}

linkcheck_ignore = [
# The voters repo is private and appears as a 404
'https://github.com/python/voters/',
# The python-core team link is private, redirects to login
'https://github.com/orgs/python/teams/python-core',
# The Discourse groups are private unless you are logged in
'https://discuss.python.org/groups/staff',
'https://discuss.python.org/groups/moderators',
'https://discuss.python.org/groups/admins',
]

intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
}
Expand Down
2 changes: 1 addition & 1 deletion getting-started/pull-request-lifecycle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Here are the steps needed in order to sign the CLA:
.. _PSF license: https://docs.python.org/dev/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python
.. _contributor agreement: https://www.python.org/psf/contrib/
.. _contributor form: https://www.python.org/psf/contrib/contrib-form/
.. _Python Software Foundation: https://www.python.org/psf/
.. _Python Software Foundation: https://www.python.org/psf-landing/


Submitting
Expand Down