Skip to content

Conversation

@hofrob
Copy link
Contributor

@hofrob hofrob commented Sep 29, 2025

Type of Changes

Type
🔨 Refactoring

Description

This has been reported in the pylint repo. Http status code names have changed via RFC9110 which was added to python in 3.13:

Changed in version 3.13: Implemented RFC9110 naming for status constants. Old constant names are preserved for backwards compatibility.

closes pylint-dev/pylint#8859

I'm aware of the comment by @jacobtylerwalls

Thanks for the report.

Tentatively assigning to me, as I'd like to see if we can remove the HTTP brain entirely by just adding support for @_simple_enum instead.

But I think doing this mini PR does not hurt, even though it might get replaced. I'd say, if the rewrite just takes a month or two, ignore this PR! What do you think?

@jacobtylerwalls
Copy link
Member

Sounds good, didn't make it very far with the plan to add support for @simple_enum myself.

Refs pylint-dev/pylint#8859

I know @Pierre-Sassoulas has been encouraging us to leave pylint tickets open until test cases are added, but here I don't think we need one (don't need to retest low-level astroid inference).

@hofrob
Copy link
Contributor Author

hofrob commented Sep 29, 2025

Refs pylint-dev/pylint#8859

I know @Pierre-Sassoulas has been encouraging us to leave pylint tickets open until test cases are added, but here I don't think we need one (don't need to retest low-level astroid inference).

Got it! I changed it to close the pylint ticket.

@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (61aa567) to head (d6e676b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2839   +/-   ##
=======================================
  Coverage   93.37%   93.37%           
=======================================
  Files          92       92           
  Lines       11148    11148           
=======================================
  Hits        10409    10409           
  Misses        739      739           
Flag Coverage Δ
linux 93.23% <ø> (ø)
pypy 93.37% <ø> (ø)
windows 93.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
astroid/brain/brain_http.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jacobtylerwalls jacobtylerwalls merged commit 3593863 into pylint-dev:main Sep 29, 2025
19 checks passed
@hofrob hofrob deleted the fix-httpstatus-add-rfc9110-constants branch September 29, 2025 12:46
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.

False positive no-member on http.HTTPStatus

2 participants