Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydantic 2.6.0 breaks pathlib validation against str | os.PathLike #456

Closed
ian-activeloop opened this issue Oct 23, 2024 · 2 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@ian-activeloop
Copy link

I'm trying to make use of a project that has paper-qa hardlocked to v5.0.10 but the moment I try to update individual settings object returned form its get_settings() method I run into pydantic validation errors on 2 fields (shown below, linking to lines of specific version used) that are typed as str | os.PathLike. This was working for my colleagues and I last week, but after a couple of us redid our venvs we got the pydantic-settings==2.6.0 version, and for those of us on that version the paper-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 on pydantic-settings==2.5.2, and upon reverting to that version all of our path validation errors stopped and we were able to run paper-qa. As 2.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

@hramezani
Copy link
Member

Thanks @ian-activeloop for reporting this issue.

This is a duplicate of #445 and caused by 76ba2c6.

please follow the original issue

@hramezani hramezani added duplicate This issue or pull request already exists and removed unconfirmed labels Oct 23, 2024
@hramezani
Copy link
Member

This has been fixed in pydantic-settings 2.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants