Skip to content

Commit f206487

Browse files
authored
Merge pull request #821 from nicoddemus/drop-forked
Remove --boxed and pytest-forked dependency
2 parents 1471164 + 1fbf499 commit f206487

File tree

10 files changed

+4
-44
lines changed

10 files changed

+4
-44
lines changed

CHANGELOG.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pytest-xdist 2.5.0 (2021-12-10)
44
Deprecations and Removals
55
-------------------------
66

7-
- `#468 <https://github.com/pytest-dev/pytest-xdist/issues/468>`_: The ``--boxed`` command line argument is deprecated. Install pytest-forked and use ``--forked`` instead. pytest-xdist 3.0.0 will remove the ``--boxed`` argument and pytest-forked dependency.
7+
- `#468 <https://github.com/pytest-dev/pytest-xdist/issues/468>`_: The ``--boxed`` command line argument is deprecated. Install `pytest-forked <https://pypi.org/project/pytest-forked>`__ and use ``--forked`` instead. pytest-xdist 3.0.0 will remove the ``--boxed`` argument and ``pytest-forked`` dependency.
88

99

1010
Features

changelog/468.removal.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The ``--boxed`` command-line option has been removed. If you still need this functionality, install `pytest-forked <https://pypi.org/project/pytest-forked>`__ separately.

changelog/468.trivial.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The ``py`` dependency has been dropped.

docs/boxed.rst

-9
This file was deleted.

docs/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ Features
5555

5656
distribution
5757
subprocess
58-
boxed
5958
remote
6059
crash
6160
how-to

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ python_requires = >=3.6
4444
install_requires =
4545
execnet>=1.1
4646
pytest>=6.2.0
47-
pytest-forked
4847
setup_requires = # left empty, enforce using isolated build system
4948

5049
[options.packages.find]

src/xdist/plugin.py

-13
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ def pytest_addoption(parser):
134134
metavar="GLOB",
135135
help="add expression for ignores when rsyncing to remote tx nodes.",
136136
)
137-
group.addoption(
138-
"--boxed",
139-
action="store_true",
140-
help="backward compatibility alias for pytest-forked --forked",
141-
)
142137
group.addoption(
143138
"--testrunuid",
144139
action="store",
@@ -195,14 +190,6 @@ def pytest_configure(config):
195190
tr = config.pluginmanager.getplugin("terminalreporter")
196191
if tr:
197192
tr.showfspath = False
198-
if config.getoption("boxed"):
199-
warning = DeprecationWarning(
200-
"The --boxed command line argument is deprecated. "
201-
"Install pytest-forked and use --forked instead. "
202-
"pytest-xdist 3.0.0 will remove the --boxed argument and pytest-forked dependency."
203-
)
204-
config.issue_config_time_warning(warning, 2)
205-
config.option.forked = True
206193

207194
config_line = (
208195
"xdist_group: specify group for tests should run in same session."

src/xdist/workermanage.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from pathlib import Path
77
from typing import List, Union, Sequence, Optional, Any, Tuple, Set
88

9-
import py
109
import pytest
1110
import execnet
1211

testing/acceptance_test.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,10 @@ def test_1(request):
602602
def test_crashing_item(pytester, when) -> None:
603603
"""Ensure crashing item is correctly reported during all testing stages"""
604604
code = dict(setup="", call="", teardown="")
605-
code[when] = "py.process.kill(os.getpid())"
605+
code[when] = "os._exit(1)"
606606
p = pytester.makepyfile(
607607
"""
608608
import os
609-
import py
610609
import pytest
611610
612611
@pytest.fixture

testing/test_plugin.py

-16
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,6 @@ def pytest_xdist_auto_num_workers():
122122
assert config.getoption("numprocesses") == 42
123123

124124

125-
def test_boxed_with_collect_only(pytester: pytest.Pytester) -> None:
126-
from xdist.plugin import pytest_cmdline_main as check_options
127-
128-
config = pytester.parseconfigure("-n1", "--boxed")
129-
check_options(config)
130-
assert config.option.forked
131-
132-
config = pytester.parseconfigure("-n1", "--collect-only")
133-
check_options(config)
134-
assert not config.option.forked
135-
136-
config = pytester.parseconfigure("-n1", "--boxed", "--collect-only")
137-
check_options(config)
138-
assert config.option.forked
139-
140-
141125
def test_dsession_with_collect_only(pytester: pytest.Pytester) -> None:
142126
from xdist.plugin import pytest_cmdline_main as check_options
143127
from xdist.plugin import pytest_configure as configure

0 commit comments

Comments
 (0)