Skip to content

Commit

Permalink
Fix support of Generic merged dataclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo committed Sep 23, 2020
1 parent f4bb73d commit 57fb36f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apischema/dataclasses/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def _serialization(

def _deserialization_merged_aliases(cls: Type) -> AbstractSet[str]:
"""Return all aliases used in cls deserialization."""
assert dataclasses.is_dataclass(cls)
cls = getattr(cls, "__origin__", cls)
types = get_type_hints(cls, include_extras=True)
result: Set[str] = set()
for field in fields_items(cls).values():
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.7.5

- Fix support of `Generic` merged dataclasses.

## 0.7.4

- Add `InitVar` support for merged dataclasses.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="apischema",
version="0.7.4",
version="0.7.5",
url="https://github.com/wyfo/apischema",
author="Joseph Perez",
author_email="[email protected]",
Expand Down

0 comments on commit 57fb36f

Please sign in to comment.