Skip to content

PEP role: Include trailing slash in URL to avoid 301 redirect#10288

Merged
tk0miya merged 2 commits intosphinx-doc:4.xfrom
hugovk:update-pep-role-url
Mar 24, 2022
Merged

PEP role: Include trailing slash in URL to avoid 301 redirect#10288
tk0miya merged 2 commits intosphinx-doc:4.xfrom
hugovk:update-pep-role-url

Conversation

@hugovk
Copy link
Copy Markdown
Contributor

@hugovk hugovk commented Mar 24, 2022

Subject: PEP role: Include trailing / in URL to avoid 301 redirect

Feature or Bugfix

  • Feature

Purpose

  • Link :pep:8 to https://peps.python.org/pep-0008/ instead of https://peps.python.org/pep-0008

Detail

  • Without the trailing /, there's an HTTP 301 redirect to add the slash, which adds a small but unnecessary delay

Without trailing /, the 301 may take between 20ms and 335ms (caching off)

image

image

image

With the trailing /, that request is skipped

image

image

image

  • Also update docs and docstrings to use the new form.

Relates

@tk0miya tk0miya added this to the 4.5.0 milestone Mar 24, 2022
@tk0miya tk0miya merged commit 40a8f2b into sphinx-doc:4.x Mar 24, 2022
@tk0miya
Copy link
Copy Markdown
Member

tk0miya commented Mar 24, 2022

Thanks!

@hugovk hugovk deleted the update-pep-role-url branch March 24, 2022 14:19
chrisjsewell pushed a commit to executablebooks/MyST-Parser that referenced this pull request Apr 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants