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

bypass pydantic runtime validation for state init #4256

Merged

Conversation

benedikt-bartscher
Copy link
Contributor

Closes #4235

@benedikt-bartscher benedikt-bartscher marked this pull request as ready for review October 29, 2024 00:15
@adhami3310
Copy link
Member

this looks fine to me, but i'm unsure if there would be any hidden things that can be broken by this, so i will leave approval for @masenf

@benedikt-bartscher
Copy link
Contributor Author

this looks fine to me, but i'm unsure if there would be any hidden things that can be broken by this, so i will leave approval for @masenf

I don't think there are many occurences of states being initiated with kwargs for default values except in tests. But let's wait for @masenf better safe than sorry

@benedikt-bartscher
Copy link
Contributor Author

@masenf can we get this one in?

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

i'm good with this going in... but i don't understand the case that it's working around... if we never initialize with kwargs outside of tests, when would we run into validation issues?

@benedikt-bartscher
Copy link
Contributor Author

but i don't understand the case that it's working around...

It is really just about tests, I wrote a minimal example test in the related issue #4235 which regressed during a reflex update.

@adhami3310 adhami3310 merged commit b3c1998 into reflex-dev:main Nov 4, 2024
29 checks passed
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.

rx.Field pydantic validation issues
3 participants