Skip to content

gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled#152871

Open
weixlu wants to merge 1 commit into
python:mainfrom
weixlu:decimal
Open

gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled#152871
weixlu wants to merge 1 commit into
python:mainfrom
weixlu:decimal

Conversation

@weixlu

@weixlu weixlu commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

As mentioned in #152870, there is compilation error about EXTRA_FUNCTIONALITY

Root 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 a METH_FASTCALL wrapper 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_decimal suite (including the C-only tests) passes.

@python-cla-bot

python-cla-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@sobolevn sobolevn left a comment

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.

Can we test this under @requires_extra_functionality?

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