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

Disallow usage of with_config on a Pydantic model #9398

Merged
merged 5 commits into from May 16, 2024

Conversation

Viicos
Copy link
Contributor

@Viicos Viicos commented May 6, 2024

Additionally, make is_pydantic_dataclass argument pos only, this was missed from a previous PR.

Fixes #9397

Copy link

codspeed-hq bot commented May 6, 2024

CodSpeed Performance Report

Merging #9398 will not alter performance

Comparing Viicos:disallow-with-config-model (e5dd238) with main (af7c6d5)

Summary

✅ 13 untouched benchmarks

@Viicos Viicos force-pushed the disallow-with-config-model branch from 26fff66 to 47e7993 Compare May 7, 2024 12:23
@Viicos
Copy link
Contributor Author

Viicos commented May 13, 2024

Waiting for directions regarding the test_public_internal test failure, as is_model_class isn't reexported.

@sydney-runkle
Copy link
Member

@Viicos,

Changes look good. Hmm, I can take an in-depth look at the test failure this afternoon...

@sydney-runkle
Copy link
Member

Will approve once tests pass, but looks great otherwise :)

Additionally, make `is_pydantic_dataclass` argument pos only,
this was missed from a previous PR.
@Viicos Viicos force-pushed the disallow-with-config-model branch from 51c7b60 to 2928dde Compare May 15, 2024 17:29
@sydney-runkle
Copy link
Member

@Viicos,

Looks great - please resolve conflicts :). Will merge after that!

@sydney-runkle sydney-runkle enabled auto-merge (squash) May 16, 2024 14:54
@sydney-runkle
Copy link
Member

@Viicos,

Ah, I resolved the conflicts, looked like super minor git problems haha.

Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick change request for tests

docs/errors/usage_errors.md Outdated Show resolved Hide resolved
@sydney-runkle sydney-runkle merged commit 2511312 into pydantic:main May 16, 2024
51 checks passed
@Viicos Viicos deleted the disallow-with-config-model branch May 16, 2024 15:32
@Viicos
Copy link
Contributor Author

Viicos commented May 16, 2024

Ah, I resolved the conflicts, looked like super minor git problems haha.

Yep was expected with the other PR merged, thanks for wrapping up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disallow Pydantic models when using with_config
2 participants