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-95149: Enhance http.HTTPStatus with properties that indicate the HTTP status category #95453

Merged
merged 5 commits into from Aug 30, 2022

Conversation

alexei
Copy link
Contributor

@alexei alexei commented Jul 29, 2022

Copy link
Member

@ethanfurman ethanfurman left a comment

One smallish change and this should be good to go!

((500, 599), "is_server_error"),
)
for member in HTTPStatus.__members__.values():
for category in categories:
Copy link
Member

@ethanfurman ethanfurman Jul 29, 2022

Choose a reason for hiding this comment

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

for (lower, upper), category in categories:

then use lower instead of category[0][0], upper instead of category[0][1], and category instead of category[1].

Copy link
Contributor Author

@alexei alexei Jul 30, 2022

Choose a reason for hiding this comment

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

Good point, see 6b8dfc4

@@ -1887,7 +1887,7 @@ def _test_simple_enum(checked_enum, simple_enum):
else:
checked_value = checked_dict[key]
simple_value = simple_dict[key]
if callable(checked_value):
if callable(checked_value) or isinstance(checked_value, bltns.property):
Copy link
Member

@ethanfurman ethanfurman Jul 29, 2022

Choose a reason for hiding this comment

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

Thank you.

@bedevere-bot
Copy link

bedevere-bot commented Jul 29, 2022

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: Ethan Furman <ethan@stoneleaf.us>
@alexei
Copy link
Contributor Author

alexei commented Jul 30, 2022

One smallish change and this should be good to go!

Thanks! What should I do about the news thing, and the note about the version? (i.e. "New in version X.Y: ...")

@alexei
Copy link
Contributor Author

alexei commented Jul 30, 2022

I have made the requested changes; please review again

@bedevere-bot
Copy link

bedevere-bot commented Jul 30, 2022

Thanks for making the requested changes!

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

@bedevere-bot bedevere-bot requested a review from ethanfurman Jul 30, 2022
@ethanfurman
Copy link
Member

ethanfurman commented Aug 1, 2022

What should I do about the news thing, and the note about the version? (i.e. "New in version X.Y: ...")

The "New in" should go in the docs (`Docs/library/http.rst').

The news entry is easist done with the web-based blurb (https://github.com/apps/blurb-it/installations/new).

Once those two things are done we can merge. :)

Copy link
Member

@ethanfurman ethanfurman left a comment

Update docs and add news entry.

@bedevere-bot
Copy link

bedevere-bot commented Aug 1, 2022

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.

@alexei
Copy link
Contributor Author

alexei commented Aug 4, 2022

@ethanfurman I will take care of the PR this weekend.

@alexei
Copy link
Contributor Author

alexei commented Aug 7, 2022

I have made the requested changes; please review again

@bedevere-bot
Copy link

bedevere-bot commented Aug 7, 2022

Thanks for making the requested changes!

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

@bedevere-bot bedevere-bot requested a review from ethanfurman Aug 7, 2022
@alexei
Copy link
Contributor Author

alexei commented Aug 30, 2022

@ethanfurman are you still interested in this?

@ethanfurman ethanfurman merged commit 0ed7788 into python:main Aug 30, 2022
14 checks passed
@ethanfurman
Copy link
Member

ethanfurman commented Aug 30, 2022

Ack, sorry. This will be in 3.12 now. :-(

@alexei
Copy link
Contributor Author

alexei commented Aug 31, 2022

Ack, sorry. This will be in 3.12 now. :-(

Sure. Shouldn't we update the docs then?

@ethanfurman
Copy link
Member

ethanfurman commented Aug 31, 2022

Yes, please do.

@alexei
Copy link
Contributor Author

alexei commented Sep 2, 2022

@ethanfurman see #96508

@alexei alexei deleted the feat-gh-95149-http_status_category branch Sep 2, 2022
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.

None yet

3 participants