Python 3.15.0 on Ubuntu is missing the C _decimal module

Abierto
#1,376 1 comentario 1 reacción 1 asignado Ver en GitHub

@v-gowridurgad ya está trabajando en esto.

Desde el 21/10/2026.

  • #418 de @austinmatherne-wk — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
2.3k
Forks
752
Merge medio
22 d 15 h
PR fusionados (30 d)
1

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de actions/setup-python

Todos los issues de actions/setup-python

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.