Skip to content
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

Fix :: avoid mutating Field default value #1413

Merged
merged 1 commit into from Apr 22, 2020

Conversation

PrettyWood
Copy link
Member

Change Summary

#1210 introduced a regression by mutating default value of a field.

Related issue number

fix #1412

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #1413 into master will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #1413   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3741      3741           
  Branches       740       740           
=========================================
  Hits          3741      3741           
Impacted Files Coverage Δ
pydantic/fields.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f071f1...b0f0821. Read the comment docs.

@samuelcolvin
Copy link
Member

Looks good to me.

I guess we might need a patch release for this?

@PrettyWood
Copy link
Member Author

I was going to say a 1.5.1 would most likely be needed yes. Sorry about that

@samuelcolvin
Copy link
Member

Okay, but I hate projects that make 3 releases in a day, each with one tiny fix.

Let's wait at least for the rest of today (UK time) to see if anything else comes up.

Then I'll deploy. Make sense?

@PrettyWood
Copy link
Member Author

Agreed

@samuelcolvin samuelcolvin merged commit 3cd8b1e into pydantic:master Apr 22, 2020
@PrettyWood PrettyWood deleted the fix/reuse-fields branch April 22, 2020 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reusing the same Field object in different Models
2 participants