spruceid / siwe-py

A Python implementation of Sign-In with Ethereum
https://login.xyz
Apache License 2.0
66 stars 28 forks source link

refactor!: pydantic v2 #59

Closed fubuloubu closed 3 months ago

fubuloubu commented 4 months ago

Refactors to use pydantic v2 API and updates most of the other pins to be more recent versions (removed dateutil)

Resolves issues with AnyURL by leveraging a trick that creates a field which uses it for validation, but retains it as a string

Additionally refactors the ISO-8601 datetime strings using a similar trick that is compatible with v2 and is clearer and easier to use

Lastly, adds a test showing that the model is compatible for use with FastAPI as a data field item (for forms and such)

fixes: https://github.com/spruceid/siwe-py/issues/46 fixes: https://github.com/spruceid/siwe-py/issues/58 fixes: https://github.com/spruceid/siwe-py/issues/50 fixes: https://github.com/spruceid/siwe-py/issues/54 fixes: https://github.com/spruceid/siwe-py/issues/56

fubuloubu commented 4 months ago

A note that python 3.8 and 3.9 not supported on macos-latest right now

fubuloubu commented 3 months ago

Sorry @sbihel @ameyarao98, CI should be fixed now

sbihel commented 3 months ago

Thank you!

sbihel commented 3 months ago

Published as part of v3.0.0