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

Improve typechecking, docs, and minor bugs with Field/FieldInfo #5800

Merged
merged 9 commits into from
May 22, 2023

Conversation

dmontagu
Copy link
Contributor

@dmontagu dmontagu commented May 19, 2023

Selected Reviewer: @lig

@cloudflare-pages
Copy link

cloudflare-pages bot commented May 19, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4c0aeb5
Status: ✅  Deploy successful!
Preview URL: https://a80804d3.pydantic-docs2.pages.dev
Branch Preview URL: https://field-updates.pydantic-docs2.pages.dev

View logs

tests/test_aliases.py Outdated Show resolved Hide resolved
@dmontagu
Copy link
Contributor Author

please review

@dmontagu
Copy link
Contributor Author

This adds a change that breaks pydantic-settings. I have opened a PR that will fix that in pydantic/pydantic-settings#59. I will disable CI for pydantic settings here for now then we can reenable once everything is back in sync.

@dmontagu
Copy link
Contributor Author

dmontagu commented May 20, 2023

Not sure why cloudflare pages is failing but that's the only problem now. (Because I disabled the run of pydantic-settings. We could re-enable once it is updated to use this version of pydantic.)

Perhaps related to it needing to clone pydantic-settings for the docs..?


For context, the reason pydantic-settings is incompatible with this branch is because I changed FieldInfo from storing the pre-processed validation_alias that is compatible with pydantic-core into keeping AliasChoices and AliasPath unmodified. (Right now, pydantic-settings expects validation_alias to potentially be a list, not AliasPath/AliasChoices.)

(And as noted above, I have already opened a PR on pydantic-settings that will fix its compatibility with pydantic.)

@dmontagu
Copy link
Contributor Author

Going to try reopening to see if that resolves the cloudflare build issue..

@dmontagu dmontagu closed this May 20, 2023
@dmontagu
Copy link
Contributor Author

Hmm nope couldn't get it to work. @samuelcolvin I guess I need some info about the cloudflare thing

@dmontagu dmontagu reopened this May 20, 2023
hramezani added a commit to pydantic/pydantic-settings that referenced this pull request May 22, 2023
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
@hramezani
Copy link
Member

@dmontagu Why do we need to addpydantic-settings as submodule here?

@dmontagu dmontagu merged commit 6487a6c into main May 22, 2023
43 checks passed
@dmontagu dmontagu deleted the field-updates branch May 22, 2023 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants