Hi Daniel,

I just NMU'd a a fix for this, since this was blocking mypy transition.
Debdiff is attached with this email, could you please apply this upstream 
and/or in the deb package?

Regards,
Nilesh
diff -Nru python-sop-0.2.0/debian/changelog python-sop-0.2.0/debian/changelog
--- python-sop-0.2.0/debian/changelog   2020-08-31 04:14:09.000000000 +0530
+++ python-sop-0.2.0/debian/changelog   2022-01-17 18:33:40.000000000 +0530
@@ -1,3 +1,11 @@
+python-sop (0.2.0-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch to fix FTBFS with mypy version 0.931-1
+    (Closes: #1003561)
+
+ -- Nilesh Patra <nil...@debian.org>  Mon, 17 Jan 2022 18:33:40 +0530
+
 python-sop (0.2.0-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru python-sop-0.2.0/debian/patches/fix-test-with-new-mypy.patch 
python-sop-0.2.0/debian/patches/fix-test-with-new-mypy.patch
--- python-sop-0.2.0/debian/patches/fix-test-with-new-mypy.patch        
1970-01-01 05:30:00.000000000 +0530
+++ python-sop-0.2.0/debian/patches/fix-test-with-new-mypy.patch        
2022-01-17 18:16:10.000000000 +0530
@@ -0,0 +1,33 @@
+--- a/sop/__init__.py
++++ b/sop/__init__.py
+@@ -96,7 +96,7 @@
+ from binascii import unhexlify, hexlify
+ from datetime import datetime, timezone
+ from argparse import ArgumentParser, _SubParsersAction, Namespace
+-from typing import List, Optional, Dict, Sequence, MutableMapping, Tuple, 
BinaryIO
++from typing import List, Optional, Dict, Sequence, MutableMapping, Tuple, 
BinaryIO, TYPE_CHECKING
+ 
+ from .__version__ import __version__
+ 
+@@ -221,7 +221,7 @@
+         self._parser = ArgumentParser(prog=name, description=description)
+         self._parser.add_argument('--debug', action='store_true',
+                                   help='show debugging data')
+-        _cmds:_SubParsersAction = self._parser.add_subparsers(required=True,
++        _cmds:_SubParsersAction[ArgumentParser] = 
self._parser.add_subparsers(required=True,
+                                             metavar='SUBCOMMAND',
+                                             dest='subcmd')
+         _subs = {}
+@@ -384,7 +384,11 @@
+             indirectout.write(data)
+         indirectout.close()
+ 
+-    def extend_parsers(self, subcommands:_SubParsersAction,
++    if TYPE_CHECKING:
++        subparsertype = _SubParsersAction[ArgumentParser]
++    else:
++        subparsertype = _SubParsersAction
++    def extend_parsers(self, subcommands:subparsertype,
+                        subparsers:Dict[str,ArgumentParser]) -> None:
+         '''override this function to add options or subcommands
+ 
diff -Nru python-sop-0.2.0/debian/patches/series 
python-sop-0.2.0/debian/patches/series
--- python-sop-0.2.0/debian/patches/series      1970-01-01 05:30:00.000000000 
+0530
+++ python-sop-0.2.0/debian/patches/series      2022-01-17 18:32:39.000000000 
+0530
@@ -0,0 +1 @@
+fix-test-with-new-mypy.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to