Skip to content

Add a regression test for a nested tagged union scenario #444

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 1 commit into from
Nov 15, 2023

Conversation

bluetech
Copy link
Contributor

@bluetech bluetech commented Nov 15, 2023

I've converted some project which uses cattrs from attrs to dataclasses, but that failed because the union dismbiguator doesn't support dataclasses yet (#426 (comment)). So I used the opportunity to convert the code to the new tagged union strategy which is much nicer than the disambiguation stuff anyway. One case looks like the test added in this PR, which failed too (cattrs v23.1.2). Looking into it I saw that the problem has been fixed in main by commit b25a258. So I'm awaiting a new release, but in the meantime thought this regression test might be helpful.

@bluetech bluetech force-pushed the tagged-union-nested-seq branch from 29ac36b to 27712f5 Compare November 15, 2023 19:13
@Tinche Tinche merged commit a9d349a into python-attrs:main Nov 15, 2023
@Tinche
Copy link
Member

Tinche commented Nov 15, 2023

Cool, thanks. The next release is imminent!

@Tinche Tinche added this to the 23.2 milestone Nov 15, 2023
@bluetech bluetech deleted the tagged-union-nested-seq branch November 16, 2023 11:54
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.

2 participants