Skip to content

gh-95149: Enhance http.HTTPStatus with properties that indicate the HTTP status category #95453

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

Merged
merged 5 commits into from
Aug 30, 2022
Merged

gh-95149: Enhance http.HTTPStatus with properties that indicate the HTTP status category #95453

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

Choose a reason for hiding this comment

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

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

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

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

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

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

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 July 30, 2022 04:59
@ethanfurman
Copy link
Member

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

Choose a reason for hiding this comment

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

Update docs and add news entry.

@bedevere-bot
Copy link

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

Thanks for making the requested changes!

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

@alexei
Copy link
Contributor Author

alexei commented Aug 30, 2022

@ethanfurman are you still interested in this?

@ethanfurman
Copy link
Member

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

Yes, please do.

@alexei
Copy link
Contributor Author

alexei commented Sep 2, 2022

@ethanfurman see #96508

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.

3 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