Skip to content

Commit 89a3df3

Browse files
committed
Deprecate --boxed
This will allow removing the pytest-forked dependency in the future. Refs #468.
1 parent 18cd9b9 commit 89a3df3

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

changelog/468.deprecation.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The ``--boxed`` commmand line argument is deprecated.
2+
Install pytest-forked and use ``--forked`` instead.
3+
pytest-xdist 3.0.0 will remove the ``--boxed`` argument and pytest-forked dependency.

example/boxed.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.. note::
1+
.. warning::
22

33
Since 1.19.0, the actual implementation of the ``--boxed`` option has been moved to a
44
separate plugin, `pytest-forked <https://github.com/pytest-dev/pytest-forked>`_
5-
which can be installed independently. The ``--boxed`` command-line options remains
6-
for backward compatibility reasons.
5+
which can be installed independently. The ``--boxed`` command-line option is deprecated
6+
and will be removed in pytest-xdist 3.0.0; use ``--forked`` from pytest-forked instead.
77

88

99
If your testing involves C or C++ libraries you might have to deal

src/xdist/plugin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ def pytest_configure(config):
193193
if tr:
194194
tr.showfspath = False
195195
if config.getoption("boxed"):
196+
warning = DeprecationWarning(
197+
"The --boxed commmand line argument is deprecated. "
198+
"Install pytest-forked and use --forked instead. "
199+
"pytest-xdist 3.0.0 will remove the --boxed argument and pytest-forked dependency."
200+
)
201+
config.issue_config_time_warning(warning, 2)
196202
config.option.forked = True
197203

198204

testing/acceptance_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ def test_ok():
738738
result.stdout.fnmatch_lines("*1 passed*")
739739

740740

741-
@pytest.mark.parametrize("plugin", ["xdist.looponfail", "xdist.boxed"])
741+
@pytest.mark.parametrize("plugin", ["xdist.looponfail"])
742742
def test_sub_plugins_disabled(pytester, plugin) -> None:
743743
"""Test that xdist doesn't break if we disable any of its sub-plugins. (#32)"""
744744
p1 = pytester.makepyfile(

0 commit comments

Comments
 (0)