Hello community, here is the log from the commit of package python-jeepney for openSUSE:Factory checked in at 2020-03-09 18:34:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-jeepney (Old) and /work/SRC/openSUSE:Factory/.python-jeepney.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jeepney" Mon Mar 9 18:34:23 2020 rev:4 rq:783023 version:0.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-jeepney/python-jeepney.changes 2020-03-03 10:16:08.830638801 +0100 +++ /work/SRC/openSUSE:Factory/.python-jeepney.new.26092/python-jeepney.changes 2020-03-09 18:34:24.238027290 +0100 @@ -1,0 +2,7 @@ +Mon Mar 9 16:22:55 UTC 2020 - Marketa Calabkova <[email protected]> + +- Update to 0.4.3 + * Raise ConnectionResetError in blocking integration if socket.recv() + gives no data + +------------------------------------------------------------------- Old: ---- jeepney-0.4.2.tar.gz New: ---- jeepney-0.4.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-jeepney.spec ++++++ --- /var/tmp/diff_new_pack.U0Wmi9/_old 2020-03-09 18:34:24.674027527 +0100 +++ /var/tmp/diff_new_pack.U0Wmi9/_new 2020-03-09 18:34:24.674027527 +0100 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-jeepney -Version: 0.4.2 +Version: 0.4.3 Release: 0 Summary: Low-level, pure Python DBus protocol wrapper License: MIT ++++++ jeepney-0.4.2.tar.gz -> jeepney-0.4.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeepney-0.4.2/PKG-INFO new/jeepney-0.4.3/PKG-INFO --- old/jeepney-0.4.2/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/jeepney-0.4.3/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: jeepney -Version: 0.4.2 +Version: 0.4.3 Summary: Low-level, pure Python DBus protocol wrapper. Home-page: https://gitlab.com/takluyver/jeepney Author: Thomas Kluyver diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeepney-0.4.2/docs/release-notes.rst new/jeepney-0.4.3/docs/release-notes.rst --- old/jeepney-0.4.2/docs/release-notes.rst 2020-01-03 19:38:06.976187000 +0100 +++ new/jeepney-0.4.3/docs/release-notes.rst 2020-03-04 18:26:10.795915400 +0100 @@ -1,6 +1,13 @@ Release notes ============= +0.4.3 +----- + +* The blocking integration now throws ``ConnectionResetError`` on all systems + when the connection was closed from the other end. It would previously hang + on some systems. + 0.4.2 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeepney-0.4.2/jeepney/__init__.py new/jeepney-0.4.3/jeepney/__init__.py --- old/jeepney-0.4.2/jeepney/__init__.py 2020-01-03 19:39:13.928380500 +0100 +++ new/jeepney-0.4.3/jeepney/__init__.py 2020-03-04 18:24:04.019867000 +0100 @@ -5,4 +5,4 @@ from .bus import find_session_bus, find_system_bus from .wrappers import * -__version__ = '0.4.2' +__version__ = '0.4.3' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeepney-0.4.2/jeepney/integrate/blocking.py new/jeepney-0.4.3/jeepney/integrate/blocking.py --- old/jeepney-0.4.2/jeepney/integrate/blocking.py 2019-11-22 21:11:24.869688700 +0100 +++ new/jeepney-0.4.3/jeepney/integrate/blocking.py 2020-03-04 18:21:16.798311500 +0100 @@ -1,6 +1,8 @@ """Synchronous IO wrappers around jeepney """ +from errno import ECONNRESET import functools +import os import socket from jeepney.auth import SASLParser, make_auth_external, BEGIN, AuthenticationError @@ -59,7 +61,7 @@ Blocks until at least one message has been read. """ while True: - b = self.sock.recv(4096) + b = unwrap_read(self.sock.recv(4096)) msgs = self.parser.feed(b) if msgs: for msg in msgs: @@ -96,6 +98,17 @@ return inner +def unwrap_read(b): + """Raise ConnectionResetError from an empty read. + + Sometimes the socket raises an error itself, sometimes it gives no data. + I haven't worked out when it behaves each way. + """ + if not b: + raise ConnectionResetError(ECONNRESET, os.strerror(ECONNRESET)) + return b + + def connect_and_authenticate(bus='SESSION'): bus_addr = get_bus(bus) sock = socket.socket(family=socket.AF_UNIX) @@ -103,7 +116,7 @@ sock.sendall(b'\0' + make_auth_external()) auth_parser = SASLParser() while not auth_parser.authenticated: - auth_parser.feed(sock.recv(1024)) + auth_parser.feed(unwrap_read(sock.recv(1024))) if auth_parser.error: raise AuthenticationError(auth_parser.error) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeepney-0.4.2/setup.py new/jeepney-0.4.3/setup.py --- old/jeepney-0.4.2/setup.py 1970-01-01 01:00:00.000000000 +0100 +++ new/jeepney-0.4.3/setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -13,7 +13,7 @@ {'dev': ['testpath']} setup(name='jeepney', - version='0.4.2', + version='0.4.3', description='Low-level, pure Python DBus protocol wrapper.', author='Thomas Kluyver', author_email='[email protected]',
