Upgrade astroid to 4.3.0 - #11234
Draft
Pierre-Sassoulas wants to merge 2 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11234 +/- ##
==========================================
- Coverage 96.35% 96.34% -0.01%
==========================================
Files 178 178
Lines 19932 19932
==========================================
- Hits 19205 19204 -1
- Misses 727 728 +1 🚀 New features to boost your workflow:
|
Add regression tests and changelog fragments for the issues fixed by the astroid 4.2/4.3 line.
On Windows the platform guard is False and no-member is still emitted for names used inside comprehensions in the unreachable branch. The linux-only verification was vacuous because the branch was reachable there. Reproduced on linux with a win32 guard and os.startfile.
Pierre-Sassoulas
force-pushed
the
upgrade-astroid-4.3.0
branch
from
August 8, 2026 09:34
8f5c1e6 to
f1b8366
Compare
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Changes
Description
Upgrade astroid to 4.3.0 and add regression tests plus changelog fragments for the pylint issues fixed by the astroid 4.2/4.3 line.
Fixed in astroid 4.3.0 (verified with new regression tests):
namedtuplewhose field name changes under NFKC normalizationpylint: disableat the start of anelseblock now works (block_rangeconsiderselseits own block)AstroidBuildingError) when inheriting from a generic dataclass rebinding__init__in__init_subclass__Fixed earlier in the astroid 4.2/4.3 line, verified fixed now and covered by new regression tests:
no-name-in-modulewith a module alias shadowing its base module and a call to.format()unnecessary-lambdawith**kwargsfrom an if-else expressionunused-variablefor the dataclass_HAS_DEFAULT_FACTORYsentinelinvalid-nameforTypeAliasaliases inTYPE_CHECKINGblocksVerified fixed but not covered by a regression test (need third-party packages or multi-module setups):
unexpected-keyword-argumentfornumpy.concatenate(..., dtype=...)(numpy not installed on CI)invalid-enum-extensionfor member-less enums from another modulesyntax-errorfor badly placed type annotations / multi-line type commentsStill not fixed with astroid 4.3.0 (checked, left open): #7688, #9259, #4944, #4908, #10460, #11115, #10471, #9622, #4018, #1480, #436, #7820, #8072, #5321, #9989, #10238, #4920, #7240.
#7240 (
no-memberinside comprehensions in platform-guarded branches) initially looked fixed, but the Windows CI jobs proved otherwise: the false positive is only observable when the guarded branch is unreachable on the running platform, so the linux-only check was vacuous. Its regression test and fragment were removed again.Closes #872
Closes #3556
Closes #3757
Closes #6887
Closes #7647
Closes #8746
Closes #9258
Closes #10193
Closes #10519
Closes #10548
Closes #11013