gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled#152871
Open
weixlu wants to merge 1 commit into
Open
gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled#152871weixlu wants to merge 1 commit into
weixlu wants to merge 1 commit into
Conversation
sobolevn
reviewed
Jul 2, 2026
sobolevn
left a comment
Member
There was a problem hiding this comment.
Can we test this under @requires_extra_functionality?
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.
As mentioned in #152870, there is compilation error about
EXTRA_FUNCTIONALITYRoot cause
The
Context.apply()wrapper (guarded by#ifdef EXTRA_FUNCTIONALITY) still calls_decimal_Context__apply()using its pre-Argument-Clinic signature. But since #73487 , the generated_decimal_Context__apply()is now aMETH_FASTCALLwrapper with the signature(context, cls, args, nargs, kwnames), so the old call no longer compiles.PR #142441 previously touched this line, but it fixed a typo, rather than the signature mismatch issue.
Test
After the fix, it builds correctly and the full
test_decimalsuite (including the C-only tests) passes.EXTRA_FUNCTIONALITYenabled #152870