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
gh-95149: Enhance http.HTTPStatus
with properties that indicate the HTTP status category
#95453
Conversation
…te the HTTP status category
Lib/test/test_httplib.py
Outdated
((500, 599), "is_server_error"), | ||
) | ||
for member in HTTPStatus.__members__.values(): | ||
for category in categories: |
There was a problem hiding this comment.
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]
.
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
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 |
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Thanks! What should I do about the news thing, and the note about the version? (i.e. "New in version X.Y: ...") |
I have made the requested changes; please review again |
Thanks for making the requested changes! @ethanfurman: please review the changes made to this pull request. |
The "New in" should go in the docs (`Docs/library/http.rst'). The news entry is easist done with the web-based Once those two things are done we can merge. :) |
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 |
@ethanfurman I will take care of the PR this weekend. |
I have made the requested changes; please review again |
Thanks for making the requested changes! @ethanfurman: please review the changes made to this pull request. |
@ethanfurman are you still interested in this? |
Ack, sorry. This will be in 3.12 now. :-( |
Sure. Shouldn't we update the docs then? |
Yes, please do. |
@ethanfurman see #96508 |
http.HTTPStatus
withis_*
properties that indicate the HTTP status category #95149