Skip to content

Commit

Permalink
Merge pull request #1059 from bluetech/execnet-min
Browse files Browse the repository at this point in the history
Bump min execnet to 2.1.0
  • Loading branch information
bluetech committed Apr 6, 2024
2 parents dd067e4 + e9084f2 commit 3e92604
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Expand Up @@ -30,4 +30,5 @@ repos:
args: []
additional_dependencies:
- pytest>=7.0.0
- execnet>=2.1.0
- py>=1.10.0
2 changes: 2 additions & 0 deletions changelog/1057.removal
@@ -1 +1,3 @@
pytest>=7.0.0 is now required.

execnet>=2.1.0 is now required.
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -33,7 +33,7 @@ classifiers = [
]
requires-python = ">=3.8"
dependencies = [
"execnet>=1.1",
"execnet>=2.1",
"pytest>=7.0.0",
]
dynamic = ["version"]
Expand Down
6 changes: 3 additions & 3 deletions src/xdist/workermanage.py
Expand Up @@ -139,7 +139,7 @@ def rsync(self, gateway, source, notify=None, verbose=False, ignores=None):
# XXX This changes the calling behaviour of
# pytest_xdist_rsyncstart and pytest_xdist_rsyncfinish to
# be called once per rsync target.
rsync = HostRSync(source, verbose=verbose, ignores=ignores)
rsync = HostRSync(source, verbose=verbose > 0, ignores=ignores)
spec = gateway.spec
if spec.popen and not spec.chdir:
# XXX This assumes that sources are python-packages
Expand Down Expand Up @@ -175,12 +175,12 @@ def __init__(
sourcedir: PathLike,
*,
ignores: Optional[Sequence[PathLike]] = None,
**kwargs: object,
verbose: bool = True,
) -> None:
if ignores is None:
ignores = []
self._ignores = [re.compile(fnmatch.translate(os.fspath(x))) for x in ignores]
super().__init__(sourcedir=Path(sourcedir), **kwargs)
super().__init__(sourcedir=Path(sourcedir), verbose=verbose)

def filter(self, path: PathLike) -> bool:
path = Path(path)
Expand Down
4 changes: 2 additions & 2 deletions testing/test_workermanage.py
Expand Up @@ -102,14 +102,14 @@ def __init__(self, *args):
def waitclose(self):
pass

gw.remote_exec = pseudoexec
gw.remote_exec = pseudoexec # type: ignore[assignment]
notifications = []
for gw in hm.group:
hm.rsync(gw, source, notify=lambda *args: notifications.append(args))
assert not notifications
hm.teardown_nodes()
assert not len(hm.group)
assert "sys.path.insert" in gw.remote_exec.args[0]
assert "sys.path.insert" in gw.remote_exec.args[0] # type: ignore[attr-defined]

def test_rsync_popen_with_path(
self, config, source: Path, dest: Path, workercontroller
Expand Down

0 comments on commit 3e92604

Please sign in to comment.