-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
⬆️ Update dependency pydantic to v2 #123
Merged
Merged
Conversation
This file contains 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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #123 +/- ##
==========================================
- Coverage 97.95% 97.70% -0.26%
==========================================
Files 30 30
Lines 784 784
==========================================
- Hits 768 766 -2
- Misses 16 18 +2 ☔ View full report in Codecov by Sentry. |
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
2 times, most recently
from
August 23, 2023 23:00
ead5de5
to
2eacabe
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
2 times, most recently
from
August 28, 2023 12:37
8226a8e
to
283607c
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
3 times, most recently
from
September 8, 2023 11:18
cdc7f64
to
372cf05
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
2 times, most recently
from
September 25, 2023 17:46
cb44f04
to
6b1592a
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
3 times, most recently
from
September 28, 2023 10:28
0916d5f
to
51114ea
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
2 times, most recently
from
October 13, 2023 10:36
659aa5c
to
bbe33f3
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
2 times, most recently
from
November 15, 2023 16:22
eaad4d0
to
9696eea
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
from
November 22, 2023 16:46
9696eea
to
e344a6f
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
from
December 22, 2023 11:22
e344a6f
to
120ec9c
Compare
eigenein
previously approved these changes
Dec 22, 2023
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
from
December 22, 2023 12:16
120ec9c
to
9e9a22a
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
from
December 22, 2023 13:18
9e9a22a
to
2ff8b05
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
2 times, most recently
from
January 29, 2024 15:45
7a7c238
to
7b9090e
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
from
February 5, 2024 15:52
7b9090e
to
2042291
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
from
February 23, 2024 19:27
2042291
to
c43b8a5
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
5 times, most recently
from
March 1, 2024 11:39
d8bca6a
to
749a7e5
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
from
March 12, 2024 13:27
749a7e5
to
a4ee391
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
2 times, most recently
from
April 11, 2024 20:11
6c9c889
to
f7814db
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
4 times, most recently
from
April 22, 2024 12:38
08ca67d
to
790f057
Compare
renovate
bot
force-pushed
the
renovate/pydantic-2.x
branch
from
April 22, 2024 12:49
790f057
to
24c472e
Compare
eigenein
approved these changes
Apr 22, 2024
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.15
->2.7.0
Release Notes
pydantic/pydantic (pydantic)
v2.7.0
Compare Source
GitHub release
The code released in v2.7.0 is practically identical to that of v2.7.0b1.
What's Changed
Packaging
pyproject.toml
sections by @Viicos in #8899pydantic-core
tov2.18.1
by @sydney-runkle in #9211jiter
v0.2.0
by @samuelcolvin in pydantic/pydantic-core#1250New Features
FieldInfo.description
by @Viicos in #6563with_config
decorator to comply with typing spec by @Viicos in #8611ByteSize.human_readable
by @jks15satoshi in #8706Secret
base type by @conradogarciaberrotaran in #8519Sphinx
inventories for cross references in docs by @Viicos in #8682deprecated
fields by @Viicos in #8237field_serializer('*')
by @ornariece in #9001model_config
is defined as a model property by @alexeyt101 in #9004create_model()
to supporttyping.Annotated
as input by @wannieman98 in #8947ClickhouseDsn
support by @solidguy7 in #9062re.Pattern[str]
topattern
field by @jag-k in #9053serialize_as_any
runtime setting by @sydney-runkle in #8830typing.Self
by @Youssefares in #9023context
to serialization by @ornariece in #8965Finalized in v2.7.0, rather than v2.7.0b1:
warnings
parameter for serialization utilities to allow raising a warning by @Lance-Drane in #9166Changes
model_construct
behavior withextra
by @sydney-runkle in #8807RootModel
subclasses by @sydney-runkle in #8857PEP570
syntax by @Viicos in #8940enum
andtype
to the JSON schema for single item literals by @dmontagu in #8944update_json_schema
internal function by @sydney-runkle in #9125Performance
enum
validator improvements by @samuelcolvin in #9045enum
validation 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>
fromjiter
by @davidhewitt in pydantic/pydantic-core#1231Fixes
Sequence
s by @sydney-runkle in #8614__qualname__
by @anci3ntr0ck in #8642__pydantic_extra__
annotation being a string or inherited by @alexmojaki in #8659NameEmail
by @Holi0317 in #8650BaseModel
by @bluenote10 in #8651mypy
plugin andno_strict_optional = True
by @dmontagu in #8666ByteSize
errortype
change by @sydney-runkle in #8681__pydantic_config__
ignored for TypeDict by @13sin in #8734pytest v8.0.0
due topytest.warns()
starting to work insidepytest.raises()
by @mgorny in #8678is_valid_field
from 1.x formypy
plugin by @DanielNoord in #8738mypy
strict equality flag by @dmontagu in #8799FieldInfo.__repr_args__
by @sydney-runkle in #8801BaseModel
type annotations to be resolvable bytyping.get_type_hints
by @devmonkey22 in #7680AliasGenerator
by @sydney-runkle in #8810date
->datetime
timezone assumption fix by @sydney-runkle in #8823ast.Str
by @Viicos in #8837deprecated
decorators by @Viicos in #8877NameEmail
if name includes an email address by @NeevCohen in #8860TypeAdapter
's typing compatible with special forms by @adriangb in #8923enum
s by @dmontagu in #8920model_json_schema
usage by @sydney-runkle in #8928mypy
plugin by @dmontagu in #9008PlainSerializer
usage with std type constructor by @sydney-runkle in #9031Model.__getattr__()
by @NeevCohen in #9082ClassVar
forward ref inherited from parent class by @alexmojaki in #9097True
by @andresliszt in #8977deque
when passed toSequence[blah blah blah]
by @sydney-runkle in #9128model_post_init
by @Viicos in #9134model_construct
withvalidation_alias
by @ornariece in #9144Literal
null
types by @bruno-f-cruz in #9135New Contributors
v2.6.4
Compare Source
GitHub release
What's Changed
Fixes
AliasGenerator
withcomputed_field
decorator by @sydney-runkle in #8806v2.6.3
Compare Source
GitHub release
What's Changed
Packaging
pydantic-settings
version in the docs by @hramezani in #8906Fixes
v2.6.2
Compare Source
GitHub release
What's Changed
Packaging
pydantic-core
2.16.3 by @sydney-runkle in #8879Fixes
v2.6.1
Compare Source
GitHub release
What's Changed
Packaging
pydantic-core
2.16.2 by @sydney-runkle in #8717Fixes
mypy
plugin andno_strict_optional = True
by @dmontagu in #8666ByteSize
errortype
change by @sydney-runkle in #8681Field
annotations in dataclasses by @sydney-runkle in #8679PlainValidator
by @sydney-runkle in #8710Union
by @davidhewitt in pydantic/pydantic-core#1174computed_field
JSON serializerexclude_none
behavior by @sydney-runkle in pydantic/pydantic-core#1187v2.6.0
Compare Source
GitHub release
The code released in v2.6.0 is practically identical to that of v2.6.0b1.
What's Changed
Packaging
email-validator
version >= 2.0 by @commonism in #6033pydantic-extra-types==2.4.1
by @yezz123 in #8478pyright==1.1.345
by @Viicos in #8453New Features
NatsDsn
by @ekeew in #6874ConfigDict.ser_json_inf_nan
by @davidhewitt in #8159types.OnErrorOmit
by @adriangb in #8222AliasGenerator
usage by @sydney-runkle in #8282yyyy-MM-DD
datetime parsing by @sydney-runkle in #8404ByteSize
class #8415 by @luca-matei in #8507ByteSize
by @geospackle in #8537eval_type_backport
to handle union operator and builtin generic subscripting in older Pythons by @alexmojaki in #8209dataclass
fieldsinit
by @dmontagu in #8552ValidationError
by @davidhewitt in pydantic/pydantic-core#1119Changes
self
inBaseModel
constructor, so no field name can ever conflict with it by @ariebovenberg in #8072@validate_call
return a function instead of a custom descriptor - fixes binding issue with inheritance and addsself/cls
argument to validation errors by @alexmojaki in #8268BaseModel
docstring from JSON schema description by @sydney-runkle in #8352classproperty
decorator formodel_computed_fields
by @Jocelyn-Gas in #8437Performance
int
extraction by @samuelcolvin in pydantic/pydantic-core#1155dataclass
serialization speedups by @samuelcolvin in pydantic/pydantic-core#1162HashMap
creation when looking up small JSON objects inLazyIndexMaps
by @samuelcolvin in pydantic/jiter#55Peak
with more efficientPeek
by @davidhewitt in pydantic/jiter#48Fixes
getattr
warning in deprecatedBaseConfig
by @tlambert03 in #7183model_fields
, not whole__dict__
by @alexmojaki in #7786mypy
plugin by @dmontagu in #7411mypy
error on untypedClassVar
by @vincent-hachin-wmx in #8138BaseModel.__eq__
instead of whole__dict__
by @QuentinSoubeyranAqemia in #7825strict
docstring inmodel_validate
method. by @LukeTonin in #8223computed_field
by @Viicos in #8227validate_call
decorator to be dynamically assigned to a class method by @jusexton in #8249unittest.mock
deprecation warnings by @ibleedicare in #8262JsonValue
contains subclassed primitive values by @jusexton in #8286mypy
error on free before validator (classmethod) by @sydney-runkle in #8285to_snake
conversion by @jevins09 in #8316ModelMetaclass.__prepare__
by @slanzmich in #8305config
specification when initializing aTypeAdapter
when the annotated type has config already by @sydney-runkle in #8365alias
indataclass
signature by @NeevCohen in #8387Field(...)
in a forward ref by @dmontagu in #8494__dict__
withmodel_construct
call by @sydney-runkle in #8500path_type
creation when globals does not contain__name__
by @hramezani in #8470from __future__ import annotations
by @sydney-runkle in #8513@deprecated
by @Viicos in #8294model_construct
call by @sydney-runkle in #8525TypeAliasType
for types with refs by @dmontagu in #8526pydantic.Field(repr=False)
in dataclasses by @tigeryy2 in #8511dataclass_transform
behavior forRootModel
by @Viicos in #8163exclude_none
for json serialization ofcomputed_field
s by @sydney-runkle in pydantic/pydantic-core#1098New Contributors
pydantic
pydantic-core
v2.5.3
Compare Source
GitHub release
What's Changed
Packaging
pydantic-core
to 2.14.6Fixes
v2.5.2
Compare Source
GitHub release
What's Changed
Packaging
pydantic-core
to 2.14.5New Features
ConfigDict.ser_json_inf_nan
by @davidhewitt in #8159Fixes
Literal
from JSON keys when used asdict
key by @sydney-runkle in pydantic/pydantic-core#1075custom_init
on members ofUnion
by @sydney-runkle in pydantic/pydantic-core#1076JsonValue
bool
serialization by @sydney-runkle in #8190Literal
inUnion
s by @sydney-runkle in pydantic/pydantic-core#1089v2.5.1
Compare Source
GitHub release
What's Changed
Packaging
Fixes
ValidateCallWrapper
error when creating a model which has a @validate_call wrapped field annotation by @sydney-runkle in #8110v2.5.0
Compare Source
GitHub release
The code released in v2.5.0 is functionally identical to that of v2.5.0b1.
What's Changed
Packaging
pyright==1.1.335
by @Viicos in #8075New Features
ValidationError
errors by @adriangb in #7806__doc__
argument increate_model()
by @chris-spann in #7863regex_engine
flag - meaning you can use with the Rust or Python regex libraries in constraints by @utkini in #7768ComputedFieldInfo
by @alexmojaki in #7889ruff
formatter by @Luca-Blight in #7930validation_error_cause
to config by @zakstucke in #7626CallableDiscriminator
andTag
by @dmontagu in #7983CallableDiscriminator
renamed toDiscriminator
by @dmontagu in #8047examples
andjson_schema_extra
to@computed_field
by @alexmojaki in #8013JsonValue
type by @dmontagu in #7998str
as argument toDiscriminator
by @dmontagu in #8047SchemaSerializer.__reduce__
method to enable pickle serialization by @edoakes in pydantic/pydantic-core#1006Changes
ultra_strict
with new smart union implementation, the way unions are validated has changed significantly to improve performance and correctness, we have worked hard to absolutely minimise the number of cases where behaviour has changed, see the PR for details - by @davidhewitt in pydantic/pydantic-core#867extra='allow'
by @sydney-runkle in #7683Enum
types with no cases by @sydney-runkle in #7927Generic
beforeBaseModel
by @alexmojaki in #7891Performance
jiter
by @samuelcolvin in pydantic/pydantic-core#974__getattr__
for all package imports, improve import time by @samuelcolvin in #7947Fixes
mypy
issue with subclasses ofRootModel
by @sydney-runkle in #7677FieldInfo
when a forward ref gets evaluated by @dmontagu in #7698SecretStr
from JSON (regression in v2.4) by @sydney-runkle in #7729defer_build
behavior withTypeAdapter
by @sydney-runkle in #7736mypy
versions by @dmontagu in #7742TypeVar
handling when default is not set by @pmmmwh in #7719strict
onEnum
type fields by @sydney-runkle in #7761weakref.ref
instead of subclassing to fixcloudpickle
serialization by @edoakes in #7780model_post_init
in subclasses by @alexmojaki in #7775json_schema_extra
by @alexmojaki in #7803strict
specification forUUID
types by @sydney-runkle in #7865pydantic.Field(kw_only=True)
with inherited dataclasses by @PrettyWood in #7827validate_call
decorator for methods in classes with__slots__
by @sydney-runkle in #7883dataclasses.field
default by @hramezani in #7898importlib_metadata
on python 3.7 by @sydney-runkle in #7904|
operator (Union) in PydanticRecursiveRef by @alexmojaki in #7892display_as_type
forTypeAliasType
in python 3.12 by @dmontagu in #7929NotRequired
generics inTypedDict
by @sydney-runkle in #7932TypeAliasType
specifications produce different schema definitions by @alexdrydew in #7893PrivateAttr
is passed fromAnnotated
default position by @tabassco in #8004classmethod
instead ofclassmethod[Any, Any, Any]
by @Mr-Pepe in #7979Optional
field withvalidate_default
only performing one field validation by @sydney-runkle in pydantic/pydantic-core#1002definition-ref
bug withDict
keys by @sydney-runkle in pydantic/pydantic-core#1014bool
types withcoerce_numbers_to_str=True
by @sydney-runkle in pydantic/pydantic-core#1017NaN
in float and decimal constraints by @davidhewitt in pydantic/pydantic-core#1037lax_str
andlax_int
support for enum values not inherited from str/int by @michaelhly in pydantic/pydantic-core#1015Union
ofList
types by @sydney-runkle in pydantic/pydantic-core#1039max_digits
anddecimals
to pass if normalized or non-normalized input is valid by @sydney-runkle in [Parsing JSON directly pydantic/pydantic-core#10Configuration
📅 Schedule: Branch creation - "after 11am on friday" in timezone Europe/Amsterdam, 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.