Update dependency pydantic to v2 #290
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.10.17->^2.0.0Release Notes
pydantic/pydantic (pydantic)
v2.8.2: (2024-07-03)Compare Source
What's Changed
Fixes
Full Changelog: pydantic/pydantic@v2.8.1...v2.8.2
v2.8.1: (2024-07-03)Compare Source
What's Changed
Packaging
rufftov0.5.0andpyrighttov1.1.369by @sydney-runkle in https://github.com/pydantic/pydantic/pull/9801pydantic-coretov2.20.1,pydantic-extra-typestov2.9.0by @sydney-runkle in https://github.com/pydantic/pydantic/pull/9832Fixes
to_snakefrom v2.7 -> v2.8 by @sydney-runkle in https://github.com/pydantic/pydantic/pull/9812New Contributors
Full Changelog: pydantic/pydantic@v2.8.0...v2.8.1
v2.8.0Compare Source
GitHub release
The code released in v2.8.0 is functionally identical to that of v2.8.0b1.
What's Changed
Packaging
v1.1.367and add type checking tests for pipeline API by @adriangb in #9674pydantic.v1stub tov1.10.17by @sydney-runkle in #9707v2.8.0b1by @sydney-runkle in #9741pydantic-coretov2.20.0by @sydney-runkle in #9745pdmversion used forpdm.lockto v2.16.1 by @sydney-runkle in #9761ruffv0.4.8by @Viicos in #9585New Features
defer_buildforTypeAdapterby @MarkusSintonen in #8939deprecatedfield in json schema by @NeevCohen in #9298fail_fastfeature by @uriyyo in #9708ser_json_inf_nan='strings'mode to produce valid JSON by @josh-newman in pydantic/pydantic-core#1307Changes
Annotatedfield by @nix010 in #9170__validators__values increate_modelby @sydney-runkle in #9697smartunion matching logic by @sydney-runkle in pydantic/pydantic-core#1322You can read more about our
smartunion matching logic here. In some cases, if the old behavioris desired, you can switch to
left-to-rightmode and change the order of yourUnionmembers.Performance
Internal Improvements
_display_error_loc()by 25% inpydantic/v1/error_wrappers.pyby @misrasaurabh1 in #9653_get_all_json_refs()by 34% inpydantic/json_schema.pyby @misrasaurabh1 in #9650is_pydantic_dataclass()by 41% inpydantic/dataclasses.pyby @misrasaurabh1 in #9652to_snake()by 27% inpydantic/alias_generators.pyby @misrasaurabh1 in #9747unwrap_wrapped_function()by 93% inpydantic/_internal/_decorators.pyby @misrasaurabh1 in #9727Fixes
__spec__.parentwith__package__by @hramezani in #9331Sequencetype by @anesmemisevic in #9303_frame_depthby @Viicos in #9353ImportStringjson schema compatible by @amitschang in #9344PrivateAttr) from__init__signature in type checkers by @idan22moral in #9293TypeVardefaults robust to the CPythonPEP-696implementation by @AlexWaygood in #9426PlainSerializerwith builtin types by @Viicos in #9450strictspecification forStringConstraint(strict=False)by @vbmendes in #9476Selfwhere possible by @Viicos in #9479RootModel.model_constructsignature in themypyplugin by @Viicos in #9480validation_contextby @OhioDschungel6 in #9508dump_json/dump_pythonby @alexcouper in #9495Field()constructor by @bjmc in #9484TypeAdapterby @Viicos in #9570__setstate__of BaseModel by @anhpham1509 in #9584PEP 746by @adriangb in #9587TypeVarfields by @dmontagu in #9606regexflags in validation and json schema by @sydney-runkle in #9591IpvAnyAddressby @sydney-runkle in #9640__pydantic_extra__by @dmontagu in #9659Optional[Decimal]by @lazyhope in #9754validate_calltype params fix by @sydney-runkle in #9760re.Patternobject in regex patterns to allow for regex flags by @sydney-runkle in pydantic/pydantic-core#1318New Contributors
v2.7.4Compare Source
Github release
What's Changed
Packaging
pydantic.v1tov1.10.16reference by @sydney-runkle in #9639Fixes
recursive_guardas kwarg inFutureRef._evaluateby @vfazio in #9612v2.7.3Compare Source
GitHub release
What's Changed
Packaging
pydantic-coretov2.18.4by @sydney-runkle in #9550Fixes
v2.7.2Compare Source
GitHub release
What's Changed
Packaging
pydantic-coretov2.18.3by @sydney-runkle in #9515Fixes
__spec__.parentwith__package__by @hramezani in #9331ints with leading unary minus by @RajatRajdeep in pydantic/pydantic-core#1291strsubclass validation for enums by @sydney-runkle in [pydantic/pydantic-core#1273]https://github.com/pydantic/pydantic-core/pull/1273BigInts inLiterals andEnums by @samuelcolvin in [pydantic/pydantic-core#1297]https://github.com/pydantic/pydantic-core/pull/1297strsubclass as input by @davidhewitt in [pydantic/pydantic-core#1296]https://github.com/pydantic/pydantic-core/pull/1296v2.7.1Compare Source
GitHub release
What's Changed
Packaging
pydantic-coretov2.18.2by @sydney-runkle in #9307New Features
Changes
…by @LouisGobert in #9214Fixes
validation_aliasbehavior withmodel_constructforAliasChoicesandAliasPathby @sydney-runkle in #9223typing.Literaland import it outside the TYPE_CHECKING block by @frost-nzcr4 in #9232Secretserialization schema, applicable for unions by @sydney-runkle in #9240strictapplication tofunction-afterwithuse_enum_valuesby @sydney-runkle in #9279model_constructon a class which definesmodel_post_initfails withAttributeErrorby @babygrimes in #9168model_json_schemawith config types by @NeevCohen in #9287intby @samuelcolvin in pydantic/pydantic-core#1269ints with leading unary plus by @cknv in pydantic/pydantic-core#1272extra != 'ignore'andfrom_attributes=Trueby @davidhewitt in pydantic/pydantic-core#1276Enum'smissingfunction asValidationErrorby @sydney-runkle in pydantic/pydantic-core#1274Iterablevalidation by @davidhewitt in pydantic/pydantic-core#1271New Contributors
v2.7.0Compare Source
GitHub release
The code released in v2.7.0 is practically identical to that of v2.7.0b1.
What's Changed
Packaging
pyproject.tomlsections by @Viicos in #8899pydantic-coretov2.18.1by @sydney-runkle in #9211jiterv0.2.0by @samuelcolvin in pydantic/pydantic-core#1250New Features
FieldInfo.descriptionby @Viicos in #6563with_configdecorator to comply with typing spec by @Viicos in #8611ByteSize.human_readableby @jks15satoshi in #8706Secretbase type by @conradogarciaberrotaran in #8519Sphinxinventories for cross references in docs by @Viicos in #8682deprecatedfields by @Viicos in #8237field_serializer('*')by @ornariece in #9001model_configis defined as a model property by @alexeyt101 in #9004create_model()to supporttyping.Annotatedas input by @wannieman98 in #8947ClickhouseDsnsupport by @solidguy7 in #9062re.Pattern[str]topatternfield by @jag-k in #9053serialize_as_anyruntime setting by @sydney-runkle in #8830typing.Selfby @Youssefares in #9023contextto serialization by @ornariece in #8965Finalized in v2.7.0, rather than v2.7.0b1:
warningsparameter for serialization utilities to allow raising a warning by @Lance-Drane in #9166Changes
model_constructbehavior withextraby @sydney-runkle in #8807RootModelsubclasses by @sydney-runkle in #8857PEP570syntax by @Viicos in #8940enumandtypeto the JSON schema for single item literals by @dmontagu in #8944update_json_schemainternal function by @sydney-runkle in #9125Performance
enumvalidator improvements by @samuelcolvin in #9045enumvalidation and serialization to Rust by @samuelcolvin in #9064aarch64(Note: SIMD on x86 will be implemented in a future release) by @samuelcolvin in in pydantic/jiter#65Cow<str>fromjiterby @davidhewitt in pydantic/pydantic-core#1231Fixes
Sequences by @sydney-runkle in #8614__qualname__by @anci3ntr0ck in #8642__pydantic_extra__annotation being a string or inherited by @alexmojaki in #8659NameEmailby @Holi0317 in #8650BaseModelby @bluenote10 in #8651mypyplugin andno_strict_optional = Trueby @dmontagu in #8666ByteSizeerrortypechange by @sydney-runkle in #8681__pydantic_config__ignored for TypeDict by @13sin in #8734pytest v8.0.0due topytest.warns()starting to work insidepytest.raises()by @mgorny in #8678is_valid_fieldfrom 1.x formypyplugin by @DanielNoord in #8738mypystrict equality flag by @dmontagu in #8799FieldInfo.__repr_args__by @sydney-runkle in #8801BaseModeltype annotations to be resolvable bytyping.get_type_hintsby @devmonkey22 in #7680AliasGeneratorby @sydney-runkle in #8810date->datetimetimezone assumption fix by @sydney-runkle in #8823ast.Strby @Viicos in #8837deprecateddecorators by @Viicos in #8877NameEmailif name includes an email address by @NeevCohen in #8860TypeAdapter's typing compatible with special forms by @adriangb in #8923enums by @dmontagu in #8920model_json_schemausage by @sydney-runkle in #8928mypyplugin by @dmontagu in #9008PlainSerializerusage with std type constructor by @sydney-runkle in #9031Model.__getattr__()by @NeevCohen in #9082ClassVarforward ref inherited from parent class by @alexmojaki in #9097Trueby @andresliszt in #8977dequewhen passed toSequence[blah blah blah]by @sydney-runkle in #9128model_post_initby @Viicos in #9134model_constructwithvalidation_aliasby @ornariece in #9144Literalnulltypes by @bruno-f-cruz in #9135New Contributors
v2.6.4Compare Source
GitHub release
What's Changed
Fixes
AliasGeneratorwithcomputed_fielddecorator by @sydney-runkle in #8806v2.6.3Compare Source
GitHub release
What's Changed
Packaging
pydantic-settingsversion in the docs by @hramezani in #8906Fixes
v2.6.2Compare Source
GitHub release
What's Changed
Packaging
pydantic-core2.16.3 by @sydney-runkle in #8879Fixes
v2.6.1Compare Source
GitHub release
What's Changed
Packaging
pydantic-core2.16.2 by @sydney-runkle in #8717Fixes
mypyplugin andno_strict_optional = Trueby @dmontagu in #8666ByteSizeerrortypechange by @sydney-runkle in #8681Fieldannotations in dataclasses by @sydney-runkle in #8679PlainValidatorby @sydney-runkle in #8710Unionby @davidhewitt in pydantic/pydantic-core#1174computed_fieldJSON serializerexclude_nonebehavior by @sydney-runkle in pydantic/pydantic-core#1187v2.6.0Compare Source
GitHub release
The code released in v2.6.0 is practically identical to that of v2.6.0b1.
What's Changed
Packaging
email-validatorversion >= 2.0 by @commonism in #6033pydantic-extra-types==2.4.1by @yezz123 in #8478pyright==1.1.345by @Viicos in #8453New Features
NatsDsnby @ekeew in #6874ConfigDict.ser_json_inf_nanby @davidhewitt in #8159types.OnErrorOmitby @adriangb in #8222AliasGeneratorusage by @sydney-runkle in #8282yyyy-MM-DDdatetime parsing by @sydney-runkle in #8404ByteSizeclass #8415 by @luca-matei in #8507ByteSizeby @geospackle in #8537eval_type_backportto handle union operator and builtin generic subscripting in older Pythons by @alexmojaki in #8209dataclassfieldsinitby @dmontagu in #8552ValidationErrorby @davidhewitt in pydantic/pydantic-core#1119Changes
selfinBaseModelconstructor, so no field name can ever conflict with it by @ariebovenberg in #8072@validate_callreturn a function instead of a custom descriptor - fixes binding issue with inheritance and addsself/clsargument to validation errors by @alexmojaki in #8268BaseModeldocstring from JSON schema description by @sydney-runkle in #8352classpropertydecorator formodel_computed_fieldsby @Jocelyn-Gas in #8437Performance
intextraction by @samuelcolvin in pydantic/pydantic-core#1155dataclassserialization speedups by @samuelcolvin in pydantic/pydantic-core#1162HashMapcreation when looking up small JSON objects inLazyIndexMapsby @samuelcolvin in pydantic/jiter#55Peakwith more efficientPeekby @davidhewitt in pydantic/jiter#48Fixes
getattrwarning in deprecatedBaseConfigby @tlambert03 in #7183model_fields, not whole__dict__by @alexmojaki in #7786mypyplugin by @dmontagu in #7411mypyerror on untypedClassVarby @vincent-hachin-wmx in #8138BaseModel.__eq__instead of whole__dict__by @QuentinSoubeyranAqemia in #7825strictdocstring inmodel_validatemethod. by @LukeTonin in #8223computed_fieldby @Viicos in #8227validate_callConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.