chore(deps): update dependency pydantic to v1.10.13 [security] #121
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.8.2
->==1.10.13
GitHub 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.13
Compare Source
pydantic.validate_email
, #7673 by @hramezaniv1.10.12
Compare Source
maxlen
property being dropped ondeque
validation. Happened only if the deque item has been typed. Changes the_validate_sequence_like
func, #6581 by @maciekglowkav1.10.11
Compare Source
v1.10.10
Compare Source
Json
field support to settings management, #6250 by @hramezaniv1.10.9
Compare Source
v1.10.8
Compare Source
Literal
usage withtyping-extension==4.6.0
, #5826 by @hramezaniAnyClassMethod
for changes in python/typeshed#9771, #5505 by @ITProKylev1.10.7
Compare Source
ConstrainedStr
withregex
as dict key, #5223 by @matejetzfrom_orm
in their own classes, #5187 by @dmontaguInitVar
usage with pydantic dataclasses, mypy version1.1.1
and the custom mypy plugin, #5162 by @cdce8pv1.10.6
Compare Source
functools.partial
andfunctools.partialmethod
when checking the signature, #5126 by @JensHeinrichdataclass_transform
decorator for pydantic dataclasses, #5111 by @cdce8pValidationError
, notConfigError
, when a discriminator value is unhashable, #4773 by @kurtmckeev1.10.5
Compare Source
GenericModel
s with complex sets of models, #5052 by @MarkusSintonenRecursionError
when deep-copying dataclass types wrapped by pydantic, #4949 by @mbillingrX | Y
union syntax breakingGenericModel
, #4146 by @thenxv1.10.4
Compare Source
typing-extensions>=4.2.0
, #4885 by @samuelcolvinv1.10.3
Compare Source
NOTE: v1.10.3 was "yanked" from PyPI due to #4885 which is fixed in v1.10.4
schema
andschema_json
on models where a model instance is a one of default values, #4781 by @BobroniumDataclassProxy
, #4695 by @PrettyWoodpostgresql+psycopg
as allowed scheme forPostgreDsn
to make it usable with SQLAlchemy 2, #4689 by @morianpatternProperties
andadditionalProperties
, #4641 by @jpariseunique_items
, #4568 by @mfulgoGenericModel
withCallable
param raising aTypeError
, #4551 by @mfulgoStrictStr
type annotation, #4538 by @sispdataclass_transform
keyword argument name fromfield_descriptors
tofield_specifiers
, #4500 by @samuelcolvin__post_init__
when dataclasses are inherited, #4487 by @PrettyWoodv1.10.2
Compare Source
GitHub release
What's Changed
Packaging
Fixes
v1.10.1
Compare Source
GitHub release
The code released in v2.9.0 is practically identical to that of v2.9.0b2.
What's Changed
Packaging
ruff
tov0.5.0
andpyright
tov1.1.369
by @sydney-runkle in #9801pydantic-extra-types
tov2.9.0
by @sydney-runkle in #9832pdm v2.18.1
by @Viicos in #10138v1
version stub tov1.10.18
by @sydney-runkle in #10214pydantic-core
tov2.23.2
by @sydney-runkle in #10311New Features
ZoneInfo
by @Youssefares in #9896Config.val_json_bytes
by @josh-newman in #9770complex
number by @changhc in #9654annotated_types.Not
by @aditkumar72 in #10210WithJsonSchema
to inject$ref
s w/http
orhttps
links by @dAIsySHEng1 in #9863PathLike
types by @nix010 in #9764str
orcallable
discriminators to select the correct serializer by @sydney-runkle in in pydantic/pydantic-core#1397Changes
dict
typejson_schema_extra
by @sydney-runkle in #9792pattern
for incompatible types by @sydney-runkle in #10158'allOf'
JSON schema workarounds by @dpeachey in #10029typed_dict_cls
data fromCoreMetadata
by @sydney-runkle in #10180Examples
class by @Viicos in #10181initial_metadata
from internal metadata construct by @sydney-runkle in #10194re.Pattern.search
instead ofre.Pattern.match
for consistency withrust
behavior by @tinez in pydantic/pydantic-core#1368pydantic-core
serialization warning by @BoxyUwU in pydantic/pydantic-core#1377pydantic-core
, changemetadata
type hint in core schemas fromAny
->Dict[str, Any] | None
by @sydney-runkle in pydantic/pydantic-core#1411self
isn't returned from model validator by @sydney-runkle in #10255Performance
BaseModel
by @sydney-runkle in #10013Minor Internal Improvements
multiple_of_validator()
by 31% inpydantic/_internal/_validators.py
by @misrasaurabh1 in #9839ModelPrivateAttr.__set_name__()
by 18% inpydantic/fields.py
by @misrasaurabh1 in #9841dataclass()
by 7% inpydantic/dataclasses.py
by @misrasaurabh1 in #9843_field_name_for_signature
by 37% inpydantic/_internal/_signature.py
by @misrasaurabh1 in #9951GenerateSchema._unpack_refs_defs
by 26% inpydantic/_internal/_generate_schema.py
by @misrasaurabh1 in #9949apply_each_item_validators
by 100% inpydantic/_internal/_generate_schema.py
by @misrasaurabh1 in #9950ConfigWrapper.core_config
by 28% inpydantic/_internal/_config.py
by @misrasaurabh1 in #9953Fixes
use_enum_values
onLiteral
types by @kwint in #9787BaseModel/RootModel
inheritance by @dmontagu in #9913str
type annotation withAny
in validator factories in documentation on validators by @maximilianfellhuber in #9885ComputedFieldInfo.wrapped_property
pointer when a property setter is assigned by @tlambert03 in #9892main.IncEnx
by @tlambert03 in #9924type[Annotated[...]]
by @Viicos in #9932mypy
plugin: handle frozen fields on a per-field basis by @dmontagu in #9935invalid-annotated-type
error code by @sydney-runkle in #9948uuid
,url
, andip
types by @sydney-runkle in #9975date
schemas to_generate_schema.py
by @sydney-runkle in #9976decimal.Decimal
validation to_generate_schema.py
by @sydney-runkle in #9977_std_types_schema.py
by @sydney-runkle in #9959GenerateSchema.match_type
options by @sydney-runkle in #9961dataclass
ignoringdefault_factory
passed in Annotated by @kc0506 in #9971Sequence
ignoringdiscriminator
by @kc0506 in #9980IPvAnyAddress
andIPvAnyInterface
by @haoyun in #9990mypy
plugin forfrom_orm
check requiring from_attributes=True config by @radekwlsk in #9938strict=True
to__init__
inmypy
plugin by @kc0506 in #9998deque
annotations by @sydney-runkle in #10018__pydantic_extra__
annotation in specific circumstances by @Viicos in #10070frozen
enforcement fordataclasses
by @sydney-runkle in #10066__get_pydantic_core_schema__
signature by @Viicos in #10075is_annotated
consistently by @Viicos in #10095PydanticDeprecatedSince26
typo by @kc0506 in #10101pyright
tests, refactor model decorators signatures by @Viicos in #10092ip
serialization logic by @sydney-runkle in #10112dataclasses
by @mochi22 in #10082when_used
set to'json-unless-none'
and the default value isNone
by @Viicos in #10121ImportString
special cases by @sydney-runkle in #10137__
prefixed annotations by @sydney-runkle in #10136nullable
schemas withserialization
schema available during JSON Schema generation by @Viicos in #10132BaseModel
annotations by @kc0506 in #10110PrivateAttr
withAnnotated
by @Viicos in #10157number
type for literal and enum schemas by @Viicos in #10172Mapping
andMutableMapping
annotations to use mapping schema instead of dict schema by @sydney-runkle in #10020field_serializer
with computed field when using*
by @nix010 in pydantic/pydantic-core#1349Union
serializer before inference by @sydney-runkle in pydantic/pydantic-core#1398float
serialization behavior instrict
mode by @sydney-runkle in pydantic/pydantic-core#1400exactness
into Decimal validation logic to improve union validation behavior by @sydney-runkle in in pydantic/pydantic-core#1405pytest.warns()
by @mgorny in #10241ModelMetaclass
by @Viicos in #10242__init__
by @Viicos in #10264BigInt
serialization forint
subclasses by @kxx317 in pydantic/pydantic-core#1417info
by @sydney-runkle in #10277__pydantic_complete__
is set when rebuildingdataclasses
by @Viicos in #10291schema_generator
config value inTypeAdapter
by @sydney-runkle in #10300New Contributors
pydantic
pydantic-core
v1.10.0
Compare Source
dataclass
decorator 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
frozen
dataclasses in fields and usage ofdefault_factory
in nested dataclasses.The support of
Config.extra
has been added.Finally, config customization directly via a
dict
is now possible, #2557 by @PrettyWoodBREAKING CHANGES:
compiled
boolean (whether pydantic is compiled with cython) has been moved frommain.py
toversion.py
Config.extra
is supported,dataclass
ignores by default extra arguments (likeBaseModel
)__set_name__
protocol inBaseModel
for PrivateAttrs, #4407 by @tlambert03parse_env_var
inConfig
, #4406 by @acmiyaguchimaster
tomain
, #4405 by @hramezaniStrictStr
does not raiseValidationError
whenmax_length
is present inField
, #4388 by @hramezaniSecretStr
andSecretBytes
hashable, #4387 by @chbndrhnnsStrictBytes
does not raiseValidationError
whenmax_length
is 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 @hramezaniForwardRef
andCallable
frompydantic.typing
instead oftyping
and also exposeMappingIntStrAny
, #4358 by @aminalaeeAny
types from thedataclass
decorator so it can be used with thedisallow_any_expr
mypy option, #4356 by @DetachHeadpydantic/pydantic
, #4348 by @yezz123Extra.forbid
is validated multiple times, #4343 by @detachheadoneOf
instead ofanyOf
when generating OpenAPI schema definitions, #4335 by @MaxwellPayneJson
type.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 None
check, rather thanbool(alias)
, #4253 by @sergeytsaplinForwardRef
s 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 @multimericConfig
when validating nestedNamedTuple
fields, #4219 by @synekBaseModel.construct
to work with aliased Fields, #4192 by @kylebamossmart_deepcopy
and revert todeepcopy
if so, #4184 by @coneybeareConfig.anystr_upper
andto_upper
kwarg to constr and conbytes, #4165 by @sathelerset
andfrozenset
when they include default values, #4155 by @aminalaee@validator
are classmethods, #4102 by @DMRobertsonType[]
in schema, #4051 by @aminalaeedefault
value in JSON Schema whenconst=True
, #4031 by @aminalaeeallow_inf_nan
, #3994 by @tiangoloenv_prefix
had 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+psycopg2
andcockroachdb+asyncpg
, #3839 by @blubber__init__
method in models, #3824 by @patrick91BaseModel
instances, #3777 by @PrettyWoodConstrainedDate
andcondate
, #3740 by @hottwajkw_only
in dataclasses, #3670 by @detachheadColor
class, #3646 by @aminalaeeto_lower_camel()
for "non pascal case" camel case, #3463 by @schlerpdefault
anddefault_factory
arguments in Mypy plugin, #3430 by @klaa97inspect.signature
forBaseModel
, #3413 by @fix-inspect-signatureSecretField
abstract class so that all the current and future secret fields likeSecretStr
andSecretBytes
will derive from it, #3409 by @expobrainPostgresDsn
, #3337 by @rglskSecretsSettingsSource
to respectconfig.case_sensitive
, #3273 by @JeanArhancetConfigError
when multiple fields are incorrectly set for a single validator, #3215 by @SunsetOrangeField
s insideAnnotated
forTypedDicts
required, #3133 by @ezegomezint_validator
, #3112 by @ojii__rich_repr__
method toRepresentation
class which enables pretty printing with Rich, #3099 by @willmcguganAnyUrl
and descendent types, #3061 by @FaresAhmedbvalidate_arguments
decorator now supportsalias
, #3019 by @MAD-py__dict__
and__weakref__
attributes inAnyUrl
and IP address fields, #2890 by @nuno-andreFinal
in a field type annotation, #2766 by @uriyyotyping_extensions>=4.1.0
to guaranteedataclass_transform
is available, #4424 by @commonismcopy_on_model_validation
to reflect recent changes, #4369 by @samuelcolvin__slots__
is passed tocreate_model
,__slots__
is then ignored, #4432 by @samuelcolvinBaseSettings.Config
to avoid mypy errors, also correct mypy version compatibility notice in docs, #4450 by @samuelcolvinv1.9.2
Compare Source
Revert Breaking Change: v1.9.1 introduced a breaking change where model fields were
deep copied by default, this release reverts the default behaviour to match v1.9.0 and before,
while also allow deep-copy behaviour via
copy_on_model_validation = 'deep'
. See #4092 for more information.Config.copy_on_model_validation
is now a str which must be'none'
,'deep'
, or'shallow'
corresponding to not copying, deep copy & shallow copy; default'shallow'
,#4093 by @timkpaine
v1.9.1
Compare Source
Thank you to pydantic's sponsors:
@tiangolo, @stellargraph, @JonasKs, @grillazz, @Mazyod, @kevinalh, @chdsbd, @povilasb, @povilasb, @jina-ai,
@mainframeindustries, @robusta-dev, @SendCloud, @rszamszur, @jodal, @hardbyte, @corleyma, @daddycocoaman,
@Rehket, @jokull, @reillysiemens, @westonsteimel, @primer-io, @koxudaxi, @browniebroke, @stradivari96,
@adriangb, @kamalgill, @jqueguiner, @dev-zero, @datarootsio, @RedCarpetUp
for their kind support.
generics._generic_types_cache
andgenerics._assigned_parameters
to avoid unlimited increase in memor
Configuration
📅 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.