Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-jsonrpc-server/files/
Date: Wed, 27 Jan 2021 18:17:30
Message-Id: 1611771436.c9965dc7a1e2030692753b358f6a43c9df9a38ec.conikost@gentoo
1 commit: c9965dc7a1e2030692753b358f6a43c9df9a38ec
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Wed Jan 27 12:50:16 2021 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 27 18:17:16 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9965dc7
7
8 dev-python/python-jsonrpc-server: remove unused patches
9
10 Closes: https://github.com/gentoo/gentoo/pull/19236
11 Package-Manager: Portage-3.0.14, Repoman-3.0.2
12 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
13 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
14
15 ...ython-3.8-fixes-for-endpoint-and-tests-37.patch | 84 ----------------------
16 ...sonrpc-server-0.3.4-remove-pytest-cov-dep.patch | 15 ----
17 2 files changed, 99 deletions(-)
18
19 diff --git a/dev-python/python-jsonrpc-server/files/python-jsonrpc-server-0.3.4-Python-3.8-fixes-for-endpoint-and-tests-37.patch b/dev-python/python-jsonrpc-server/files/python-jsonrpc-server-0.3.4-Python-3.8-fixes-for-endpoint-and-tests-37.patch
20 deleted file mode 100644
21 index 8d597ddda03..00000000000
22 --- a/dev-python/python-jsonrpc-server/files/python-jsonrpc-server-0.3.4-Python-3.8-fixes-for-endpoint-and-tests-37.patch
23 +++ /dev/null
24 @@ -1,84 +0,0 @@
25 -From 7987e30c99edddab8acbf567bad0ebf2d1c3381d Mon Sep 17 00:00:00 2001
26 -From: Ben Greiner <code@××××××××××.de>
27 -Date: Mon, 17 Aug 2020 21:28:03 +0200
28 -Subject: [PATCH] Python 3.8 fixes for endpoint and tests (#37)
29 -
30 -* fix endpoint exception lists for Python 3.8
31 -Author: @maximbaz according to #33
32 -
33 -* fix test_writer_bad_message
34 -not only windows can have problems with serializing datetime
35 -
36 -Co-authored-by: Carlos Cordoba <ccordoba12@×××××.com>
37 -Co-authored-by: Marko Bakovic <delta003@××××××××××××××××××××.com>
38 ----
39 - pyls_jsonrpc/endpoint.py | 1 +
40 - test/test_endpoint.py | 4 ++--
41 - test/test_streams.py | 19 +++++++++----------
42 - 3 files changed, 12 insertions(+), 12 deletions(-)
43 -
44 -diff --git a/pyls_jsonrpc/endpoint.py b/pyls_jsonrpc/endpoint.py
45 -index e8bfb5b..0caf612 100644
46 ---- a/pyls_jsonrpc/endpoint.py
47 -+++ b/pyls_jsonrpc/endpoint.py
48 -@@ -236,6 +236,7 @@ class Endpoint(object):
49 - if error is not None:
50 - log.debug("Received error response to message %s: %s", msg_id, error)
51 - request_future.set_exception(JsonRpcException.from_dict(error))
52 -+ return
53 -
54 - log.debug("Received result for message %s: %s", msg_id, result)
55 - request_future.set_result(result)
56 -diff --git a/test/test_endpoint.py b/test/test_endpoint.py
57 -index 47a038b..b954732 100644
58 ---- a/test/test_endpoint.py
59 -+++ b/test/test_endpoint.py
60 -@@ -115,9 +115,9 @@ def test_request_cancel(endpoint, consumer):
61 - 'params': {'id': MSG_ID}
62 - })
63 -
64 -- with pytest.raises(exceptions.JsonRpcException) as exc_info:
65 -+ with pytest.raises((exceptions.JsonRpcException, futures.CancelledError)) as exc_info:
66 - assert future.result(timeout=2)
67 -- assert exc_info.type == exceptions.JsonRpcRequestCancelled
68 -+ assert exc_info.type in (exceptions.JsonRpcRequestCancelled, futures.CancelledError)
69 -
70 -
71 - def test_consume_notification(endpoint, dispatcher):
72 -diff --git a/test/test_streams.py b/test/test_streams.py
73 -index 8c2e93e..480a73b 100644
74 ---- a/test/test_streams.py
75 -+++ b/test/test_streams.py
76 -@@ -97,7 +97,8 @@ def test_writer(wfile, writer):
77 -
78 - def test_writer_bad_message(wfile, writer):
79 - # A datetime isn't serializable(or poorly serializable),
80 -- # ensure the write method doesn't throw
81 -+ # ensure the write method doesn't throw, but the result could be empty
82 -+ # or the correct datetime
83 - import datetime
84 - writer.write(datetime.datetime(
85 - year=2019,
86 -@@ -108,12 +109,10 @@ def test_writer_bad_message(wfile, writer):
87 - second=1,
88 - ))
89 -
90 -- if os.name == 'nt':
91 -- assert wfile.getvalue() == b''
92 -- else:
93 -- assert wfile.getvalue() == (
94 -- b'Content-Length: 10\r\n'
95 -- b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
96 -- b'\r\n'
97 -- b'1546304461'
98 -- )
99 -+ assert wfile.getvalue() in [
100 -+ b'',
101 -+ b'Content-Length: 10\r\n'
102 -+ b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
103 -+ b'\r\n'
104 -+ b'1546304461'
105 -+ ]
106 ---
107 -2.26.2
108 -
109
110 diff --git a/dev-python/python-jsonrpc-server/files/python-jsonrpc-server-0.3.4-remove-pytest-cov-dep.patch b/dev-python/python-jsonrpc-server/files/python-jsonrpc-server-0.3.4-remove-pytest-cov-dep.patch
111 deleted file mode 100644
112 index a81919eae4b..00000000000
113 --- a/dev-python/python-jsonrpc-server/files/python-jsonrpc-server-0.3.4-remove-pytest-cov-dep.patch
114 +++ /dev/null
115 @@ -1,15 +0,0 @@
116 -pytest-cov is a deprecated dep
117 -diff --git a/setup.cfg b/setup.cfg
118 -index 03b63df..165c746 100644
119 ---- a/setup.cfg
120 -+++ b/setup.cfg
121 -@@ -13,9 +13,6 @@ exclude = test/plugins/.ropeproject,test/.ropeproject
122 -
123 - [tool:pytest]
124 - testpaths = test
125 --addopts =
126 -- --cov-report html --cov-report term --junitxml=pytest.xml
127 -- --cov pyls --cov test
128 -
129 - [egg_info]
130 - tag_build =