Skip to content

bpo-30553: Add status code 421 (Misdirected Req.) to http.HTTPStatus#2589

Merged
berkerpeksag merged 4 commits into
python:masterfrom
vmsp:issue-30553
Oct 26, 2017
Merged

bpo-30553: Add status code 421 (Misdirected Req.) to http.HTTPStatus#2589
berkerpeksag merged 4 commits into
python:masterfrom
vmsp:issue-30553

Conversation

@vmsp

@vmsp vmsp commented Jul 5, 2017

Copy link
Copy Markdown
Contributor

Comment thread Lib/http/__init__.py Outdated
EXPECTATION_FAILED = (417, 'Expectation Failed',
'Expect condition could not be satisfied')
MISDIRECTED_REQUEST = (421, 'Misdirected Request',
'Server can not produce a response')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"cannot" should be one word (unless this is specified otherwise in the RFC)

Comment thread Doc/library/http.rst
``415`` ``UNSUPPORTED_MEDIA_TYPE`` HTTP/1.1 :rfc:`7231`, Section 6.5.13
``416`` ``REQUEST_RANGE_NOT_SATISFIABLE`` HTTP/1.1 Range Requests :rfc:`7233`, Section 4.4
``417`` ``EXPECTATION_FAILED`` HTTP/1.1 :rfc:`7231`, Section 6.5.14
``421`` ``MISDIRECTED_REQUEST`` HTTP/2 :rfc:`7540`, Section 9.1.2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you add

.. versionchanged:: 3.7
   Added ``421`` status code.

to the end of the file? You can adjust the "Added 421 status code." part if you want -- I just used it as an example :)

@@ -0,0 +1 @@
Add HTTP/2 status code 421 (Misdirected Request) to http.HTTPStatus.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add "Patch by Vitor Pereira.".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is this new? I sent a patch a couple of months ago and wasn't asked to do this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, it's not new. We always try to add contributor's name in the NEWS file. Our GitHub workflow is still new so it's normal to forget this step (or sometimes we skip it intentionally if the patch is trivial)

@@ -0,0 +1 @@
Add HTTP/2 status code 421 (Misdirected Request) to http.HTTPStatus.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

http.HTTPStatus -> :class:`http.HTTPStatus`

@bedevere-bot

Copy link
Copy Markdown

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.

@vmsp

vmsp commented Oct 26, 2017

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@berkerpeksag: please review the changes made to this pull request.

@berkerpeksag berkerpeksag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you!. I just made a small markup tweak and will merge it once Travis CI is happy.

@vmsp

vmsp commented Oct 26, 2017

Copy link
Copy Markdown
Contributor Author

Cheers!

@berkerpeksag berkerpeksag merged commit 52ad72d into python:master Oct 26, 2017
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.

5 participants