Bump pydantic from 1.5.1 to 1.6.1
Created by: dependabot-preview[bot]
Bumps pydantic from 1.5.1 to 1.6.1.
Release notes
Sourced from pydantic's releases.
v1.6.1 (2020-07-15)
See Changelog.
Thank you to pydantic's sponsors: @matin, @tiangolo, @chdsbd, @jorgecarleitao, and 1 anonymous sponsor for their kind support.
changes:
- fix validation and parsing of nested models with
default_factory
, #1710 by @PrettyWoodv1.6 (2020-07-11)
See Changelog.
Thank you to pydantic's sponsors: @matin, @tiangolo, @chdsbd, @jorgecarleitao, and 1 anonymous sponsor for their kind support.
changes:
- Modify validators for
conlist
andconset
to not havealways=True
, #1682 by @samuelcolvin- add port check to
AnyUrl
(can't exceed 65536) ports are 16 insigned bits:0 <= port <= 2**16-1
src: rfc793 header format, #1654 by @flapili- Document default
regex
anchoring semantics, #1648 by @yurikhan- Use
chain.from_iterable
in class_validators.py. This is a faster and more idiomatic way of usingitertools.chain
. Instead of computing all the items in the iterable and storing them in memory, they are computed one-by-one and never stored as a huge list. This can save on both runtime and memory space, #1642 by @cool-RR- Add
conset()
, analogous toconlist()
, #1623 by @patrickkwang- make pydantic errors (un)pickable, #1616 by @PrettyWood
- Allow custom encoding for
dotenv
files, #1615 by @PrettyWood- Ensure
SchemaExtraCallable
is always defined to get type hints on BaseConfig, #1614 by @PrettyWood- Update datetime parser to support negative timestamps, #1600 by @mlbiche
- Update mypy, remove
AnyType
alias forType[Any]
, #1598 by @samuelcolvin- Adjust handling of root validators so that errors are aggregated from all failing root validators, instead of reporting on only the first root validator to fail, #1586 by @beezee
- Make
__modify_schema__
on Enums apply to the enum schema rather than fields that use the enum, #1581 by @therefromhere- Fix behavior of
__all__
key when used in conjunction with index keys in advanced include/exclude of fields that are sequences, #1579 by @xspirus- Subclass validators do not run when referencing a
List
field defined in a parent class wheneach_item=True
. Added an example to the docs illustrating this, #1566 by @samueldeklund- change
schema.field_class_to_schema
to supportfrozenset
in schema, #1557 by @wangpeibao- Call
__modify_schema__
only for the field schema, #1552 by @PrettyWood- Move the assignment of
field.validate_always
infields.py
so thealways
parameter of validators work on inheritance, #1545 by @dcHHH- Added support for UUID instantiation through 16 byte strings such as
b'\x12\x34\x56\x78' * 4
. This was done to supportBINARY(16)
columns in sqlalchemy, #1541 by @shawnwall- Add a test assertion that
default_factory
can return a singleton, #1523 by @therefromhere- Add
NameEmail.__eq__
so duplicateNameEmail
instances are evaluated as equal, #1514 by @stephen-bunn- Add datamodel-code-generator link in pydantic document site, #1500 by @koxudaxi
- Added a "Discussion of Pydantic" section to the documentation, with a link to "Pydantic Introduction" video by Alexander Hultnér, #1499 by @hultner
- Avoid some side effects of
default_factory
by calling it only once if possible and by not setting a default value in the schema, #1491 by @PrettyWood- Added docs about dumping dataclasses to JSON, #1487 by @mikegrima
- Make
BaseModel.__signature__
class-only, so getting__signature__
from model instance will raiseAttributeError
, #1466 by @MrMrRobat- include
'format': 'password'
in the schema for secret types, #1424 by @atheuz- Modify schema constraints on
ConstrainedFloat
so thatexclusiveMinimum
and minimum are not included in the schema if they are equal to-math.inf
andexclusiveMaximum
andmaximum
are not included if they are equal tomath.inf
, #1417 by @vdwees- Squash internal
__root__
dicts in.dict()
(and, by extension, in.json()
), #1414 by @patrickkwang- Move
const
validator to post-validators so it validates the parsed value, #1410 by @selimb- Fix model validation to handle nested literals, e.g.
Literal['foo', Literal['bar']]
, #1364 by @DBCerigo- Remove
user_required = True
fromRedisDsn
, neither user nor password are required, #1275 by @samuelcolvin
Changelog
Sourced from pydantic's changelog.
v1.6.1 (2020-07-15)
- fix validation and parsing of nested models with
default_factory
, #1710 by @PrettyWoodv1.6 (2020-07-11)
Thank you to pydantic's sponsors: @matin, @tiangolo, @chdsbd, @jorgecarleitao, and 1 anonymous sponsor for their kind support.
- Modify validators for
conlist
andconset
to not havealways=True
, #1682 by @samuelcolvin- add port check to
AnyUrl
(can't exceed 65536) ports are 16 insigned bits:0 <= port <= 2**16-1
src: rfc793 header format, #1654 by @flapili- Document default
regex
anchoring semantics, #1648 by @yurikhan- Use
chain.from_iterable
in class_validators.py. This is a faster and more idiomatic way of usingitertools.chain
. Instead of computing all the items in the iterable and storing them in memory, they are computed one-by-one and never stored as a huge list. This can save on both runtime and memory space, #1642 by @cool-RR- Add
conset()
, analogous toconlist()
, #1623 by @patrickkwang- make pydantic errors (un)pickable, #1616 by @PrettyWood
- Allow custom encoding for
dotenv
files, #1615 by @PrettyWood- Ensure
SchemaExtraCallable
is always defined to get type hints on BaseConfig, #1614 by @PrettyWood- Update datetime parser to support negative timestamps, #1600 by @mlbiche
- Update mypy, remove
AnyType
alias forType[Any]
, #1598 by @samuelcolvin- Adjust handling of root validators so that errors are aggregated from all failing root validators, instead of reporting on only the first root validator to fail, #1586 by @beezee
- Make
__modify_schema__
on Enums apply to the enum schema rather than fields that use the enum, #1581 by @therefromhere- Fix behavior of
__all__
key when used in conjunction with index keys in advanced include/exclude of fields that are sequences, #1579 by @xspirus- Subclass validators do not run when referencing a
List
field defined in a parent class wheneach_item=True
. Added an example to the docs illustrating this, #1566 by @samueldeklund- change
schema.field_class_to_schema
to supportfrozenset
in schema, #1557 by @wangpeibao- Call
__modify_schema__
only for the field schema, #1552 by @PrettyWood- Move the assignment of
field.validate_always
infields.py
so thealways
parameter of validators work on inheritance, #1545 by @dcHHH- Added support for UUID instantiation through 16 byte strings such as
b'\x12\x34\x56\x78' * 4
. This was done to supportBINARY(16)
columns in sqlalchemy, #1541 by @shawnwall- Add a test assertion that
default_factory
can return a singleton, #1523 by @therefromhere- Add
NameEmail.__eq__
so duplicateNameEmail
instances are evaluated as equal, #1514 by @stephen-bunn- Add datamodel-code-generator link in pydantic document site, #1500 by @koxudaxi
- Added a "Discussion of Pydantic" section to the documentation, with a link to "Pydantic Introduction" video by Alexander Hultnér, #1499 by @hultner
- Avoid some side effects of
default_factory
by calling it only once if possible and by not setting a default value in the schema, #1491 by @PrettyWood- Added docs about dumping dataclasses to JSON, #1487 by @mikegrima
- Make
BaseModel.__signature__
class-only, so getting__signature__
from model instance will raiseAttributeError
, #1466 by @MrMrRobat- include
'format': 'password'
in the schema for secret types, #1424 by @atheuz- Modify schema constraints on
ConstrainedFloat
so thatexclusiveMinimum
and minimum are not included in the schema if they are equal to-math.inf
andexclusiveMaximum
andmaximum
are not included if they are equal tomath.inf
, #1417 by @vdwees- Squash internal
__root__
dicts in.dict()
(and, by extension, in.json()
), #1414 by @patrickkwang- Move
const
validator to post-validators so it validates the parsed value, #1410 by @selimb- Fix model validation to handle nested literals, e.g.
Literal['foo', Literal['bar']]
, #1364 by @DBCerigo- Remove
user_required = True
fromRedisDsn
, neither user nor password are required, #1275 by @samuelcolvin- Remove extra
allOf
from schema for fields withUnion
and customField
, #1209 by @mostaphaRoudsari- Updates OpenAPI schema generation to output all enums as separate models. Instead of inlining the enum values in the model schema, models now use a
$ref
property to point to the enum definition, #1173 by @calvinwyoung
Commits
-
d2b0501
uprev -
e2fcab5
fix: validate and parse nested models properly withdefault_factory
(#1712) -
ba56a67
Bump pytest-mock from 3.1.1 to 3.2.0 (#1719) -
f1f944f
Update datamode_code_generator:typo in pip install (#1713) -
5dbb127
use codecov github action to do retries (#1709) -
2440ab9
uprev and changes -
1f4ecd0
Fix nested all include exclude (#1588) -
853a6bb
fix coverage for 'conset()' (#1704) -
527c35a
remove duplicate "an" (#1708) -
f977709
add dependabot.yml (#1705) - Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.
You can always request more updates by clicking Bump now
in your Dependabot dashboard.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -
@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language -
@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language -
@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language -
@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and language -
@dependabot badge me
will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)