[arch-commits] Commit in python-jsonrpc-server/repos/community-any (4 files)

Morten Linderud foxboron at archlinux.org
Tue Sep 15 16:28:50 UTC 2020


    Date: Tuesday, September 15, 2020 @ 16:28:50
  Author: foxboron
Revision: 707164

archrelease: copy trunk to community-any

Added:
  python-jsonrpc-server/repos/community-any/PKGBUILD
    (from rev 707163, python-jsonrpc-server/trunk/PKGBUILD)
  python-jsonrpc-server/repos/community-any/fix-test.patch
    (from rev 707163, python-jsonrpc-server/trunk/fix-test.patch)
Deleted:
  python-jsonrpc-server/repos/community-any/PKGBUILD
  python-jsonrpc-server/repos/community-any/python-3.8.patch

------------------+
 PKGBUILD         |   82 ++++++++++++++++++++++++++---------------------------
 fix-test.patch   |   19 ++++++++++++
 python-3.8.patch |   60 --------------------------------------
 3 files changed, 60 insertions(+), 101 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-15 16:28:40 UTC (rev 707163)
+++ PKGBUILD	2020-09-15 16:28:50 UTC (rev 707164)
@@ -1,41 +0,0 @@
-# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
-# Maintainer: Morten Linderud <foxboron at archlinux.org>
-# Contributor: fenuks
-
-pkgname=python-jsonrpc-server
-pkgver=0.3.4
-pkgrel=1
-pkgdesc="Python library implementing asynchronous JSON RPC server"
-arch=("any")
-url="https://github.com/palantir/python-jsonrpc-server"
-license=("MIT")
-depends=("python" "python-future" "python-ujson")
-makedepends=("python" "python-setuptools")
-checkdepends=("python-pytest" "python-pytest-runner" "python-pytest-cov"  "python-pyflakes" "python-mock")
-source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz"
-        'python-3.8.patch')
-sha256sums=('c73bf5495c9dd4d2f902755bedeb6da5afe778e0beee82f0e195c4655352fe37'
-            '718d791bd233eeb9c3876f5e18d32e28e75d919375c4c2dd511f8a4e1023b479')
-
-prepare() {
-    cd "${pkgname}-${pkgver}"
-    patch -Np1 -i ../python-3.8.patch
-}
-
-build() {
-    cd "${pkgname}-${pkgver}"
-    python setup.py build
-}
-
-check() {
-    cd "${pkgname}-${pkgver}"
-    py.test
-}
-
-package() {
-    cd "${pkgname}-${pkgver}"
-    python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
-    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
-
-# vim:set ts=4 sw=4 et:

Copied: python-jsonrpc-server/repos/community-any/PKGBUILD (from rev 707163, python-jsonrpc-server/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-09-15 16:28:50 UTC (rev 707164)
@@ -0,0 +1,41 @@
+# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
+# Maintainer: Morten Linderud <foxboron at archlinux.org>
+# Contributor: fenuks
+
+pkgname=python-jsonrpc-server
+pkgver=0.4.0
+pkgrel=1
+pkgdesc="Python library implementing asynchronous JSON RPC server"
+arch=("any")
+url="https://github.com/palantir/python-jsonrpc-server"
+license=("MIT")
+depends=("python" "python-future" "python-ujson")
+makedepends=("python" "python-setuptools")
+checkdepends=("python-pytest" "python-pytest-runner" "python-pytest-cov"  "python-pyflakes" "python-mock")
+source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+        "fix-test.patch")
+sha256sums=('62c543e541f101ec5b57dc654efc212d2c2e3ea47ff6f54b2e7dcb36ecf20595'
+            'ad8dfe322b5d1f29db6da44f1346f2a900d046d2163241c1e312bfd7c54b5155')
+
+prepare(){
+    cd "${pkgname}-${pkgver}"
+    patch -p1 -i ../fix-test.patch
+}
+
+build() {
+    cd "${pkgname}-${pkgver}"
+    python setup.py build
+}
+
+check() {
+    cd "${pkgname}-${pkgver}"
+    py.test
+}
+
+package() {
+    cd "${pkgname}-${pkgver}"
+    python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
+    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+# vim:set ts=4 sw=4 et:

Copied: python-jsonrpc-server/repos/community-any/fix-test.patch (from rev 707163, python-jsonrpc-server/trunk/fix-test.patch)
===================================================================
--- fix-test.patch	                        (rev 0)
+++ fix-test.patch	2020-09-15 16:28:50 UTC (rev 707164)
@@ -0,0 +1,19 @@
+diff --git a/test/test_streams.py b/test/test_streams.py
+index 6985aec..8b292f9 100644
+--- a/test/test_streams.py
++++ b/test/test_streams.py
+@@ -121,10 +121,10 @@ def test_writer_bad_message(wfile, writer):
+         second=1,
+     ))
+ 
+-    assert wfile.getvalue() in [
+-        b'',
++    assert wfile.getvalue() == (
++        b''
+         b'Content-Length: 10\r\n'
+         b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
+         b'\r\n'
+-        b'1546304461'
+-    ]
++        b'1546300861'
++        )

