Hello community,
here is the log from the commit of package python-python-jsonrpc-server for
openSUSE:Factory checked in at 2020-09-21 17:30:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-jsonrpc-server (Old)
and /work/SRC/openSUSE:Factory/.python-python-jsonrpc-server.new.4249
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-jsonrpc-server"
Mon Sep 21 17:30:14 2020 rev:6 rq:835431 version:0.4.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-python-jsonrpc-server/python-python-jsonrpc-server.changes
2020-05-03 22:46:52.887111588 +0200
+++
/work/SRC/openSUSE:Factory/.python-python-jsonrpc-server.new.4249/python-python-jsonrpc-server.changes
2020-09-21 17:37:57.964654824 +0200
@@ -1,0 +2,9 @@
+Fri Sep 11 11:59:25 UTC 2020 - Benjamin Greiner <[email protected]>
+
+- Update to version 0.4.0
+ * no changelog provided gh#palantir/python-jsonrpc-server#48
+- The update is basically a merge of the patches
+ * python-jsonrpc-server-pr37.patch
+ * remove_testing_warnings.patch
+
+-------------------------------------------------------------------
Old:
----
python-jsonrpc-server-0.3.4.tar.gz
python-jsonrpc-server-pr37.patch
remove_testing_warnings.patch
New:
----
python-jsonrpc-server-0.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-jsonrpc-server.spec ++++++
--- /var/tmp/diff_new_pack.N1MbyI/_old 2020-09-21 17:38:07.948662063 +0200
+++ /var/tmp/diff_new_pack.N1MbyI/_new 2020-09-21 17:38:07.952662066 +0200
@@ -20,32 +20,28 @@
%define modname python-jsonrpc-server
%bcond_without python2
Name: python-python-jsonrpc-server
-Version: 0.3.4
+Version: 0.4.0
Release: 0
Summary: JSON RPC 2.0 server library
License: MIT
URL: https://github.com/palantir/python-jsonrpc-server
Source:
https://files.pythonhosted.org/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM remove_testing_warnings.patch
gh#palantir/python-jsonrpc-server#34 [email protected]
-# remove warnings about deprecated method logging.Logger.warn
-Patch0: remove_testing_warnings.patch
-# PATCH-FIX-UPSTREAM remove_testing_warnings.patch
gh#palantir/python-jsonrpc-server#37 [email protected]
-Patch1: python-jsonrpc-server-pr37.patch
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module ujson}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-ujson
%if %{with python2}
BuildRequires: python2-future >= 0.14.0
BuildRequires: python2-futures
%endif
+Requires: python-ujson
%ifpython2
Requires: python2-future >= 0.14.0
Requires: python2-futures
%endif
+
%python_subpackages
%description
@@ -55,8 +51,6 @@
%prep
%autosetup -p1 -n %{modname}-%{version}
-sed -i 's/ujson<=1.35;/ujson;/' setup.py
-
%build
%python_build
++++++ python-jsonrpc-server-0.3.4.tar.gz -> python-jsonrpc-server-0.4.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jsonrpc-server-0.3.4/PKG-INFO
new/python-jsonrpc-server-0.4.0/PKG-INFO
--- old/python-jsonrpc-server-0.3.4/PKG-INFO 2020-01-19 17:34:34.000000000
+0100
+++ new/python-jsonrpc-server-0.4.0/PKG-INFO 2020-09-08 21:22:46.000000000
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: python-jsonrpc-server
-Version: 0.3.4
+Version: 0.4.0
Summary: JSON RPC 2.0 server library
Home-page: https://github.com/palantir/python-jsonrpc-server
Author: Palantir Technologies, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jsonrpc-server-0.3.4/pyls_jsonrpc/_version.py
new/python-jsonrpc-server-0.4.0/pyls_jsonrpc/_version.py
--- old/python-jsonrpc-server-0.3.4/pyls_jsonrpc/_version.py 2020-01-19
17:34:34.000000000 +0100
+++ new/python-jsonrpc-server-0.4.0/pyls_jsonrpc/_version.py 2020-09-08
21:22:46.000000000 +0200
@@ -8,11 +8,11 @@
version_json = '''
{
- "date": "2020-01-19T16:33:35+0000",
+ "date": "2020-09-07T23:24:04+0200",
"dirty": false,
"error": null,
- "full-revisionid": "808d078f44ed5f9664952cf605b4620c7fe08221",
- "version": "0.3.4"
+ "full-revisionid": "73ab099c0a3d7d68cfb3e785a4271a7e44447833",
+ "version": "0.4.0"
}
''' # END VERSION_JSON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jsonrpc-server-0.3.4/pyls_jsonrpc/endpoint.py
new/python-jsonrpc-server-0.4.0/pyls_jsonrpc/endpoint.py
--- old/python-jsonrpc-server-0.3.4/pyls_jsonrpc/endpoint.py 2020-01-19
17:34:33.000000000 +0100
+++ new/python-jsonrpc-server-0.4.0/pyls_jsonrpc/endpoint.py 2020-09-08
21:22:45.000000000 +0200
@@ -98,7 +98,7 @@
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 @@
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 @@
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 @@
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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-jsonrpc-server-0.3.4/python_jsonrpc_server.egg-info/PKG-INFO
new/python-jsonrpc-server-0.4.0/python_jsonrpc_server.egg-info/PKG-INFO
--- old/python-jsonrpc-server-0.3.4/python_jsonrpc_server.egg-info/PKG-INFO
2020-01-19 17:34:34.000000000 +0100
+++ new/python-jsonrpc-server-0.4.0/python_jsonrpc_server.egg-info/PKG-INFO
2020-09-08 21:22:46.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: python-jsonrpc-server
-Version: 0.3.4
+Version: 0.4.0
Summary: JSON RPC 2.0 server library
Home-page: https://github.com/palantir/python-jsonrpc-server
Author: Palantir Technologies, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-jsonrpc-server-0.3.4/python_jsonrpc_server.egg-info/requires.txt
new/python-jsonrpc-server-0.4.0/python_jsonrpc_server.egg-info/requires.txt
--- old/python-jsonrpc-server-0.3.4/python_jsonrpc_server.egg-info/requires.txt
2020-01-19 17:34:34.000000000 +0100
+++ new/python-jsonrpc-server-0.4.0/python_jsonrpc_server.egg-info/requires.txt
2020-09-08 21:22:46.000000000 +0200
@@ -1,6 +1,4 @@
-
-[:platform_system != "Windows"]
-ujson<=1.35
+ujson>=3.0.0
[:python_version < "3"]
future>=0.14.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jsonrpc-server-0.3.4/setup.py
new/python-jsonrpc-server-0.4.0/setup.py
--- old/python-jsonrpc-server-0.3.4/setup.py 2020-01-19 17:34:33.000000000
+0100
+++ new/python-jsonrpc-server-0.4.0/setup.py 2020-09-08 21:22:45.000000000
+0200
@@ -1,10 +1,21 @@
#!/usr/bin/env python
from setuptools import find_packages, setup
+import sys
import versioneer
README = open('README.rst', 'r').read()
+install_requires = [
+ 'future>=0.14.0; python_version<"3"',
+ 'futures; python_version<"3.2"',
+]
+
+if sys.version_info[0] == 2:
+ install_requires.append('ujson<=2.0.3; platform_system!="Windows"')
+else:
+ install_requires.append('ujson>=3.0.0')
+
setup(
name='python-jsonrpc-server',
@@ -31,11 +42,7 @@
# your project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
- install_requires=[
- 'future>=0.14.0; python_version<"3"',
- 'futures; python_version<"3.2"',
- 'ujson<=1.35; platform_system!="Windows"',
- ],
+ install_requires=install_requires,
# List additional groups of dependencies here (e.g. development
# dependencies). You can install these using the following syntax,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jsonrpc-server-0.3.4/test/test_endpoint.py
new/python-jsonrpc-server-0.4.0/test/test_endpoint.py
--- old/python-jsonrpc-server-0.3.4/test/test_endpoint.py 2020-01-19
17:34:33.000000000 +0100
+++ new/python-jsonrpc-server-0.4.0/test/test_endpoint.py 2020-09-08
21:22:45.000000000 +0200
@@ -115,9 +115,9 @@
'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):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jsonrpc-server-0.3.4/test/test_streams.py
new/python-jsonrpc-server-0.4.0/test/test_streams.py
--- old/python-jsonrpc-server-0.3.4/test/test_streams.py 2020-01-19
17:34:33.000000000 +0100
+++ new/python-jsonrpc-server-0.4.0/test/test_streams.py 2020-09-08
21:22:45.000000000 +0200
@@ -1,7 +1,9 @@
# Copyright 2018 Palantir Technologies, Inc.
# pylint: disable=redefined-outer-name
from io import BytesIO
+import datetime
import os
+import sys
import mock
import pytest
@@ -95,10 +97,21 @@
)
+class JsonDatetime(datetime.datetime):
+ """Monkey path json datetime."""
+ def __json__(self):
+ if sys.version_info.major == 3:
+ dif = int(self.timestamp())
+ else:
+ dif = int((self - datetime.datetime(1970, 1, 1)).total_seconds())
+ return '{0}'.format(dif)
+
+
def test_writer_bad_message(wfile, writer):
# A datetime isn't serializable(or poorly serializable),
- # ensure the write method doesn't throw
- import datetime
+ # ensure the write method doesn't throw, but the result could be empty
+ # or the correct datetime
+ datetime.datetime = JsonDatetime
writer.write(datetime.datetime(
year=2019,
month=1,
@@ -108,12 +121,10 @@
second=1,
))
- if os.name == 'nt':
- assert wfile.getvalue() == b''
- else:
- assert wfile.getvalue() == (
- b'Content-Length: 10\r\n'
- b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
- b'\r\n'
- b'1546304461'
- )
+ assert wfile.getvalue() in [
+ b'',
+ b'Content-Length: 10\r\n'
+ b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
+ b'\r\n'
+ b'1546304461'
+ ]