[fix] Crash when parsing an empty arbitrary expression with extract_node#2736
Merged
Pierre-Sassoulas merged 2 commits intomainfrom May 12, 2025
Merged
Conversation
__() (the transient function without args)
DanielNoord
previously approved these changes
May 12, 2025
Collaborator
DanielNoord
left a comment
There was a problem hiding this comment.
If CI approves I approve as well :)
Member
Author
|
Do you understand the transient function though ? 😄 |
Collaborator
|
See b8dc84f It seems to be a very bespoke way to do extraction of nodes in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2736 +/- ##
=======================================
Coverage 93.21% 93.21%
=======================================
Files 93 93
Lines 11072 11072
=======================================
Hits 10321 10321
Misses 751 751
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Member
Author
|
Ha, thank you, here's the doc: I'm going to update the changelog then. Learned something today. |
Collaborator
Don't we all when we look at |
__() (the transient function without args)extract_node
extract_nodeextract_node
Member
Author
DanielNoord
approved these changes
May 12, 2025
Pierre-Sassoulas
added a commit
that referenced
this pull request
May 12, 2025
Pierre-Sassoulas
added a commit
that referenced
this pull request
Jul 13, 2025
* [fix] Crash when parsing an empty arbitrary expression with ``extract_node`` (#2736) (#2737) Closes #2734 (cherry picked from commit 59f36e7) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> * [fix] Prevent crash on slice decorator for 'six' decorated function (#2738) (#2740) Closes #2721 (cherry picked from commit 555a128) Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> * [Backport maintenance/3.3.x] Initial fixes for Python 3.14 (#2747) (#2748) (cherry picked from commit 43111bb) * Improve backport job permissions (#2750) (cherry picked from commit fe5bb6c) * Use custom Github App to authenticate backport job (#2751) (#2752) (cherry picked from commit a6f8d6a) Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> * Include subclasses of standard property classes as property decorators (#2735) * Include subclasses of standard property types as property decorators * Modify astroid.bases and tests.test_nodes to reflect that enum.property was added in Python 3.11, not 3.10 * Apply suggestions from code review Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> --------- Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> (cherry picked from commit 30128b7) * Bump astroid to 3.3.11, update changelog (#2777) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: pylint-backport-bot[bot] <212256041+pylint-backport-bot[bot]@users.noreply.github.com> Co-authored-by: Mitch Harding <mitchell.harding@hpe.com>
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
To be fair I'm not exactly sure of what the transient function is. It seems internal. But the fix seems self evident.
astroid/astroid/builder.py
Lines 32 to 35 in 3636bc2
astroid/astroid/builder.py
Lines 303 to 315 in 3636bc2
astroid/astroid/builder.py
Lines 324 to 328 in 3636bc2
Closes #2734