Skip to content

Use compression.zstd from Python >= 3.14 - #639

Draft
bdrung wants to merge 9 commits into
canonical:mainfrom
bdrung:zstd-compressor
Draft

Use compression.zstd from Python >= 3.14#639
bdrung wants to merge 9 commits into
canonical:mainfrom
bdrung:zstd-compressor

Conversation

@bdrung

@bdrung bdrung commented Jul 27, 2026

Copy link
Copy Markdown
Member

Use compression.zstd from Python >= 3.14 to avoid relying on the third-party library zstandard.

Bug: https://launchpad.net/bugs/2161787

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.15%. Comparing base (649773b) to head (c126c71).

Files with missing lines Patch % Lines
bin/apport-valgrind 0.00% 5 Missing ⚠️
apport/crashdb_impl/launchpad.py 0.00% 2 Missing ⚠️
apport_python_hook.py 0.00% 2 Missing ⚠️
apport/crashdb.py 0.00% 1 Missing ⚠️
apport/crashdb_impl/debian.py 0.00% 1 Missing ⚠️
apport/fileutils.py 85.71% 1 Missing ⚠️
apport/hookutils.py 0.00% 1 Missing ⚠️
apport/packaging_impl/apt_dpkg.py 66.66% 1 Missing ⚠️
apport/report.py 80.00% 1 Missing ⚠️
bin/apport-retrace 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #639      +/-   ##
==========================================
- Coverage   84.46%   84.15%   -0.32%     
==========================================
  Files         106      106              
  Lines       21053    20898     -155     
  Branches     3223     2102    -1121     
==========================================
- Hits        17783    17586     -197     
- Misses       2793     2846      +53     
+ Partials      477      466      -11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

bdrung added 7 commits July 30, 2026 02:58
Do not rely on the implementation detail and create a real corrupted
core dump for testing `add_gdb_info` in
`test_add_gdb_info_damaged_gz_core`.
`CompressedValue.decode_compressed_stream` does not raise an `EOFError`
in case the file ended before the end-of-stream marker was reached, but
`gzip.GzipFile` would do that.
Make the code more readable and compact by instructing zlib to use
native gzip header and trailer processing.
Use the iterator version `decode_compressed_stream` in
`CompressedValue.write` to avoid code duplication.
The GitHub action runners provide preview Ubuntu 26.04 images. Switch
from Ubuntu 24.04 to 26.04 for the installed tests.
Ubuntu 26.04 LTS "Resolute Raccoon" is the latest Ubuntu LTS version.
Since the main branch targets the Ubuntu development release, drop
testing on Ubuntu 24.04 LTS "Noble Numbat".
Add Ubuntu 26.10 "Stonking Stingray" and use it for running the linter.
@bdrung
bdrung force-pushed the zstd-compressor branch from 401cc9e to 7599818 Compare July 30, 2026 01:38
Ubuntu 26.04 "resolute" comes with Python 3.14 and this version ships a
`compression.zstd` module that can replace the third-party library
`zstandard`.

The Python version in Debian stable is too old. So remove
`debian:stable-slim` from the CI.

Apply black format changes that come with the newer Python version.
@bdrung
bdrung force-pushed the zstd-compressor branch from 7599818 to fdcedb9 Compare July 30, 2026 01:48
Use `compression.zstd` from Python >= 3.14 to avoid relying on
the third-party library `zstandard`.

Bug: https://launchpad.net/bugs/2161787
@bdrung
bdrung force-pushed the zstd-compressor branch from fdcedb9 to c126c71 Compare July 30, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant