Skip to content

Commit e9084f2

Browse files
committed
Bump min execnet to 2.1.0
This version adds typing which we want to utilize.
1 parent dd067e4 commit e9084f2

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ repos:
3030
args: []
3131
additional_dependencies:
3232
- pytest>=7.0.0
33+
- execnet>=2.1.0
3334
- py>=1.10.0

changelog/1057.removal

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
pytest>=7.0.0 is now required.
2+
3+
execnet>=2.1.0 is now required.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ classifiers = [
3333
]
3434
requires-python = ">=3.8"
3535
dependencies = [
36-
"execnet>=1.1",
36+
"execnet>=2.1",
3737
"pytest>=7.0.0",
3838
]
3939
dynamic = ["version"]

src/xdist/workermanage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def rsync(self, gateway, source, notify=None, verbose=False, ignores=None):
139139
# XXX This changes the calling behaviour of
140140
# pytest_xdist_rsyncstart and pytest_xdist_rsyncfinish to
141141
# be called once per rsync target.
142-
rsync = HostRSync(source, verbose=verbose, ignores=ignores)
142+
rsync = HostRSync(source, verbose=verbose > 0, ignores=ignores)
143143
spec = gateway.spec
144144
if spec.popen and not spec.chdir:
145145
# XXX This assumes that sources are python-packages
@@ -175,12 +175,12 @@ def __init__(
175175
sourcedir: PathLike,
176176
*,
177177
ignores: Optional[Sequence[PathLike]] = None,
178-
**kwargs: object,
178+
verbose: bool = True,
179179
) -> None:
180180
if ignores is None:
181181
ignores = []
182182
self._ignores = [re.compile(fnmatch.translate(os.fspath(x))) for x in ignores]
183-
super().__init__(sourcedir=Path(sourcedir), **kwargs)
183+
super().__init__(sourcedir=Path(sourcedir), verbose=verbose)
184184

185185
def filter(self, path: PathLike) -> bool:
186186
path = Path(path)

testing/test_workermanage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ def __init__(self, *args):
102102
def waitclose(self):
103103
pass
104104

105-
gw.remote_exec = pseudoexec
105+
gw.remote_exec = pseudoexec # type: ignore[assignment]
106106
notifications = []
107107
for gw in hm.group:
108108
hm.rsync(gw, source, notify=lambda *args: notifications.append(args))
109109
assert not notifications
110110
hm.teardown_nodes()
111111
assert not len(hm.group)
112-
assert "sys.path.insert" in gw.remote_exec.args[0]
112+
assert "sys.path.insert" in gw.remote_exec.args[0] # type: ignore[attr-defined]
113113

114114
def test_rsync_popen_with_path(
115115
self, config, source: Path, dest: Path, workercontroller

0 commit comments

Comments
 (0)