Uh oh!
There was an error while loading. Please reload this page.
fix: fix dacite deserialization compatibilty, deprecatation warnings, import error and update mypy, black and poetry - #813
Conversation
beda783 to
429a56cComparemdevolde
commented
Apr 14, 2026
Seems that this old version of mypy doesn't support pydantic v2. I'm looking at this. |
…usage, update mypy and black
429a56c to
e1f0636Comparemdevolde
commented
Apr 14, 2026
Okay so, I updated |
mdevolde
commented
Apr 14, 2026
At this stage, one option might be to bump the |
mdevolde
commented
Apr 14, 2026
I made the commit to demonstrate the upgrade of |
dd9c7f1 to
2a01a3fComparemdevolde
commented
Apr 14, 2026
I missed a fixed version of |
2a01a3f to
28e2ee5Comparemdevolde
commented
Apr 14, 2026
Just patched the old config param |
mdevolde
commented
Apr 14, 2026
By running the CI on my Linux, I noticed an import error in the GUI, and some deprecation warnings about |
mdevolde
commented
Apr 15, 2026
The code seems good, Linux/Mac checks are ok. |
mdevolde
commented
Apr 15, 2026
So, I corrected the pylint warnings, and I allowed |
mdevolde
commented
Apr 15, 2026
The two disabled categories that I added in |
mdevolde
commented
Apr 16, 2026
It's mypy's turn to complain x) |
mdevolde
commented
Apr 16, 2026
Mypy warnings from dependencies are patched, and mkdocs version is bumped to ensure that the documentation build properly. |
mdevolde
commented
May 2, 2026
@jungshadow Hi! Sorry to tag you. If you need any help understanding a change, don't hesitate to ask. Of course, there is no hurry! |
jungshadow
left a comment
There was a problem hiding this comment.
@mdevolde This all looks good and I appreciate the quality of life improvements. Oddly, I got an error on first build, but I think that's largely because I tried to be too clever by half (NB: it's a running gripe I have with this project that the Makefile is too opinionated for those of us with existing pyenv, poetry, et al. environments). I'd like to migrate the entire package management to uv at some point, but that's a story for another day. All that (and too much) said, LGTM!
Uh oh!
There was an error while loading. Please reload this page.
mdevolde
commented
May 14, 2026
@jungshadow thanks again for the review ! I'm used to uv, so it's not a problem for me to migrate the development environment to uv if you want! |
jungshadow
commented
May 14, 2026
@mdevolde Let's scope it out and add it to the issue pile. |
mdevolde
commented
May 14, 2026
@jungshadow sure ! I will open an issue about, and when I'll have some free time, I'll open a PR about. |
jungshadow
commented
May 14, 2026
Thanks, @mdevolde! |
Issue
Fixes#812
Description
This change updates the
daciteconfiguration inserialize.pyso thatdatetimevalues are handled only through the existingtype_hook(parser.parse) and are no longer also included incast.This avoids a double-conversion path introduced by newer
daciteversions, where a JSON datetime string is first parsed into adatetime.datetimeobject and then incorrectly cast again, causing manifest deserialization to fail.With this change, serialization behavior remains compatible with the existing code path while restoring support for newer
dacitereleases such as1.9.2.I also replaced deprecated
pydantic_encoderusage withpydantic_core.to_jsonable_pythoninserialize.py(and so, I bumped pydantic version).Testing
Run the relevant test suites with:
These tests include
tests/unit/electionguard/test_manifest.py, the tests that we just patched with this PR.I ran the test with python 3.9, 3.11, 3.13.