You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compile error in decimal when EXTRA_FUNCTIONALITY enabled #152870
When building CPython with libmpdec, enabling the EXTRA_FUNCTIONALITY option fails to compile:
./Modules/_decimal/_decimal.c:6996:12: error: too few arguments to function '_decimal_Context__apply'
6996 | return _decimal_Context__apply(context, x);
| ^~~~~~~~~~~~~~~~~~~~~~~
The wrapper should call the implementation function directly: _decimal_Context__apply_impl(context, cls, x).
If acceptable, I plan to open a PR for this.
Hi, I looked into the EXTRA_FUNCTIONALITY flag a bit. You're right — it is not covered by CI, and has regressed several times, so dropping it altogether is quite reasonable.
That said, it guards a lot more than Context.apply — there's also MallocError and more (about 14 #ifdef blocks in total). So it's a fairly big task.
I'd prefer to keep #152871 focused on just the compile fix. If OK, we can leave this issue open for further discussion on removing the flag.
Activity
skirpichev commentedon Jul 2, 2026
I would prefer to drop EXTRA_FUNCTIONALITY flag.
pythongh-152870: Fix compile error with decimal when EXTRA_FUNCTIONAL…
pythongh-152870: Fix compile error with decimal when EXTRA_FUNCTIONAL…
weixlu commentedon Jul 3, 2026
Hi, I looked into the
EXTRA_FUNCTIONALITYflag a bit. You're right — it is not covered by CI, and has regressed several times, so dropping it altogether is quite reasonable.That said, it guards a lot more than
Context.apply— there's alsoMallocErrorand more (about 14#ifdefblocks in total). So it's a fairly big task.I'd prefer to keep #152871 focused on just the compile fix. If OK, we can leave this issue open for further discussion on removing the flag.
pythongh-152870: Fix compile error with decimal when EXTRA_FUNCTIONAL…
gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY en…
skirpichev commentedon Jul 3, 2026
Fair enough. Here a new issue: #152939
[3.15] gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONA…
weixlu commentedon Jul 3, 2026
Sure, then let me close this issue as complete
skirpichev commentedon Jul 3, 2026
Thanks for the fix!