Skip to content

gh-135615: Rephrase HTTP status codes overview #135625

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sharktide
Copy link
Contributor

@sharktide sharktide commented Jun 17, 2025

The HTTP module supports status codes that are unregistered/unofficial. Take http status code 418: I'm a teapot Due to the save418 movement (https://save418.com/), python decided to preserve http code 418 in its codebase, but the documentation contradicts itself.

In the documentation, right above the table of status codes supported by the http library we have this:

Supported, IANA-registered status codes available in http.HTTPStatus are:

This is factually incorrect, because code 418, (among others) is not official, and this PR lists 418 as an exception

Fix #135615


📚 Documentation preview 📚: https://cpython-previews--135625.org.readthedocs.build/

Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

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

Better to note that 418 is an exception than to remove this useful reference.

A

@bedevere-app
Copy link

bedevere-app bot commented Jun 17, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@sharktide
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Jun 18, 2025

Thanks for making the requested changes!

@AA-Turner: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from AA-Turner June 18, 2025 04:09
@sharktide
Copy link
Contributor Author

Gentle ping

@AA-Turner AA-Turner changed the title gh-135615 Fix incorrect heading outlining http status codes, specifically 418 gh-135615: Rephrase HTTP status codes overview Jul 30, 2025
Copy link
Member

@AA-Turner AA-Turner 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 for the reminder.

Revisiting the substance of this change, I'm on the fence. The website lists 418 as "418 (Unused) [RFC9110, Section 15.5.19]". This contrasts to other ranges, which are listed as "Unassigned". The RFC goes on to note that "the 418 status code is reserved in the IANA HTTP Status Code Registry".

If we do go ahead with this change, I've suggested a rewording that I hope clarifies matters.

A

@bedevere-app
Copy link

bedevere-app bot commented Jul 30, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@sharktide
Copy link
Contributor Author

Oops typo in commit msg

@sharktide
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Jul 30, 2025

Thanks for making the requested changes!

@AA-Turner: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from AA-Turner July 30, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

HTTP modules documentation displays a list of both unsupported http and supported codes, contrary to caption.
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy