-
Notifications
You must be signed in to change notification settings - Fork 3
Update dependency pydantic to v1 [SECURITY] #41
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
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/pypi-pydantic-vulnerability
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8879379 to
9c15c1b
Compare
0444049 to
bb61728
Compare
bb61728 to
6f49832
Compare
6f49832 to
c147669
Compare
4cdb87f to
b48c80e
Compare
4a639cc to
153b80e
Compare
153b80e to
737d62d
Compare
737d62d to
25a3c73
Compare
25a3c73 to
9559397
Compare
9559397 to
1e40ec2
Compare
1e40ec2 to
518fa99
Compare
da7b668 to
19fa2f4
Compare
19fa2f4 to
9de699f
Compare
9de699f to
779ced6
Compare
779ced6 to
a18a513
Compare
a18a513 to
8a22175
Compare
8a22175 to
3669d87
Compare
3669d87 to
4674965
Compare
4674965 to
cdc7be3
Compare
cdc7be3 to
25b315a
Compare
15e1615 to
25b315a
Compare
25b315a to
d1b11cc
Compare
d1b11cc to
82a3db4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.9-><=1.10.13GitHub Vulnerability Alerts
CVE-2024-3772
Regular expression denial of service in Pydantic < 2.4.0, < 1.10.13 allows remote attackers to cause denial of service via a crafted email string.
Release Notes
pydantic/pydantic (pydantic)
v1.10.13Compare Source
pydantic.validate_email, #7673 by @hramezaniv1.10.12Compare Source
maxlenproperty being dropped ondequevalidation. Happened only if the deque item has been typed. Changes the_validate_sequence_likefunc, #6581 by @maciekglowkav1.10.11Compare Source
v1.10.10Compare Source
Jsonfield support to settings management, #6250 by @hramezaniv1.10.9Compare Source
v1.10.8Compare Source
Literalusage withtyping-extension==4.6.0, #5826 by @hramezaniAnyClassMethodfor changes in python/typeshed#9771, #5505 by @ITProKylev1.10.7Compare Source
ConstrainedStrwithregexas dict key, #5223 by @matejetzfrom_ormin their own classes, #5187 by @dmontaguInitVarusage with pydantic dataclasses, mypy version1.1.1and the custom mypy plugin, #5162 by @cdce8pv1.10.6Compare Source
functools.partialandfunctools.partialmethodwhen checking the signature, #5126 by @JensHeinrichdataclass_transformdecorator for pydantic dataclasses, #5111 by @cdce8pValidationError, notConfigError, when a discriminator value is unhashable, #4773 by @kurtmckeev1.10.5Compare Source
GenericModels with complex sets of models, #5052 by @MarkusSintonenRecursionErrorwhen deep-copying dataclass types wrapped by pydantic, #4949 by @mbillingrX | Yunion syntax breakingGenericModel, #4146 by @thenxv1.10.4Compare Source
typing-extensions>=4.2.0, #4885 by @samuelcolvinv1.10.3Compare Source
NOTE: v1.10.3 was "yanked" from PyPI due to #4885 which is fixed in v1.10.4
schemaandschema_jsonon models where a model instance is a one of default values, #4781 by @BobroniumDataclassProxy, #4695 by @PrettyWoodpostgresql+psycopgas allowed scheme forPostgreDsnto make it usable with SQLAlchemy 2, #4689 by @morianpatternPropertiesandadditionalProperties, #4641 by @jpariseunique_items, #4568 by @mfulgoGenericModelwithCallableparam raising aTypeError, #4551 by @mfulgoStrictStrtype annotation, #4538 by @sispdataclass_transformkeyword argument name fromfield_descriptorstofield_specifiers, #4500 by @samuelcolvin__post_init__when dataclasses are inherited, #4487 by @PrettyWoodv1.10.2Compare Source
GitHub release
What's Changed
This is the final 2.12 release. It features the work of 20 external contributors and provides useful new features, along with initial Python 3.14 support.
Several minor changes (considered non-breaking changes according to our versioning policy)
are also included in this release. Make sure to look into them before upgrading.
Changes (see the alpha and beta releases for additional changes since 2.11):
Packaging
New Features
extraparameter to the validate functions by @anvilpete in #12233exclude_computed_fieldsserialization option by @Viicos in #12334preverse_empty_pathURL options by @Viicos in #12336union_formatparameter to JSON Schema generation by @Viicos in #12147__qualname__parameter forcreate_modelby @Atry in #12001Fixes
TypeAdapterby @Viicos in #12324Anyfor context type annotation inTypeAdapterby @inducer in #12279FieldInfoinpydantic.fields.__all__by @Viicos in #12339validation_aliasin@validate_callby @Viicos in #12340Anyas context annotation in plugin API by @Viicos in #12341stacklevelin warnings when possible by @Viicos in #12342New Contributors
v1.10.1Compare Source
GitHub release
The code released in v2.9.0 is practically identical to that of v2.9.0b2.
What's Changed
Packaging
rufftov0.5.0andpyrighttov1.1.369by @sydney-runkle in #9801pydantic-extra-typestov2.9.0by @sydney-runkle in #9832pdm v2.18.1by @Viicos in #10138v1version stub tov1.10.18by @sydney-runkle in #10214pydantic-coretov2.23.2by @sydney-runkle in #10311New Features
ZoneInfoby @Youssefares in #9896Config.val_json_bytesby @josh-newman in #9770complexnumber by @changhc in #9654annotated_types.Notby @aditkumar72 in #10210WithJsonSchemato inject$refs w/httporhttpslinks by @dAIsySHEng1 in #9863PathLiketypes by @nix010 in #9764strorcallablediscriminators to select the correct serializer by @sydney-runkle in in pydantic/pydantic-core#1397Changes
dicttypejson_schema_extraby @sydney-runkle in #9792patternfor incompatible types by @sydney-runkle in #10158'allOf'JSON schema workarounds by @dpeachey in #10029typed_dict_clsdata fromCoreMetadataby @sydney-runkle in #10180Examplesclass by @Viicos in #10181initial_metadatafrom internal metadata construct by @sydney-runkle in #10194re.Pattern.searchinstead ofre.Pattern.matchfor consistency withrustbehavior by @tinez in pydantic/pydantic-core#1368pydantic-coreserialization warning by @BoxyUwU in pydantic/pydantic-core#1377pydantic-core, changemetadatatype hint in core schemas fromAny->Dict[str, Any] | Noneby @sydney-runkle in pydantic/pydantic-core#1411selfisn't returned from model validator by @sydney-runkle in #10255Performance
BaseModelby @sydney-runkle in #10013Minor Internal Improvements
multiple_of_validator()by 31% inpydantic/_internal/_validators.pyby @misrasaurabh1 in #9839ModelPrivateAttr.__set_name__()by 18% inpydantic/fields.pyby @misrasaurabh1 in #9841dataclass()by 7% inpydantic/dataclasses.pyby @misrasaurabh1 in #9843_field_name_for_signatureby 37% inpydantic/_internal/_signature.pyby @misrasaurabh1 in #9951GenerateSchema._unpack_refs_defsby 26% inpydantic/_internal/_generate_schema.pyby @misrasaurabh1 in #9949apply_each_item_validatorsby 100% inpydantic/_internal/_generate_schema.pyby @misrasaurabh1 in #9950ConfigWrapper.core_configby 28% inpydantic/_internal/_config.pyby @misrasaurabh1 in #9953Fixes
use_enum_valuesonLiteraltypes by @kwint in #9787BaseModel/RootModelinheritance by @dmontagu in #9913strtype annotation withAnyin validator factories in documentation on validators by @maximilianfellhuber in #9885ComputedFieldInfo.wrapped_propertypointer when a property setter is assigned by @tlambert03 in #9892main.IncEnxby @tlambert03 in #9924type[Annotated[...]]by @Viicos in #9932mypyplugin: handle frozen fields on a per-field basis by @dmontagu in #9935invalid-annotated-typeerror code by @sydney-runkle in #9948uuid,url, andiptypes by @sydney-runkle in #9975dateschemas to_generate_schema.pyby @sydney-runkle in #9976decimal.Decimalvalidation to_generate_schema.pyby @sydney-runkle in #9977_std_types_schema.pyby @sydney-runkle in #9959GenerateSchema.match_typeoptions by @sydney-runkle in #9961dataclassignoringdefault_factorypassed in Annotated by @kc0506 in #9971Sequenceignoringdiscriminatorby @kc0506 in #9980IPvAnyAddressandIPvAnyInterfaceby @haoyun in #9990mypyplugin forfrom_ormcheck requiring from_attributes=True config by @radekwlsk in #9938strict=Trueto__init__inmypyplugin by @kc0506 in #9998dequeannotations by @sydney-runkle in #10018__pydantic_extra__annotation in specific circumstances by @Viicos in #10070frozenenforcement fordataclassesby @sydney-runkle in #10066__get_pydantic_core_schema__signature by @Viicos in #10075is_annotatedconsistently by @Viicos in #10095PydanticDeprecatedSince26typo by @kc0506 in #10101pyrighttests, refactor model decorators signatures by @Viicos in #10092ipserialization logic by @sydney-runkle in #10112dataclassesby @mochi22 in #10082when_usedset to'json-unless-none'and the default value isNoneby @Viicos in #10121ImportStringspecial cases by @sydney-runkle in #10137__prefixed annotations by @sydney-runkle in #10136nullableschemas withserializationschema available during JSON Schema generation by @Viicos in #10132BaseModelannotations by @kc0506 in #10110PrivateAttrwithAnnotatedby @Viicos in #10157numbertype for literal and enum schemas by @Viicos in #10172MappingandMutableMappingannotations to use mapping schema instead of dict schema by @sydney-runkle in #10020field_serializerwith computed field when using*by @nix010 in pydantic/pydantic-core#1349Unionserializer before inference by @sydney-runkle in pydantic/pydantic-core#1398floatserialization behavior instrictmode by @sydney-runkle in pydantic/pydantic-core#1400exactnessinto Decimal validation logic to improve union validation behavior by @sydney-runkle in in pydantic/pydantic-core#1405pytest.warns()by @mgorny in #10241ModelMetaclassby @Viicos in #10242__init__by @Viicos in #10264BigIntserialization forintsubclasses by @kxx317 in pydantic/pydantic-core#1417infoby @sydney-runkle in #10277__pydantic_complete__is set when rebuildingdataclassesby @Viicos in #10291schema_generatorconfig value inTypeAdapterby @sydney-runkle in #10300New Contributors
pydanticpydantic-corev1.10.0Compare Source
dataclassdecorator to really act like its standard lib equivalent.It hence keeps
__eq__,__hash__, ... and makes comparison with its non-validated version possible.It also fixes usage of
frozendataclasses in fields and usage ofdefault_factoryin nested dataclasses.The support of
Config.extrahas been added.Finally, config customization directly via a
dictis now possible, #2557 by @PrettyWoodBREAKING CHANGES:
compiledboolean (whether pydantic is compiled with cython) has been moved frommain.pytoversion.pyConfig.extrais supported,dataclassignores by default extra arguments (likeBaseModel)__set_name__protocol inBaseModelfor PrivateAttrs, #4407 by @tlambert03parse_env_varinConfig, #4406 by @acmiyaguchimastertomain, #4405 by @hramezaniStrictStrdoes not raiseValidationErrorwhenmax_lengthis present inField, #4388 by @hramezaniSecretStrandSecretByteshashable, #4387 by @chbndrhnnsStrictBytesdoes not raiseValidationErrorwhenmax_lengthis present inField, #4380 by @JeanArhancettype, #4375 by @hramezanire.Pattern, #4366 by @hramezani__post_init_post_parse__is incorrectly passed keyword arguments when no__post_init__is defined, #4361 by @hramezaniForwardRefandCallablefrompydantic.typinginstead oftypingand also exposeMappingIntStrAny, #4358 by @aminalaeeAnytypes from thedataclassdecorator so it can be used with thedisallow_any_exprmypy option, #4356 by @DetachHeadpydantic/pydantic, #4348 by @yezz123Extra.forbidis validated multiple times, #4343 by @detachheadoneOfinstead ofanyOfwhen generating OpenAPI schema definitions, #4335 by @MaxwellPayneJsontype.Json[list[str]]will be now inferred aslist[str],Json[Any]should be used instead of plainJson.Runtime behaviour is not changed, #4332 by @Bobronium
alias is not Nonecheck, rather thanbool(alias), #4253 by @sergeytsaplinForwardRefs inField.outer_type_, #4249 by @JacobHayes__dataclass_transform__has been replaced bytyping_extensions.dataclass_transform, which is the preferred way to mark pydantic models as a dataclass under PEP 681, #4241 by @multimericConfigwhen validating nestedNamedTuplefields, #4219 by @synekBaseModel.constructto work with aliased Fields, #4192 by @kylebamossmart_deepcopyand revert todeepcopyif so, #4184 by @coneybeareConfig.anystr_upperandto_upperkwarg to constr and conbytes, #4165 by @sathelersetandfrozensetwhen they include default values, #4155 by @aminalaee@validatorare classmethods, #4102 by @DMRobertsonType[]in schema, #4051 by @aminalaeedefaultvalue in JSON Schema whenconst=True, #4031 by @aminalaeeallow_inf_nan, #3994 by @tiangoloenv_prefixhad characters in common withenv_nested_delimiter, #3975 by @arsenroncreate_model, #3945 by @hot123sBaseModel, #3920 by @irgolicMinus was serialized in incorrect place ("P-1DT23H59M59.888735S" instead of correct "-P1DT23H59M59.888735S"), #3899 by @07pepa
supports the following schemes:
cockroachdb,cockroachdb+psycopg2andcockroachdb+asyncpg, #3839 by @blubber__init__method in models, #3824 by @patrick91BaseModelinstances, #3777 by @PrettyWoodConstrainedDateandcondate, #3740 by @hottwajkw_onlyin dataclasses, #3670 by @detachheadColorclass, #3646 by @aminalaeeto_lower_camel()for "non pascal case" camel case, #3463 by @schlerpdefaultanddefault_factoryarguments in Mypy plugin, #3430 by @klaa97inspect.signatureforBaseModel, #3413 by @fix-inspect-signatureSecretFieldabstract class so that all the current and future secret fields likeSecretStrandSecretByteswill derive from it, #3409 by @expobrainPostgresDsn, #3337 by @rglskSecretsSettingsSourceto respectconfig.case_sensitive, #3273 by @JeanArhancetConfigErrorwhen multiple fields are incorrectly set for a single validator, #3215 by @SunsetOrangeFields insideAnnotatedforTypedDictsrequired, #3133 by @ezegomezint_validator, #3112 by @ojii__rich_repr__method toRepresentationclass which enables pretty printing with Rich, #3099 by @willmcguganAnyUrland descendent types, #3061 by @FaresAhmedbvalidate_argumentsdecorator now supportsalias, #3019 by @MAD-py__dict__and__weakref__attributes inAnyUrland IP address fields, #2890 by @nuno-andreFinalin a field type annotation, #2766 by @uriyyotyping_extensions>=4.1.0to guaranteedataclass_transformis available, #4424 by @commonismcopy_on_model_validationto reflect recent changes, #4369 by @samuelcolvin__slots__is passed tocreate_model,__slots__is then ignored, #4432 by @samuelcolvinBaseSettings.Configto avoid mypy errors, also correct mypy version compatibility notice in docs, #4450 by [@samuelcolvin](https://redirect.github.com/samueConfiguration
📅 Schedule: Branch creation - "" (UTC), 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 was generated by Mend Renovate. View the repository job log.