Conversation
| validators = getattr(obj, '__get_validators__', None) | ||
| if validators is None: | ||
| return None | ||
| schema = core_schema.chain_schema([core_schema.general_plain_validator_function(v) for v in validators()]) |
There was a problem hiding this comment.
Don't know whether general_plain_validator_function is the right choice
Deploying with
|
| Latest commit: |
2cb4e9c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1ae086d5.pydantic-docs2.pages.dev |
| Branch Preview URL: | https://get-validators.pydantic-docs2.pages.dev |
samuelcolvin
left a comment
There was a problem hiding this comment.
we should add a deprecation warning, otherwise LGTM.
adriangb
left a comment
There was a problem hiding this comment.
Do we care how this interacts with Annotated, including with other classes that implement __get_pydantic_core_schema__? Might be worth testing
285f7ae to
2cb4e9c
Compare
@adriangb, I think we already have a test for this. Is that enough? pydantic/tests/test_deprecated.py Lines 498 to 523 in d110b47 |
|
But that doesn't use this new / old |
Closes #6899