Python 3.15.0 on Ubuntu is missing the C _decimal module

Aberta
#1,376 1 comentário 1 reação 1 responsável Ver no GitHub

@v-gowridurgad já está trabalhando nisso.

Desde 21/10/2026.

  • #418 de @austinmatherne-wk — aberto

Avaliação

Esta issue ainda não foi avaliada.

Descrição

bug

Description:

The Ubuntu builds of Python 3.15.0 don't include the C _decimal extension module. import _decimal fails, and decimal silently falls back to the pure Python. That fallback is much slower and can't handle numbers with more than 4300 digits. Python 3.14.8 on the same runners has _decimal.

The cause looks like the Ubuntu builder in actions/python-versions. ubuntu-python-builder.psm1 doesn't install libmpdec-dev. Up to 3.14, CPython's configure fell back to its bundled copy of libmpdec. In 3.15 it skips _decimal instead when it can't find the system library. Adding libmpdec-dev to the builder's package list and rebuilding 3.15.0 should fix it.

https://docs.python.org/3/whatsnew/3.15.html#build-changes

Removed implicit fallback to the bundled copy of the libmpdec library. Now this should be explicitly enabled with --with-system-libmpdec set to no or with --without-system-libmpdec. (Contributed by Sergey B Kirpichev in gh-115119.)

Action version:
actions/[email protected]

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
3.15.0

Repro steps:

runs-on: ubuntu-24.04
steps:
  - uses: actions/[email protected]
    with:
      python-version: '3.15.0'
  - run: python -c "import _decimal"

Expected behavior:
import _decimal succeeds, as it does on Python 3.14 and on the Windows build of 3.15.0.

Actual behavior:
ModuleNotFoundError: Standard library module _decimal was not found. Code that uses decimal runs on _pydecimal, and values over 4300 digits raise ValueError: Exceeds the limit (4300 digits) for integer string conversion.

Linguagem predominante
TypeScript
Estrelas
2.3k
Forks
752
Merge médio
22d 15h
PRs com merge (30d)
1

Preparar o ambiente

  • Sem Dockerfile nem arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de actions/setup-python

Todas as issues de actions/setup-python

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.