Deleted: python-3.8.patch
===================================================================
--- python-3.8.patch	2020-09-15 16:28:40 UTC (rev 707163)
+++ python-3.8.patch	2020-09-15 16:28:50 UTC (rev 707164)
@@ -1,60 +0,0 @@
-diff -uprb python-jsonrpc-server-0.2.0.orig/pyls_jsonrpc/endpoint.py python-jsonrpc-server-0.2.0/pyls_jsonrpc/endpoint.py
---- python-jsonrpc-server-0.2.0.orig/pyls_jsonrpc/endpoint.py	2019-06-27 18:42:22.000000000 +0300
-+++ python-jsonrpc-server-0.2.0/pyls_jsonrpc/endpoint.py	2019-11-02 23:24:59.407851208 +0200
-@@ -98,7 +98,7 @@ class Endpoint(object):
-             message (dict): The JSON RPC message sent by the client
-         """
-         if 'jsonrpc' not in message or message['jsonrpc'] != JSONRPC_VERSION:
--            log.warn("Unknown message type %s", message)
-+            log.warning("Unknown message type %s", message)
-             return
- 
-         if 'id' not in message:
-@@ -135,7 +135,7 @@ class Endpoint(object):
-         try:
-             handler = self._dispatcher[method]
-         except KeyError:
--            log.warn("Ignoring notification for unknown method %s", method)
-+            log.warning("Ignoring notification for unknown method %s", method)
-             return
- 
-         try:
-@@ -165,7 +165,7 @@ class Endpoint(object):
-         request_future = self._client_request_futures.pop(msg_id, None)
- 
-         if not request_future:
--            log.warn("Received cancel notification for unknown message id %s", msg_id)
-+            log.warning("Received cancel notification for unknown message id %s", msg_id)
-             return
- 
-         # Will only work if the request hasn't started executing
-@@ -230,12 +230,13 @@ class Endpoint(object):
-         request_future = self._server_request_futures.pop(msg_id, None)
- 
-         if not request_future:
--            log.warn("Received response to unknown message id %s", msg_id)
-+            log.warning("Received response to unknown message id %s", msg_id)
-             return
- 
-         if error is not None:
-             log.debug("Received error response to message %s: %s", msg_id, error)
-             request_future.set_exception(JsonRpcException.from_dict(error))
-+            return
- 
-         log.debug("Received result for message %s: %s", msg_id, result)
-         request_future.set_result(result)
-diff -uprb python-jsonrpc-server-0.2.0.orig/test/test_endpoint.py python-jsonrpc-server-0.2.0/test/test_endpoint.py
---- python-jsonrpc-server-0.2.0.orig/test/test_endpoint.py	2019-06-27 18:42:22.000000000 +0300
-+++ python-jsonrpc-server-0.2.0/test/test_endpoint.py	2019-11-02 23:24:21.033838729 +0200
-@@ -115,9 +115,9 @@ def test_request_cancel(endpoint, consum
-         'params': {'id': MSG_ID}
-     })
- 
--    with pytest.raises(exceptions.JsonRpcException) as exc_info:
-+    with pytest.raises((exceptions.JsonRpcException, futures.CancelledError)) as exc_info:
-         assert future.result(timeout=2)
--    assert exc_info.type == exceptions.JsonRpcRequestCancelled
-+    assert exc_info.type in (exceptions.JsonRpcRequestCancelled, futures.CancelledError)
- 
- 
- def test_consume_notification(endpoint, dispatcher):



More information about the arch-commits mailing list