Pydantic 2.6.0 breaks pathlib validation against str | os.PathLike
#456
Labels
duplicate
This issue or pull request already exists
str | os.PathLike
#456
I'm trying to make use of a project that has
paper-qa
hardlocked tov5.0.10
but the moment I try to update individual settings object returned form itsget_settings()
method I run into pydantic validation errors on 2 fields (shown below, linking to lines of specific version used) that are typed asstr | os.PathLike
. This was working for my colleagues and I last week, but after a couple of us redid our venvs we got thepydantic-settings==2.6.0
version, and for those of us on that version thepaper-qa
settings outright break. When we compared relevant version numbers with a colleague that did not have that validation issue we discovered they were still onpydantic-settings==2.5.2
, and upon reverting to that version all of our path validation errors stopped and we were able to runpaper-qa
. As2.6.0
was a "minor" release, we do not expect breaking behavior to occur.https://github.com/Future-House/paper-qa/blob/v5.0.10/paperqa/settings.py#L413-L419
https://github.com/Future-House/paper-qa/blob/v5.0.10/paperqa/settings.py#L440-L445
The text was updated successfully, but these errors were encountered: