Python 3.11 loses the ability to set PYTHON_DECIMAL_WITH_MACHINE
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 36k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
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)
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Compare as linhas de setup.py do Python 3.10 vinculadas no relatório com a lógica de build atual para _decimal e, em seguida, inspecione Modules/_decimal/tests/runall-memorydebugger.sh para verificar o uso da configuração. Confirme que o override funciona com --with-system-libmpdec nas arquiteturas macOS relatadas e que as verificações relevantes de build e teste passam.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- build-system
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100