Skip to content

Build zstd and uuid modules for Python 3.14 and 3.15 - #412

Closed
edenhaus wants to merge 1 commit into
edenhaus/py-3.15from
edenhaus/optimize-python
Closed

edenhaus wants to merge 1 commit into
edenhaus/py-3.15from
edenhaus/optimize-python

Conversation

@edenhaus

Copy link
Copy Markdown
Member

Summary

Improve the Python 3.14 and 3.15 Dockerfiles:

  • Add zstd-dev. Without it the compression.zstd module (new in 3.14) wasn't built.
  • Add util-linux-dev. This builds the _uuid C module, which uuid uses when available.
  • Remove libnsl-dev and libtirpc-dev. They were only needed for the nis module, which was removed in Python 3.13.
  • Also delete idlelib/idle_test when removing test folders.

After this change, the 3.14 and 3.15 Dockerfiles differ only in PYTHON_VERSION.

Testing

Built locally for arm64 on Alpine 3.24:

Image Python Size (disk / content)
3.14 3.14.10 204 MB / 47.6 MB
3.15 3.15.2 211 MB / 49.1 MB
  • Both images import compression.zstd, _uuid, ssl, sqlite3, decimal and ctypes.
  • pip 26.2.2 works in both, and idle_test is gone.
  • amd64 and Alpine 3.22/3.23 will be checked by CI.

- Add zstd-dev so the compression.zstd module is built
- Add util-linux-dev so the _uuid C module is built
- Remove libnsl-dev and libtirpc-dev, only needed for the nis module removed in Python 3.13
- Also remove idlelib/idle_test with the other test folders

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edenhaus
edenhaus added this pull request to stack #413 October 26, 2026 22:13
@agners

agners commented Oct 26, 2026

Copy link
Copy Markdown
Member

Ouch, that is bad! We actually dropped the backports in Supervisor (home-assistant/supervisor#6586) under the assumption that Python would ship it 😬 .

I'd prefer if we could swap the stack: Ship these fixes for Python 3.14 now, and then have the Python 3.15 bump PR depend on this PR.

@edenhaus

Copy link
Copy Markdown
Member Author

Will create a PR for 3.14 from main, so we can ship it

@edenhaus edenhaus closed this Oct 27, 2026
@edenhaus
edenhaus removed this pull request from stack #413 October 27, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants