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

[3.10] gh-95789: update documentation RFC base URL #95800

Merged
merged 2 commits into from
Aug 12, 2022

Conversation

JulianMaurin
Copy link

@JulianMaurin JulianMaurin commented Aug 8, 2022

I did not find any way to override docutils default settings through sphinx so I had to create this configuration file.

Tested locally ✔️

The issue is also impacting python 3.7, 3.8 and 3.9. So I guess I've to create the exact same PR targeting another branch, may you confirm, please?

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Aug 8, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@JulianMaurin JulianMaurin force-pushed the pythongh-95789-doc-rfc-base-url branch from 8173254 to 947dd76 Compare August 8, 2022 19:01
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@hugovk
Copy link
Member

hugovk commented Aug 8, 2022

Rather than putting this in a new Doc/docutils.conf file, can we put rfc_base_url = 'https://datatracker.ietf.org/doc/html/' in the existing conf.py?


The issue is also impacting python 3.7, 3.8 and 3.9. So I guess I've to create the exact same PR targeting another branch, may you confirm, please?

As you noted at #95789 (comment), the redirects are fixed now on the IETF side, so it's less pressing to get this backported to the security-only branches. Let's ask 3.8/3.9 release manager @ambv.

@JulianMaurin
Copy link
Author

Rather than putting this in a new Doc/docutils.conf file, can we put rfc_base_url = 'https://datatracker.ietf.org/doc/html/' in the existing conf.py?

That was my first intention. But actually conf.py is the configuration of sphinx.
In our case, the rfc_base_url is a docutils configuration (which is a dependency of sphinx).

I had a look at sphinx source code and the sphinx configuration is handled independently from the one of docutils.

@hugovk
Copy link
Member

hugovk commented Aug 9, 2022

There's a rfc_base_url in both docutils and Sphinx.

We're overriding this setting in Sphinx:

    'rfc_base_url': 'https://datatracker.ietf.org/doc/html/',

https://github.com/sphinx-doc/sphinx/blob/f45dc5e1398f7850e23003cac200ad3433da2a78/sphinx/environment/__init__.py#L47

To test, I modified that line directly in Sphinx and rebuilt the docs, and it used that modified one.

@JulianMaurin
Copy link
Author

@hugovk ,

Yes, it's exactly the link I refer in my last message.
I invite you to test, putting rfc_base_url in the conf.py. Rebuilding the documentation you will see that there is no impact.

(cf. https://www.sphinx-doc.org/en/master/usage/configuration.html)

@hugovk
Copy link
Member

hugovk commented Aug 9, 2022

Ah yes, thanks!

Please could you prefix the title of this PR with "[3.10] " and add a news entry?

@JulianMaurin JulianMaurin changed the title pythongh-95789: update documentation RFC base URL [3.10] pythongh-95789: update documentation RFC base URL Aug 9, 2022
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ambv ambv changed the title [3.10] pythongh-95789: update documentation RFC base URL [3.10] gh-95789: update documentation RFC base URL Aug 12, 2022
@ambv ambv merged commit 345daea into python:3.10 Aug 12, 2022
CAM-Gerlach added a commit to CAM-Gerlach/cpython that referenced this pull request Oct 16, 2022
gpshead pushed a commit that referenced this pull request Oct 17, 2022
…main (#98344)

Add int/str security change from issue gh-95778 PRs gh-96499 / gh-95800

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants