diff -pruN 8.5.8-2/debian/changelog 8.5.8-2ubuntu1/debian/changelog
--- 8.5.8-2/debian/changelog	2022-07-15 01:54:12.000000000 +0000
+++ 8.5.8-2ubuntu1/debian/changelog	2022-09-28 07:54:28.000000000 +0000
@@ -1,3 +1,12 @@
+python-marshmallow-dataclass (8.5.8-2ubuntu1) kinetic; urgency=medium
+
+  * Fix autopkgtest failures with python-typing-inspect 0.8.0 (LP: #1991064)
+    adding upstream patches
+    d/p/0001-A-couple-of-fixes-to-make-CI-tests-more-resilient-21.patch
+    d/p/0001-Fix-test-for-python-3.11-212.patch
+
+ -- Heinrich Schuchardt <heinrich.schuchardt@canonical.com>  Wed, 28 Sep 2022 09:54:28 +0200
+
 python-marshmallow-dataclass (8.5.8-2) unstable; urgency=medium
 
   * Add autopkgtests
diff -pruN 8.5.8-2/debian/control 8.5.8-2ubuntu1/debian/control
--- 8.5.8-2/debian/control	2022-07-15 01:54:12.000000000 +0000
+++ 8.5.8-2ubuntu1/debian/control	2022-09-28 07:54:28.000000000 +0000
@@ -1,7 +1,8 @@
 Source: python-marshmallow-dataclass
 Section: python
 Priority: optional
-Maintainer: Debian Python Team <team+python@tracker.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSCB-Original-Maintainer: Debian Python Team <team+python@tracker.debian.org>
 Uploaders:
  Jérôme Charaoui <jerome@riseup.net>,
 Build-Depends:
diff -pruN 8.5.8-2/debian/patches/0001-A-couple-of-fixes-to-make-CI-tests-more-resilient-21.patch 8.5.8-2ubuntu1/debian/patches/0001-A-couple-of-fixes-to-make-CI-tests-more-resilient-21.patch
--- 8.5.8-2/debian/patches/0001-A-couple-of-fixes-to-make-CI-tests-more-resilient-21.patch	1970-01-01 00:00:00.000000000 +0000
+++ 8.5.8-2ubuntu1/debian/patches/0001-A-couple-of-fixes-to-make-CI-tests-more-resilient-21.patch	2022-09-28 07:54:28.000000000 +0000
@@ -0,0 +1,147 @@
+From 32299c858c40b659ebbf3a7c8802b66b05d74aaf Mon Sep 17 00:00:00 2001
+From: Jeff Dairiki <dairiki@dairiki.org>
+Date: Fri, 23 Sep 2022 12:50:51 -0700
+Subject: [PATCH 1/1] A couple of fixes to make CI tests more resilient (#211)
+
+* Explicitly set PYTHONPATH=. in mypy tests
+
+This prevents issues when marshmallow_dataclass is installed
+in editable mode. (See #209, #207.)
+
+* Don't fail tests upon warnings from external packages.
+
+E.g. marshmallow<3.15 generates a deprecation warning from distutils.
+There's no reason that should cause a test failure for us.
+
+* Update black target-version config.
+
+I have no idea whether this actually affects anything, but
+might as well keep it up-to-date.
+
+* Fix typing of Union._serialize parameter
+
+This tracks a change in type of the `attr` parameter to
+`Field._serialize` made in marshmallow 3.18.0.
+
+Here we also switch to using keyword args to typeguard.check_type
+in an attempt to protect against upcoming
+[changes in its signature](https://typeguard.readthedocs.io/en/latest/api.html#typeguard.check_type).
+
+* Cherry-pick PR #207: Fix broken user types after typing-inspect 0.8.0
+
+This is cherry-picks PR#207 by @vit-zikmund
+---
+ marshmallow_dataclass/__init__.py    |  7 ++-----
+ marshmallow_dataclass/union_field.py | 10 +++++++---
+ pyproject.toml                       |  4 ++--
+ tests/test_mypy.yml                  |  6 ++++++
+ 4 files changed, 17 insertions(+), 10 deletions(-)
+
+diff --git a/marshmallow_dataclass/__init__.py b/marshmallow_dataclass/__init__.py
+index f2014af..c7b1e0a 100644
+--- a/marshmallow_dataclass/__init__.py
++++ b/marshmallow_dataclass/__init__.py
+@@ -48,6 +48,7 @@ from typing import (
+     Dict,
+     List,
+     Mapping,
++    NewType as typing_NewType,
+     Optional,
+     Set,
+     Tuple,
+@@ -805,12 +806,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 --git a/marshmallow_dataclass/union_field.py b/marshmallow_dataclass/union_field.py
+index 9146457..4b1b42a 100644
+--- a/marshmallow_dataclass/union_field.py
++++ b/marshmallow_dataclass/union_field.py
+@@ -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 --git a/pyproject.toml b/pyproject.toml
+index 8d9205d..030f602 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -1,8 +1,8 @@
+ [tool.black]
+ line-length = 88
+-target-version = ['py36', 'py37', 'py38']
++target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
+ 
+ [tool.pytest.ini_options]
+ filterwarnings = [
+-    "error",
++    "error:::marshmallow_dataclass|test",
+ ]
+diff --git a/tests/test_mypy.yml b/tests/test_mypy.yml
+index 20f0e03..624ebf1 100644
+--- a/tests/test_mypy.yml
++++ b/tests/test_mypy.yml
+@@ -5,6 +5,8 @@
+   mypy_config: |
+     follow_imports = silent
+     plugins = marshmallow_dataclass.mypy
++  env:
++    - PYTHONPATH=.
+   main: |
+     from dataclasses import dataclass
+     import marshmallow as ma
+@@ -28,6 +30,8 @@
+   mypy_config: |
+     follow_imports = silent
+     plugins = marshmallow_dataclass.mypy
++  env:
++    - PYTHONPATH=.
+   main: |
+     from marshmallow_dataclass import dataclass
+ 
+@@ -41,6 +45,8 @@
+   mypy_config: |
+     follow_imports = silent
+     plugins = marshmallow_dataclass.mypy
++  env:
++    - PYTHONPATH=.
+   main: |
+     from dataclasses import dataclass
+     import marshmallow
+-- 
+2.37.2
+
diff -pruN 8.5.8-2/debian/patches/0001-Fix-test-for-python-3.11-212.patch 8.5.8-2ubuntu1/debian/patches/0001-Fix-test-for-python-3.11-212.patch
--- 8.5.8-2/debian/patches/0001-Fix-test-for-python-3.11-212.patch	1970-01-01 00:00:00.000000000 +0000
+++ 8.5.8-2ubuntu1/debian/patches/0001-Fix-test-for-python-3.11-212.patch	2022-09-28 07:54:28.000000000 +0000
@@ -0,0 +1,35 @@
+From 8f52a8cccc61fb6100a3c819faf9557680f349d1 Mon Sep 17 00:00:00 2001
+From: Jeff Dairiki <dairiki@dairiki.org>
+Date: Sat, 24 Sep 2022 03:45:10 -0700
+Subject: [PATCH] Fix test for python 3.11 (#212)
+
+---
+ tests/test_class_schema.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_class_schema.py b/tests/test_class_schema.py
+index ed09418..ef237a3 100644
+--- a/tests/test_class_schema.py
++++ b/tests/test_class_schema.py
+@@ -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):
+-- 
+2.37.2
+
diff -pruN 8.5.8-2/debian/patches/series 8.5.8-2ubuntu1/debian/patches/series
--- 8.5.8-2/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ 8.5.8-2ubuntu1/debian/patches/series	2022-09-28 07:54:28.000000000 +0000
@@ -0,0 +1,2 @@
+0001-A-couple-of-fixes-to-make-CI-tests-more-resilient-21.patch
+0001-Fix-test-for-python-3.11-212.patch
