Closed HLasse closed 5 months ago
@KennethEnevoldsen any thoughts on this?
Seems like spacy is working on pydantic v2, I either go with keeping the pydantic version in line with spacy or convert it to a dataclass. We don't really gain a lot from using a pydantic object here I believe a dataclass could do just fine as well.
Spacy <3.6.0 seems to require pydantic <2.0 (see image). So, tradeoff here. Do we want to support multiple spacy versions by requiring pydantic to be <2.0, OR do we require a newer version of spacy to be able to support newer versions of pydantic.
Alternatively, we can rewrite to
dataclass
, but then we lose this amazing documentation from autodoc_pydantic. (although I don't know how well sphinx's autodoc handles dataclasses with metadata fields.