8000 Make sure Pydantic dataclasses with slots and `validate_assignment` can be unpickled by Viicos · Pull Request #11769 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Make sure Pydantic dataclasses with slots and validate_assignment can be unpickled #11769

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

Merged
merged 2 commits into from
Apr 29, 2025

Conversation

Viicos
Copy link
Member
@Viicos Viicos commented Apr 17, 2025

Fixes #11768.

Change Summary

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Apr 17, 2025
Copy link
cloudflare-workers-and-pages bot commented Apr 17, 2025

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4cf3a25
Status: ✅  Deploy successful!
Preview URL: https://28d9942a.pydantic-docs.pages.dev
Branch Preview URL: https://dc-slots-validate-assignment.pydantic-docs.pages.dev

View logs

@Viicos Viicos force-pushed the dc-slots-validate-assignment branch from 63c9727 to d174f8b Compare April 17, 2025 13:41
Copy link
codspeed-hq bot commented Apr 17, 2025

CodSpeed Performance Report

Merging #11769 will not alter performance

Comparing dc-slots-validate-assignment (4cf3a25) with main (bf06866)

Summary

✅ 46 untouched benchmarks

Copy link
Contributor
github-actions bot commented Apr 17, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic
  dataclasses.py
  pydantic/_internal
  _dataclasses.py
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Contributor
@DouweM DouweM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Viicos Take my comments with a grain of salt because you've looked into this much more deeply than I have, but I was confused about a few things which may point at real issues/opportunities for improvement. But if not, let me know and I'll defer to your judgment and merge this :)

@pydantic-hooky pydantic-hooky bot added the awaiting author revision awaiting changes from the PR author label Apr 25, 2025
@Viicos Viicos removed the awaiting author revision awaiting changes from the PR author 885D label Apr 29, 2025
@Viicos Viicos merged commit d912c41 into main Apr 29, 2025
63 checks passed
@Viicos Viicos deleted the dc-slots-validate-assignment branch April 29, 2025 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes-fix Used for bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing attribute dataclass copy with slots=True & validate_assignment=True
2 participants
0