diff -pruN 8.5.8-2/CHANGELOG.md 8.5.10-1/CHANGELOG.md
--- 8.5.8-2/CHANGELOG.md	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/CHANGELOG.md	2022-11-09 20:48:06.000000000 +0000
@@ -1,5 +1,33 @@
 # marshmallow\_dataclass change log
 
+## v8.5.10 (2022-11-09)
+
+ - We now test under python version 3.11 (as well as 3.6 through 3.10). ([#220][])
+
+ - Recognize the variable-length, homogeneous tuple types `Tuple[T,
+   ...]` (and `tuple[T, ...]` under python >= 3.8).  These are
+   equivalent to the previously recognized `Sequence[T]`. ([#221][])
+
+ - Recognize PEP 604, `T | U`, union notation (requires python >=
+   3.10). Fixes [#194][]. ([#219][])
+
+[#181]: https://github.com/lovasoa/marshmallow_dataclass/issues/181
+[#194]: https://github.com/lovasoa/marshmallow_dataclass/issues/194
+[#219]: https://github.com/lovasoa/marshmallow_dataclass/pull/219
+[#220]: https://github.com/lovasoa/marshmallow_dataclass/pull/220
+[#221]: https://github.com/lovasoa/marshmallow_dataclass/pull/221
+
+## v8.5.9 (2022-10-04)
+
+ - Fix [#206][]: NewType breakage with `typing-inspect>=0.8.0`
+   ([#207][], [#211][])
+ - Fix tests for python 3.11 ([#212][])
+ 
+[#206]: https://github.com/lovasoa/marshmallow_dataclass/issues/206
+[#207]: https://github.com/lovasoa/marshmallow_dataclass/pull/207
+[#211]: https://github.com/lovasoa/marshmallow_dataclass/pull/211
+[#212]: https://github.com/lovasoa/marshmallow_dataclass/pull/212
+
 ## v8.5.7, v8.5.8
 
  - Fix https://github.com/lovasoa/marshmallow_dataclass/issues/190
diff -pruN 8.5.8-2/debian/changelog 8.5.10-1/debian/changelog
--- 8.5.8-2/debian/changelog	2022-07-15 01:54:12.000000000 +0000
+++ 8.5.10-1/debian/changelog	2022-12-01 21:27:58.000000000 +0000
@@ -1,3 +1,21 @@
+python-marshmallow-dataclass (8.5.10-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version. (Closes: #1025108)
+  * d/patches: remove 'fix_broken_types.patch', as it has been upstreamed.
+  * d/control: make the binary package's description longer, as recommended by
+    lintian.
+
+ -- Louis-Philippe Véronneau <pollo@debian.org>  Thu, 01 Dec 2022 16:27:58 -0500
+
+python-marshmallow-dataclass (8.5.8-3) unstable; urgency=medium
+
+  * Team upload.
+  * d/patches/fix_broken_types.patch: from upstream
+    Closes: #1019391, #1020099
+
+ -- Michael R. Crusoe <crusoe@debian.org>  Sat, 01 Oct 2022 12:25:37 +0200
+
 python-marshmallow-dataclass (8.5.8-2) unstable; urgency=medium
 
   * Add autopkgtests
diff -pruN 8.5.8-2/debian/control 8.5.10-1/debian/control
--- 8.5.8-2/debian/control	2022-07-15 01:54:12.000000000 +0000
+++ 8.5.10-1/debian/control	2022-12-01 21:27:26.000000000 +0000
@@ -29,5 +29,7 @@ Depends:
 Recommends:
  python3-marshmallow-enum,
  python3-typing-inspect,
+Breaks: python3-typing-inspect (<< 0.8.0)
 Description: Automatic generation of marshmallow schemas from dataclasses
- Python library to convert dataclasses into marshmallow schemas.
+ Python library to convert dataclasses into marshmallow schemas. It provides
+ automatic generation of marshmallow schemas from dataclasses.
diff -pruN 8.5.8-2/debian/tests/control 8.5.10-1/debian/tests/control
--- 8.5.8-2/debian/tests/control	2022-07-15 01:54:12.000000000 +0000
+++ 8.5.10-1/debian/tests/control	2022-12-01 21:26:04.000000000 +0000
@@ -4,5 +4,5 @@ Depends:
  python3-marshmallow-enum,
  python3-pytest,
  python3-typeguard,
- python3-typing-inspect,
+ python3-typing-inspect (>= 0.8.0),
  @,
diff -pruN 8.5.8-2/.github/workflows/python-package.yml 8.5.10-1/.github/workflows/python-package.yml
--- 8.5.8-2/.github/workflows/python-package.yml	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/.github/workflows/python-package.yml	2022-11-09 20:48:06.000000000 +0000
@@ -11,29 +11,35 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python_version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"]
+        python_version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.9"]
 
     steps:
-    - uses: actions/checkout@v2
+    - uses: actions/checkout@v3
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
+      uses: actions/setup-python@v4
       with:
         python-version: ${{ matrix.python_version }}
     - name: set pre-commit cache
-      uses: actions/cache@v2
+      uses: actions/cache@v3
       with:
         path: |
           ~/.cache/pre-commit
           ~/.cache/pip
         key: ${{ matrix.python_version }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('setup.py') }}
+
+    - name: Use latest pip
+      run: python -m pip install --upgrade pip
+    - name: Pre-install PyYAML without --pre
+      if: ${{ startsWith(matrix.python_version, 'pypy') }}
+      # Temporary workaround:
+      # PyYAML fails to build with Cython 3.0.0a
+      # see https://github.com/yaml/pyyaml/issues/601
+      run: pip install PyYAML
     - name: Install dependencies
-      run: |
-        python -m pip install --upgrade pip
-        pip install --pre -e '.[dev]'
+      run: pip install --pre -e '.[dev]'
+
     - name: Pre-commit hooks
       if: ${{ matrix.python_version != 'pypy3' && matrix.python_version != '3.6' }}
       run: pre-commit run --all-files
     - name: Test with pytest
       run: pytest
-      env:
-        PYTHONWARNINGS: error
diff -pruN 8.5.8-2/marshmallow_dataclass/__init__.py 8.5.10-1/marshmallow_dataclass/__init__.py
--- 8.5.8-2/marshmallow_dataclass/__init__.py	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/marshmallow_dataclass/__init__.py	2022-11-09 20:48:06.000000000 +0000
@@ -48,6 +48,7 @@ from typing import (
     Dict,
     List,
     Mapping,
+    NewType as typing_NewType,
     Optional,
     Set,
     Tuple,
@@ -383,10 +384,10 @@ def _internal_class_schema(
             )
             created_dataclass: type = dataclasses.dataclass(clazz)
             return _internal_class_schema(created_dataclass, base_schema, clazz_frame)
-        except Exception:
+        except Exception as exc:
             raise TypeError(
                 f"{getattr(clazz, '__name__', repr(clazz))} is not a dataclass and cannot be turned into one."
-            )
+            ) from exc
 
     # Copy all marshmallow hooks and whitelisted members of the dataclass to the schema.
     attributes = {
@@ -469,17 +470,17 @@ def _field_by_supertype(
 
 def _generic_type_add_any(typ: type) -> type:
     """if typ is generic type without arguments, replace them by Any."""
-    if typ is list:
+    if typ is list or typ is List:
         typ = List[Any]
-    elif typ is dict:
+    elif typ is dict or typ is Dict:
         typ = Dict[Any, Any]
     elif typ is Mapping:
         typ = Mapping[Any, Any]
     elif typ is Sequence:
         typ = Sequence[Any]
-    elif typ is Set:
+    elif typ is set or typ is Set:
         typ = Set[Any]
-    elif typ is FrozenSet:
+    elif typ is frozenset or typ is FrozenSet:
         typ = FrozenSet[Any]
     return typ
 
@@ -494,8 +495,8 @@ def _field_for_generic_type(
     If the type is a generic interface, resolve the arguments and construct the appropriate Field.
     """
     origin = typing_inspect.get_origin(typ)
+    arguments = typing_inspect.get_args(typ, True)
     if origin:
-        arguments = typing_inspect.get_args(typ, True)
         # Override base_schema.TYPE_MAPPING to change the class used for generic types below
         type_mapping = base_schema.TYPE_MAPPING if base_schema else {}
 
@@ -508,7 +509,11 @@ def _field_for_generic_type(
                 type_mapping.get(List, marshmallow.fields.List),
             )
             return list_type(child_type, **metadata)
-        if origin in (collections.abc.Sequence, Sequence):
+        if origin in (collections.abc.Sequence, Sequence) or (
+            origin in (tuple, Tuple)
+            and len(arguments) == 2
+            and arguments[1] is Ellipsis
+        ):
             from . import collection_field
 
             child_type = field_for_schema(
@@ -556,38 +561,38 @@ def _field_for_generic_type(
                 ),
                 **metadata,
             )
-        elif typing_inspect.is_union_type(typ):
-            if typing_inspect.is_optional_type(typ):
-                metadata["allow_none"] = metadata.get("allow_none", True)
-                metadata["dump_default"] = metadata.get("dump_default", None)
-                if not metadata.get("required"):
-                    metadata["load_default"] = metadata.get("load_default", None)
-                metadata.setdefault("required", False)
-            subtypes = [t for t in arguments if t is not NoneType]  # type: ignore
-            if len(subtypes) == 1:
-                return field_for_schema(
-                    subtypes[0],
-                    metadata=metadata,
-                    base_schema=base_schema,
-                    typ_frame=typ_frame,
-                )
-            from . import union_field
-
-            return union_field.Union(
-                [
-                    (
+    if typing_inspect.is_union_type(typ):
+        if typing_inspect.is_optional_type(typ):
+            metadata["allow_none"] = metadata.get("allow_none", True)
+            metadata["dump_default"] = metadata.get("dump_default", None)
+            if not metadata.get("required"):
+                metadata["load_default"] = metadata.get("load_default", None)
+            metadata.setdefault("required", False)
+        subtypes = [t for t in arguments if t is not NoneType]  # type: ignore
+        if len(subtypes) == 1:
+            return field_for_schema(
+                subtypes[0],
+                metadata=metadata,
+                base_schema=base_schema,
+                typ_frame=typ_frame,
+            )
+        from . import union_field
+
+        return union_field.Union(
+            [
+                (
+                    subtyp,
+                    field_for_schema(
                         subtyp,
-                        field_for_schema(
-                            subtyp,
-                            metadata={"required": True},
-                            base_schema=base_schema,
-                            typ_frame=typ_frame,
-                        ),
-                    )
-                    for subtyp in subtypes
-                ],
-                **metadata,
-            )
+                        metadata={"required": True},
+                        base_schema=base_schema,
+                        typ_frame=typ_frame,
+                    ),
+                )
+                for subtyp in subtypes
+            ],
+            **metadata,
+        )
     return None
 
 
@@ -805,12 +810,8 @@ def NewType(
     marshmallow.exceptions.ValidationError: {'mail': ['Not a valid email address.']}
     """
 
-    def new_type(x: _U):
-        return x
-
-    new_type.__name__ = name
     # noinspection PyTypeHints
-    new_type.__supertype__ = typ  # type: ignore
+    new_type = typing_NewType(name, typ)  # type: ignore
     # noinspection PyTypeHints
     new_type._marshmallow_field = field  # type: ignore
     # noinspection PyTypeHints
diff -pruN 8.5.8-2/marshmallow_dataclass/union_field.py 8.5.10-1/marshmallow_dataclass/union_field.py
--- 8.5.8-2/marshmallow_dataclass/union_field.py	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/marshmallow_dataclass/union_field.py	2022-11-09 20:48:06.000000000 +0000
@@ -34,13 +34,15 @@ class Union(fields.Field):
 
         self.union_fields = new_union_fields
 
-    def _serialize(self, value: Any, attr: str, obj, **kwargs) -> Any:
+    def _serialize(self, value: Any, attr: Optional[str], obj, **kwargs) -> Any:
         errors = []
         if value is None:
             return value
         for typ, field in self.union_fields:
             try:
-                typeguard.check_type(attr, value, typ)
+                typeguard.check_type(
+                    value=value, expected_type=typ, argname=attr or "anonymous"
+                )
                 return field._serialize(value, attr, obj, **kwargs)
             except TypeError as e:
                 errors.append(e)
@@ -53,7 +55,9 @@ class Union(fields.Field):
         for typ, field in self.union_fields:
             try:
                 result = field.deserialize(value, **kwargs)
-                typeguard.check_type(attr or "anonymous", result, typ)
+                typeguard.check_type(
+                    value=result, expected_type=typ, argname=attr or "anonymous"
+                )
                 return result
             except (TypeError, ValidationError) as e:
                 errors.append(e)
diff -pruN 8.5.8-2/.pre-commit-config.yaml 8.5.10-1/.pre-commit-config.yaml
--- 8.5.8-2/.pre-commit-config.yaml	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/.pre-commit-config.yaml	2022-11-09 20:48:06.000000000 +0000
@@ -1,27 +1,27 @@
 repos:
 - repo: https://github.com/asottile/pyupgrade
-  rev: v2.31.0 # Later versions do not support python 3.6
+  rev: v3.2.0
   hooks:
   - id: pyupgrade
     args: ["--py36-plus"]
 - repo: https://github.com/python/black
-  rev: 22.3.0
+  rev: 22.10.0
   hooks:
   - id: black
     language_version: python3
 - repo: https://gitlab.com/pycqa/flake8
-  rev: 3.9.2
+  rev: 5.0.4
   hooks:
   - id: flake8
-    additional_dependencies: ['flake8-bugbear==19.8.0']
+    additional_dependencies: ['flake8-bugbear==22.10.27']
 - repo: https://github.com/pre-commit/mirrors-mypy
-  rev: v0.931 # Later versions do not support python 3.6
+  rev: v0.982
   hooks:
   - id: mypy
     additional_dependencies: [marshmallow-enum,typeguard,marshmallow]
     args: [--show-error-codes]
 - repo: https://github.com/asottile/blacken-docs
-  rev: v1.12.0 # Later versions do not support python 3.6
+  rev: v1.12.1
   hooks:
   - id: blacken-docs
-    additional_dependencies: [black==19.3b0]
+    additional_dependencies: [black==22.8.0]
diff -pruN 8.5.8-2/pyproject.toml 8.5.10-1/pyproject.toml
--- 8.5.8-2/pyproject.toml	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/pyproject.toml	2022-11-09 20:48:06.000000000 +0000
@@ -1,8 +1,8 @@
 [tool.black]
 line-length = 88
-target-version = ['py36', 'py37', 'py38']
+target-version = ['py36', 'py37', 'py38', 'py39', 'py310', 'py310']
 
 [tool.pytest.ini_options]
 filterwarnings = [
-    "error",
+    "error:::marshmallow_dataclass|test",
 ]
diff -pruN 8.5.8-2/setup.py 8.5.10-1/setup.py
--- 8.5.8-2/setup.py	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/setup.py	2022-11-09 20:48:06.000000000 +0000
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-VERSION = "8.5.8"
+VERSION = "8.5.10"
 
 CLASSIFIERS = [
     "Development Status :: 4 - Beta",
@@ -12,6 +12,8 @@ CLASSIFIERS = [
     "Programming Language :: Python :: 3.7",
     "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
+    "Programming Language :: Python :: 3.10",
+    "Programming Language :: Python :: 3.11",
     "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
 ]
 
diff -pruN 8.5.8-2/tests/test_class_schema.py 8.5.10-1/tests/test_class_schema.py
--- 8.5.8-2/tests/test_class_schema.py	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/tests/test_class_schema.py	2022-11-09 20:48:06.000000000 +0000
@@ -227,7 +227,7 @@ class TestClassSchema(unittest.TestCase)
                 schema.load({"data": data})
 
     def test_final_infers_type_from_default(self):
-        # @dataclasses.dataclass
+        # @dataclasses.dataclass(frozen=True)
         class A:
             data: Final = "a"
 
@@ -238,7 +238,8 @@ class TestClassSchema(unittest.TestCase)
         # NOTE: This workaround is needed to avoid a Mypy crash.
         # See: https://github.com/python/mypy/issues/10090#issuecomment-865971891
         if not TYPE_CHECKING:
-            A = dataclasses.dataclass(A)
+            frozen_dataclass = dataclasses.dataclass(frozen=True)
+            A = frozen_dataclass(A)
             B = dataclasses.dataclass(B)
 
         with self.assertWarns(Warning):
diff -pruN 8.5.8-2/tests/test_field_for_schema.py 8.5.10-1/tests/test_field_for_schema.py
--- 8.5.8-2/tests/test_field_for_schema.py	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/tests/test_field_for_schema.py	2022-11-09 20:48:06.000000000 +0000
@@ -1,4 +1,5 @@
 import inspect
+import sys
 import typing
 import unittest
 from enum import Enum
@@ -53,6 +54,16 @@ class TestFieldForSchema(unittest.TestCa
             ),
         )
 
+    def test_dict_from_typing_wo_args(self):
+        self.assertFieldsEqual(
+            field_for_schema(Dict),
+            fields.Dict(
+                keys=fields.Raw(required=True, allow_none=True),
+                values=fields.Raw(required=True, allow_none=True),
+                required=True,
+            ),
+        )
+
     def test_builtin_dict(self):
         self.assertFieldsEqual(
             field_for_schema(dict),
@@ -63,6 +74,21 @@ class TestFieldForSchema(unittest.TestCa
             ),
         )
 
+    def test_list_from_typing(self):
+        self.assertFieldsEqual(
+            field_for_schema(List[int]),
+            fields.List(fields.Integer(required=True), required=True),
+        )
+
+    def test_list_from_typing_wo_args(self):
+        self.assertFieldsEqual(
+            field_for_schema(List),
+            fields.List(
+                fields.Raw(required=True, allow_none=True),
+                required=True,
+            ),
+        )
+
     def test_builtin_list(self):
         self.assertFieldsEqual(
             field_for_schema(list, metadata=dict(required=False)),
@@ -217,6 +243,13 @@ class TestFieldForSchema(unittest.TestCa
         )
 
     def test_sequence(self):
+        self.maxDiff = 2000
+        self.assertFieldsEqual(
+            field_for_schema(typing.Sequence[int]),
+            collection_field.Sequence(fields.Integer(required=True), required=True),
+        )
+
+    def test_sequence_wo_args(self):
         self.assertFieldsEqual(
             field_for_schema(typing.Sequence),
             collection_field.Sequence(
@@ -225,7 +258,30 @@ class TestFieldForSchema(unittest.TestCa
             ),
         )
 
-    def test_set(self):
+    def test_homogeneous_tuple_from_typing(self):
+        self.assertFieldsEqual(
+            field_for_schema(Tuple[str, ...]),
+            collection_field.Sequence(fields.String(required=True), required=True),
+        )
+
+    @unittest.skipIf(sys.version_info < (3, 9), "PEP 585 unsupported")
+    def test_homogeneous_tuple(self):
+        self.assertFieldsEqual(
+            field_for_schema(tuple[float, ...]),
+            collection_field.Sequence(fields.Float(required=True), required=True),
+        )
+
+    def test_set_from_typing(self):
+        self.assertFieldsEqual(
+            field_for_schema(typing.Set[str]),
+            collection_field.Set(
+                fields.String(required=True),
+                frozen=False,
+                required=True,
+            ),
+        )
+
+    def test_set_from_typing_wo_args(self):
         self.assertFieldsEqual(
             field_for_schema(typing.Set),
             collection_field.Set(
@@ -235,12 +291,42 @@ class TestFieldForSchema(unittest.TestCa
             ),
         )
 
-    def test_frozenset(self):
+    def test_builtin_set(self):
+        self.assertFieldsEqual(
+            field_for_schema(set),
+            collection_field.Set(
+                cls_or_instance=fields.Raw(required=True, allow_none=True),
+                frozen=False,
+                required=True,
+            ),
+        )
+
+    def test_frozenset_from_typing(self):
+        self.assertFieldsEqual(
+            field_for_schema(typing.FrozenSet[int]),
+            collection_field.Set(
+                fields.Integer(required=True),
+                frozen=True,
+                required=True,
+            ),
+        )
+
+    def test_frozenset_from_typing_wo_args(self):
         self.assertFieldsEqual(
             field_for_schema(typing.FrozenSet),
             collection_field.Set(
                 cls_or_instance=fields.Raw(required=True, allow_none=True),
                 frozen=True,
+                required=True,
+            ),
+        )
+
+    def test_builtin_frozenset(self):
+        self.assertFieldsEqual(
+            field_for_schema(frozenset),
+            collection_field.Set(
+                cls_or_instance=fields.Raw(required=True, allow_none=True),
+                frozen=True,
                 required=True,
             ),
         )
diff -pruN 8.5.8-2/tests/test_mypy.yml 8.5.10-1/tests/test_mypy.yml
--- 8.5.8-2/tests/test_mypy.yml	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/tests/test_mypy.yml	2022-11-09 20:48:06.000000000 +0000
@@ -5,6 +5,9 @@
   mypy_config: |
     follow_imports = silent
     plugins = marshmallow_dataclass.mypy
+    show_error_codes = true
+  env:
+    - PYTHONPATH=.
   main: |
     from dataclasses import dataclass
     import marshmallow as ma
@@ -22,12 +25,14 @@
     reveal_type(user.id)  # N: Revealed type is "builtins.str"
     reveal_type(user.email)  # N: Revealed type is "builtins.str"
 
-    User(id=42, email="user@email.com")  # E: Argument "id" to "User" has incompatible type "int"; expected "str"
-    User(id="a"*32, email=["not", "a", "string"])  # E: Argument "email" to "User" has incompatible type "List[str]"; expected "str"
+    User(id=42, email="user@email.com")  # E: Argument "id" to "User" has incompatible type "int"; expected "str"  [arg-type]
+    User(id="a"*32, email=["not", "a", "string"])  # E: Argument "email" to "User" has incompatible type "List[str]"; expected "str"  [arg-type]
 - case: marshmallow_dataclass_keyword_arguments
   mypy_config: |
     follow_imports = silent
     plugins = marshmallow_dataclass.mypy
+  env:
+    - PYTHONPATH=.
   main: |
     from marshmallow_dataclass import dataclass
 
@@ -41,6 +46,9 @@
   mypy_config: |
     follow_imports = silent
     plugins = marshmallow_dataclass.mypy
+    show_error_codes = true
+  env:
+    - PYTHONPATH=.
   main: |
     from dataclasses import dataclass
     import marshmallow
@@ -56,4 +64,4 @@
     reveal_type(website.url)  # N: Revealed type is "builtins.str"
     reveal_type(website.email)  # N: Revealed type is "builtins.str"
 
-    Website(url=42, email="user@email.com")  # E: Argument "url" to "Website" has incompatible type "int"; expected "str"
+    Website(url=42, email="user@email.com")  # E: Argument "url" to "Website" has incompatible type "int"; expected "str"  [arg-type]
diff -pruN 8.5.8-2/tests/test_union.py 8.5.10-1/tests/test_union.py
--- 8.5.8-2/tests/test_union.py	2022-04-27 16:20:10.000000000 +0000
+++ 8.5.10-1/tests/test_union.py	2022-11-09 20:48:06.000000000 +0000
@@ -1,4 +1,5 @@
 from dataclasses import field
+import sys
 import unittest
 from typing import List, Optional, Union, Dict
 
@@ -180,3 +181,18 @@ class TestClassSchema(unittest.TestCase)
             )
         with self.assertRaises(marshmallow.exceptions.ValidationError):
             schema.load({"value": None})
+
+    @unittest.skipIf(sys.version_info < (3, 10), "No PEP604 support in py<310")
+    def test_pep604_union(self):
+        @dataclass
+        class PEP604IntOrStr:
+            value: int | str
+
+        schema = PEP604IntOrStr.Schema()
+        data_in = {"value": "hello"}
+        loaded = schema.load(data_in)
+        self.assertEqual(loaded, PEP604IntOrStr(value="hello"))
+        self.assertEqual(schema.dump(loaded), data_in)
+
+        data_in = {"value": 42}
+        self.assertEqual(schema.dump(schema.load(data_in)), data_in)
