robotpy-build icon indicating copy to clipboard operation
robotpy-build copied to clipboard

Upgrade to pydantic v2

Open auscompgeek opened this issue 1 year ago • 5 comments

#207 pins pydantic to v1. We should upgrade. There's a migration guide in their docs: https://docs.pydantic.dev/latest/migration/

Note that we'll need to build pydantic_core in https://github.com/robotpy/roborio-wheels, which means we'll need to get Rust into the cross-build container (https://github.com/robotpy/robotpy-cross-docker) too.

auscompgeek avatar Sep 03 '23 05:09 auscompgeek

That feels like a lot of work for low reward, but if you can figure out how to make it work I'm happy to accept the changes.

virtuald avatar Sep 03 '23 22:09 virtuald

Sorry, I didn't realize this was for robotpy-build... why do we need to upgrade pydantic in roborio-wheels? I no longer use robotpy-build natively, we exclusively use crossenv in docker now.

virtuald avatar Sep 03 '23 23:09 virtuald

Pydantic v2 versions apparently ship with v1 embedded in it. So we could use that

TheTripleV avatar Sep 03 '23 23:09 TheTripleV

pydantic-core is written in Rust, so we should have it prebuilt to avoid building it in all of our CI jobs, right? Or am I misunderstanding how our cross-builds work?

auscompgeek avatar Sep 04 '23 08:09 auscompgeek

The cross build has a native piece and a cross piece. robotpy-build runs in the native side.

virtuald avatar Sep 04 '23 08:09 virtuald