Skip to content

use xxhash from pypi, for issue #6535#9440

Open
defnvary wants to merge 2 commits intoborgbackup:masterfrom
defnvary:use_xxhash_from_pypi
Open

use xxhash from pypi, for issue #6535#9440
defnvary wants to merge 2 commits intoborgbackup:masterfrom
defnvary:use_xxhash_from_pypi

Conversation

@defnvary
Copy link
Contributor

@defnvary defnvary commented Mar 5, 2026

Description

Use xxhash from pypi, instead of the custom cython binding.

Issue

#6535

@defnvary defnvary force-pushed the use_xxhash_from_pypi branch from 7bf82b2 to 0f61103 Compare March 5, 2026 15:05
@defnvary defnvary force-pushed the use_xxhash_from_pypi branch from 0f61103 to 54aedc3 Compare March 5, 2026 15:10
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.

Thanks for the PR, some things I found while reviewing it.

Comment on lines 9 to 11
from time import perf_counter

from xxhash import xxh64
from borgstore.backends.errors import PermissionDenied
Copy link
Member

Choose a reason for hiding this comment

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

please do imports like this:

imports from stdlib
empty line
imports from 3rd party
empty line
imports from borg

also try to keep it alpha-sorted.

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 85.18519% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.86%. Comparing base (7b69bed) to head (86ce463).
⚠️ Report is 21 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/borg/legacyremote.py 33.33% 2 Missing ⚠️
src/borg/cache.py 75.00% 0 Missing and 1 partial ⚠️
src/borg/repository.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9440      +/-   ##
==========================================
+ Coverage   76.52%   76.86%   +0.33%     
==========================================
  Files          85       85              
  Lines       14822    14814       -8     
  Branches     2214     2209       -5     
==========================================
+ Hits        11343    11387      +44     
+ Misses       2802     2763      -39     
+ Partials      677      664      -13     

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

@defnvary
Copy link
Contributor Author

defnvary commented Mar 5, 2026

Also there needs to some doc changes for this commit. should i include them in this pr or open a separate one. And I think we can remove streaming_xxh64 test from checksums_test.py. Also in test_xxh64 there is unnecessary conversion from bin_to_hex and from hex_to_bin in the third assert statement. Should i include test changes in this pr too or open a new one?

@ThomasWaldmann
Copy link
Member

Also there needs to some doc changes for this commit. should i include them in this pr or open a separate one.

Include docs changes here. Be careful, do not edit generated docs (see comment in 1st line).

And I think we can remove streaming_xxh64 test from checksums_test.py.

Sure.

Also in test_xxh64 there is unnecessary conversion from bin_to_hex and from hex_to_bin in the third assert statement.
Should i include test changes in this pr too or open a new one?

Yes, change the conversions, but keep the test data and hashes the same values.

@ThomasWaldmann
Copy link
Member

(ignore the macOS CI failure, I already fixed that in master)

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