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
allow for shallow copies #4093
Merged
Merged
allow for shallow copies #4093
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
54f5e31
allow for shallow copies
timkpaine 49461f3
Add changes file
timkpaine a1690d1
tweak change
timkpaine 556231f
update for comments
timkpaine f8a2705
rename attr
timkpaine 4eeb6df
use single quotes
timkpaine 64bf6f8
bump ci
timkpaine bb33a04
add warning if not a string, switch to string literals
timkpaine ce26312
Merge branch '1.9.X-fixes' into tkp/shallow
timkpaine c055976
fix linting, prompt ci
samuelcolvin 0b998a5
fix ci
samuelcolvin c5da8e2
extend and fix tests
samuelcolvin cc39d7f
change default to "shallow"
samuelcolvin File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
- 1.9.X-fixes | ||
tags: | ||
- '**' | ||
pull_request: {} | ||
|
||
jobs: | ||
lint: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Allow for shallow copies of attributes, adjusting the behavior of #3642 | ||
`Config.copy_on_model_validation` is now a str enum of `["none", "deep", "shallow"]` corresponding to | ||
not copying, deep copy, shallow copy. | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
ansi2html==1.6.0 | ||
flake8==4.0.1 | ||
ansi2html==1.8.0 | ||
flake8==5.0.4 | ||
flake8-quotes==3.3.1 | ||
hypothesis==6.46.3 | ||
markdown-include==0.6.0 | ||
mdx-truly-sane-lists==1.2 | ||
mkdocs==1.3.0 | ||
hypothesis==6.54.1 | ||
markdown-include==0.7.0 | ||
mdx-truly-sane-lists==1.3 | ||
mkdocs==1.3.1 | ||
mkdocs-exclude==1.0.2 | ||
mkdocs-material==8.2.14 | ||
mkdocs-material==8.3.9 | ||
sqlalchemy | ||
orjson | ||
ujson |
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main concern is on the default value
With the test example
we used to have in v1.9.0
which got changed (the famous breaking change) in 1.9.1
We now have with this patch
I wonder if we should write a note saying a breaking change has been introduced by mistake in a release version and that the old 1.9.0 behaviour has been fixed. In which case, the default value should be
'shallow'
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, we should make the default
shallow
.I'll try to fix this today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default changed.