Bump pydantic from 1.6.1 to 1.7
Created by: dependabot-preview[bot]
Bumps pydantic from 1.6.1 to 1.7.
Release notes
Sourced from pydantic's releases.
v1.7 (2020-10-26)
See Changelog.
Thank you to pydantic's sponsors: @timdrijvers, @BCarley, @chdsbd, @tiangolo, @matin, @linusg, @kevinalh, @jorgecarleitao, @koxudaxi, @primer-api for their kind support.
Highlights
- python 3.9 support, thanks @PrettyWood
- Private model attributes, thanks @MrMrRobat
- "secrets files" support in
BaseSettings
, thanks @mdgilene- convert stdlib dataclasses to pydantic dataclasses and use stdlib dataclasses in models, thanks @PrettyWood
Changes
- Breaking Change: remove
__field_defaults__
, adddefault_factory
support withBaseModel.construct
. Use.get_default()
method on fields in__fields__
attribute instead, #1732 by @PrettyWood- Rearrange CI to run linting as a separate job, split install recipes for different tasks, #2020 by @samuelcolvin
- Allows subclasses of generic models to make some, or all, of the superclass's type parameters concrete, while also defining new type parameters in the subclass, #2005 by @choogeboom
- Call validator with the correct
values
parameter type inBaseModel.__setattr__
, whenvalidate_assignment = True
in model config, #1999 by @me-ransh- Force
fields.Undefined
to be a singleton object, fixing inherited generic model schemas, #1981 by @daviskirk- Include tests in source distributions, #1976 by @sbraz
- Add ability to use
min_length/max_length
constraints with secret types, #1974 by @uriyyo- Also check
root_validators
whenvalidate_assignment
is on, #1971 by @PrettyWood- Fix const validators not running when custom validators are present, #1957 by @hmvp
- add
deque
to field types, #1935 by @wozniakty- add basic support for python 3.9, #1832 by @PrettyWood
- Fix typo in the anchor of exporting_models.md#modelcopy and incorrect description, #1821 by @KimMachineGun
- Added ability for
BaseSettings
to read "secret files", #1820 by @mdgilene- add
parse_raw_as
utility function, #1812 by @PrettyWood- Support home directory relative paths for
dotenv
files (e.g.~/.env
), #1803 by @PrettyWood- Clarify documentation for
parse_file
to show that the argument should be a file path not a file-like object, #1794 by @mdavis-xyz- Fix false positive from mypy plugin when a class nested within a
BaseModel
is namedModel
, #1770 by @selimb- add basic support of Pattern type in schema generation, #1767 by @PrettyWood
- Support custom title, description and default in schema of enums, #1748 by @PrettyWood
- Properly represent
Literal
Enums whenuse_enum_values
is True, #1747 by @noelevans- Allows timezone information to be added to strings to be formatted as time objects. Permitted formats are
Z
for UTC or an offset for absolute positive or negative time shifts. Or the timezone data can be omitted, #1744 by @noelevans- Add stub
__init__
with python 3.6 signature forForwardRef
, #1738 by @sirtelemak- Fix behaviour with forward refs and optional fields in nested models, #1736 by @PrettyWood
- add
Enum
andIntEnum
as valid types for fields, #1735 by @PrettyWood- Change default value of
__module__
argument ofcreate_model
fromNone
to'pydantic.main'
. Set reference of created concrete model to it's module to allow pickling (not applied to models created in functions), #1686 by @MrMrRobat- Add private attributes support, #1679 by @MrMrRobat
- add
config
to@validate_arguments
, #1663 by @samuelcolvin
Changelog
Sourced from pydantic's changelog.
v1.7 (2020-10-26)
Thank you to pydantic's sponsors: @timdrijvers, @BCarley, @chdsbd, @tiangolo, @matin, @linusg, @kevinalh, @jorgecarleitao, @koxudaxi, @primer-api for their kind support.
Highlights
- python 3.9 support, thanks @PrettyWood
- Private model attributes, thanks @MrMrRobat
- "secrets files" support in
BaseSettings
, thanks @mdgilene- convert stdlib dataclasses to pydantic dataclasses and use stdlib dataclasses in models, thanks @PrettyWood
Changes
- Breaking Change: remove
__field_defaults__
, adddefault_factory
support withBaseModel.construct
. Use.get_default()
method on fields in__fields__
attribute instead, #1732 by @PrettyWood- Rearrange CI to run linting as a separate job, split install recipes for different tasks, #2020 by @samuelcolvin
- Allows subclasses of generic models to make some, or all, of the superclass's type parameters concrete, while also defining new type parameters in the subclass, #2005 by @choogeboom
- Call validator with the correct
values
parameter type inBaseModel.__setattr__
, whenvalidate_assignment = True
in model config, #1999 by @me-ransh- Force
fields.Undefined
to be a singleton object, fixing inherited generic model schemas, #1981 by @daviskirk- Include tests in source distributions, #1976 by @sbraz
- Add ability to use
min_length/max_length
constraints with secret types, #1974 by @uriyyo- Also check
root_validators
whenvalidate_assignment
is on, #1971 by @PrettyWood- Fix const validators not running when custom validators are present, #1957 by @hmvp
- add
deque
to field types, #1935 by @wozniakty- add basic support for python 3.9, #1832 by @PrettyWood
- Fix typo in the anchor of exporting_models.md#modelcopy and incorrect description, #1821 by @KimMachineGun
- Added ability for
BaseSettings
to read "secret files", #1820 by @mdgilene- add
parse_raw_as
utility function, #1812 by @PrettyWood- Support home directory relative paths for
dotenv
files (e.g.~/.env
), #1803 by @PrettyWood- Clarify documentation for
parse_file
to show that the argument should be a file path not a file-like object, #1794 by @mdavis-xyz- Fix false positive from mypy plugin when a class nested within a
BaseModel
is namedModel
, #1770 by @selimb- add basic support of Pattern type in schema generation, #1767 by @PrettyWood
- Support custom title, description and default in schema of enums, #1748 by @PrettyWood
- Properly represent
Literal
Enums whenuse_enum_values
is True, #1747 by @noelevans- Allows timezone information to be added to strings to be formatted as time objects. Permitted formats are
Z
for UTC or an offset for absolute positive or negative time shifts. Or the timezone data can be omitted, #1744 by @noelevans- Add stub
__init__
with python 3.6 signature forForwardRef
, #1738 by @sirtelemak- Fix behaviour with forward refs and optional fields in nested models, #1736 by @PrettyWood
- add
Enum
andIntEnum
as valid types for fields, #1735 by @PrettyWood- Change default value of
__module__
argument ofcreate_model
fromNone
to'pydantic.main'
. Set reference of created concrete model to it's module to allow pickling (not applied to models created in functions), #1686 by @MrMrRobat- Add private attributes support, #1679 by @MrMrRobat
- add
config
to@validate_arguments
, #1663 by @samuelcolvin- Allow descendant Settings models to override env variable names for the fields defined in parent Settings models with
Commits
-
95435de
build history and uprev version (#2040) -
c83156d
feat: make pydanticdataclass
decorator support built-indataclass
(#1817) -
8b4e726
Fix typing coverage (#2032) -
44b6399
add pytest assert rewrite to create_module, rewrite existing tests (#2035) -
30cd121
Add ability to read secrets from files (#1820) -
5288920
Bump devtools from 0.6.0 to 0.6.1 (#2037) -
664cbcf
Add private attributes support (#1679) -
2f7e404
include assert in validator test in pytest (#2033) -
0af5e5f
Allow generics to extend concrete classes. fixes #2005 (#2006) -
f2af9f7
Fix #1999: call validator with correct "values" type insetattr
(#2000) - 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
.
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)