Skip to content

Commit

Permalink
Remove --boxed and pytest-forked dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Oct 22, 2022
1 parent 1471164 commit 1fbf499
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 44 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pytest-xdist 2.5.0 (2021-12-10)
Deprecations and Removals
-------------------------

- `#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.
- `#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.


Features
Expand Down
1 change: 1 addition & 0 deletions changelog/468.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +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.
1 change: 1 addition & 0 deletions changelog/468.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ``py`` dependency has been dropped.
9 changes: 0 additions & 9 deletions docs/boxed.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Features

distribution
subprocess
boxed
remote
crash
how-to
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ python_requires = >=3.6
install_requires =
execnet>=1.1
pytest>=6.2.0
pytest-forked
setup_requires = # left empty, enforce using isolated build system

[options.packages.find]
Expand Down
13 changes: 0 additions & 13 deletions src/xdist/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ def pytest_addoption(parser):
metavar="GLOB",
help="add expression for ignores when rsyncing to remote tx nodes.",
)
group.addoption(
"--boxed",
action="store_true",
help="backward compatibility alias for pytest-forked --forked",
)
group.addoption(
"--testrunuid",
action="store",
Expand Down Expand Up @@ -195,14 +190,6 @@ def pytest_configure(config):
tr = config.pluginmanager.getplugin("terminalreporter")
if tr:
tr.showfspath = False
if config.getoption("boxed"):
warning = DeprecationWarning(
"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."
)
config.issue_config_time_warning(warning, 2)
config.option.forked = True

config_line = (
"xdist_group: specify group for tests should run in same session."
Expand Down
1 change: 0 additions & 1 deletion src/xdist/workermanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from pathlib import Path
from typing import List, Union, Sequence, Optional, Any, Tuple, Set

import py
import pytest
import execnet

Expand Down
3 changes: 1 addition & 2 deletions testing/acceptance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,10 @@ def test_1(request):
def test_crashing_item(pytester, when) -> None:
"""Ensure crashing item is correctly reported during all testing stages"""
code = dict(setup="", call="", teardown="")
code[when] = "py.process.kill(os.getpid())"
code[when] = "os._exit(1)"
p = pytester.makepyfile(
"""
import os
import py
import pytest
@pytest.fixture
Expand Down
16 changes: 0 additions & 16 deletions testing/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,6 @@ def pytest_xdist_auto_num_workers():
assert config.getoption("numprocesses") == 42


def test_boxed_with_collect_only(pytester: pytest.Pytester) -> None:
from xdist.plugin import pytest_cmdline_main as check_options

config = pytester.parseconfigure("-n1", "--boxed")
check_options(config)
assert config.option.forked

config = pytester.parseconfigure("-n1", "--collect-only")
check_options(config)
assert not config.option.forked

config = pytester.parseconfigure("-n1", "--boxed", "--collect-only")
check_options(config)
assert config.option.forked


def test_dsession_with_collect_only(pytester: pytest.Pytester) -> None:
from xdist.plugin import pytest_cmdline_main as check_options
from xdist.plugin import pytest_configure as configure
Expand Down

0 comments on commit 1fbf499

Please sign in to comment.