Python 3.14 introduces the compression.zstd module, adding Zstandard support to the standard library (PEP 784). The CPython implementation was adapted from the pyzstd codebase. As the maintainer of pyzstd, I was contacted by @emmatyping and contributed to this effort.
I believe the future of Zstandard in Python lies in the stdlib, with additional libraries offering extra functionality in pure Python (without the need for a C module). A shared codebase maintained by CPython core developers will mutualize the work (updates, security, performance, etc.), and benefit the entire community.
As a result, below is my personal plan of action:
- Help with PEP 784 and the integration of
pyzstd into stdlib ➡️ was done in the last few months.
- Backport the code from stdlib to support for Python versions before 3.14 ➡️
backports.zstd is available.
- Promote adoption of the stdlib and help with migration.
- Use stdlib in
pyzstd.
For pyzstd specifically, I am working on the following points:
- Update the readme and documentation to recommend the standard library for new users and provide a migration guide for existing users.
- Deprecate parts of the
pyzstd public API that cannot be reimplemented using the standard library.
- Refactor the
pyzstd codebase to use stdlib instead of C/CFFI bindings, making pyzstd a pure Python module.
This ticket will be used to gather feedback and track progress on the above plan.
Python 3.14 introduces the
compression.zstdmodule, adding Zstandard support to the standard library (PEP 784). The CPython implementation was adapted from thepyzstdcodebase. As the maintainer ofpyzstd, I was contacted by @emmatyping and contributed to this effort.I believe the future of Zstandard in Python lies in the stdlib, with additional libraries offering extra functionality in pure Python (without the need for a C module). A shared codebase maintained by CPython core developers will mutualize the work (updates, security, performance, etc.), and benefit the entire community.
As a result, below is my personal plan of action:
pyzstdinto stdlib ➡️ was done in the last few months.backports.zstdis available.pyzstd.For
pyzstdspecifically, I am working on the following points:pyzstdpublic API that cannot be reimplemented using the standard library.pyzstdcodebase to use stdlib instead of C/CFFI bindings, makingpyzstda pure Python module.This ticket will be used to gather feedback and track progress on the above plan.