FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-148083: Prevent constant folding when lhs is container types by corona10 · Pull Request #148090 · python/cpython · GitHub

Repository navigation

gh-148083: Prevent constant folding when lhs is container types - #148090

Merged
corona10 merged 2 commits into
python:mainfrom
corona10:gh-148083-fix
Apr 4, 2026
Merged

corona10 merged 2 commits into
python:mainfrom
corona10:gh-148083-fix

Conversation

corona10 commented Apr 4, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Comment thread Python/optimizer_symbols.c Outdated
}

bool
_Py_uop_sym_is_container(JitOptRef sym)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's better to make this an allowlist, so we should say sym_is_not_container and check for the usual int float str etc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Otherwise custom containers might be let through

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done :)

corona10 merged commit 853dafe into python:main Apr 4, 2026
72 of 73 checks passed
corona10 deleted the gh-148083-fix branch April 4, 2026 15:40
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL