On Fri, 15 Apr 2022 09:33:26 +0200 Bastian Germann <b...@debian.org> wrote:
Control: tags -1 patch

This should be resolved by https://github.com/pyserial/pyserial/pull/382

As the package maintainer has not reacted for quite a while,
I have just uploaded an NMU to DELAYED/3 to include this patch.
Without it, the package is unusable for me.

The debdiff is attached.
diff -Nru pyserial-3.5/debian/changelog pyserial-3.5/debian/changelog
--- pyserial-3.5/debian/changelog       2022-04-03 11:33:57.000000000 +0200
+++ pyserial-3.5/debian/changelog       2022-09-26 17:04:16.000000000 +0200
@@ -1,3 +1,10 @@
+pyserial (3.5-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch: add timeout.setter for rfc2217. Closes: #699914.
+
+ -- Bastian Germann <b...@debian.org>  Mon, 26 Sep 2022 17:04:16 +0200
+
 pyserial (3.5-1) unstable; urgency=medium
 
   * New upstream version. Closes: #1008834.
diff -Nru pyserial-3.5/debian/patches/add-timeout-setter-for-rfc2217.patch 
pyserial-3.5/debian/patches/add-timeout-setter-for-rfc2217.patch
--- pyserial-3.5/debian/patches/add-timeout-setter-for-rfc2217.patch    
1970-01-01 01:00:00.000000000 +0100
+++ pyserial-3.5/debian/patches/add-timeout-setter-for-rfc2217.patch    
2022-09-26 17:04:16.000000000 +0200
@@ -0,0 +1,42 @@
+Origin: https://github.com/pyserial/pyserial/pull/382
+From: Rouven Czerwinski <rou...@czerwinskis.de>
+Date: Sun, 9 Sep 2018 20:08:40 +0200
+Subject: serial/rfc2217: add timeout.setter for rfc2217
+
+Add a new setter method for the timeout property which does not invoke
+the port reconfiguration.
+This is a direct copy of the SerialBase timeout property without the port
+reconfiguration.
+
+Modified by Bastian Germann to apply on v3.5.
+---
+ serial/rfc2217.py | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/serial/rfc2217.py b/serial/rfc2217.py
+index d962c1e8..12615cf3 100644
+--- a/serial/rfc2217.py
++++ b/serial/rfc2217.py
+@@ -723,5 +723,22 @@ def cd(self):
+         return bool(self.get_modem_state() & MODEMSTATE_MASK_CD)
+ 
++    @property
++    def timeout(self):
++        """Get the current timeout setting."""
++        return self._timeout
++
++    @timeout.setter
++    def timeout(self, timeout):
++        """Change timeout setting."""
++        if timeout is not None:
++            try:
++                timeout + 1     # test if it's a number, will throw a 
TypeError if not...
++            except TypeError:
++                raise ValueError("Not a valid timeout: {!r}".format(timeout))
++            if timeout < 0:
++                raise ValueError("Not a valid timeout: {!r}".format(timeout))
++        self._timeout = timeout
++
+     # - - - platform specific - - -
+     # None so far
+ 
diff -Nru pyserial-3.5/debian/patches/series pyserial-3.5/debian/patches/series
--- pyserial-3.5/debian/patches/series  1970-01-01 01:00:00.000000000 +0100
+++ pyserial-3.5/debian/patches/series  2022-09-26 17:03:04.000000000 +0200
@@ -0,0 +1 @@
+add-timeout-setter-for-rfc2217.patch

Reply via email to