@@ -1,6 +1,5 @@
|
||||
environment:
|
||||
matrix:
|
||||
- TOXENV: "py27-pytestlatest"
|
||||
- TOXENV: "py35-pytestlatest"
|
||||
- TOXENV: "py36-pytestlatest"
|
||||
- TOXENV: "py37-pytestlatest"
|
||||
|
||||
@@ -32,8 +32,6 @@ jobs:
|
||||
- $HOME/.cache/pre-commit
|
||||
- python: '3.8'
|
||||
env: TOXENV=py38-pytestlatest
|
||||
- python: '2.7'
|
||||
env: TOXENV=py27-pytestlatest
|
||||
|
||||
- stage: test
|
||||
python: "3.5"
|
||||
|
||||
1
changelog/541.removal.rst
Normal file
1
changelog/541.removal.rst
Normal file
@@ -0,0 +1 @@
|
||||
drop backward-compatibility "slave" aliases related to worker nodes. We deliberately moved away from this terminology years ago, and it seems like the right time to finish the deprecation and removal process.
|
||||
16
setup.py
16
setup.py
@@ -1,12 +1,6 @@
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
install_requires = [
|
||||
"execnet>=1.1",
|
||||
"psutil>=3.0.0",
|
||||
"pytest>=4.4.0",
|
||||
"pytest-forked",
|
||||
"six",
|
||||
]
|
||||
install_requires = ["execnet>=1.1", "psutil>=3.0.0", "pytest>=6.0.0", "pytest-forked"]
|
||||
|
||||
|
||||
with open("README.rst") as f:
|
||||
@@ -15,8 +9,7 @@ with open("README.rst") as f:
|
||||
setup(
|
||||
name="pytest-xdist",
|
||||
use_scm_version={"write_to": "src/xdist/_version.py"},
|
||||
description="pytest xdist plugin for distributed testing"
|
||||
" and loop-on-failing modes",
|
||||
description="pytest xdist plugin for distributed testing and loop-on-failing modes",
|
||||
long_description=long_description,
|
||||
license="MIT",
|
||||
author="holger krekel and contributors",
|
||||
@@ -30,7 +23,7 @@ setup(
|
||||
"pytest11": ["xdist = xdist.plugin", "xdist.looponfail = xdist.looponfail"]
|
||||
},
|
||||
zip_safe=False,
|
||||
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
|
||||
python_requires=">=3.5",
|
||||
install_requires=install_requires,
|
||||
setup_requires=["setuptools_scm"],
|
||||
classifiers=[
|
||||
@@ -45,9 +38,8 @@ setup(
|
||||
"Topic :: Software Development :: Quality Assurance",
|
||||
"Topic :: Utilities",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
|
||||
@@ -150,9 +150,6 @@ class DSession(object):
|
||||
node.workerinfo["id"] = node.gateway.id
|
||||
node.workerinfo["spec"] = node.gateway.spec
|
||||
|
||||
# TODO: (#234 task) needs this for pytest. Remove when refactor in pytest repo
|
||||
node.slaveinfo = node.workerinfo
|
||||
|
||||
self.config.hook.pytest_testnodeready(node=node)
|
||||
if self.shuttingdown:
|
||||
node.shutdown()
|
||||
|
||||
@@ -43,14 +43,11 @@ def pytest_addoption(parser):
|
||||
)
|
||||
group.addoption(
|
||||
"--max-worker-restart",
|
||||
"--max-slave-restart",
|
||||
action="store",
|
||||
default=None,
|
||||
dest="maxworkerrestart",
|
||||
help="maximum number of workers that can be restarted "
|
||||
"when crashed (set to zero to disable this feature)\n"
|
||||
"'--max-slave-restart' option is deprecated and will be removed in "
|
||||
"a future release",
|
||||
"when crashed (set to zero to disable this feature)",
|
||||
)
|
||||
group.addoption(
|
||||
"--dist",
|
||||
|
||||
@@ -266,8 +266,5 @@ if __name__ == "__channelexec__":
|
||||
config._parser.prog = os.path.basename(workerinput["mainargv"][0])
|
||||
config.workerinput = workerinput
|
||||
config.workeroutput = {}
|
||||
# TODO: deprecated name, backward compatibility only. Remove it in future
|
||||
config.slaveinput = config.workerinput
|
||||
config.slaveoutput = config.workeroutput
|
||||
interactor = WorkerInteractor(config, channel)
|
||||
config.hook.pytest_cmdline_main(config=config)
|
||||
|
||||
@@ -228,13 +228,9 @@ class WorkerController(object):
|
||||
self.workerinput = {
|
||||
"workerid": gateway.id,
|
||||
"workercount": len(nodemanager.specs),
|
||||
"slaveid": gateway.id,
|
||||
"slavecount": len(nodemanager.specs),
|
||||
"testrunuid": nodemanager.testrunuid,
|
||||
"mainargv": sys.argv,
|
||||
}
|
||||
# TODO: deprecated name, backward compatibility only. Remove it in future
|
||||
self.slaveinput = self.workerinput
|
||||
self._down = False
|
||||
self._shutdown_sent = False
|
||||
self.log = py.log.Producer("workerctl-%s" % gateway.id)
|
||||
@@ -333,7 +329,7 @@ class WorkerController(object):
|
||||
self.notify_inproc(eventname, node=self, **kwargs)
|
||||
elif eventname == "workerfinished":
|
||||
self._down = True
|
||||
self.workeroutput = self.slaveoutput = kwargs["workeroutput"]
|
||||
self.workeroutput = kwargs["workeroutput"]
|
||||
self.notify_inproc("workerfinished", node=self)
|
||||
elif eventname in ("logstart", "logfinish"):
|
||||
self.notify_inproc(eventname, node=self, **kwargs)
|
||||
|
||||
@@ -245,22 +245,6 @@ class TestDistribution:
|
||||
result.stderr.fnmatch_lines(["--foobar=123 active! *"])
|
||||
assert dest.join(subdir.basename).check(dir=1)
|
||||
|
||||
def test_backward_compatibility_worker_terminology(self, testdir):
|
||||
"""Ensure that we still support "config.slaveinput" for backward compatibility (#234).
|
||||
|
||||
Keep in mind that removing this compatibility will break a ton of plugins and user code.
|
||||
"""
|
||||
testdir.makepyfile(
|
||||
"""
|
||||
def test(pytestconfig):
|
||||
assert hasattr(pytestconfig, 'slaveinput')
|
||||
assert hasattr(pytestconfig, 'workerinput')
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest("-n1")
|
||||
result.stdout.fnmatch_lines("*1 passed*")
|
||||
assert result.ret == 0
|
||||
|
||||
def test_data_exchange(self, testdir):
|
||||
testdir.makeconftest(
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user