Skip to content

Drop timing-sensitive sha1 count assertion#63

Closed
nadzyah wants to merge 1 commit into
rndusr:masterfrom
nadzyah:sha1-count-assertion
Closed

Drop timing-sensitive sha1 count assertion#63
nadzyah wants to merge 1 commit into
rndusr:masterfrom
nadzyah:sha1-count-assertion

Conversation

@nadzyah
Copy link
Copy Markdown
Contributor

@nadzyah nadzyah commented Apr 30, 2026

With Python 3.14, Reader and HasherPool threads start before collect() is called. For 8-byte pieces all 1000 hashes land in hash_queue before the main thread calls hash_queue.get(), so sha1_mock.call_count always equals t.pieces regardless of whether cancellation works

The error initially appeared during the CI autopkgtest run for the torf package in Debian on amd64 and arm64

With Python 3.14, Reader and HasherPool threads start before collect()
is called. For 8-byte pieces all 1000 hashes land in hash_queue before
the main thread calls hash_queue.get(), so sha1_mock.call_count always
equals t.pieces regardless of whether cancellation works
@rndusr
Copy link
Copy Markdown
Owner

rndusr commented May 1, 2026

Thank you for the fixes.

Do you need another release? And if so, should I hold off on making a new release? Or are you fairly
sure things are good now?

@rndusr rndusr closed this May 1, 2026
@nadzyah
Copy link
Copy Markdown
Contributor Author

nadzyah commented May 1, 2026

Thank you for the fixes.

No worries, happy to help! Is there any reason why this PR was closed and not merged? Without this change, the tests on Debian CI infra fail

Do you need another release? And if so, should I hold off on making a new release? Or are you fairly

sure things are good now?

It would be wonderful to see a new release! That way, I could easily include the patches directly in Debian and have everything packaged more smoothly

@rndusr
Copy link
Copy Markdown
Owner

rndusr commented May 1, 2026 via email

@nadzyah
Copy link
Copy Markdown
Contributor Author

nadzyah commented May 1, 2026

@rndusr oh, I see that the commit is there. Thanks for accepting the change!

No need to release it now, I’ll also try to package torf-cli this or next week and will see if there are any new bugs with this program. But thank you for your collaboration, I really appreciate that!

@nadzyah nadzyah deleted the sha1-count-assertion branch May 1, 2026 12:51
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