Uh oh!
There was an error while loading. Please reload this page.
gh-132983: Introduce compression package and move _compression module - #133018
Conversation
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`.
picnixz
commented
Apr 26, 2025
(You need to run |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Yeah, unfortunately E: s/modules/packages/ |
Also update `generate_stdlib_module_names.py` to collect `compression`, a namespace package.
Uh oh!
There was an error while loading. Please reload this page.
picnixz
left a comment
There was a problem hiding this comment.
Some imports are not sorted but they are part of the test and tests imports don't follow a specific convention (unless we manage to). In general, we try to keep the convention within the same file.
emmatyping
commented
Apr 26, 2025
Good to know, sorry I am not very familiar with the import ordering conventions! |
picnixz
commented
Apr 26, 2025
Officially, there is no convention so it's fine! The modules I maintain have sorted imports because it's easier to find what I want but other modules have what I call chronological imports (i.e., once you need another module, a new line is added). There are benefits in both: the first is "purer" (although it's subjective) while the latter eases diffs. I try to minimize the diffs in general even if it goes against my own conventions (and minimizing the diff is generally achieved by keeping the same convention as the current file). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
46c7e21 to
2e1b2a8Comparebedevere-bot
commented
Apr 27, 2025
|
StanFromIreland
commented
Apr 27, 2025
Fails are related. |
emmatyping
commented
Apr 27, 2025
Yes, it looks like I need to add the |
bedevere-bot
commented
Apr 27, 2025
|
emmatyping
commented
Apr 27, 2025
PR with fix: #133063 |
Uh oh!
There was an error while loading. Please reload this page.
This is part 1 of the Implementation Plan for PEP 784.
This change:
compressionpackage and re-exports existing modules under that package.Lib/_compression.pytoLib/compression/_common/streams.pyand updates imports to match.I added
skip newsas I'd like to write a holistic NEWS/What's New entry once the entire implementation has landed. If people think each PR should have NEWS I can write something up.