stac-fastapi icon indicating copy to clipboard operation
stac-fastapi copied to clipboard

Update to pydantic 2.0

Open gadomski opened this issue 1 year ago • 8 comments

I hear it's faster 😉

gadomski avatar Sep 06 '23 12:09 gadomski

Is this related to #588 ?

keul avatar Sep 15 '23 07:09 keul

Yes, #588 would probably be a blocker for this issue.

gadomski avatar Sep 15 '23 11:09 gadomski

As an FYI, I finally got around to updating pycql2 to work with v2. If it would be useful for this update. Its in the develop branch right now and is passing all my tests + some hypothesis fuzzing. Had to do a few odd things to get v2 working, but think its in a decent spot. And happy to address any concerns with it if there are any, as well as provide any help integrating.

eseglem avatar Nov 14 '23 15:11 eseglem

support for pydantic 2 was added in stac-pydantic 3.0.0

thomas-maschler avatar Feb 09 '24 20:02 thomas-maschler

Is #588 still a blocker for this now that stac-pydantic has been updated? I'd love to see the stac-fastapi family support Pydantic 2.

I found out the hard way that we can't upgrade our monorepo to Pydantic v2 until both stac-fastapi and stac-fastapi-pgstac get updated. Long story short, we can't upgrade to pypgstac>=0.8.* (where Pydantic v2 support begins) because stac-fastapi-pgstac is pinned to pypgstac==0.7.* and both the DB and pypgstac must be on the same minor version (i.e., they both need to be upgraded coincidentally).

bmcandr avatar Feb 15 '24 14:02 bmcandr

@bmcandr please see #625

thomas-maschler avatar Feb 20 '24 19:02 thomas-maschler

:wave: @thomas-maschler. Thanks! I was actually asking about 588 with respect to your PR. The discussion in https://github.com/stac-utils/stac-pydantic/pull/127 suggests that it's no longer a blocker on this issue, but I haven't seen confirmation. Just eager to get your PR merged 😄

bmcandr avatar Feb 20 '24 21:02 bmcandr

#588 says to either remove stac-pydantic as a dependency or bring it up to date. We got the latter done now, with additional PRs in the queue.

Based on the discussion in https://github.com/stac-utils/stac-pydantic/pull/127 and https://github.com/radiantearth/stac-spec/discussions/1252 there is a longer-term goal to deprecate stac-pydantic. But this hasn't happened yet and shouldn't prevent us from using the latest version in stac-fastapi

thomas-maschler avatar Feb 20 '24 22:02 thomas-maschler

done in #625

vincentsarago avatar Apr 26 '24 07:04 vincentsarago