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

adds test case for unexpected discriminated union behavior #9236

Merged
merged 4 commits into from Apr 23, 2024

Conversation

kf-novi
Copy link
Contributor

@kf-novi kf-novi commented Apr 12, 2024

Change Summary

Adds failing test case for expected behavior in discriminated union model_dump

Related issue number

#9235

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

Copy link

codspeed-hq bot commented Apr 12, 2024

CodSpeed Performance Report

Merging #9236 will not alter performance

Comparing kf-novi:discriminated-union-bug (303b868) with main (77b0e1c)

Summary

✅ 13 untouched benchmarks

@sydney-runkle
Copy link
Member

Thanks for adding the test case! Please remove all of the other changes made in this PR (reformatting), etc

@kf-novi
Copy link
Contributor Author

kf-novi commented Apr 14, 2024 via email

@sydney-runkle
Copy link
Member

@kf-novi I believe so, or just revert the commit + add back the test if that doesn't work

@kf-novi
Copy link
Contributor Author

kf-novi commented Apr 15, 2024

Sorry about the dual account thing here, opened with this one and keep forgetting which one I'm using. Anyway, had to revert since my auto-formatter added a bunch of commas that ruff format doesn't remove. So, should be good now.

@sydney-runkle
Copy link
Member

@kf-novi,

Maybe add an xfail with a link to your issue, then we can merge this?

@kfreezen
Copy link

kfreezen commented Apr 19, 2024 via email

@sydney-runkle
Copy link
Member

@kf-novi @kfreezen :),

Wonderful, thanks for your help here!

@sydney-runkle sydney-runkle added the relnotes-ignore Omit this PR from the release notes. label Apr 23, 2024
Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Nice, including this in the patch and hoping we can get a fix for this in 2.8

@sydney-runkle sydney-runkle marked this pull request as ready for review April 23, 2024 12:40
@sydney-runkle sydney-runkle merged commit 73d1049 into pydantic:main Apr 23, 2024
53 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes-ignore Omit this PR from the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants