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

gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled by weixlu · Pull Request #152871 · python/cpython · GitHub

Repository navigation

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

Merged
sobolevn merged 1 commit into
python:mainfrom
weixlu:decimal
Jul 3, 2026
Merged

sobolevn merged 1 commit into
python:mainfrom
weixlu:decimal

Conversation

weixlu commented Jul 2, 2026 •
edited by bedevere-app Bot
Loading

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.

This comment was marked as resolved.

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.

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

Can we test this under @requires_extra_functionality?

skirpichev 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.

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

Yes, please add a simple test.

weixlu commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Sure, I have added a simple precision test.

  • It pass on EXTRA_FUNCTIONALITY build
  • It skip on regular build with message test requires build with -DEXTRA_FUNCTIONALITY

skirpichev self-requested a review July 3, 2026 03:08
sobolevn added the needs backport to 3.15 bugs and security fixes label Jul 3, 2026
sobolevn merged commit c473953 into python:main Jul 3, 2026
60 checks passed

Copy link
Copy Markdown

Thanks @weixlu for the PR, and @sobolevn for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

bedevere-app Bot commented Jul 3, 2026

Copy link
Copy Markdown

GH-152937 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Jul 3, 2026
sobolevn pushed a commit that referenced this pull request Jul 3, 2026
…LITY enabled (GH-152871) (#152937)

gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled (GH-152871)
(cherry picked from commit c473953)

Co-authored-by: Xiaowei Lu <weixlu420302@gmail.com>
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL