Hello community,

here is the log from the commit of package python-pytest-xdist for 
openSUSE:Factory checked in at 2019-12-02 11:26:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-xdist (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-xdist.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-xdist"

Mon Dec  2 11:26:51 2019 rev:11 rq:735843 version:1.30.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-xdist/python-pytest-xdist.changes  
2019-07-30 13:00:30.514446513 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-xdist.new.4691/python-pytest-xdist.changes
        2019-12-02 11:27:08.650676139 +0100
@@ -1,0 +2,7 @@
+Mon Oct  7 13:00:36 UTC 2019 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 1.30.0:
+  * Fix crash issues related to running xdist with the terminal plugin disabled
+  * Initialization between workers and master nodes is now more consistent
+
+-------------------------------------------------------------------

Old:
----
  pytest-xdist-1.29.0.tar.gz

New:
----
  pytest-xdist-1.30.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytest-xdist.spec ++++++
--- /var/tmp/diff_new_pack.lYn1Ra/_old  2019-12-02 11:27:09.270675904 +0100
+++ /var/tmp/diff_new_pack.lYn1Ra/_new  2019-12-02 11:27:09.274675903 +0100
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pytest-xdist
-Version:        1.29.0
+Version:        1.30.0
 Release:        0
 Summary:        Distributed testing and loop-on-failing for py.test
 License:        MIT

++++++ pytest-xdist-1.29.0.tar.gz -> pytest-xdist-1.30.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/CHANGELOG.rst 
new/pytest-xdist-1.30.0/CHANGELOG.rst
--- old/pytest-xdist-1.29.0/CHANGELOG.rst       2019-06-14 22:11:07.000000000 
+0200
+++ new/pytest-xdist-1.30.0/CHANGELOG.rst       2019-10-01 17:36:18.000000000 
+0200
@@ -411,6 +411,28 @@
 
 .. towncrier release notes start
 
+pytest-xdist 1.30.0 (2019-10-01)
+================================
+
+Features
+--------
+
+- `#448 <https://github.com/pytest-dev/pytest-xdist/issues/448>`_: 
Initialization between workers and master nodes is now more consistent, which 
fixes a number of
+  long-standing issues related to startup with the ``-c`` option.
+
+  Issues:
+
+  * `#6 <https://github.com/pytest-dev/pytest-xdist/issues/6>`__: Poor 
interaction between ``-n#`` and ``-c X.cfg``
+  * `#445 <https://github.com/pytest-dev/pytest-xdist/issues/445>`__: 
pytest-xdist is not reporting the same nodeid as pytest does
+
+  This however only works with **pytest 5.1 or later**, as it required changes 
in pytest itself.
+
+
+Bug Fixes
+---------
+
+- `#467 <https://github.com/pytest-dev/pytest-xdist/issues/467>`_: Fix crash 
issues related to running xdist with the terminal plugin disabled.
+
 
 1.17.0
 ------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/PKG-INFO 
new/pytest-xdist-1.30.0/PKG-INFO
--- old/pytest-xdist-1.29.0/PKG-INFO    2019-06-14 22:11:25.000000000 +0200
+++ new/pytest-xdist-1.30.0/PKG-INFO    2019-10-01 17:36:34.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-xdist
-Version: 1.29.0
+Version: 1.30.0
 Summary: pytest xdist plugin for distributed testing and loop-on-failing modes
 Home-page: https://github.com/pytest-dev/pytest-xdist
 Author: holger krekel and contributors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-xdist-1.29.0/src/pytest_xdist.egg-info/PKG-INFO 
new/pytest-xdist-1.30.0/src/pytest_xdist.egg-info/PKG-INFO
--- old/pytest-xdist-1.29.0/src/pytest_xdist.egg-info/PKG-INFO  2019-06-14 
22:11:24.000000000 +0200
+++ new/pytest-xdist-1.30.0/src/pytest_xdist.egg-info/PKG-INFO  2019-10-01 
17:36:33.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-xdist
-Version: 1.29.0
+Version: 1.30.0
 Summary: pytest xdist plugin for distributed testing and loop-on-failing modes
 Home-page: https://github.com/pytest-dev/pytest-xdist
 Author: holger krekel and contributors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/src/xdist/_version.py 
new/pytest-xdist-1.30.0/src/xdist/_version.py
--- old/pytest-xdist-1.29.0/src/xdist/_version.py       2019-06-14 
22:11:24.000000000 +0200
+++ new/pytest-xdist-1.30.0/src/xdist/_version.py       2019-10-01 
17:36:33.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.29.0'
+version = '1.30.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/src/xdist/dsession.py 
new/pytest-xdist-1.30.0/src/xdist/dsession.py
--- old/pytest-xdist-1.29.0/src/xdist/dsession.py       2019-06-14 
22:11:07.000000000 +0200
+++ new/pytest-xdist-1.30.0/src/xdist/dsession.py       2019-10-01 
17:36:18.000000000 +0200
@@ -49,11 +49,8 @@
         self._max_worker_restart = get_default_max_worker_restart(self.config)
         # summary message to print at the end of the session
         self._summary_report = None
-        try:
-            self.terminal = config.pluginmanager.getplugin("terminalreporter")
-        except KeyError:
-            self.terminal = None
-        else:
+        self.terminal = config.pluginmanager.getplugin("terminalreporter")
+        if self.terminal:
             self.trdist = TerminalDistReporter(config)
             config.pluginmanager.register(self.trdist, "terminaldistreporter")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/src/xdist/plugin.py 
new/pytest-xdist-1.30.0/src/xdist/plugin.py
--- old/pytest-xdist-1.29.0/src/xdist/plugin.py 2019-06-14 22:11:07.000000000 
+0200
+++ new/pytest-xdist-1.30.0/src/xdist/plugin.py 2019-10-01 17:36:18.000000000 
+0200
@@ -154,11 +154,7 @@
 def pytest_addhooks(pluginmanager):
     from xdist import newhooks
 
-    # avoid warnings with pytest-2.8
-    method = getattr(pluginmanager, "add_hookspecs", None)
-    if method is None:
-        method = pluginmanager.addhooks
-    method(newhooks)
+    pluginmanager.add_hookspecs(newhooks)
 
 
 # -------------------------------------------------------------------------
@@ -174,7 +170,8 @@
         session = DSession(config)
         config.pluginmanager.register(session, "dsession")
         tr = config.pluginmanager.getplugin("terminalreporter")
-        tr.showfspath = False
+        if tr:
+            tr.showfspath = False
     if config.getoption("boxed"):
         config.option.forked = True
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/src/xdist/remote.py 
new/pytest-xdist-1.30.0/src/xdist/remote.py
--- old/pytest-xdist-1.29.0/src/xdist/remote.py 2019-06-14 22:11:07.000000000 
+0200
+++ new/pytest-xdist-1.30.0/src/xdist/remote.py 2019-10-01 17:36:18.000000000 
+0200
@@ -15,6 +15,8 @@
 import pytest
 from execnet.gateway_base import dumps, DumpError
 
+from _pytest.config import _prepareconfig, Config
+
 
 class WorkerInteractor(object):
     def __init__(self, config, channel):
@@ -211,18 +213,18 @@
 
 
 def remote_initconfig(option_dict, args):
-    from _pytest.config import Config
-
     option_dict["plugins"].append("no:terminal")
-    config = Config.fromdictargs(option_dict, args)
+    return Config.fromdictargs(option_dict, args)
+
+
+def setup_config(config, basetemp):
     config.option.looponfail = False
     config.option.usepdb = False
     config.option.dist = "no"
     config.option.distload = False
     config.option.numprocesses = None
     config.option.maxprocesses = None
-    config.args = args
-    return config
+    config.option.basetemp = basetemp
 
 
 if __name__ == "__channelexec__":
@@ -239,7 +241,13 @@
     os.environ["PYTEST_XDIST_WORKER"] = workerinput["workerid"]
     os.environ["PYTEST_XDIST_WORKER_COUNT"] = str(workerinput["workercount"])
 
-    config = remote_initconfig(option_dict, args)
+    if hasattr(Config, "InvocationParams"):
+        config = _prepareconfig(args, None)
+    else:
+        config = remote_initconfig(option_dict, args)
+        config.args = args
+
+    setup_config(config, option_dict.get("basetemp"))
     config._parser.prog = os.path.basename(workerinput["mainargv"][0])
     config.workerinput = workerinput
     config.workeroutput = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/src/xdist/workermanage.py 
new/pytest-xdist-1.30.0/src/xdist/workermanage.py
--- old/pytest-xdist-1.29.0/src/xdist/workermanage.py   2019-06-14 
22:11:07.000000000 +0200
+++ new/pytest-xdist-1.30.0/src/xdist/workermanage.py   2019-10-01 
17:36:18.000000000 +0200
@@ -112,7 +112,10 @@
         ignores += self.config.option.rsyncignore
         ignores += self.config.getini("rsyncignore")
 
-        return {"ignores": ignores, "verbose": self.config.option.verbose}
+        return {
+            "ignores": ignores,
+            "verbose": getattr(self.config.option, "verbose", False),
+        }
 
     def rsync(self, gateway, source, notify=None, verbose=False, ignores=None):
         """Perform rsync to remote hosts for node."""
@@ -186,6 +189,8 @@
     for arg in args:
         parts = arg.split(splitcode)
         fspath = py.path.local(parts[0])
+        if not fspath.exists():
+            continue
         for root in roots:
             x = fspath.relto(root)
             if x or fspath == root:
@@ -236,10 +241,14 @@
     def setup(self):
         self.log("setting up worker session")
         spec = self.gateway.spec
-        args = self.config.args
+        if hasattr(self.config, "invocation_params"):
+            args = [str(x) for x in self.config.invocation_params.args or ()]
+            option_dict = {}
+        else:
+            args = self.config.args
+            option_dict = vars(self.config.option)
         if not spec.popen or spec.chdir:
             args = make_reltoroot(self.nodemanager.roots, args)
-        option_dict = vars(self.config.option)
         if spec.popen:
             name = "popen-%s" % self.gateway.id
             if hasattr(self.config, "_tmpdirhandler"):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/testing/acceptance_test.py 
new/pytest-xdist-1.30.0/testing/acceptance_test.py
--- old/pytest-xdist-1.29.0/testing/acceptance_test.py  2019-06-14 
22:11:07.000000000 +0200
+++ new/pytest-xdist-1.30.0/testing/acceptance_test.py  2019-10-01 
17:36:18.000000000 +0200
@@ -559,6 +559,30 @@
     assert result.ret
 
 
+def test_config_initialization(testdir, pytestconfig):
+    """Ensure workers and master are initialized consistently. Integration 
test for #445"""
+    if not hasattr(pytestconfig, "invocation_params"):
+        pytest.skip(
+            "requires pytest >=5.1 (config has no attribute 
'invocation_params')"
+        )
+    testdir.makepyfile(
+        **{
+            "dir_a/test_foo.py": """
+                def test_1(): pass
+        """
+        }
+    )
+    testdir.makefile(
+        ".ini",
+        myconfig="""
+        [pytest]
+        testpaths=dir_a
+    """,
+    )
+    result = testdir.runpytest("-n2", "-c", "myconfig.ini", "-v")
+    result.stdout.fnmatch_lines(["dir_a/test_foo.py::test_1*"])
+
+
 @pytest.mark.parametrize("when", ["setup", "call", "teardown"])
 def test_crashing_item(testdir, when):
     """Ensure crashing item is correctly reported during all testing stages"""
@@ -1050,6 +1074,22 @@
     assert "gw0 C / gw1 C" not in result.stdout.str()
 
 
+def test_without_terminal_plugin(testdir, request):
+    """
+    No output when terminal plugin is disabled
+    """
+    testdir.makepyfile(
+        """
+        def test_1():
+            pass
+    """
+    )
+    result = testdir.runpytest("-p", "no:terminal", "-n2")
+    assert result.stdout.str() == ""
+    assert result.stderr.str() == ""
+    assert result.ret == 0
+
+
 def test_internal_error_with_maxfail(testdir):
     """
     Internal error when using --maxfail option (#62, #65).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-xdist-1.29.0/testing/conftest.py 
new/pytest-xdist-1.30.0/testing/conftest.py
--- old/pytest-xdist-1.29.0/testing/conftest.py 2019-06-14 22:11:07.000000000 
+0200
+++ new/pytest-xdist-1.30.0/testing/conftest.py 2019-10-01 17:36:18.000000000 
+0200
@@ -1,20 +1,19 @@
+import six
 import py
 import pytest
 import execnet
 
-
-@pytest.fixture(scope="session", autouse=True)
-def _ensure_imports():
-    # we import some modules because pytest-2.8's testdir fixture
-    # will unload all modules after each test and this cause
-    # (unknown) problems with execnet.Group()
-    execnet.Group
-    execnet.makegateway
-
-
 pytest_plugins = "pytester"
 
-# rsyncdirs = ['.', '../xdist', py.path.local(execnet.__file__).dirpath()]
+if six.PY2:
+
+    @pytest.fixture(scope="session", autouse=True)
+    def _ensure_imports():
+        # we import some modules because pytest-2.8's testdir fixture
+        # will unload all modules after each test and this cause
+        # (unknown) problems with execnet.Group()
+        execnet.Group
+        execnet.makegateway
 
 
 @pytest.fixture(autouse=True)
@@ -45,14 +44,6 @@
     return getspecssh(request.config)
 
 
-@pytest.fixture
-def testdir(testdir):
-    # pytest before 2.8 did not have a runpytest_subprocess
-    if not hasattr(testdir, "runpytest_subprocess"):
-        testdir.runpytest_subprocess = testdir.runpytest
-    return testdir
-
-
 # configuration information for tests
 def getgspecs(config):
     return [execnet.XSpec(spec) for spec in config.getvalueorskip("gspecs")]


Reply via email to