dandi / dandi-schema

Schemata for DANDI archive project
Apache License 2.0
7 stars 10 forks source link

FYI: Pydantic v2 is breaking things #176

Closed effigies closed 8 months ago

effigies commented 1 year ago

Just a heads up that we're getting failures in PyBIDS on our pre-release tests due to a dependency using pydantic. A quick glance didn't indicate that you're testing pre-releases, so I wanted to make sure you weren't caught off-guard when the full release comes out.

yarikoptic commented 1 year ago

Thank you @effigies for the heads up! I guess, while addressing incompatibility, we better add a dev run on CI here to also be able to be proactive. @jwodder -- please look into adding such a CI run and possibly fixing up any issue which might be arising? If no issues, I guess we would better still keep the upper bound before 2.0 you added in #177 until 2.0 is actually released, whenever we could boost it to < 3.0.

yarikoptic commented 11 months ago

ok, @candleindark let's look into just migrating over to use pydantic 2.0 -- first approach here, and then see what it would take in the projects which use dandischema (see https://github.com/dandi/dandi-schema/pull/178#issuecomment-1513374751)

candleindark commented 11 months ago

ok, @candleindark let's look into just migrating over to use pydantic 2.0 -- first approach here, and then see what it would take in the projects which use dandischema (see #178 (comment))

Do you mean migrating to Pydantic 2.0 for real now, without the support for Pydantic 1.0? Do you also mean to abandon the approach in #178? That approach supports Pydanic 1.0 by importing it though pydantic.v1 when Pydantic 2.0 is installed in the Python environment. It doesn't actually use Pydantic 2.0.

satra commented 11 months ago

Do you mean migrating to Pydantic 2.0 for real now, without the support for Pydantic 1.0?

yup! no backwards compatibility wanted at this time.

candleindark commented 11 months ago

Do you mean migrating to Pydantic 2.0 for real now, without the support for Pydantic 1.0?

yup! no backwards compatibility wanted at this time.

Great. That would be cleaner.

yarikoptic commented 11 months ago

reconfirming -- full migration to v2 without using a shim

oruebel commented 9 months ago

FYI, this has come up as an issue here https://github.com/NeurodataWithoutBorders/pynwb/issues/1799