Skip to content

Conversation

bm424
Copy link

@bm424 bm424 commented Nov 9, 2020

Change Summary

Ensures Enum fields defined with additional keyword arguments have their schema updated in the same way as other fields.

ℹ️ Regression introduced by #1749 in v1.7.0

Related issue number

#2108

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 Nov 9, 2020

Codecov Report

Merging #2109 (02cc1c0) into master (31bc243) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #2109   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         4093      4095    +2     
  Branches       823       824    +1     
=========================================
+ Hits          4093      4095    +2     
Impacted Files Coverage Δ
pydantic/schema.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 31bc243...02cc1c0. Read the comment docs.

@PrettyWood PrettyWood added the bug V1 Bug related to Pydantic V1.X label Nov 13, 2020
@samuelcolvin samuelcolvin merged commit 0b7a570 into pydantic:master Nov 29, 2020
@samuelcolvin
Copy link
Member

thanks a lot for this.

Currently it's merged into master, but I suppose in theory it's a fix to v1.7 and should be cherry-picked and released in a patch , e.g. 1.7.3. Does anyone need that?

@PrettyWood I think there was another PR with a fix for v1.7 - do you think we need v1.7.3? If so what else needs to be included?

@PrettyWood
Copy link
Collaborator

PrettyWood commented Nov 30, 2020

@samuelcolvin I labelled all the PRs related to v1.7 regressions with "bug" (I didn't dare create a new label but IMO it could be useful) and updated all their descriptions.
And when we had only the issue with __doc__ I thought making a v1.7.3 was not needed but with 4-5 other regressions I reckon it's worth yes

@samuelcolvin
Copy link
Member

Thanks a lot, by all means create a new label.

I have to stop and sleep now, but I'll try and go through the remaining PRs tomorrow.

Then I guess I'll create a new branch off the most recent release and cherry-pick commits, we can then review that branch and create a release.

@PrettyWood PrettyWood mentioned this pull request Nov 30, 2020
6 tasks
samuelcolvin pushed a commit that referenced this pull request Nov 30, 2020
…ments to the schema (#2109)

fix #2108

* Fix schema extra not being included when field type is Enum

* Code format

* More code format

* Add changes file

Co-authored-by: Ben Martineau <b.martineau@iwoca.co.uk>
samuelcolvin added a commit that referenced this pull request Jan 1, 2021
* fix: ignore `__doc__` as valid private attribute (#2091)

closes #2090

* Fixes a regression where Enum fields would not propagate keyword arguments to the schema (#2109)

fix #2108

* Fix schema extra not being included when field type is Enum

* Code format

* More code format

* Add changes file

Co-authored-by: Ben Martineau <b.martineau@iwoca.co.uk>

* fix: update all modified field values in `root_validator` when `validate_assignment` is on (#2119)

* fix: update all modified field values in `root_validator` when `validate_assignment` is on

closes #2116

* chore: update root_validator name

Co-authored-by: Arthur Pastel <arthur.pastel@gmail.com>

Co-authored-by: Arthur Pastel <arthur.pastel@gmail.com>

* fix: support `underscore_attrs_are_private` with generic models (#2139)

closes #2138

* fix: set right default value for required (optional) fields (#2143)

closes #2142

* Fix #2111: support pickle for built-in dataclasses (#2114)

* 2111: support pickle for built-in dataclasses

* 2111: add changes

* 2111: simplify test

* return original name + handle similar names

* add additional check

* fix a misspell

* remove useless f-string

* cleanup test

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* uprev and add history

* tempoarily pin pip

Co-authored-by: Eric Jolibois <em.jolibois@gmail.com>
Co-authored-by: Ben Martineau <bm424@cam.ac.uk>
Co-authored-by: Ben Martineau <b.martineau@iwoca.co.uk>
Co-authored-by: Arthur Pastel <arthur.pastel@gmail.com>
Co-authored-by: aimestereo <aimestereo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug V1 Bug related to Pydantic V1.X
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants