Hello community, here is the log from the commit of package python-execnet for openSUSE:Factory checked in at 2019-08-16 15:27:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-execnet (Old) and /work/SRC/openSUSE:Factory/.python-execnet.new.22127 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-execnet" Fri Aug 16 15:27:43 2019 rev:10 rq:722842 version:1.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-execnet/python-execnet.changes 2019-07-30 13:06:00.850378075 +0200 +++ /work/SRC/openSUSE:Factory/.python-execnet.new.22127/python-execnet.changes 2019-08-16 15:27:45.302005577 +0200 @@ -1,0 +2,6 @@ +Mon Aug 12 15:44:00 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Update to 1.7: + * Fix flaky hangs + +------------------------------------------------------------------- Old: ---- execnet-1.6.1.tar.gz New: ---- execnet-1.7.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-execnet.spec ++++++ --- /var/tmp/diff_new_pack.ZRcudl/_old 2019-08-16 15:27:45.746005478 +0200 +++ /var/tmp/diff_new_pack.ZRcudl/_new 2019-08-16 15:27:45.750005477 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-execnet -Version: 1.6.1 +Version: 1.7.0 Release: 0 Summary: Rapid multi-Python deployment License: MIT ++++++ execnet-1.6.1.tar.gz -> execnet-1.7.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/CHANGELOG.rst new/execnet-1.7.0/CHANGELOG.rst --- old/execnet-1.6.1/CHANGELOG.rst 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/CHANGELOG.rst 2019-08-09 00:59:56.000000000 +0200 @@ -1,3 +1,11 @@ +1.7.0 (08-08-2019) +------------------ + +* `#102 <https://github.com/pytest-dev/execnet/pull/102>`__: Show paths in stack traces + generated by ``remote_exec()``. + +* `#100 <https://github.com/pytest-dev/execnet/pull/100>`__: Fix flaky hangs in ``workerpool.waitall``. + 1.6.1 (2019-07-22) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/PKG-INFO new/execnet-1.7.0/PKG-INFO --- old/execnet-1.6.1/PKG-INFO 2019-07-22 23:19:03.000000000 +0200 +++ new/execnet-1.7.0/PKG-INFO 2019-08-09 01:01:22.000000000 +0200 @@ -1,17 +1,18 @@ Metadata-Version: 1.2 Name: execnet -Version: 1.6.1 +Version: 1.7.0 Summary: execnet: rapid multi-Python deployment Home-page: https://execnet.readthedocs.io/en/latest/ Author: holger krekel and others License: MIT -Description: .. warning:: - - execnet is currently not maintained +Description: execnet: distributed Python deployment and communication + ======================================================== + Important + --------- - execnet: distributed Python deployment and communication - ======================================================== + **execnet currently is in maintenance-only mode, mostly because it is still the backend + of the pytest-xdist plugin. Do not use in new projects.** .. image:: https://img.shields.io/pypi/v/execnet.svg :target: https://pypi.org/project/execnet/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/README.rst new/execnet-1.7.0/README.rst --- old/execnet-1.6.1/README.rst 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/README.rst 2019-08-09 00:59:56.000000000 +0200 @@ -1,11 +1,12 @@ -.. warning:: - - execnet is currently not maintained - - execnet: distributed Python deployment and communication ======================================================== +Important +--------- + +**execnet currently is in maintenance-only mode, mostly because it is still the backend +of the pytest-xdist plugin. Do not use in new projects.** + .. image:: https://img.shields.io/pypi/v/execnet.svg :target: https://pypi.org/project/execnet/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/doc/index.rst new/execnet-1.7.0/doc/index.rst --- old/execnet-1.6.1/doc/index.rst 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/doc/index.rst 2019-08-09 00:59:56.000000000 +0200 @@ -3,6 +3,12 @@ .. image:: _static/pythonring.png :align: right + +.. warning:: + + execnet currently is in maintenance-only mode, mostly because it is still the backend + of the pytest-xdist plugin. Do not use in new projects. + Python_ is a mature dynamic language whose interpreters can interact with all major computing platforms today. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/execnet/_version.py new/execnet-1.7.0/execnet/_version.py --- old/execnet-1.6.1/execnet/_version.py 2019-07-22 23:19:02.000000000 +0200 +++ new/execnet-1.7.0/execnet/_version.py 2019-08-09 01:01:21.000000000 +0200 @@ -1,4 +1,4 @@ # coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control -version = '1.6.1' +version = '1.7.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/execnet/gateway.py new/execnet-1.7.0/execnet/gateway.py --- old/execnet-1.6.1/execnet/gateway.py 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/execnet/gateway.py 2019-08-09 00:59:56.000000000 +0200 @@ -7,7 +7,6 @@ import os import inspect import types -import linecache import textwrap import execnet from execnet.gateway_base import Message @@ -111,22 +110,27 @@ executing code. """ call_name = None + file_name = None if isinstance(source, types.ModuleType): - linecache.updatecache(inspect.getsourcefile(source)) - source = inspect.getsource(source) + file_name = inspect.getsourcefile(source) + if not file_name: + source = inspect.getsource(source) + else: + source = None elif isinstance(source, types.FunctionType): call_name = source.__name__ + file_name = inspect.getsourcefile(source) source = _source_of_function(source) else: source = textwrap.dedent(str(source)) - if call_name is None and kwargs: + if not call_name and kwargs: raise TypeError("can't pass kwargs to non-function remote_exec") channel = self.newchannel() self._send(Message.CHANNEL_EXEC, channel.id, - gateway_base.dumps_internal((source, call_name, kwargs))) + gateway_base.dumps_internal((source, file_name, call_name, kwargs))) return channel def remote_init_threads(self, num=None): @@ -186,7 +190,7 @@ args = inspect.getargspec(function)[0] else: args = sig.args - if args[0] != 'channel': + if not args or args[0] != 'channel': raise ValueError('expected first function argument to be `channel`') if gateway_base.ISPY3: @@ -213,4 +217,5 @@ used_globals, ) - return source + leading_ws = "\n" * (codeobj.co_firstlineno - 1) + return leading_ws + source diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/execnet/gateway_base.py new/execnet-1.7.0/execnet/gateway_base.py --- old/execnet-1.6.1/execnet/gateway_base.py 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/execnet/gateway_base.py 2019-08-09 00:59:56.000000000 +0200 @@ -13,6 +13,7 @@ """ from __future__ import with_statement import sys +import linecache import os import weakref import traceback @@ -25,8 +26,9 @@ ISPY3 = sys.version_info >= (3, 0) if ISPY3: from io import BytesIO - exec("def do_exec(co, loc): exec(co, loc)\n" - "def reraise(cls, val, tb): raise val\n") + exec("do_exec = exec") + def reraise(cls, val, tb): + raise val.with_traceback(tb) unicode = str _long_type = int from _thread import interrupt_main @@ -1044,7 +1046,7 @@ def executetask(self, item): try: - channel, (source, call_name, kwargs) = item + channel, (source, file_name, call_name, kwargs) = item if not ISPY3 and kwargs: # some python2 versions do not accept unicode keyword params # note: Unserializer generally turns py2-str to py3-str objects @@ -1054,12 +1056,15 @@ name = name.encode('ascii') newkwargs[name] = value kwargs = newkwargs + if source is None: + assert file_name, file_name + source = "".join(linecache.updatecache(file_name)) loc = {'channel': channel, '__name__': '__channelexec__'} self._trace("execution starts[%s]: %s" % (channel.id, repr(source)[:50])) channel._executing = True try: - co = compile(source+'\n', '<remote exec>', 'exec') + co = compile(source+'\n', file_name or '<remote exec>', 'exec') do_exec(co, loc) # noqa if call_name: self._trace('calling %s(**%60r)' % (call_name, kwargs)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/execnet/multi.py new/execnet-1.7.0/execnet/multi.py --- old/execnet-1.6.1/execnet/multi.py 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/execnet/multi.py 2019-08-09 00:59:56.000000000 +0200 @@ -295,7 +295,7 @@ replylist.append(reply) for reply in replylist: reply.get() - workerpool.waitall() + workerpool.waitall(timeout=timeout) default_group = Group() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/execnet/script/socketserver.py new/execnet-1.7.0/execnet/script/socketserver.py --- old/execnet-1.6.1/execnet/script/socketserver.py 2019-07-22 23:14:56.000000000 +0200 +++ new/execnet-1.7.0/execnet/script/socketserver.py 2019-08-09 00:59:56.000000000 +0200 @@ -63,7 +63,7 @@ } source = eval(source) if source: - co = compile(source+'\n', source, 'exec') + co = compile(source+'\n', '<socket server>', 'exec') print_(progname, 'compiled source, executing') try: exec_(co, g) # noqa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/execnet.egg-info/PKG-INFO new/execnet-1.7.0/execnet.egg-info/PKG-INFO --- old/execnet-1.6.1/execnet.egg-info/PKG-INFO 2019-07-22 23:19:02.000000000 +0200 +++ new/execnet-1.7.0/execnet.egg-info/PKG-INFO 2019-08-09 01:01:21.000000000 +0200 @@ -1,17 +1,18 @@ Metadata-Version: 1.2 Name: execnet -Version: 1.6.1 +Version: 1.7.0 Summary: execnet: rapid multi-Python deployment Home-page: https://execnet.readthedocs.io/en/latest/ Author: holger krekel and others License: MIT -Description: .. warning:: - - execnet is currently not maintained +Description: execnet: distributed Python deployment and communication + ======================================================== + Important + --------- - execnet: distributed Python deployment and communication - ======================================================== + **execnet currently is in maintenance-only mode, mostly because it is still the backend + of the pytest-xdist plugin. Do not use in new projects.** .. image:: https://img.shields.io/pypi/v/execnet.svg :target: https://pypi.org/project/execnet/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/testing/conftest.py new/execnet-1.7.0/testing/conftest.py --- old/execnet-1.6.1/testing/conftest.py 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/testing/conftest.py 2019-08-09 00:59:56.000000000 +0200 @@ -186,8 +186,8 @@ def execmodel(request): if request.param != "thread": pytest.importorskip(request.param) - if sys.platform == "win32": - pytest.xfail("eventlet/gevent do not work onwin32") + if request.param in ("eventlet", "gevent") and sys.platform == "win32": + pytest.xfail(request.param + " does not work on win32") return get_execmodel(request.param) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/testing/test_basics.py new/execnet-1.7.0/testing/test_basics.py --- old/execnet-1.6.1/testing/test_basics.py 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/testing/test_basics.py 2019-08-09 00:59:56.000000000 +0200 @@ -218,8 +218,6 @@ cap = py.io.StdCaptureFD() gateway_base.init_popen_io(execmodel) os.write(1, "hello".encode('ascii')) - if os.name == "nt": - os.write(2, "world") os.read(0, 1) out, err = cap.reset() assert not out @@ -326,7 +324,7 @@ def working(channel): pass - send_source = gateway._source_of_function(working) + send_source = gateway._source_of_function(working).lstrip("\r\n") expected = 'def working(channel):\n pass\n' assert send_source == expected diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/testing/test_gateway.py new/execnet-1.7.0/testing/test_gateway.py --- old/execnet-1.6.1/testing/test_gateway.py 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/testing/test_gateway.py 2019-08-09 00:59:56.000000000 +0200 @@ -2,6 +2,8 @@ mostly functional tests of gateways. """ import os +from textwrap import dedent + import py import pytest import socket @@ -15,6 +17,7 @@ needs_osdup = py.test.mark.skipif("not hasattr(os, 'dup')") +flakytest = pytest.mark.xfail(reason='on some systems this test fails due to timing problems') skip_win_pypy = pytest.mark.xfail(condition=hasattr(sys, 'pypy_version_info') and sys.platform.startswith('win'), reason='failing on Windows on PyPy (#63)') @@ -76,6 +79,7 @@ # closure of temporary channels assert numchan2 == numchan + @flakytest def test_gateway_status_busy(self, gw): numchannels = gw.remote_status().numchannels ch1 = gw.remote_exec("channel.send(1); channel.receive()") @@ -110,6 +114,38 @@ name = channel.receive() assert name == 2 + def test_remote_exec_module_with_traceback(self, gw, tmpdir, monkeypatch): + remotetest = tmpdir.join("remotetest.py") + remotetest.write(dedent(""" + def run_me(channel=None): + raise ValueError('me') + + if __name__ == '__channelexec__': + run_me() + """) + ) + + monkeypatch.syspath_prepend(tmpdir) + import remotetest + + ch = gw.remote_exec(remotetest) + try: + ch.receive() + except execnet.gateway_base.RemoteError as e: + assert 'remotetest.py", line 3, in run_me' in str(e) + assert "ValueError: me" in str(e) + finally: + ch.close() + + ch = gw.remote_exec(remotetest.run_me) + try: + ch.receive() + except execnet.gateway_base.RemoteError as e: + assert 'remotetest.py", line 3, in run_me' in str(e) + assert "ValueError: me" in str(e) + finally: + ch.close() + def test_correct_setup_no_py(self, gw): channel = gw.remote_exec(""" import sys @@ -347,6 +383,7 @@ for ch in channels: ch.waitclose(TESTTIMEOUT) + @flakytest def test_status_with_threads(self, makegateway): gw = makegateway('popen') c1 = gw.remote_exec("channel.send(1) ; channel.receive()") @@ -391,6 +428,7 @@ gw.exit() @skip_win_pypy + @flakytest def test_popen_stderr_tracing(self, capfd, monkeypatch, makegateway): monkeypatch.setenv('EXECNET_DEBUG', "2") gw = makegateway("popen") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/testing/test_rsync.py new/execnet-1.7.0/testing/test_rsync.py --- old/execnet-1.6.1/testing/test_rsync.py 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/testing/test_rsync.py 2019-08-09 00:59:56.000000000 +0200 @@ -232,7 +232,7 @@ assert len(dest.listdir()) == 1 assert len(source.listdir()) == 1 - @py.test.mark.skip_if('sys.version_info >= (3)') + @py.test.mark.skipif('sys.version_info >= (3,)') def test_2_to_3_bridge_can_send_binary_files(self, tmpdir, makegateway): python = _find_version('3') gw = makegateway('popen//python=%s' % python) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/execnet-1.6.1/testing/test_xspec.py new/execnet-1.7.0/testing/test_xspec.py --- old/execnet-1.6.1/testing/test_xspec.py 2019-07-22 23:16:42.000000000 +0200 +++ new/execnet-1.7.0/testing/test_xspec.py 2019-08-09 00:59:56.000000000 +0200 @@ -125,6 +125,7 @@ assert rinfo.version_info == sys.version_info @pytest.mark.skipif("not hasattr(os, 'nice')") + @pytest.mark.xfail(reason='fails due to timing problems on busy single-core VMs') def test_popen_nice(self, makegateway): gw = makegateway("popen")
