Skip to content

Comments

use zstd from python lib or backports.zstd (python<'3.14'), closes #9261#9397

Merged
ThomasWaldmann merged 1 commit intoborgbackup:masterfrom
defnvary:use_zstd_python_stdlib
Feb 23, 2026
Merged

use zstd from python lib or backports.zstd (python<'3.14'), closes #9261#9397
ThomasWaldmann merged 1 commit intoborgbackup:masterfrom
defnvary:use_zstd_python_stdlib

Conversation

@defnvary
Copy link
Contributor

@defnvary defnvary commented Feb 22, 2026

Description

Replace C dependency for zstd with built in compression.zstd (for python 3.14 and above) falling back to backports.zstd for older python versions.

Issue

#9261

@defnvary defnvary changed the title use zstd from python lib or backport.zstd (python<'3.14'), closes #9261 use zstd from python lib or backports.zstd (python<'3.14'), closes #9261 Feb 22, 2026
@ThomasWaldmann
Copy link
Member

@defnvary Thanks for the PR, looks good!

Guess we also describe the requirements in our install docs, including some dist-specific instructions for linux, bsd, mac, windows about what to install and they need fixing also.

@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.47%. Comparing base (475b70b) to head (4344eb3).
⚠️ Report is 19 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9397   +/-   ##
=======================================
  Coverage   76.47%   76.47%           
=======================================
  Files          85       85           
  Lines       14804    14804           
  Branches     2213     2213           
=======================================
  Hits        11322    11322           
  Misses       2803     2803           
  Partials      679      679           

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

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Feb 22, 2026

@ThomasWaldmann
Copy link
Member

Please update your local master branch and then rebase this branch onto that master and force push.

That should solve the CI test failures that are unrelated to your work.

@defnvary
Copy link
Contributor Author

Oh Thank you. I thought I made some mistake in setting up the environment🙃.

Copy link
Member

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

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

Looks good overall, dependencies for py<3.14 unclear.

@defnvary
Copy link
Contributor Author

Looks good overall, dependencies for py<3.14 unclear.

There is backports.zstd dependency that i added in pyproject.toml under dependencies. which i am not 100% sure is the correct place for this kind of dependency. Should i put it under requirements.d/development.txt?

@ThomasWaldmann
Copy link
Member

pyproject.toml is the correct place for the backports.zstd dependency.

the files in requirements.d/* mostly define requirements for development, testing, docs building.

@ThomasWaldmann
Copy link
Member

BTW, do you know git rebase -i master?

Be careful when first using it, but that is a very nice and powerful command to get a clean commit history.

@defnvary
Copy link
Contributor Author

BTW, do you know git rebase -i master?

Be careful when first using it, but that is a very nice and powerful command to get a clean commit history.

I know (in theory) never used it. I need to rebase this whole pr into a single commit before merging right?

@defnvary defnvary force-pushed the use_zstd_python_stdlib branch from 1fc75b5 to 3b7fa9f Compare February 22, 2026 18:14
Copy link
Member

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

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

there are changes from other commits now in your PR.

Copy link
Member

Choose a reason for hiding this comment

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

that should not be in your PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@defnvary defnvary force-pushed the use_zstd_python_stdlib branch from 3b7fa9f to 4344eb3 Compare February 22, 2026 19:03
Copy link
Member

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

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

LGTM!

@ThomasWaldmann ThomasWaldmann merged commit 23060e3 into borgbackup:master Feb 23, 2026
19 checks passed
@ThomasWaldmann
Copy link
Member

Thanks!

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.

2 participants