From d794b27e72d4f44ea7bbd72b60b360ba2ecc9259 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 30 Oct 2021 21:27:26 +0300 Subject: [PATCH] Use config._tmp_path_factory instead of config._tmpdirhandler Both are private, and shouldn't be used, but not sure how to fix it currently. But `_tmpdirhandler` will be relegated to the legacypath plugin so should extra not be used. --- src/xdist/workermanage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xdist/workermanage.py b/src/xdist/workermanage.py index 7f0bce2..4b576f9 100644 --- a/src/xdist/workermanage.py +++ b/src/xdist/workermanage.py @@ -254,9 +254,9 @@ class WorkerController: args = make_reltoroot(self.nodemanager.roots, args) if spec.popen: name = "popen-%s" % self.gateway.id - if hasattr(self.config, "_tmpdirhandler"): - basetemp = self.config._tmpdirhandler.getbasetemp() - option_dict["basetemp"] = str(basetemp.join(name)) + if hasattr(self.config, "_tmp_path_factory"): + basetemp = self.config._tmp_path_factory.getbasetemp() + option_dict["basetemp"] = str(basetemp / name) self.config.hook.pytest_configure_node(node=self) remote_module = self.config.hook.pytest_xdist_getremotemodule()