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
| @@ -114,6 +115,10 @@ def __new__(cls, value, phrase, description=''): | |||
| 'Request Header Fields Too Large', | |||
| 'The server is unwilling to process the request because its header ' | |||
| 'fields are too large') | |||
| UNAVAILABLE_FOR_LEGAL_REASONS = (451, | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please add this constant to list of tested constants like the previously added constant MISDIRECTED_REQUEST : https://github.com/python/cpython/pull/2589/files#diff-4334c6b7e8fcfc88f2555f65fa7ab337R1358
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done.
| @@ -106,6 +106,7 @@ Code Enum Name Details | |||
| ``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`` Status Code to Report Legal Obstacles :rfc:`7725` | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you should change it to the title of the rfc for consistency?
| ``451`` ``UNAVAILABLE_FOR_LEGAL_REASONS`` Status Code to Report Legal Obstacles :rfc:`7725` | |
| ``451`` ``UNAVAILABLE_FOR_LEGAL_REASONS`` An HTTP Status Code to Report Legal Obstacles :rfc:`7725` |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Okay.
| @@ -126,3 +127,6 @@ equal to the constant name (i.e. ``http.HTTPStatus.OK`` is also available as | |||
|
|
|||
| .. versionchanged:: 3.7 | |||
| Added ``421 MISDIRECTED_REQUEST`` status code. | |||
|
|
|||
| .. versionadded:: 3.8 | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Should this be:
| .. versionadded:: 3.8 | |
| .. versionadded:: 3.9 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm backporting this to 3.8
| @@ -15,6 +15,7 @@ class HTTPStatus(IntEnum): | |||
| * RFC 7238: Permanent Redirect | |||
| * RFC 2295: Transparent Content Negotiation in HTTP | |||
| * RFC 2774: An HTTP Extension Framework | |||
| * RFC 7725: Status Code to Report Legal Obstacles | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| * RFC 7725: Status Code to Report Legal Obstacles | |
| * RFC 7725: An HTTP Status Code to Report Legal Obstacles |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Okay
|
Thanks @rhettinger for the PR |
|
Sorry @rhettinger, I had trouble checking out the |
|
Thanks @rhettinger for the PR |
|
GH-15436 is a backport of this pull request to the 3.8 branch. |
(cherry picked from commit 8f080b0) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Previously given LGTM by R David Murray on 5/29/2016
https://bugs.python.org/issue26589