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

fix: fix deserialization of unions if the type of a field with the same name differs between union members #511

Merged

Conversation

TristanSpeakEasy
Copy link
Contributor

The type of union that failed is documented in the test I added, but basically if members of a union differed by the type of a field with a matching name, the resultant AttributeError wasn't being caught and so deserialization would stop and not all the members of the union would be tried

@TristanSpeakEasy
Copy link
Contributor Author

@george-zubrienko would be great if this could be merged and a new release made. Otherwise I am staring down the barrel of having to publish our fork on pypi and updating our dependency usage to that as its a blocking issue on our side for customers that have SSE use cases in the AI space

Copy link
Collaborator

@george-zubrienko george-zubrienko left a comment

Choose a reason for hiding this comment

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

Kinda funky that skipping an exception fixes this, but I can't really see any complications from merging this in, so let's go.

Also, yes, if you need something reviewed asap - please tag in comments, helps me to sort out priorities :)

@george-zubrienko george-zubrienko merged commit 8512afc into lidatong:master Feb 1, 2024
9 checks passed
@george-zubrienko
Copy link
Collaborator

@TristanSpeakEasy should be available in 0.6.4

@TristanSpeakEasy
Copy link
Contributor Author

Great thank you

renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request Feb 1, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [dataclasses-json](https://togithub.com/lidatong/dataclasses-json)
([changelog](https://togithub.com/lidatong/dataclasses-json/releases)) |
`0.6.3` -> `0.6.4` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/dataclasses-json/0.6.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/dataclasses-json/0.6.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/dataclasses-json/0.6.3/0.6.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/dataclasses-json/0.6.3/0.6.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>lidatong/dataclasses-json (dataclasses-json)</summary>

###
[`v0.6.4`](https://togithub.com/lidatong/dataclasses-json/releases/tag/v0.6.4)

[Compare
Source](https://togithub.com/lidatong/dataclasses-json/compare/v0.6.3...v0.6.4)

#### What's Changed

- fix: fix deserialization of unions if the type of a field with the
same name differs between union members by
[@&#8203;TristanSpeakEasy](https://togithub.com/TristanSpeakEasy) in
[lidatong/dataclasses-json#511

#### New Contributors

- [@&#8203;TristanSpeakEasy](https://togithub.com/TristanSpeakEasy) made
their first contribution in
[lidatong/dataclasses-json#511

**Full Changelog**:
lidatong/dataclasses-json@v0.6.3...v0.6.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ixm-one/pytest-cmake-presets).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

None yet

2 participants