Skip to content

gh-132983: Add documentation for compression.zstd #133911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Doc/library/archiving.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ Data Compression and Archiving
******************************

The modules described in this chapter support data compression with the zlib,
gzip, bzip2 and lzma algorithms, and the creation of ZIP- and tar-format
gzip, bzip2, zstd, and lzma algorithms, and the creation of ZIP- and tar-format
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New algorithm at the end?

Suggested change
gzip, bzip2, zstd, and lzma algorithms, and the creation of ZIP- and tar-format
gzip, bzip2, lzma, and zstd algorithms, and the creation of ZIP- and tar-format

archives. See also :ref:`archiving-operations` provided by the :mod:`shutil`
module.


.. toctree::

compression.rst
compression.zstd.rst
zlib.rst
gzip.rst
bz2.rst
Expand Down
25 changes: 25 additions & 0 deletions Doc/library/compression.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
The :mod:`!compression` package
=================================
Comment on lines +1 to +2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The :mod:`!compression` package
=================================
The :mod:`!compression` package
===============================


.. versionadded:: 3.14

.. note::

Several modules in :mod:`!compression` re-export modules that currently
exist at the repository top-level. These re-exported modules are the new
canonical import name for the respective top-level module. The existing
modules are not currently deprecated and will not be removed prior to Python
3.19, but users are encouraged to migrate to the new import names when
feasible.
Comment on lines +6 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. note::
Several modules in :mod:`!compression` re-export modules that currently
exist at the repository top-level. These re-exported modules are the new
canonical import name for the respective top-level module. The existing
modules are not currently deprecated and will not be removed prior to Python
3.19, but users are encouraged to migrate to the new import names when
feasible.
.. attention::
The :mod:`!compression` package is the new location for the data compression
modules in the standard library, listed below. The existing modules are not
deprecated and will not be removed before Python 3.19. The new ``compression.*``
import names are encouraged for use where practicable.


* :mod:`!compression.bz2` -- Re-exports :mod:`bz2`

* :mod:`!compression.gzip` -- Re-exports :mod:`gzip`

* :mod:`!compression.lzma` -- Re-exports :mod:`lzma`

* :mod:`!compression.zlib` -- Re-exports :mod:`zlib`

* :mod:`compression.zstd` -- Wrapper for the Zstandard compression library
Comment on lines +15 to +23
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* :mod:`!compression.bz2` -- Re-exports :mod:`bz2`
* :mod:`!compression.gzip` -- Re-exports :mod:`gzip`
* :mod:`!compression.lzma` -- Re-exports :mod:`lzma`
* :mod:`!compression.zlib` -- Re-exports :mod:`zlib`
* :mod:`compression.zstd` -- Wrapper for the Zstandard compression library
* :mod:`!compression.bz2` -- Re-exports :mod:`bz2`
* :mod:`!compression.gzip` -- Re-exports :mod:`gzip`
* :mod:`!compression.lzma` -- Re-exports :mod:`lzma`
* :mod:`!compression.zlib` -- Re-exports :mod:`zlib`
* :mod:`compression.zstd` -- Wrapper for the Zstandard compression library



Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Loading
Loading