Skip to content

pyzstd and stdlib (PEP 784) #45

@Rogdham

Description

@Rogdham

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions