Skip to content

Add "libmpdec" to build deps on 3.15+ - #1137

Open
tianon wants to merge 1 commit into
docker-library:masterfrom
infosiftr:_decimal
Open

tianon wants to merge 1 commit into
docker-library:masterfrom
infosiftr:_decimal

Conversation

@tianon

@tianon tianon commented Oct 14, 2026

Copy link
Copy Markdown
Member

This unlocks the _decimal fast-path for the decimal stdlib module, making Decimal arithmetic ~16x faster (or rather, avoiding a 16x slowdown regression compared to 3.14 and below).

This unlocks the `_decimal` fast-path for the `decimal` stdlib module, making Decimal arithmetic ~16x faster (or rather, avoiding a 16x slowdown regression compared to 3.14 and below).
@yosifkit

yosifkit commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

That's strange. libmpdec-dev (and the whole source package) exists in Trixie (stable) and Bullseye (oldoldstable) but not Bookworm (oldstable) (https://packages.debian.org/trixie/libmpdec-dev).

https://packages.debian.org/search?suite=bookworm&searchon=contents&keywords=libmpdec.so

@yosifkit

yosifkit commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

I think we need a few changes, and which we choose for 3.16 could alter the test changes.

  • for 3.15: add --without-system-libmpdec to bookworm
    • it is still included, just not used by default
  • for 3.16: either drop bookworm or just leave it as slow 🤷

@yosifkit

Copy link
Copy Markdown
Member

Ah, it was dropped in Bookworm because it had nothing depending on it: https://bugs.debian.org/1056785. Apparently, python was the last package that did. ♻️😆

Please remove mpdecimal, cypthon now using the library included in the
cpython source. There are no other users in the archive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.15 images ship without _decimal (missing libmpdec-dev)

2 participants