Python 3.11 loses the ability to set PYTHON_DECIMAL_WITH_MACHINE
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 36k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Bug report
Python 3.10 had the ability to set PYTHON_DECIMAL_WITH_MACHINE to override the choice of configuration for the _decimal module:
https://github.com/python/cpython/blob/dcb342b5f9d931b030ca310bf3e175bbc54df5aa/setup.py#L2388-L2397
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 setting PYTHON_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 system libmpdec was built.
Homebrew's Python currently depends on this feature.
A test within CPython also seems to depend on this feature: https://github.com/python/cpython/blob/f4c03484da59049eb62a9bf7777b963e2267d187/Modules/_decimal/tests/runall-memorydebugger.sh#L63-L79
Your environment
- CPython versions tested on: 3.11.0rc2
- Operating system and architecture: macOS 12 (x86_64 and arm64)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Confronta le righe di setup.py di Python 3.10 collegate nel report con la logica di build attuale per _decimal, quindi esamina Modules/_decimal/tests/runall-memorydebugger.sh per verificarne l’uso dell’impostazione. Conferma che l’override funzioni con --with-system-libmpdec sulle architetture macOS segnalate e che i controlli pertinenti di build e test vadano a buon fine.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- build-system
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100