From 464136121cbdf15b72f8978cb43a1dddc3326c92 Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Mon, 28 Aug 2023 22:39:56 -0400 Subject: [PATCH] python310Packages.debugpy: disable process test timeouts --- .../python-modules/debugpy/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index eff66b360715..2a937c9f41a2 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -5,6 +5,7 @@ , pythonAtLeast , fetchFromGitHub , substituteAll +, fetchpatch , gdb , django , flask @@ -49,6 +50,13 @@ buildPythonPackage rec { # To avoid this issue, debugpy should be installed using python.withPackages: # python.withPackages (ps: with ps; [ debugpy ]) ./fix-test-pythonpath.patch + + # Support disabling process timeouts when set to 0 + # See https://github.com/microsoft/debugpy/pull/1286 + (fetchpatch { + url = "https://github.com/microsoft/debugpy/commit/1569cc8319350afcc5ba8630660f599d514ac3bb.patch"; + hash = "sha256-v4GKLb2M20F1egAGtix9cTkSzBnvSgSSphSQST5p63w="; + }) ] ++ lib.optionals stdenv.isLinux [ # Hard code GDB path (used to attach to process) (substituteAll { @@ -91,11 +99,8 @@ buildPythonPackage rec { ]; preCheck = '' - # Scale default timeouts by a factor of 4 to avoid flaky builds - # https://github.com/microsoft/debugpy/pull/1286 if merged would - # allow us to disable the timeouts altogether - export DEBUGPY_PROCESS_SPAWN_TIMEOUT=60 - export DEBUGPY_PROCESS_EXIT_TIMEOUT=20 + export DEBUGPY_PROCESS_SPAWN_TIMEOUT=0 + export DEBUGPY_PROCESS_EXIT_TIMEOUT=0 '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' # https://github.com/python/cpython/issues/74570#issuecomment-1093748531 export no_proxy='*';