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

:pep: directive generates redirected links #10253

Closed
arekfu opened this issue Mar 11, 2022 · 3 comments
Closed

:pep: directive generates redirected links #10253

arekfu opened this issue Mar 11, 2022 · 3 comments
Labels

Comments

@arekfu
Copy link

arekfu commented Mar 11, 2022

Describe the bug

The :pep: directive generates links to https://www.python.org/dev/peps/pep-$PEP, but the linkcheck builder warns that these URLs are now redirected to https://peps.python.org/pep-$PEP/.

How to Reproduce

$ python3 -m venv ./venv
$ source ./venv/bin/activate
$ pip install sphinx
$ git clone git@github.com:arekfu/sphinx-issue-pep.git && cd sphinx-issue-pep
$ sphinx-build -b linkcheck . _build
Running Sphinx v4.4.0
building [mo]: targets for 0 po files that are out of date
building [linkcheck]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index

(           index: line    4) redirect  https://www.python.org/dev/peps/pep-0008 - permanently to https://peps.python.org/pep-0008/
build succeeded.

Look for any errors in the above output or in _build/output.txt

Expected behavior

No linkcheck warning should be produced.

Your project

https://github.com/arekfu/sphinx-issue-pep

Screenshots

No response

OS

Linux Ubuntu 20.04

Python version

3.8.10

Sphinx version

4.4.0

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

@arekfu
Copy link
Author

arekfu commented Mar 11, 2022

I just realised this is probably a docutils bug, isn't it?

@arekfu
Copy link
Author

arekfu commented Mar 11, 2022

Link to the docutils bug report: here

@nijel
Copy link
Contributor

nijel commented Mar 16, 2022

The default value for this is hardcoded in Sphinx as well, #10267 should address this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants