cog
Add support for Pydantic 2
#1858
Merged

Add support for Pydantic 2 #1858

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

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone