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

Dataclasses #269

Merged
merged 5 commits into from Oct 1, 2018

Conversation

4 participants
@samuelcolvin
Owner

samuelcolvin commented Sep 28, 2018

replaces #231, fixes #178.

@codecov

This comment has been minimized.

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

This comment has been minimized.

Owner

samuelcolvin commented Sep 28, 2018

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.

Gaunt and others added some commits Jul 16, 2018

@pauleveritt

This comment has been minimized.

pauleveritt commented Sep 29, 2018

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

@pauleveritt

This comment has been minimized.

pauleveritt commented Sep 29, 2018

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

@samuelcolvin

This comment has been minimized.

Owner

samuelcolvin commented Sep 30, 2018

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

This comment has been minimized.

Collaborator

Gr1N commented Sep 30, 2018

Awesome feature! LGTM!

@samuelcolvin samuelcolvin merged commit f3a278b into master Oct 1, 2018

5 checks passed

codecov/project 100% (+0%) compared to b0d8ee8
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
pyup.io/safety-ci No dependencies with known security vulnerabilities.
Details

@samuelcolvin samuelcolvin deleted the dataclasses branch Oct 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment