python3Packages.pyserial: patches for RFC2217

These two patches significantly improve the RFC2217 negotiation and
support for devices like the Moxa serial servers. The patches reduce the
amount of negotiations done over RFC2217 and, in case of the timeout
setter patch, prevent pyserial from setting the timeout again on every
send line. We have been using these in a downstream fork for 2 years now
and have not seen problems in the field. Upstream has acted neither on
the issue [1] nor on the proposed pull request [2], so I am proposing to
include them downstream within nixpkgs instead.

[1]: https://github.com/pyserial/pyserial/issues/376
[2]: https://github.com/pyserial/pyserial/pull/382
This commit is contained in:
Rouven Czerwinski
2021-02-17 10:56:45 +01:00
parent 2fe492c198
commit db945b0751
3 changed files with 89 additions and 0 deletions
@@ -9,6 +9,11 @@ buildPythonPackage rec {
sha256 = "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw";
};
patches = [
./001-rfc2217-only-negotiate-on-value-change.patch
./002-rfc2217-timeout-setter-for-rfc2217.patch
];
checkPhase = "python -m unittest discover -s test";
doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin