gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled#152871
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
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?
skirpichev
requested changes
Jul 3, 2026
skirpichev
left a comment
Member
There was a problem hiding this comment.
Yes, please add a simple test.
Contributor
Author
|
Sure, I have added a simple precision test.
|
skirpichev
approved these changes
Jul 3, 2026
sobolevn
approved these changes
Jul 3, 2026
|
GH-152937 is a backport of this pull request to the 3.15 branch. |
sobolevn
pushed a commit
that referenced
this pull request
Jul 3, 2026
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