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

gh-127089: Add missing description for codes in http.HTTPStatus #127100

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

Conversation

donBarbos
Copy link

@donBarbos donBarbos commented Nov 21, 2024

  1. Add missing description field for http status codes (I was inspired by the RFCs that were listed in ./Doc/library/http.rst for each status code)
    ======= =================================== ==================================================================
    Code Enum Name Details
    ======= =================================== ==================================================================
    ``100`` ``CONTINUE`` HTTP Semantics :rfc:`9110`, Section 15.2.1
    ``101`` ``SWITCHING_PROTOCOLS`` HTTP Semantics :rfc:`9110`, Section 15.2.2
    ``102`` ``PROCESSING`` WebDAV :rfc:`2518`, Section 10.1
    ``103`` ``EARLY_HINTS`` An HTTP Status Code for Indicating Hints :rfc:`8297`
    ``200`` ``OK`` HTTP Semantics :rfc:`9110`, Section 15.3.1
    ``201`` ``CREATED`` HTTP Semantics :rfc:`9110`, Section 15.3.2
    ``202`` ``ACCEPTED`` HTTP Semantics :rfc:`9110`, Section 15.3.3
    ``203`` ``NON_AUTHORITATIVE_INFORMATION`` HTTP Semantics :rfc:`9110`, Section 15.3.4
    ``204`` ``NO_CONTENT`` HTTP Semantics :rfc:`9110`, Section 15.3.5
    ``205`` ``RESET_CONTENT`` HTTP Semantics :rfc:`9110`, Section 15.3.6
    ``206`` ``PARTIAL_CONTENT`` HTTP Semantics :rfc:`9110`, Section 15.3.7
    ``207`` ``MULTI_STATUS`` WebDAV :rfc:`4918`, Section 11.1
    ``208`` ``ALREADY_REPORTED`` WebDAV Binding Extensions :rfc:`5842`, Section 7.1 (Experimental)
    ``226`` ``IM_USED`` Delta Encoding in HTTP :rfc:`3229`, Section 10.4.1
    ``300`` ``MULTIPLE_CHOICES`` HTTP Semantics :rfc:`9110`, Section 15.4.1
    ``301`` ``MOVED_PERMANENTLY`` HTTP Semantics :rfc:`9110`, Section 15.4.2
    ``302`` ``FOUND`` HTTP Semantics :rfc:`9110`, Section 15.4.3
    ``303`` ``SEE_OTHER`` HTTP Semantics :rfc:`9110`, Section 15.4.4
    ``304`` ``NOT_MODIFIED`` HTTP Semantics :rfc:`9110`, Section 15.4.5
    ``305`` ``USE_PROXY`` HTTP Semantics :rfc:`9110`, Section 15.4.6
    ``307`` ``TEMPORARY_REDIRECT`` HTTP Semantics :rfc:`9110`, Section 15.4.8
    ``308`` ``PERMANENT_REDIRECT`` HTTP Semantics :rfc:`9110`, Section 15.4.9
    ``400`` ``BAD_REQUEST`` HTTP Semantics :rfc:`9110`, Section 15.5.1
    ``401`` ``UNAUTHORIZED`` HTTP Semantics :rfc:`9110`, Section 15.5.2
    ``402`` ``PAYMENT_REQUIRED`` HTTP Semantics :rfc:`9110`, Section 15.5.3
    ``403`` ``FORBIDDEN`` HTTP Semantics :rfc:`9110`, Section 15.5.4
    ``404`` ``NOT_FOUND`` HTTP Semantics :rfc:`9110`, Section 15.5.5
    ``405`` ``METHOD_NOT_ALLOWED`` HTTP Semantics :rfc:`9110`, Section 15.5.6
    ``406`` ``NOT_ACCEPTABLE`` HTTP Semantics :rfc:`9110`, Section 15.5.7
    ``407`` ``PROXY_AUTHENTICATION_REQUIRED`` HTTP Semantics :rfc:`9110`, Section 15.5.8
    ``408`` ``REQUEST_TIMEOUT`` HTTP Semantics :rfc:`9110`, Section 15.5.9
    ``409`` ``CONFLICT`` HTTP Semantics :rfc:`9110`, Section 15.5.10
    ``410`` ``GONE`` HTTP Semantics :rfc:`9110`, Section 15.5.11
    ``411`` ``LENGTH_REQUIRED`` HTTP Semantics :rfc:`9110`, Section 15.5.12
    ``412`` ``PRECONDITION_FAILED`` HTTP Semantics :rfc:`9110`, Section 15.5.13
    ``413`` ``CONTENT_TOO_LARGE`` HTTP Semantics :rfc:`9110`, Section 15.5.14
    ``414`` ``URI_TOO_LONG`` HTTP Semantics :rfc:`9110`, Section 15.5.15
    ``415`` ``UNSUPPORTED_MEDIA_TYPE`` HTTP Semantics :rfc:`9110`, Section 15.5.16
    ``416`` ``RANGE_NOT_SATISFIABLE`` HTTP Semantics :rfc:`9110`, Section 15.5.17
    ``417`` ``EXPECTATION_FAILED`` HTTP Semantics :rfc:`9110`, Section 15.5.18
    ``418`` ``IM_A_TEAPOT`` HTCPCP/1.0 :rfc:`2324`, Section 2.3.2
    ``421`` ``MISDIRECTED_REQUEST`` HTTP Semantics :rfc:`9110`, Section 15.5.20
    ``422`` ``UNPROCESSABLE_CONTENT`` HTTP Semantics :rfc:`9110`, Section 15.5.21
    ``423`` ``LOCKED`` WebDAV :rfc:`4918`, Section 11.3
    ``424`` ``FAILED_DEPENDENCY`` WebDAV :rfc:`4918`, Section 11.4
    ``425`` ``TOO_EARLY`` Using Early Data in HTTP :rfc:`8470`
    ``426`` ``UPGRADE_REQUIRED`` HTTP Semantics :rfc:`9110`, Section 15.5.22
    ``428`` ``PRECONDITION_REQUIRED`` Additional HTTP Status Codes :rfc:`6585`
    ``429`` ``TOO_MANY_REQUESTS`` Additional HTTP Status Codes :rfc:`6585`
    ``431`` ``REQUEST_HEADER_FIELDS_TOO_LARGE`` Additional HTTP Status Codes :rfc:`6585`
    ``451`` ``UNAVAILABLE_FOR_LEGAL_REASONS`` An HTTP Status Code to Report Legal Obstacles :rfc:`7725`
    ``500`` ``INTERNAL_SERVER_ERROR`` HTTP Semantics :rfc:`9110`, Section 15.6.1
    ``501`` ``NOT_IMPLEMENTED`` HTTP Semantics :rfc:`9110`, Section 15.6.2
    ``502`` ``BAD_GATEWAY`` HTTP Semantics :rfc:`9110`, Section 15.6.3
    ``503`` ``SERVICE_UNAVAILABLE`` HTTP Semantics :rfc:`9110`, Section 15.6.4
    ``504`` ``GATEWAY_TIMEOUT`` HTTP Semantics :rfc:`9110`, Section 15.6.5
    ``505`` ``HTTP_VERSION_NOT_SUPPORTED`` HTTP Semantics :rfc:`9110`, Section 15.6.6
    ``506`` ``VARIANT_ALSO_NEGOTIATES`` Transparent Content Negotiation in HTTP :rfc:`2295`, Section 8.1 (Experimental)
    ``507`` ``INSUFFICIENT_STORAGE`` WebDAV :rfc:`4918`, Section 11.5
    ``508`` ``LOOP_DETECTED`` WebDAV Binding Extensions :rfc:`5842`, Section 7.2 (Experimental)
    ``510`` ``NOT_EXTENDED`` An HTTP Extension Framework :rfc:`2774`, Section 7 (Experimental)
    ``511`` ``NETWORK_AUTHENTICATION_REQUIRED`` Additional HTTP Status Codes :rfc:`6585`, Section 6
    ======= =================================== ==================================================================
  2. I also delete the period at the end of the sentence to describe 418 IM_A_TEAPOT (because this is the only place where for some reason there was a period in the description)

@bedevere-app
Copy link

bedevere-app bot commented Nov 21, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Nov 21, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@donBarbos
Copy link
Author

donBarbos commented Nov 21, 2024

@ethanfurman could you apply the skip news label? (I'm just not sure that it's needed here)

@bedevere-app
Copy link

bedevere-app bot commented Nov 22, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants