Add support for Pydantic 2 #1858
8W9aG
approved these changes
on 2024-08-06
mattt
force pushed
from
eebecff4
to
538bad0b
1 year ago
mattt
force pushed
from
b4f6a684
to
9471dbb4
1 year ago
mattt
force pushed
from
9471dbb4
to
de6b7539
1 year ago
mattt
force pushed
from
c0492171
to
837e08f1
1 year ago
mattt
force pushed
from
837e08f1
to
dcc2f022
1 year ago
mattt
commented
on 2024-08-12
mattt
requested a review
1 year ago
mattt
force pushed
from
cb9cc7e0
to
d9d6ed8a
1 year ago
mattt
force pushed
from
d9d6ed8a
to
b0861e71
1 year ago
mattt
force pushed
from
2ee83b87
to
56867b16
1 year ago
mattt
force pushed
from
4ad78fef
to
d7cc1281
1 year ago
mattt
force pushed
from
eec2f5fa
to
b3713ead
1 year ago
mattt
force pushed
from
b3713ead
to
bb064f8b
1 year ago
nickstenning
force pushed
from
440e47f9
to
c535ed45
1 year ago
nickstenning
force pushed
from
c535ed45
to
db581531
1 year ago
nickstenning
force pushed
from
db581531
to
2d73ace2
1 year ago
nickstenning
force pushed
from
2d73ace2
to
b7f5961c
1 year ago
nickstenning
force pushed
from
b7f5961c
to
0bad5557
1 year ago
nickstenning
force pushed
from
0bad5557
to
0459fe37
1 year ago
nickstenning
force pushed
from
0459fe37
to
d88cdfeb
1 year ago
nickstenning
force pushed
from
d88cdfeb
to
e89b878e
1 year ago
nickstenning
force pushed
from
e89b878e
to
a99c7d72
1 year ago
erbridge
force pushed
from
6ff0bf9a
to
72f77da7
1 year ago
erbridge
force pushed
from
72f77da7
to
4be282da
1 year ago
nickstenning
force pushed
from
4be282da
to
6e8d5d82
1 year ago
mattt
force pushed
from
df1da5e5
to
b5d77fb6
1 year ago
mattt
force pushed
from
5ee544e9
to
3852ddf4
1 year ago
mattt
force pushed
from
3871f6ad
to
bbad8381
1 year ago
Update pydantic and fastapi requirements
fa99c7bb
Define PYDANTIC_V2
af339a42
Replace use of ErrorWrapper removed in pydantic v2
52405b6a
Update predictor model config and output types
5f06aab6
Pass string literal for extra value
41e1223e
Set explicit None values for optional fields
d8043c6d
Give output field an explicit default of None
f06ed9fa
Import types from typing instead of accessing through namespace
98391c6b
Set extra in model config
6b768e42
Actually, don't allow additional properties
37d22e4a
Fix generated schema for webhook event filter
8e960a30
Fixup generated OpenAPI schema
7507361a
Update expectations for test_gt_lt response JSON
ddad900f
Flatten allOf for component schemas
5364b748
Fix validation of weights_url
34c224e4
Use __get_pydantic_json_schema__ instead of __modify_schema__
a98294e2
Fix test_make_encodeable_ignores_files
33338c06
Fix expectations for test_bad_int_input
4a60175c
Skip numpy tests for pydantic v2
34f469e2
Fix test_make_encodeable_encodes_pydantic_models for pydantic v2
afb34abb
Fix use of __get_pydantic_core_schema__
b1c65c51
Fix warnings for pydantic.Field construction
e29e577c
Fix use of deprecated dict instead of model_dump
d78dc11f
Limit application of OpenAPI processing for default enum description
9f268abf
Passing test_openapi_specification_with_int_choices
9b73ccdc
Fix declarations of __get_pydantic_json_schema__ and __get_pydantic_c…
7fe5503f
Update validate_input_type to handle annotated cog.Types
6a36b1ac
Update __get_pydantic_core_schema__ to start with is_instance_schema
fcccb9a2
Conditionalize use of deprecated dict method
146fe56d
Avoid re-encoding of PredictionResponse in _predict
130a494e
Remove no-op if TYPE_CHECKING
17d96495
Unwrap SerializationIterators after model_dump
3fe6eafa
Also unwrap SerializationIterator in make_encodeable
c48f5099
Replace use of choices=[] with typing.Literal
a7da4506
Make output schema optional so validation doesn't fail on errors
3765a6ef
Restore choices tests and fix validation of choices in v2
d1dee398
Refactor, move, and rename unwrap_pydantic_serialization_iterators to…
f6c7ad23
Update AST OpenAPI generator to support Literal
bdc43c6e
Fix ast.Str and ast.Num deprecation warnings
61245e62
Disable Literal support for Python 3.8
044e5e53
Apply suggestions from code review
eca80a19
Document unwrap_pydantic_serialization_iterators
39607915
Test on Pydantic v1 and v2
80dc92e9
Fix import of Literal for Python 3.7
521b584a
Reenable and fix test_numpy
e48c67ab
Customize openapi_schema for Pydantic v1 and v2 to get consistent spe…
cc4cab04
Conditionalize call to unwrap_pydantic_serialization_iterators
aadcf86c
Correctly unset title for webhook_events_filter
0f937742
Skip literal tests for Python<3.9 and Pydantic<2
30918922
Remove pyupgrade checks for ruff
883eb97c
Fix pyright warning in useragent
5e812384
Manually remove webhook_events_filter title from OpenAPI schema
c681a216
Add support for Literal to Python <=3.9
17162feb
mattt
force pushed
from
bbad8381
to
17162feb
1 year ago
Run typecheck with Pydantic v1 and Pydantic v2
588df97d
Replace use of deprecated dict method with model_dump
52c1ff09
mattt
force pushed
from
9c7390a9
to
52c1ff09
1 year ago
Attempt to resolve test failures related to OpenAPI generation
ec4c0cc0
Fix pydantic{1,2} typecheck
a6c55e62
Fix type errors on pydantic1
7b1e7319
Install pydantic<2 in the cog wheel installation step.
03b86e1c
yorickvP
force pushed
from
836096fc
to
03b86e1c
1 year ago
Merge branch 'main' into mattt/pydantic-v2
d3eb7ece
technillogue
deleted the mattt/pydantic-v2 branch 1 year ago
Assignees
No one assigned
Login to write a write a comment.
Login via GitHub