Uh oh!
There was an error while loading. Please reload this page.
fix(tally): fix shared default ciphertext in tally selection - #810
Conversation
mdevolde
commented
Mar 29, 2026
@lprichar@jungshadow hey, sorry for tagging you, I just wanted to know if you're still maintaining this repository? |
jungshadow
commented
Apr 3, 2026
Hi @mdevolde! Thanks for the PR and the flag, and sorry I didn't see this earlier. You probably followed that ElectionGuard moved from Microsoft to the Election Technology Initiative, and we're currently trying to determine where our resources should go. The .NET implementation recently received an update and is currently being used by US election tech providers. My heart is always with Python, and I'd personally like to maintain this version, too, but we need both a business need and funding for it. Give me a few days to check with @JDziurlaj on what it would take to set up PR validation here, and I'll see if we can at least merge this in. Thanks again! |
mdevolde
commented
Apr 3, 2026
Hi @jungshadow! |
jungshadow
commented
Apr 4, 2026
@mdevolde, I hear you, and I agree. We had high hopes that this project and its goals would attract significant financial support. Sadly, it hasn't worked out that way, so we're trying to be as strategic as possible with the support we have. |
JDziurlaj
commented
Apr 8, 2026
I apologize for the noise on this PR, I have to close and reopen the PR to force GitHub actions. |
mdevolde
commented
Apr 8, 2026
No problem ! on:
workflow_dispatch: |
6a3b25d to
0042052CompareJDziurlaj
commented
Apr 10, 2026
Uh oh!
There was an error while loading. Please reload this page.
mdevolde
commented
Apr 13, 2026
Thank you @JDziurlaj ! |
mdevolde
commented
Apr 13, 2026
Update: before bumping lib version and pushing on PyPI, I made a little other PR #813, to ensure that all the dependencies are compatible with our usage. |
Issue
Fixes#809
Description
This change updates
CiphertextTallySelection.ciphertextto usedefault_factoryinstead of a sharedElGamalCiphertextinstance as a dataclass field default. That ensures eachCiphertextTallySelectiongets its own ciphertext value rather than sharing the same default object across instances.The behavior avoids unintended shared state if the default ciphertext is ever mutated in place, and also resolves the dataclass validation error raised by Python 3.11 for mutable defaults.
I ran the tests locally:
poetry run pytest tests/unit,poetry run pytest tests/property,poetry run pytest tests/integration(on python 3.9.21, on windows 11). I built the project withpoetry buildon the same environment.Testing
Run the relevant tally-related test suites with:
These validate that
CiphertextTallySelectionstill behaves correctly.