Skip to content

Conversation

samuelcolvin
Copy link
Member

@samuelcolvin samuelcolvin commented Sep 28, 2018

replaces #231, fixes #178.

@codecov
Copy link

codecov bot commented Sep 28, 2018

Codecov Report

Merging #269 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #269   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          11     12    +1     
  Lines        1480   1514   +34     
  Branches      274    280    +6     
=====================================
+ Hits         1480   1514   +34

@samuelcolvin
Copy link
Member Author

ready.

@Gaunt @Gr1N @pauleveritt please review and let me know if you see any problems, otherwise I'll merge and deploy in a couple of days.

@pauleveritt
Copy link

I just noticed @pydantic.dataclasses.dataclass(frozen=True) works as expected. Cool. Does it internally map to the "faux immutability" support?

@pauleveritt
Copy link

Models using dataclass don't have .copy(), .json(), dict() for https://pydantic-docs.helpmanual.io/#serialisation

@samuelcolvin
Copy link
Member Author

faux immutability

Yes

Models using dataclass don't have .copy(), .json(), dict()

That's because they return vanilla dataclasses, I want to keep it like that. If you want the serialisation methods user normal models.

@Gr1N
Copy link
Contributor

Gr1N commented Sep 30, 2018

Awesome feature! LGTM!

@samuelcolvin samuelcolvin merged commit f3a278b into master Oct 1, 2018
@samuelcolvin samuelcolvin deleted the dataclasses branch October 1, 2018 08:48
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.

Python 3.7 dataclasses
4 participants