-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.11 loses the ability to set PYTHON_DECIMAL_WITH_MACHINE #98557
Comments
Cc. @rhettinger for |
FTR, this was removed in GH-29541 (cc. @tiran as PR author and @mdickinson as PR reviewer) |
What reads Lines 3882 to 3891 in 75a6fad
Unless you suggest that I instead pass |
Ah, sorry, you are right. I misread the diff from GH-29541; it is used as an index, not a CFLAG. |
Yes, it seems this ability is now lost; there is no way to manually override that |
You mentioned Homebrew? Does this prevent Homebrew from building and distributing Python 3.11? Is there a Homebrew ticket for this? |
From #98557 (comment):
Then from the OP:
I suggest you use ISTM we don't need a way to override the |
Not yet considering we don't ship betas, but what we'll probably do for 3.11.0 (and what I've done in a local test rc2 build) is a
It made sense and is what Stefan Krah recommended we did. Might I propose an alternative way forward here however. I propose looking into not setting any CFLAGS for the system libmpdec and checking FWIW, this is what the relevent section of mpdecimal.h looks like on a different configurations of system libmpdec: Universal
x64 and uint128
|
That sounds like a better way forward indeed. I've already pinged Christian on this issue; let's wait and see if he also agrees. |
It's been a while here. Can we find a way to move this forward? |
For 3.11? Unfortunately not; 3.11 only received security fixes. For 3.12 and newer, the environment variables See also #115119. |
Looks like #115406 might have fixed this by moving the assumptions into a For 3.11 and 3.12 it was previously unfixable without patching the |
Right, so my gut feel would be that a backport of #115406 probably won't happen; such changes to the |
Bug report
Python 3.10 had the ability to set
PYTHON_DECIMAL_WITH_MACHINE
to override the choice of configuration for the_decimal
module:cpython/setup.py
Lines 2388 to 2397 in dcb342b
Since Python 3.11, this is no longer possible. This feature was necessary, on macOS particularly, with the
--with-system-libmpdec
option if that system libmpdec is configured differently to the default Python config. On macOS, the default Python config forces universal, while settingPYTHON_DECIMAL_WITH_MACHINE
allowed it to be single-arch.libmpdec
produces different headers depending on how it was built, which is why the setting is important to be able to override. Without it, the_decimal
module will fail to compile if the default does not match how systemlibmpdec
was built.Homebrew's Python currently depends on this feature.
A test within CPython also seems to depend on this feature:
cpython/Modules/_decimal/tests/runall-memorydebugger.sh
Lines 63 to 79 in f4c0348
Your environment
The text was updated successfully, but these errors were encountered: