Hello community,
here is the log from the commit of package python-pytest-xdist for
openSUSE:Factory checked in at 2019-03-26 15:35:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-xdist (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-xdist.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-xdist"
Tue Mar 26 15:35:30 2019 rev:9 rq:687180 version:1.27.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-xdist/python-pytest-xdist.changes
2019-02-24 17:04:34.976646573 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-xdist.new.25356/python-pytest-xdist.changes
2019-03-26 15:35:33.364419053 +0100
@@ -1,0 +2,7 @@
+Thu Mar 21 09:54:59 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.27.0:
+ * #374: The new ``pytest_xdist_getremotemodule`` hook allows overriding the
module run on remote nodes.
+ * #415: Improve behavior of ``--numprocesses=auto`` to work well with
``--pdb`` option.
+
+-------------------------------------------------------------------
Old:
----
pytest-xdist-1.26.1.tar.gz
New:
----
pytest-xdist-1.27.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-xdist.spec ++++++
--- /var/tmp/diff_new_pack.GP9Fb2/_old 2019-03-26 15:35:34.112418739 +0100
+++ /var/tmp/diff_new_pack.GP9Fb2/_new 2019-03-26 15:35:34.112418739 +0100
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-xdist
-Version: 1.26.1
+Version: 1.27.0
Release: 0
Summary: Distributed testing and loop-on-failing for py.test
License: MIT
++++++ pytest-xdist-1.26.1.tar.gz -> pytest-xdist-1.27.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-xdist-1.26.1/CHANGELOG.rst
new/pytest-xdist-1.27.0/CHANGELOG.rst
--- old/pytest-xdist-1.26.1/CHANGELOG.rst 2019-01-28 21:48:04.000000000
+0100
+++ new/pytest-xdist-1.27.0/CHANGELOG.rst 2019-03-21 00:17:48.000000000
+0100
@@ -1,3 +1,14 @@
+pytest-xdist 1.27.0 (2019-02-15)
+================================
+
+Features
+--------
+
+- `#374 <https://github.com/pytest-dev/pytest-xdist/issues/374>`_: The new
``pytest_xdist_getremotemodule`` hook allows overriding the module run on
remote nodes.
+
+- `#415 <https://github.com/pytest-dev/pytest-xdist/issues/415>`_: Improve
behavior of ``--numprocesses=auto`` to work well with ``--pdb`` option.
+
+
pytest-xdist 1.26.1 (2019-01-28)
================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-xdist-1.26.1/PKG-INFO
new/pytest-xdist-1.27.0/PKG-INFO
--- old/pytest-xdist-1.26.1/PKG-INFO 2019-01-28 21:48:22.000000000 +0100
+++ new/pytest-xdist-1.27.0/PKG-INFO 2019-03-21 00:18:08.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pytest-xdist
-Version: 1.26.1
+Version: 1.27.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.26.1/pytest_xdist.egg-info/PKG-INFO
new/pytest-xdist-1.27.0/pytest_xdist.egg-info/PKG-INFO
--- old/pytest-xdist-1.26.1/pytest_xdist.egg-info/PKG-INFO 2019-01-28
21:48:22.000000000 +0100
+++ new/pytest-xdist-1.27.0/pytest_xdist.egg-info/PKG-INFO 2019-03-21
00:18:07.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: pytest-xdist
-Version: 1.26.1
+Version: 1.27.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.26.1/testing/test_plugin.py
new/pytest-xdist-1.27.0/testing/test_plugin.py
--- old/pytest-xdist-1.26.1/testing/test_plugin.py 2019-01-28
21:48:04.000000000 +0100
+++ new/pytest-xdist-1.27.0/testing/test_plugin.py 2019-03-21
00:17:48.000000000 +0100
@@ -36,6 +36,7 @@
def test_auto_detect_cpus(testdir, monkeypatch):
import os
+ from xdist.plugin import pytest_cmdline_main as check_options
if hasattr(os, "sched_getaffinity"):
monkeypatch.setattr(os, "sched_getaffinity", lambda _pid:
set(range(99)))
@@ -52,6 +53,11 @@
config = testdir.parseconfigure("-nauto")
assert config.getoption("numprocesses") == 99
+ config = testdir.parseconfigure("-nauto", "--pdb")
+ check_options(config)
+ assert config.getoption("usepdb")
+ assert config.getoption("numprocesses") == 0
+
monkeypatch.delattr(os, "sched_getaffinity", raising=False)
monkeypatch.setenv("TRAVIS", "true")
config = testdir.parseconfigure("-nauto")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-xdist-1.26.1/testing/test_remote.py
new/pytest-xdist-1.27.0/testing/test_remote.py
--- old/pytest-xdist-1.26.1/testing/test_remote.py 2019-01-28
21:48:04.000000000 +0100
+++ new/pytest-xdist-1.27.0/testing/test_remote.py 2019-03-21
00:17:48.000000000 +0100
@@ -457,6 +457,4 @@
result = testdir.runpytest_subprocess("-n1")
assert result.ret == 1
- result.stdout.fnmatch_lines(
- ["usage: pytest.py *", "pytest.py: error: my_usage_error"]
- )
+ result.stdout.fnmatch_lines(["*usage: *", "*error: my_usage_error"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-xdist-1.26.1/xdist/_version.py
new/pytest-xdist-1.27.0/xdist/_version.py
--- old/pytest-xdist-1.26.1/xdist/_version.py 2019-01-28 21:48:22.000000000
+0100
+++ new/pytest-xdist-1.27.0/xdist/_version.py 2019-03-21 00:18:07.000000000
+0100
@@ -1,4 +1,4 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '1.26.1'
+version = '1.27.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-xdist-1.26.1/xdist/newhooks.py
new/pytest-xdist-1.27.0/xdist/newhooks.py
--- old/pytest-xdist-1.26.1/xdist/newhooks.py 2019-01-28 21:48:04.000000000
+0100
+++ new/pytest-xdist-1.27.0/xdist/newhooks.py 2019-03-21 00:17:48.000000000
+0100
@@ -30,6 +30,11 @@
""" called after rsyncing a directory to remote gateways takes place. """
[email protected]
+def pytest_xdist_getremotemodule():
+ """ called when creating remote node"""
+
+
def pytest_configure_node(node):
""" configure node information before it gets instantiated. """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-xdist-1.26.1/xdist/plugin.py
new/pytest-xdist-1.27.0/xdist/plugin.py
--- old/pytest-xdist-1.26.1/xdist/plugin.py 2019-01-28 21:48:04.000000000
+0100
+++ new/pytest-xdist-1.27.0/xdist/plugin.py 2019-03-21 00:17:48.000000000
+0100
@@ -27,10 +27,14 @@
return n if n else 1
+class AutoInt(int):
+ """Mark value as auto-detected."""
+
+
def parse_numprocesses(s):
if s == "auto":
- return auto_detect_cpus()
- else:
+ return AutoInt(auto_detect_cpus())
+ elif s is not None:
return int(s)
@@ -45,7 +49,7 @@
type=parse_numprocesses,
help="shortcut for '--dist=load --tx=NUM*popen', "
"you can use 'auto' here for auto detection CPUs number on "
- "host system",
+ "host system and it will be 0 when used with --pdb",
)
group.addoption(
"--maxprocesses",
@@ -177,6 +181,10 @@
@pytest.mark.tryfirst
def pytest_cmdline_main(config):
+ usepdb = config.getoption("usepdb") # a core option
+ if isinstance(config.option.numprocesses, AutoInt):
+ config.option.numprocesses = 0 if usepdb else
int(config.option.numprocesses)
+
if config.option.numprocesses:
if config.option.dist == "no":
config.option.dist = "load"
@@ -188,11 +196,10 @@
config.option.dist = "load"
val = config.getvalue
if not val("collectonly"):
- usepdb = config.getoption("usepdb") # a core option
if val("dist") != "no":
if usepdb:
raise pytest.UsageError(
- "--pdb is incompatible with distributing tests; try using
-n0."
+ "--pdb is incompatible with distributing tests; try using
-n0 or -nauto."
) # noqa: E501
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-xdist-1.26.1/xdist/remote.py
new/pytest-xdist-1.27.0/xdist/remote.py
--- old/pytest-xdist-1.26.1/xdist/remote.py 2019-01-28 21:48:04.000000000
+0100
+++ new/pytest-xdist-1.27.0/xdist/remote.py 2019-03-21 00:17:48.000000000
+0100
@@ -10,6 +10,7 @@
import os
import time
+import py
import _pytest.hookspec
import pytest
from execnet.gateway_base import dumps, DumpError
@@ -261,8 +262,6 @@
if __name__ == "__channelexec__":
- import py
-
channel = channel # noqa
workerinput, args, option_dict, change_sys_path = channel.receive()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-xdist-1.26.1/xdist/workermanage.py
new/pytest-xdist-1.27.0/xdist/workermanage.py
--- old/pytest-xdist-1.26.1/xdist/workermanage.py 2019-01-28
21:48:04.000000000 +0100
+++ new/pytest-xdist-1.27.0/xdist/workermanage.py 2019-03-21
00:17:48.000000000 +0100
@@ -204,7 +204,13 @@
class WorkerController(object):
ENDMARK = -1
+ class RemoteHook:
+ @pytest.mark.trylast
+ def pytest_xdist_getremotemodule(self):
+ return xdist.remote
+
def __init__(self, nodemanager, gateway, config, putevent):
+ config.pluginmanager.register(self.RemoteHook())
self.nodemanager = nodemanager
self.putevent = putevent
self.gateway = gateway
@@ -244,10 +250,13 @@
basetemp = self.config._tmpdirhandler.getbasetemp()
option_dict["basetemp"] = str(basetemp.join(name))
self.config.hook.pytest_configure_node(node=self)
- self.channel = self.gateway.remote_exec(xdist.remote)
+
+ remote_module = self.config.hook.pytest_xdist_getremotemodule()
+ self.channel = self.gateway.remote_exec(remote_module)
# change sys.path only for remote workers
change_sys_path = not self.gateway.spec.popen
self.channel.send((self.workerinput, args, option_dict,
change_sys_path))
+
if self.putevent:
self.channel.setcallback(self.process_from_remote,
endmarker=self.ENDMARK)