The compression.zstd docs page and 3.14 what's new changelog entry neglect to mention that compression.zstd is an optional build time dependency. The import will fail when cpython is built without libzstd:
import compression.zstd # noqa: I900
^^^^^^^^^^^^^^^^^^^^^^^
/opt/python/3.14/lib/python3.14/compression/zstd/__init__.py:29: in <module>
import _zstd
E ModuleNotFoundError: No module named '_zstd'
Documentation
The compression.zstd docs page and 3.14 what's new changelog entry neglect to mention that compression.zstd is an optional build time dependency. The import will fail when cpython is built without libzstd:
https://docs.python.org/3/library/compression.zstd.html#module-compression.zstd
Linked PRs
ModuleNotFoundErrormessage for missing stdlib modules #140219winreg,msvcrtandwinsoundmodule availability in docs #140429winreg,msvcrtandwinsoundmodule availability in docs (GH-140429) #141351winreg,msvcrtandwinsoundmodule availability in docs (GH-140429) #141350