8000 Eliminate the undefined types warning by dmontagu · Pull Request #5754 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@dmontagu
Copy link
Contributor
@dmontagu dmontagu commented May 12, 2023

I believe we discussed this some time around the end of pycon.

I think another viable alternative might be just changing the default config value, but I think if there's any doubt we should just remove this config setting and handle things the way we did in v1 where we only error for undefined types when you attempt to instantiate them.

It's pretty annoying to have to change config everywhere there is a forward ref, and also need to do the model rebuild.

(I did this because I started down the path of rebuilding dataclasses and I felt like if we were going to make this change, I wanted to do so before porting the logic to dataclasses.)

Selected Reviewer: @samuelcolvin

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6516c43
Status: ✅  Deploy successful!
Preview URL: https://c6113699.pydantic-docs2.pages.dev
Branch Preview URL: https://eliminate-undefined-types-wa.pydantic-docs2.pages.dev

View logs

@dmontagu dmontagu requested review from adriangb and samuelcolvin and removed request for samuelcolvin May 12, 2023 16:48
@dmontagu
Copy link
Contributor Author

On Adrian's suggestion I made it auto-rebuild as well, happy to remove that though if preferred.

@dmontagu
Copy link
Contributor Author

please review

@adriangb
Copy link
Member

Looks good to me since I had suggested auto rebuilding and that’s all you did since last review 😀

@adriangb adriangb merged commit 67396b3 into main May 13, 2023
@adriangb adriangb deleted the eliminate-undefined-types-warning branch May 13, 2023 17:38
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.

4 participants

0