chore(setup_helpers): remove dead cpp_flag_cache and fix parameter typo#6085
Open
henryiii wants to merge 1 commit into
Open
chore(setup_helpers): remove dead cpp_flag_cache and fix parameter typo#6085henryiii wants to merge 1 commit into
henryiii wants to merge 1 commit into
Conversation
Remove the module-level `cpp_flag_cache = None` variable and its stale comment "Every call will cache the result". The actual caching is handled by the `@lru_cache` decorator on `auto_cpp_level` directly below. Also rename the typo'd parameter `obg` to `obj` in `no_recompile`. Nothing passes this argument by keyword, so there is no API break. Part of pybind#6084 Assisted-by: ClaudeCode:claude-sonnet-4-6
5 tasks
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.
🤖 AI text below 🤖
Part of #6084
Summary
cpp_flag_cache = Noneand its stale comment# Every call will cache the result. The actual caching is already handled by the@lru_cachedecorator onauto_cpp_leveljust below it; the variable was never read anywhere in the codebase.obgtoobjinno_recompile(obg: str, src: str). Nothing passes this argument by keyword (it is only used as aneeds_recompilecallback passed positionally), so there is no API break.Test plan
grep -rn cpp_flag_cache— only the one definition, now removedgrep -rn "no_recompile\|obg"— no callers use keyword argumentobgprek -a --quietpasses cleanlyuv run --with setuptools python -c "import pybind11.setup_helpers"succeeds