]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-132983: Introduce `compression` package and move `_compression` module (GH-133018)
authorEmma Smith <emma@emmatyping.dev>
Sun, 27 Apr 2025 21:41:30 +0000 (14:41 -0700)
committerGitHub <noreply@github.com>
Sun, 27 Apr 2025 21:41:30 +0000 (14:41 -0700)
commit20be6ba61ac8a0a5d6242701c4186579cfa653f0
tree02120df9300352ba50b86823fdbf74a8cc7424eb
parent6d53b752831c453da115dd4ce54a0d121d9990cd
gh-132983: Introduce `compression` package and move `_compression` module (GH-133018)

* Introduces `compression` package for https://peps.python.org/pep-0784/

This commit introduces the `compression` package, specified in PEP 784
to re-export the `lzma`, `bz2`, `gzip`, and `zlib` modules. Introduction
of `compression.zstd` will be completed in a future commit once the
`_zstd` module is merged.

This commit also moves the `_compression` private module to
`compression._common._streams`.

* Re-exports existing module docstrings.
12 files changed:
Lib/bz2.py
Lib/compression/__init__.py [new file with mode: 0644]
Lib/compression/_common/_streams.py [moved from Lib/_compression.py with 98% similarity]
Lib/compression/bz2/__init__.py [new file with mode: 0644]
Lib/compression/gzip/__init__.py [new file with mode: 0644]
Lib/compression/lzma/__init__.py [new file with mode: 0644]
Lib/compression/zlib/__init__.py [new file with mode: 0644]
Lib/gzip.py
Lib/lzma.py
Lib/test/test_bz2.py
Lib/test/test_lzma.py
Python/stdlib_module_names.h